diff --git a/CHANGELOG.md b/CHANGELOG.md index 55160420e..3a384a529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,56 @@ All notable changes to this project will be documented in this file. ## Unreleased +## [0.15.0] - 2019-04-14 + +### Added + +- Keybinding to toggle UI (ctrl+u). +- Keybinding to copy selection to clipboard (ctrl+c). +- Keybinding to paste clipboard to board (ctrl+v). +- Labeling system. + - You can add labels to shapes. + - You can filter the gameboard on these labels. + +### Changed + +- Asset preview now disappears when starting a drag asset action. +- A mouse down in general will now trigger layer or tool selection. + - In the past a 'click' was required, now any 'mousedown' will trigger. +- Zoom scale has been modified. +- Select tool can now also select shapes not owned by the player. + - The selection info box is shown with all info visible for the user. + - The tokens cannot be dragged or resized. + - Groupselect will only select your own tokens. +- Some minor style changes to the edit asset dialog +- Shape names can now be hidden from other users. +- Default vision mode changed to triangle mode. Legacy vision mode (bvh) can still be selected in the DM options. + +### Fixed + +- Bug causing rulers to stick on DM screen. +- Bug causing rulers to not appear on other screens. +- Drag and drop asset on firefox redirecting to random urls. +- Some eventlisteners not being removed properly. + - This caused zoom behaviour to mess up when leaving and joining a room multiple times. +- Bug causing players not being able to add or update initiative effects. +- Bug causing shown initiative effect to be one lower than it actually is on location load. +- Move layer to/from DM layer having broken results for players untill a refresh of the page. +- Bug causing some windows (e.g. initiatives) to no longer appear. +- Vision bugs at different zoom levels caused by the world boundary being too large. + - Reduced boundary location from 1e10 to 1e8. +- Bug causing the vision recalculation not happening in a lot of cases. + +### Removed + +- Some old css files. + ### [0.14.2] - 2019-01-29 ### Fixed - Registered users had to logout and login again before being able to perform actions. +- [tech] Javascript files being wrongly served as plaintext in some obscure cases. ## [0.14.1] - 2019-01-28 diff --git a/Dockerfile b/Dockerfile index 1057e4451..9796cbb88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.6-slim -MAINTAINER Schemen +MAINTAINER Kruptein EXPOSE 8000 diff --git a/client/package-lock.json b/client/package-lock.json index 2d6615784..fefb8b912 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,6 +1,6 @@ { "name": "planarally-client", - "version": "0.14.2", + "version": "0.15.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/client/package.json b/client/package.json index b4f3f0d1c..8cab71e75 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "planarally-client", - "version": "0.14.2", + "version": "0.15.0", "description": "A companion tool for when you travel into the planes.", "scripts": { "serve": "vue-cli-service serve", diff --git a/client/src/core/components/accordion.vue b/client/src/core/components/accordion.vue new file mode 100644 index 000000000..4513ee6ec --- /dev/null +++ b/client/src/core/components/accordion.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/client/src/core/components/colorpicker.vue b/client/src/core/components/colorpicker.vue index 3625390c3..1b0d4b523 100644 --- a/client/src/core/components/colorpicker.vue +++ b/client/src/core/components/colorpicker.vue @@ -4,22 +4,22 @@ // This due to the canvas elements requiring rgba strings for their colours and thus avoiding extra conversion steps + + \ No newline at end of file diff --git a/client/src/game/ui/menu/asset_node.vue b/client/src/game/ui/menu/asset_node.vue index c97360318..bd56fea81 100644 --- a/client/src/game/ui/menu/asset_node.vue +++ b/client/src/game/ui/menu/asset_node.vue @@ -1,24 +1,24 @@ @@ -60,6 +60,7 @@ export default class AssetNode extends Vue { } dragStart(event: DragEvent, imageSource: string) { + this.showImage = null; if (event === null || event.dataTransfer === null) return; const img = (event.target).querySelector(".preview")!; event.dataTransfer.setDragImage(img, 0, 0); diff --git a/client/src/game/ui/selection/edit_dialog.vue b/client/src/game/ui/selection/edit_dialog.vue index efba5caa8..0495c550f 100644 --- a/client/src/game/ui/selection/edit_dialog.vue +++ b/client/src/game/ui/selection/edit_dialog.vue @@ -14,168 +14,232 @@ @@ -207,15 +271,26 @@ export default class EditDialog extends Vue { visible = false; + get owned(): boolean { + return this.shape.ownedBy(); + } + mounted() { EventBus.$on("EditDialog.Open", (shape: Shape) => { this.shape = shape; this.visible = true; }); + EventBus.$on("EditDialog.AddLabel", (label: string) => { + if (this.visible) { + this.shape.labels.push(gameStore.labels[label]); + this.updateShape(true); + } + }); } beforeDestroy() { - EventBus.$off(); + EventBus.$off("EditDialog.Open"); + EventBus.$off("EditDialog.AddLabel"); } updated() { @@ -246,23 +321,28 @@ export default class EditDialog extends Vue { }); } updateShape(redraw: boolean, temporary = false) { + if (!this.owned) return; socket.emit("Shape.Update", { shape: this.shape.asDict(), redraw, temporary }); if (redraw) layerManager.invalidate(); this.addEmpty(); } setToken(event: { target: HTMLInputElement }) { + if (!this.owned) return; this.shape.setIsToken(event.target.checked); this.updateShape(true); } setVisionBlocker(event: { target: HTMLInputElement }) { + if (!this.owned) return; this.shape.checkVisionSources(); this.updateShape(true); } setMovementBlocker(event: { target: HTMLInputElement }) { + if (!this.owned) return; this.shape.setMovementBlock(event.target.checked); this.updateShape(false); } updateAnnotation(event: { target: HTMLInputElement }) { + if (!this.owned) return; const hadAnnotation = this.shape.annotation !== ""; this.shape.annotation = event.target.value; if (this.shape.annotation !== "" && !hadAnnotation) { @@ -275,36 +355,48 @@ export default class EditDialog extends Vue { this.updateShape(false); } updateOwner(event: { target: HTMLInputElement }, oldValue: string) { + if (!this.owned) return; this.shape.updateOwner(oldValue, event.target.value); this.updateShape(gameStore.fowLOS); } removeOwner(value: string) { + if (!this.owned) return; this.shape.removeOwner(value); this.updateShape(gameStore.fowLOS); } removeTracker(uuid: string) { + if (!this.owned) return; this.shape.trackers = this.shape.trackers.filter(tr => tr.uuid !== uuid); this.updateShape(false); } removeAura(uuid: string) { + if (!this.owned) return; this.shape.auras = this.shape.auras.filter(au => au.uuid !== uuid); this.shape.checkVisionSources(); this.updateShape(true); } updateAuraVisionSource(aura: Aura) { + if (!this.owned) return; aura.visionSource = !aura.visionSource; const i = gameStore.visionSources.findIndex(ls => ls.aura === aura.uuid); if (aura.visionSource && i === -1) gameStore.visionSources.push({ shape: this.shape.uuid, aura: aura.uuid }); else if (!aura.visionSource && i >= 0) gameStore.visionSources.splice(i, 1); - // aura.lastPath = undefined; - layerManager.invalidateLight(); this.updateShape(true); } updateAuraColour(aura: Aura, colour: string) { + if (!this.owned) return; const layer = layerManager.getLayer(this.shape.layer); if (layer === undefined) return; layer.invalidate(!aura.visionSource); } + openLabelManager() { + EventBus.$emit("LabelManager.Open"); + } + removeLabel(uuid: string) { + if(!this.owned) return; + this.shape.labels = this.shape.labels.filter(l => l.uuid !== uuid); + this.updateShape(true); + } } @@ -325,6 +417,10 @@ export default class EditDialog extends Vue { .modal-body { padding: 10px; + max-width: 450px; +} + +.grid { display: grid; grid-template-columns: [name] 1fr [numerator] 30px [slash] 5px [denominator] 30px [colour] 40px [visible] 30px [light] 30px [remove] 30px [end]; grid-column-gap: 5px; @@ -353,4 +449,70 @@ export default class EditDialog extends Vue { .spanrow { grid-column: 1 / end; } + +#labels { + flex-wrap: wrap; +} + +.label { + display: inline-flex; + position: relative; + flex-direction: row; + align-items: center; + background-color: white; + font-size: 13px; + margin: 5px; +} + +.label:hover > .label-main::before { + content: "\00D7"; + position: absolute; + color: red; + font-size: 20px; + font-weight: bold; + cursor: pointer; + top: -8px; + right: -4px; + pointer-events: auto; +} + +#label-add:hover > .label-main { + pointer-events: auto; + cursor: pointer; + color: white; + font-weight: bold; + background-color: #ff7052; +} + +#label-add:hover > .label-main::before { + content: ""; +} + +.label-user { + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; + background-color: #ff7052; + border: solid 1px #ff7052; + padding: 5px; +} + +.label-main { + border: solid 1px #ff7052; + border-radius: 10px; + padding: 5px; + pointer-events: none; +} + +.label-user + .label-main { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +input[type="checkbox"] { + width: 16px; + height: 23px; + margin: 0 8px 0 8px; + white-space: nowrap; + display: inline-block; +} \ No newline at end of file diff --git a/client/src/game/ui/selection/selection_info.vue b/client/src/game/ui/selection/selection_info.vue index acf3cda62..2a8b60415 100644 --- a/client/src/game/ui/selection/selection_info.vue +++ b/client/src/game/ui/selection/selection_info.vue @@ -67,7 +67,7 @@ export default class SelectionInfo extends Vue { } beforeDestroy() { - EventBus.$off(); + EventBus.$off("SelectionInfo.Shape.Set"); } openEditDialog() { diff --git a/client/src/game/ui/tools/filter.vue b/client/src/game/ui/tools/filter.vue new file mode 100644 index 000000000..49d4923a0 --- /dev/null +++ b/client/src/game/ui/tools/filter.vue @@ -0,0 +1,121 @@ + + + + + + + + \ No newline at end of file diff --git a/client/src/game/ui/tools/select.vue b/client/src/game/ui/tools/select.vue index 185c7b0db..3b16d7816 100644 --- a/client/src/game/ui/tools/select.vue +++ b/client/src/game/ui/tools/select.vue @@ -72,8 +72,6 @@ export default class SelectTool extends Tool { for (let i = selectionStack.length - 1; i >= 0; i--) { const shape = selectionStack[i]; - if (!shape.ownedBy()) continue; - this.resizePoint = shape.getPointIndex(globalMouse, l2gz(3)); // Resize case, a corner is selected @@ -148,6 +146,7 @@ export default class SelectTool extends Tool { // If we are on the tokens layer do a movement block check. if (layer.name === "tokens" && !(event.shiftKey && gameStore.IS_DM)) { for (const sel of layer.selection) { + if (!sel.ownedBy()) continue; if (sel.uuid === this.selectionHelper.uuid) continue; // the selection helper should not be treated as a real shape. delta = calculateDelta(delta, sel); if (delta !== ogDelta) this.deltaChanged = true; @@ -155,6 +154,7 @@ export default class SelectTool extends Tool { } // Actually apply the delta on all shapes for (const sel of layer.selection) { + if (!sel.ownedBy()) continue; sel.refPoint = sel.refPoint.add(delta); if (sel !== this.selectionHelper) { if (sel.visionObstruction) gameStore.recalculateVision(true); @@ -164,6 +164,7 @@ export default class SelectTool extends Tool { layer.invalidate(false); } else if (this.mode === SelectOperations.Resize) { for (const sel of layer.selection) { + if (!sel.ownedBy()) continue; sel.resize(this.resizePoint, mouse); if (sel !== this.selectionHelper) { if (sel.visionObstruction) gameStore.recalculateVision(true); @@ -190,6 +191,7 @@ export default class SelectTool extends Tool { if (this.mode === SelectOperations.GroupSelect) { layer.clearSelection(); layer.shapes.forEach(shape => { + if (!shape.ownedBy()) return; if (shape === this.selectionHelper) return; const bbox = shape.getBoundingBox(); if (!shape.ownedBy()) return; @@ -210,6 +212,7 @@ export default class SelectTool extends Tool { layer.invalidate(true); } else if (layer.selection.length) { layer.selection.forEach(sel => { + if (!sel.ownedBy()) return; if (this.mode === SelectOperations.Drag) { if ( this.dragRay.origin!.x === g2lx(sel.refPoint.x) && diff --git a/client/src/game/ui/tools/tools.vue b/client/src/game/ui/tools/tools.vue index b7135d85c..013e31180 100644 --- a/client/src/game/ui/tools/tools.vue +++ b/client/src/game/ui/tools/tools.vue @@ -1,33 +1,33 @@ @@ -37,6 +37,7 @@ import Vue from "vue"; import ShapeContext from "@/game/ui/selection/shapecontext.vue"; import CreateTokenModal from "@/game/ui/tools/createtoken_modal.vue"; import DrawTool from "@/game/ui/tools/draw.vue"; +import FilterTool from "@/game/ui/tools/filter.vue"; import MapTool from "@/game/ui/tools/map.vue"; import PanTool from "@/game/ui/tools/pan"; import SelectTool from "@/game/ui/tools/select.vue"; @@ -56,6 +57,7 @@ import Component from "vue-class-component"; "draw-tool": DrawTool, "ruler-tool": RulerTool, "map-tool": MapTool, + "filter-tool": FilterTool, "shape-menu": ShapeContext, "createtoken-dialog": CreateTokenModal, }, @@ -71,7 +73,7 @@ export default class Tools extends Vue { }; currentTool = "Select"; - tools = ["Select", "Pan", "Draw", "Ruler", "Map"]; + tools = ["Select", "Pan", "Draw", "Ruler", "Map", "Filter"]; dmTools = ["Map"]; get IS_DM(): boolean { @@ -82,6 +84,10 @@ export default class Tools extends Vue { return `${this.currentTool.toLowerCase()}-tool`; } + get visibleTools(): string[] { + return this.tools.filter(t => (!this.dmTools.includes(t) || this.IS_DM)); + } + mousedown(event: MouseEvent) { if ((event.target).tagName !== "CANVAS") return; @@ -156,6 +162,11 @@ export default class Tools extends Vue { z-index: 10; } +#toolselect * { + user-select: none !important; + -webkit-user-drag: none !important; +} + #toolselect > ul { display: flex; list-style: none; @@ -185,10 +196,6 @@ export default class Tools extends Vue { } #toolselect > ul > li a { - -webkit-user-select: none; /* Chrome all / Safari all */ - -moz-user-select: none; /* Firefox all */ - -ms-user-select: none; /* IE 10+ */ - user-select: none; display: flex; padding: 10px; text-decoration: none; diff --git a/client/src/game/utils.ts b/client/src/game/utils.ts index 23dd88110..2e4fbc0cf 100644 --- a/client/src/game/utils.ts +++ b/client/src/game/utils.ts @@ -13,3 +13,13 @@ export function getFogColour(opposite: boolean = false): string { else tc.setAlpha(1); return tc.toRgbString(); } + +export function zoomValue(display: number) { + // Powercurve 0.2/3/10 + // Based on https://stackoverflow.com/a/17102320 + return 1 / (-5 / 3 + (28 / 15) * Math.exp(1.83 * display)); +} + +export function zoomDisplay(value: number) { + return Math.log((1 / value + 5 / 3) * (15 / 28)) / 1.83; +} diff --git a/client/src/game/visibility/te/pa.ts b/client/src/game/visibility/te/pa.ts index 81590b7fa..feb3de886 100644 --- a/client/src/game/visibility/te/pa.ts +++ b/client/src/game/visibility/te/pa.ts @@ -23,25 +23,25 @@ export function triangulate(target: "vision" | "movement", partial: boolean = fa } } // LEFT WALL - cdt.insertConstraint([-1e10, -1e10], [-1e10, 1e10]); - cdt.insertConstraint([-1e10, 1e10], [-1e11, 1e10]); - cdt.insertConstraint([-1e11, 1e10], [-1e11, -1e10]); - cdt.insertConstraint([-1e11, -1e10], [-1e10, -1e10]); + cdt.insertConstraint([-1e8, -1e8], [-1e8, 1e8]); + cdt.insertConstraint([-1e8, 1e8], [-1e11, 1e8]); + cdt.insertConstraint([-1e11, 1e8], [-1e11, -1e8]); + cdt.insertConstraint([-1e11, -1e8], [-1e8, -1e8]); // TOP WALL - cdt.insertConstraint([-1e10, -1e10], [1e10, -1e10]); - cdt.insertConstraint([1e10, -1e10], [1e10, -1e11]); - cdt.insertConstraint([1e10, -1e11], [-1e10, -1e11]); - cdt.insertConstraint([-1e10, -1e11], [-1e10, -1e10]); + cdt.insertConstraint([-1e8, -1e8], [1e8, -1e8]); + cdt.insertConstraint([1e8, -1e8], [1e8, -1e11]); + cdt.insertConstraint([1e8, -1e11], [-1e8, -1e11]); + cdt.insertConstraint([-1e8, -1e11], [-1e8, -1e8]); // RIGHT WALL - cdt.insertConstraint([1e10, -1e10], [1e10, 1e10]); - cdt.insertConstraint([1e10, 1e10], [1e11, 1e10]); - cdt.insertConstraint([1e11, 1e10], [1e11, -1e10]); - cdt.insertConstraint([1e11, -1e10], [1e10, -1e10]); + cdt.insertConstraint([1e8, -1e8], [1e8, 1e8]); + cdt.insertConstraint([1e8, 1e8], [1e11, 1e8]); + cdt.insertConstraint([1e11, 1e8], [1e11, -1e8]); + cdt.insertConstraint([1e11, -1e8], [1e8, -1e8]); // BOT WALL - cdt.insertConstraint([-1e10, 1e10], [1e10, 1e10]); - cdt.insertConstraint([1e10, 1e10], [1e10, 1e11]); - cdt.insertConstraint([1e10, 1e11], [-1e10, 1e11]); - cdt.insertConstraint([-1e10, 1e11], [-1e10, 1e10]); + cdt.insertConstraint([-1e8, 1e8], [1e8, 1e8]); + cdt.insertConstraint([1e8, 1e8], [1e8, 1e11]); + cdt.insertConstraint([1e8, 1e11], [-1e8, 1e11]); + cdt.insertConstraint([-1e8, 1e11], [-1e8, 1e8]); PA_CDT[target] = cdt; (window).CDT = PA_CDT; } diff --git a/docs/getting_started.rst b/docs/getting_started.rst index ddef99dd7..9904e5850 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -5,79 +5,29 @@ Getting Started This document will show you how to get started using Planar Ally. -If you are a player you can jump straight to :ref:`login`, -if you're a DM you'll first need to choose hosting and potentially install some things. +If you are a player you can immediately continue to :ref:`login`, +if you're a DM, +you'll first need to decide where/how you want to run PlanarAlly. +See :ref:`installation ` for more info . -Installation ---------------- - -*DM Only* - -As the DM you'll have to decide where you want to host your game. -You can either use some service that hosts Planar Ally for you, -or you can host PA yourself, which requires a bit more setup. - -Self-hosting -~~~~~~~~~~~~~ - -When hosting PA yourself, you'll need to download the server files and -install some dependencies. - -For Windows a precompiled binary is also available. - -Manual Installation -^^^^^^^^^^^^^^^^^^^^^ - -The core of the project is built around the following three tools. - -* python 3.6+ -* aiohttp -* python-socketio - -Additionally the following libraries are also necessary: - -* aiohttp_jinja2 -* aiohttp_security -* aiohttp_session -* bcrypt -* cryptography - -All of the dependencies are listed in requirements.txt so after cloning/downloading this repo, -a simple `pip install -r requirements.txt` should do the trick. - -To run the server you simply have to run `python planarserver.py`. - -Server configuration can be done in the `server_config.cfg` file. - -Precompiled binary -^^^^^^^^^^^^^^^^^^^^ - -These are typically only provided for major releases and can be found [here](https://github.com/Kruptein/PlanarAlly/releases). - -These files are zipped and should be extracted to some directory from which you wish to run PA. - -To run the server either double click the `PlanarAllyServer.exe` file or run it from a command prompt. - -Server configuration can be done in the `server_config.cfg` file. .. _login: Login ------- -When the DM has chosen the hosting, he/she has to give the players the hosting URL. +When the DM has chosen the hosting, +he/she has to give the players the hosting URL. When you visit this URL you should be greeted with a login/registration form like shown below. .. image:: images/login.png -If you already have an account, you simply fill in your username and password and press enter -or the right pointing arrow. If you are a new user, choose your desired username and password +If you already have an account, +you simply fill in your username and password and press enter +or the right pointing arrow. +If you are a new user, choose your desired username and password and click on the + button. -.. note:: - If you use Planar Ally for multiple campaigns it's possible that they are played - on multiple providers and you'll need to create an account on each specific provider. - Session hub ------------- @@ -102,16 +52,18 @@ Creating a session is simply done by choosing a name for your session and pressi This will automatically open the new session, showing you a blank screen. -To get your players to join this session, you'll have to give them the invitation code. +To get your players to join this session, +you'll have to give them the invitation code. We'll talk about this later, but if you're impatient you can find the code in your DM settings menu ;). Joining a new session -~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~ To join a specific session, you need the invite link. Your DM should provide this to you. -When visiting this link, you'll automatically join the session and in a future visit +When visiting this link, +you'll automatically join the session and in a future visit to the session hub it should be listed as well. The game @@ -119,30 +71,37 @@ The game When we finally are in the right session, the magic can begin! -We'll start of with a short introduction of what happens when you open your first session, +We'll start with a short introduction of what happens +when you open your first session, followed by information on the various controls, tools and settings that you can configure. First impressions ~~~~~~~~~~~~~~~~~~ -Upon loading the session, you'll be greeted with whatever your DM has prepared for you. +Upon loading the session, +you'll be greeted with whatever your DM has prepared for you. Let's take a look at an example where the DM has added a base map, added a token and some light/shadows. .. image:: images/player-base.png -Most important UI elements are immediately visible. We have a button in the topleft that opens a settings menu when pressed, +Most important UI elements are immediately visible. +We have a button in the topleft that opens a settings menu when pressed, in the topright there is a slider that controls your zoom level and in the lower right there is a selection of tools that you can use. The DM has an additional UI element in the lower left corner, which can be used to change layers. We'll give a brief overview of these UI elements soon, there is however another UI element that is currently not visible! -When you select a token that you own, a red border will be drawn around the token to visually give a reminder of what you have selected and on top of that +When you select a token that you own, +a red border will be drawn around the token +to visually give a reminder of what you have selected and on top of that a box appears at the right side of the screen, with the name of the selected token as well as any tracker or aura active on the token (more on that later). .. image:: images/player-selection.png -This is a quick info panel for your token. A more advanced view is possible by pressing on the edit button in this panel (in the topright). +This is a quick info panel for your token. +A more advanced view is possible +by pressing on the edit button in this panel (in the topright). This panel provides all the options to configure how your token(s) interact with the map. .. image:: images/player-selection-detail.png @@ -155,7 +114,8 @@ This panel provides all the options to configure how your token(s) interact with Controls ~~~~~~~~~ -One of the things you'll be doing most is almost certainly going to be moving around. +One of the things you'll be doing most +is almost certainly going to be moving around. Getting to know the controls is thus an important element. Most input is mouse based, but we'll first see some handy keyboard movement options. @@ -163,7 +123,8 @@ Most input is mouse based, but we'll first see some handy keyboard movement opti Keyboard ^^^^^^^^^ -If nothing is selected, using the arrow keys will result in moving the map in the desired direction. +If nothing is selected, +using the arrow keys will result in moving the map in the desired direction. When you've selected a token however, the token itself will move. .. hint:: @@ -173,10 +134,11 @@ Pressing `Delete` will delete the current selected token. Pressing `d` will deselect your current selection. -mouse +Mouse ^^^^^^ -The left and right mouse button behaviour depends completely on the active tool, +The left and right mouse button behaviour +depends completely on the active tool, the middle mouse button however has the same functionality at all times. Scrolling will zoom in (or out) to the location where your mouse is currently pointing. @@ -194,7 +156,8 @@ Scrolling will zoom in (or out) to the location where your mouse is currently po Tools to find your path back to reality are in development, in the meanwhile you'll have to beg your DM to bring you back. -Pressing (and holding) the middle mouse button additionaly serves as a shortcut for the pan tool. +Pressing (and holding) the middle mouse button +additionaly serves as a shortcut for the pan tool. This is a tool that you'll often use and it would be a hassle to change tools every single time. .. hint:: @@ -210,8 +173,10 @@ There are two additional modifiers that can be used for both mouse and keyboard ALT """" -When the grid is enabled, most tool actions will by default attempt to "snap" to the grid. -This means that when moving or drawing tokens they will automatically be put in such a way that +When the grid is enabled, +most tool actions will by default attempt to "snap" to the grid. +This means that when moving or drawing tokens +they will automatically be put in such a way that they fit the grid. This behaviour can be ignored by pressing the ALT key while doing the action. @@ -235,10 +200,12 @@ As a player you'll have access to 4 tools and the DM has one additional tool ava Select ^^^^^^^^ -This tool will be your most used tool as it allows to select tokens allowing you to see more info about them +This tool will be your most used tool +as it allows to select tokens allowing you to see more info about them or moving them. -A selection box can be drawn at any point which will try to select all shapes inside the drawn region, +A selection box can be drawn at any point +which will try to select all shapes inside the drawn region, moving these will behave in a similar way as moving singular tokens. .. note:: @@ -261,7 +228,9 @@ Movement can be done by dragging with the left mouse button or by using the arro When in select modus, your right mouse button will show a context menu. -When you right click a selection, you'll have the option to move it to the front or back and add or show its initiative. +When you right click a selection, +you'll have the option to move it to the front or back and +add or show its initiative. When nothing is selected, you'll have the option to show the initiative tracker or create a new basic token. Pan @@ -269,7 +238,8 @@ Pan The pan tool simply allows you to pan around when you drag your left mouse button around. -This behaviour is also implemented in the middle mouse button when other tools are selected, +This behaviour is also implemented in the middle mouse button +when other tools are selected, to minimize constant tool changing. It's heavily encouraged to use the middle mouse pan, but the tool still exists for those cases when you don't have a middle mouse. @@ -282,16 +252,20 @@ The draw tool allows you to draw some simple shapes! You can choose between a rectangle, a circle, or a freehand brush. You also have the option to select two colours. -The left colour is used as the fill colour, the right one as the border colour. -If you wish to only have a fill or only have a border colour, simply set the opacity of the other to 0 +The left colour is used as the fill colour, +the right one as the border colour. +If you wish to only have a fill or only have a border colour, +simply set the opacity of the other to 0 *(this is the second slider in the color picker)*. Additionally as a DM you'll have the option to change the draw modus. **Normal mode** - The shape you're drawing will be added to the active layer with the selected colour. + The shape you're drawing will be added to the active layer + with the selected colour. **Reveal mode** - The shape will be drawn on the 'fow' layer and pierce through any fog in the area. + The shape will be drawn on the 'fow' layer and + pierce through any fog in the area. **Hide mode** This is the reverse operation of reveal, and will cover an area in fog. @@ -305,7 +279,8 @@ Additionally as a DM you'll have the option to change the draw modus. Ruler ^^^^^^ -The last tool currently available is the ruler, it allows for easy measurements. +The last tool currently available is the ruler, +it allows for easy measurements. simply press the left mouse button and drag it. While holding the button it will show you the distance in ft between your initial click and your current position. @@ -323,10 +298,12 @@ Map With the map tool you can automatically resize assets to fit to the grid. -With the desired asset selected, you insert in the map tool how many grid cells horizontally and vertically +With the desired asset selected, +you insert in the map tool how many grid cells horizontally and vertically the selection you're about to make with this tool, is supposed to represent. -This can be a bit hit and miss, but in general it is advised to zoom in as much as possible and +This can be a bit hit and miss, +but in general it is advised to zoom in as much as possible and selecting larger areas wil also typically give better performance. Asset configuration @@ -334,7 +311,8 @@ Asset configuration Let us now look further into the specific configuration of individual assets. Below you see the asset configuration dialog again from our mysterious X. -In the following paragraphs we'll go over each of these elements to see what they mean +In the following paragraphs we'll go over each of these elements +to see what they mean and how you should use them. .. image:: images/asset-detail.png @@ -347,22 +325,28 @@ some fundamental settings that decide how the asset acts. .. image:: images/asset-detail-state.png -The name of an asset has no specific functionality, but is a nice way to differentiate +The name of an asset has no specific functionality, +but is a nice way to differentiate between multiple assets. The next three toggles however have an important effect on the behaviour of the asset. -**Is a token**: This is a setting that is very important for the lighting system, +**Is a token**: +This is a setting that is very important for the lighting system, but only if the optional token based vision modus is selected by your DM. -In general it is advised to select this option if the asset represents a player character or +In general it is advised to select this option +if the asset represents a player character or player controlled npc that can move and has vision. -**Blocks vision/light**: When this option is selected, vision and light cannot pass through -the asset. This is generally used for walls or other static objects, but there is nothing +**Blocks vision/light**: +When this option is selected, vision and light cannot pass through +the asset. This is generally used for walls or other static objects, +but there is nothing preventing some wacky scenario where your character has turned to stone or something. -**Blocks movement**: When this options is selected, other assets cannot move through this +**Blocks movement**: +When this options is selected, other assets cannot move through this asset's space. This is intended for walls but hey, you never know. .. note:: @@ -396,11 +380,14 @@ A good example is shown in the above image, where the HP of our mysterious X is The eye symbol is used to allow people without ownership to see the tracker. -These values are also provided in the smaller selection info box on the right side of the screen +These values are also provided in the smaller selection info box +on the right side of the screen as mentioned earlier, quickly see them without having to open this configuration dialog. -When you left click on the tracker value in this quick info box, a popup allows you to immediately -change the value of these trackers. You can fill in a new absolute value or a relative value +When you left click on the tracker value in this quick info box, +a popup allows you to immediately +change the value of these trackers. +You can fill in a new absolute value or a relative value (e.g. -5 to decrease the tracker by 5). Auras @@ -415,14 +402,17 @@ The first input box is the bright radius that the aura has. The second input box is the dim radius. The difference is that the dim radius has a gradient dropoff towards half the opacity of the bright circle. -The third box is a simple colour selector and the eye has the same functionality as that for trackers, +The third box is a simple colour selector and +the eye has the same functionality as that for trackers, whether or not other users that do not own this asset, can see the aura. -The next icon is an important one and decides whether the aura is a normal aura or a light aura. +The next icon is an important one and +decides whether the aura is a normal aura or a light aura. A normal aura will always fill a circle with the asset at the center. An example of a normal aura is the aura of protection that the Paladin class provides. -A light emitting aura, is an aura to indicate light sources like lanterns or to show darkvision ranges. +A light emitting aura, is an aura to indicate light sources +like lanterns or to show darkvision ranges. These auras stop at walls and other objects that block vision. Annotation @@ -451,7 +441,8 @@ Client Options .. image:: images/settings-client.png The client options offers two options related to styling the board. -Both the colour of the grid (including the opacity) as well as the colour of the shadows +Both the colour of the grid (including the opacity) +as well as the colour of the shadows can be chosen by each player individually. Notes @@ -475,7 +466,8 @@ Assets The assets menu lists all assets that you own. When hovering over a file in this menu, a preview is shown as can be seen above. -When dragging files from here on to the game board, a new asset is created on the currently +When dragging files from here on to the game board, +a new asset is created on the currently selected layer with that image. To add/remove/move files/folders you can use the dedicated asset manager, @@ -498,20 +490,26 @@ The DM options define some core elements of how the board behaves. The `Use Grid` option simply toggles the grid on/off. The `Fill entire canvas with FOW` and `Only show lights in LoS` options are -all related to lighting, which will be covered more in-depth in a separate document. +all related to lighting, +which will be covered more in-depth in a separate document. The first option will, when enabled, fill the entire screen with shadow. -The second option enhances the immersion by only showing a player vision of something if one +The second option enhances the immersion +by only showing a player vision of something if one of the assets he/she owns can see it. -With the `FOW opacity` option, the opacity of the fog for th DM only is changed. -Players always have 100% fog opacity. This option can thus be used to see through the fog +With the `FOW opacity` option, +the opacity of the fog for th DM only is changed. +Players always have 100% fog opacity. +This option can thus be used to see through the fog as a DM. -The `Unit Size` option decides the space 1 grid cell represents in the game world. +The `Unit Size` option decides the space +1 grid cell represents in the game world. It is used by the ruler. The `Grid size` option decides the space 1 grid cell fills on the screen. Increasing this number will thus lower the amount of cells visible and vice versa. -Lastly the `invitation code` is the code that you need to provide someone who wishes to join the game. +Lastly the `invitation code` +is the code that you need to provide someone who wishes to join the game. The full URL to give the player is `/invite/` (e.g. `https://localhost:8000/invite/4287fa8e-041e-499c-8eca-81e8567a6948`). diff --git a/docs/index.rst b/docs/index.rst index 7b655cf3d..a89bc1393 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,30 +1,26 @@ -.. Planar Ally documentation master file, created by - sphinx-quickstart on Thu Sep 6 10:04:05 2018. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to Planar Ally's documentation! +Welcome to PlanarAlly's documentation! ======================================= +Getting Started +----------------- + +To quickly get started follow :ref:`this `, +this will give an introduction to all things you need during PlanarAlly play. + +These documents are in active development, + +If anything is left unanswered feel free to contact me on github or reddit *(username Kruptein)*. + .. toctree:: :maxdepth: 2 :caption: Contents: getting_started + installation lighting Layers Initiative -These documents are in active development, - -If anything is left unanswered feel free to contact me on github or reddit *(username Kruptein)*. - -Getting Started ------------------ - -To quickly get started follow :ref:`this `, -this will give an introduction to all things you need during PA play. - Indices and tables ================== diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 000000000..7df9131af --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,103 @@ +.. _installation: + +Installation +============= + +As the DM you'll have to decide where you want to host your game. +You can either use some service that hosts PlanarAlly for you, +or you can host PA yourself, which requires a bit more setup. + +.. note:: + This only has to be done by the DM and is not relevant for normal players. + +Using existing services +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. warning:: + These services are not controlled by me and there is no guarantee that the + software has not been altered. Make sure you trust a service before using it. + +The easiest setup is to use some existing online service. +At the moment of writing the only active service I'm aware of is `dndbox `_. + +Self-hosting +~~~~~~~~~~~~~ + +Hosting PlanarAlly yourself requires a bit more setup +then simply using an existing service, +but it does give you more control and +you can rely on it working offline as well. + +Self-hosting involves 2 steps: + +* Installing/running the software, +* Configuring your network correctly so that other players can join. + +Installation +************* + +For installation you again have two options: + +* Precompiled binary +* Manual installtion + +The first option is easier, but is only available on Windows currently, +and I do forget to create it from time to time. Feel free to ping me if I do. + +Precompiled binary +^^^^^^^^^^^^^^^^^^^^ + +These are typically only provided for major releases and can be found `here `_. + +1. Download the latest planarserver.zip +2. Extract it to a folder on your server. +3. Run the server by executing `PlanarAllyServer.exe`. +4. Optionally you can configure the server in the `server_config.cfg` file. +5. Restart the server after applying a change. + + +Manual Installation +^^^^^^^^^^^^^^^^^^^^^ + +Make sure you have a valid python 3.6+ installation. +See :ref:`python` if you don't know how. + +1. Download the latest source code from `here `_. +2. Open the server folder. +3. Execute `pip install -r requirements.txt`. +4. Run the server by executing `python planarserver.py`. +5. Optionally you can configure the server in the `server_config.cfg` file. +6. Restart the server after applying a change. + +Configuring +************ + +With the server running, +you should now be able to visit `http://localhost:8000 `_. + +If you're players are on a local network, +you'll need to replace the `localhost` +part with your internal ip address. + +If you're players are however somewhere else on the internet, +you'll also need to replace the `localhost` part, +but this time with your external ip address. +Additionally you'll probably need to modify your router to allow access from +the outside world on your personal computer on port 8000. +Look up information on `port forwarding` for more info on this topic. + + +.. _python: + +Python installation +~~~~~~~~~~~~~~~~~~~~~ + +Installation of python is very straightforward. + +Download and install the latest python 3 version from `the python site `_. + +.. note:: + If you use linux, you can probably install python using your system package manager. + +Make sure to note where you install python as you will need it later on. + diff --git a/server/VERSION b/server/VERSION index 1c16bd1a4..7092c7c46 100644 --- a/server/VERSION +++ b/server/VERSION @@ -1 +1 @@ -0.14.2 \ No newline at end of file +0.15.0 \ No newline at end of file diff --git a/server/api/socket/__init__.py b/server/api/socket/__init__.py index 93f1fb3b6..f4469b938 100644 --- a/server/api/socket/__init__.py +++ b/server/api/socket/__init__.py @@ -2,7 +2,7 @@ from app import app, logger, sio, state from models import GridLayer, Layer, LocationUserOption from models.db import db -from . import asset_manager, connection, initiative, location, note, shape +from . import asset_manager, connection, initiative, label, location, note, shape @sio.on("Client.Options.Set", namespace="/planarally") diff --git a/server/api/socket/connection.py b/server/api/socket/connection.py index 4a94e1f3c..4b7e35138 100644 --- a/server/api/socket/connection.py +++ b/server/api/socket/connection.py @@ -4,7 +4,7 @@ from .location import load_location from app import logger, sio, state -from models import Asset, Location, Room, User +from models import Asset, Label, LabelSelection, Location, Room, User @sio.on("connect", namespace="/planarally") @@ -36,8 +36,18 @@ async def connect(sid, environ): logger.info(f"User {user.name} connected with identifier {sid}") + labels = Label.select().where((Label.user == user) | (Label.visible == True)) + label_filters = LabelSelection.select().where((LabelSelection.user == user) & (LabelSelection.room == room)) + sio.enter_room(sid, location.get_path(), namespace="/planarally") await sio.emit("Username.Set", user.name, room=sid, namespace="/planarally") + await sio.emit( + "Labels.Set", + [l.as_dict() for l in labels], + room=sid, + namespace="/planarally", + ) + await sio.emit("Labels.Filters.Set", [l.label.uuid for l in label_filters], room=sid, namespace="/planarally") await sio.emit( "Room.Info.Set", { diff --git a/server/api/socket/initiative.py b/server/api/socket/initiative.py index ce01e7940..8db86c84b 100644 --- a/server/api/socket/initiative.py +++ b/server/api/socket/initiative.py @@ -210,7 +210,7 @@ async def new_initiative_effect(sid, data): room = sid_data["room"] location = sid_data["location"] - if room.creator != user and not ShapeOwner.get_or_none(shape=shape, user=user): + if room.creator != user and not ShapeOwner.get_or_none(shape=data["actor"], user=user): logger.warning(f"{user.name} attempted to create a new initiative effect") return @@ -237,10 +237,12 @@ async def update_initiative_effect(sid, data): user = sid_data["user"] room = sid_data["room"] location = sid_data["location"] - - if room.creator != user and not ShapeOwner.get_or_none(shape=shape, user=user): + + if room.creator != user and not ShapeOwner.get_or_none(shape=data["actor"], user=user): logger.warning(f"{user.name} attempted to update an initiative effect") return + + print(data) with db.atomic(): effect = InitiativeEffect.get(uuid=data["effect"]["uuid"]) diff --git a/server/api/socket/label.py b/server/api/socket/label.py new file mode 100644 index 000000000..22a6e3e17 --- /dev/null +++ b/server/api/socket/label.py @@ -0,0 +1,135 @@ +import auth +from app import app, logger, sio, state +from models import Label, LabelSelection, User +from models.db import db + + +@sio.on("Label.Add", namespace="/planarally") +@auth.login_required(app, sio) +async def add(sid, data): + sid_data = state.sid_map[sid] + user = sid_data["user"] + room = sid_data["room"] + location = sid_data["location"] + + label = Label.get_or_none(uuid=data) + + if label is not None: + logger.warn(f"{user.name} tried to add a label with an id that already exists.") + return + + if data["user"] != user.name: + logger.warn(f"{user.name} tried to add a label for someone else.") + return + + data["user"] = User.by_name(data["user"]) + label = Label.create(**data) + + for psid in state.get_sids(skip_sid=sid, room=room): + if state.get_user(psid) == user or label.visible: + await sio.emit( + "Label.Add", label.as_dict(), room=psid, namespace="/planarally" + ) + + +@sio.on("Label.Delete", namespace="/planarally") +@auth.login_required(app, sio) +async def delete(sid, data): + sid_data = state.sid_map[sid] + user = sid_data["user"] + room = sid_data["room"] + location = sid_data["location"] + + label = Label.get_or_none(uuid=data) + + if label is None: + logger.warn(f"{user.name} tried to delete a non-existing label.") + return + + if label.user != user: + logger.warn(f"{user.name} tried to delete another user's label.") + return + + label.delete_instance(True) + + await sio.emit( + "Label.Delete", + {"user": user.name, "uuid": data}, + skip_sid=sid, + namespace="/planarally", + ) + + +@sio.on("Label.Visibility.Set", namespace="/planarally") +@auth.login_required(app, sio) +async def set_visibility(sid, data): + sid_data = state.sid_map[sid] + user = sid_data["user"] + room = sid_data["room"] + location = sid_data["location"] + + label = Label.get_or_none(uuid=data["uuid"]) + + if label is None: + logger.warn(f"{user.name} tried to change a non-existing label.") + return + + if label.user != user: + logger.warn(f"{user.name} tried to change another user's label.") + return + + label.visible = data["visible"] + label.save() + + for psid in state.get_sids(skip_sid=sid, room=room): + if state.get_user(psid) == user: + await sio.emit( + "Label.Visibility.Set", + {"user": label.user.name, **data}, + room=psid, + namespace="/planarally", + ) + else: + if data["visible"]: + await sio.emit( + "Label.Add", label.as_dict(), room=psid, namespace="/planarally" + ) + else: + await sio.emit( + "Label.Delete", {'uuid': label.uuid, 'user': label.user.name}, room=psid, namespace="/planarally" + ) + + +@sio.on("Labels.Filter.Add", namespace="/planarally") +@auth.login_required(app, sio) +async def add_filter(sid, uuid): + sid_data = state.sid_map[sid] + user = sid_data["user"] + room = sid_data["room"] + + label = Label.get_or_none(uuid=uuid) + + LabelSelection.create(label=label, user=user, room=room) + + for psid in state.get_sids(skip_sid=sid, room=room): + if state.get_user(psid) == user: + await sio.emit("Labels.Filter.Add", uuid, room=psid, namespace="/planarally") + + +@sio.on("Labels.Filter.Remove", namespace="/planarally") +@auth.login_required(app, sio) +async def remove_filter(sid, uuid): + sid_data = state.sid_map[sid] + user = sid_data["user"] + room = sid_data["room"] + + label = Label.get_or_none(uuid=uuid) + + ls = LabelSelection.get_or_none(label=label, room=room, user=user) + + if ls: + ls.delete_instance(True) + + for psid in state.get_sids(skip_sid=sid, room=room): + if state.get_user(psid) == user: + await sio.emit("Labels.Filter.Remove", uuid, room=psid, namespace="/planarally") diff --git a/server/api/socket/location.py b/server/api/socket/location.py index 20e863bad..80cdaca7c 100644 --- a/server/api/socket/location.py +++ b/server/api/socket/location.py @@ -74,10 +74,7 @@ async def load_location(sid, location): namespace="/planarally", ) await sio.emit( - "Initiative.Turn.Update", - location_data.turn, - room=sid, - namespace="/planarally", + "Initiative.Turn.Set", location_data.turn, room=sid, namespace="/planarally" ) diff --git a/server/api/socket/shape.py b/server/api/socket/shape.py index 8ac062a64..bed8ffeeb 100644 --- a/server/api/socket/shape.py +++ b/server/api/socket/shape.py @@ -5,7 +5,17 @@ import auth from .initiative import send_client_initiatives from app import app, logger, sio, state -from models import Aura, Layer, PlayerRoom, Shape, ShapeOwner, Tracker, User +from models import ( + Aura, + Label, + Layer, + PlayerRoom, + Shape, + ShapeLabel, + ShapeOwner, + Tracker, + User, +) from models.db import db from models.utils import get_table, reduce_data_to_model @@ -162,6 +172,26 @@ async def update_shape(sid, data): aura_db.save() else: Aura.create(**reduced) + # Labels + for label in data["shape"]["labels"]: + label_db = Label.get_or_none(uuid=label["uuid"]) + reduced = reduce_data_to_model(Label, label) + reduced["user"] = User.by_name(reduced["user"]) + if label_db: + update_model_from_dict(label_db, reduced) + label_db.save() + else: + Label.create(**reduced) + shape_label_db = ShapeLabel.get_or_none(shape=shape, label=label_db) + old_labels = {shape_label.label.uuid for shape_label in shape.labels} + new_labels = set(label["uuid"] for label in data["shape"]["labels"]) + for label in old_labels ^ new_labels: + if label == "": + continue + if label in new_labels: + ShapeLabel.create(shape=shape, label=Label.get(uuid=label)) + else: + ShapeLabel.get(label=Label.get(uuid=label), shape=shape).delete_instance(True) await sync_shape_update(layer, room, data, sid, shape) @@ -245,6 +275,19 @@ async def change_shape_layer(sid, data): shape = Shape.get(uuid=data["uuid"]) old_layer = shape.layer old_index = shape.index + + if old_layer.player_visible and not layer.player_visible: + for room_player in room.players: + for psid in state.get_sids(user=room_player.player, room=room): + if psid == sid: + continue + await sio.emit( + "Shape.Remove", + shape.as_dict(room_player.player, False), + room=psid, + namespace="/planarally", + ) + shape.layer = layer shape.index = layer.shapes.count() shape.save() @@ -252,13 +295,36 @@ async def change_shape_layer(sid, data): (Shape.layer == old_layer) & (Shape.index >= old_index) ).execute() - await sio.emit( - "Shape.Layer.Change", - data, - room=location.get_path(), - skip_sid=sid, - namespace="/planarally", - ) + if old_layer.player_visible and layer.player_visible: + await sio.emit( + "Shape.Layer.Change", + data, + room=location.get_path(), + skip_sid=sid, + namespace="/planarally", + ) + else: + for csid in state.get_sids(user=room.creator, room=room): + if csid == sid: + continue + await sio.emit( + "Shape.Layer.Change", + data, + room=location.get_path(), + skip_sid=sid, + namespace="/planarally", + ) + if layer.player_visible: + for room_player in room.players: + for psid in state.get_sids(user=room_player.player, room=room): + if psid == sid: + continue + await sio.emit( + "Shape.Add", + shape.as_dict(room_player.player, False), + room=psid, + namespace="/planarally", + ) @sio.on("Shape.Order.Set", namespace="/planarally") diff --git a/server/app.py b/server/app.py index 98541b626..a530c1a65 100644 --- a/server/app.py +++ b/server/app.py @@ -63,13 +63,14 @@ async def remove_sid(self, sid): await state.clear_temporaries(sid) del self.sid_map[sid] - def get_sids(self, **options): + def get_sids(self, skip_sid=None, **options): for sid in dict(self.sid_map): if all( self.sid_map[sid].get(option, None) == value for option, value in options.items() ): - yield sid + if skip_sid != sid: + yield sid def get_players(self, **options): for sid in dict(self.sid_map): @@ -77,7 +78,10 @@ def get_players(self, **options): self.sid_map[sid].get(option, None) == value for option, value in options.items() ): - yield sid, self.sid_map[sid]["user"] + yield sid, self.get_user(sid) + + def get_user(self, sid): + return self.sid_map[sid]["user"] def add_temp(self, sid, uid): if sid not in self.client_temporaries: diff --git a/server/models/__init__.py b/server/models/__init__.py index fae3731d3..dce9b0647 100644 --- a/server/models/__init__.py +++ b/server/models/__init__.py @@ -4,6 +4,7 @@ from .campaign import * from .general import * from .initiative import * +from .label import * from .shape import * from .signals import * from .user import * diff --git a/server/models/campaign.py b/server/models/campaign.py index 32b47b67f..35005b274 100644 --- a/server/models/campaign.py +++ b/server/models/campaign.py @@ -8,6 +8,7 @@ TextField, ) from playhouse.shortcuts import model_to_dict +from playhouse.sqlite_ext import JSONField from .base import BaseModel from .user import User @@ -63,7 +64,7 @@ class Location(BaseModel): full_fow = BooleanField(default=False) fow_opacity = FloatField(default=0.3) fow_los = BooleanField(default=False) - vision_mode = TextField(default="bvh") + vision_mode = TextField(default="triangle") # default is 1km max, 0.5km min vision_min_range = FloatField(default=1640) vision_max_range = FloatField(default=3281) @@ -189,6 +190,7 @@ class LocationUserOption(BaseModel): pan_y = IntegerField(default=0) zoom_factor = FloatField(default=1.0) active_layer = ForeignKeyField(Layer, backref="active_users", null=True) + active_filters = JSONField(default = {}) def __repr__(self): return f"" diff --git a/server/models/label.py b/server/models/label.py new file mode 100644 index 000000000..dfa168b15 --- /dev/null +++ b/server/models/label.py @@ -0,0 +1,28 @@ +from peewee import BooleanField, ForeignKeyField, TextField +from playhouse.shortcuts import model_to_dict + +from .base import BaseModel +from .campaign import Room +from .user import User + + +__all__ = ["Label", "LabelSelection"] + + +class Label(BaseModel): + uuid = TextField(primary_key=True) + user = ForeignKeyField(User, backref="labels", on_delete="CASCADE") + category = TextField(null=True) + name = TextField() + visible = BooleanField() + + def as_dict(self): + d = model_to_dict(self, recurse=False, exclude=[Label.id]) + d["user"] = self.user.name + return d + + +class LabelSelection(BaseModel): + label = ForeignKeyField(Label, on_delete="CASCADE") + user = ForeignKeyField(User, on_delete="CASCADE") + room = ForeignKeyField(Room, on_delete="CASCADE") diff --git a/server/models/shape.py b/server/models/shape.py index 3d235d36d..fca1a1126 100644 --- a/server/models/shape.py +++ b/server/models/shape.py @@ -4,6 +4,7 @@ from .base import BaseModel from .campaign import Layer +from .label import Label from .user import User from .utils import get_table @@ -18,6 +19,7 @@ "Polygon", "Rect", "Shape", + "ShapeLabel", "ShapeOwner", "Text", "Tracker", @@ -31,6 +33,7 @@ class Shape(BaseModel): x = FloatField() y = FloatField() name = TextField(null=True) + name_visible = BooleanField(default=True) fill_colour = TextField(default="#000") stroke_colour = TextField(default="#fff") vision_obstruction = BooleanField(default=False) @@ -59,12 +62,17 @@ def as_dict(self, user: User, dm: bool): owned = dm or (user.name in data["owners"]) tracker_query = self.trackers aura_query = self.auras + label_query = self.labels.join(Label) if not owned: data["annotation"] = "" tracker_query = tracker_query.where(Tracker.visible) aura_query = aura_query.where(Aura.visible) + label_query = label_query.where(Label.visible) + if not self.name_visible: + data["name"] = "?" data["trackers"] = [t.as_dict() for t in tracker_query] data["auras"] = [a.as_dict() for a in aura_query] + data["labels"] = [l.as_dict() for l in label_query] # Subtype type_table = get_table(self.type_) data.update( @@ -74,6 +82,14 @@ def as_dict(self, user: User, dm: bool): return data +class ShapeLabel(BaseModel): + shape = ForeignKeyField(Shape, backref="labels", on_delete="CASCADE") + label = ForeignKeyField(Label, backref="shapes", on_delete="CASCADE") + + def as_dict(self): + return self.label.as_dict() + + class Tracker(BaseModel): uuid = TextField(primary_key=True) shape = ForeignKeyField(Shape, backref="trackers", on_delete="CASCADE") diff --git a/server/models/user.py b/server/models/user.py index 3ec58aa19..d6bcee701 100644 --- a/server/models/user.py +++ b/server/models/user.py @@ -1,5 +1,5 @@ import bcrypt -from peewee import fn, TextField +from peewee import fn, BooleanField, ForeignKeyField, TextField from playhouse.shortcuts import model_to_dict from .base import BaseModel @@ -34,3 +34,4 @@ def as_dict(self): @classmethod def by_name(cls, name): return cls.get_or_none(fn.Lower(cls.name) == name.lower()) + diff --git a/server/planarserver.py b/server/planarserver.py index 486b6483f..7539ad9f4 100644 --- a/server/planarserver.py +++ b/server/planarserver.py @@ -3,6 +3,11 @@ This is the code responsible for starting the backend and reacting to socket IO events. """ +# Mimetype recognition for js files apparently is not alwyas properly setup out of the box for some users out there. +import mimetypes +if mimetypes.guess_type(".js")[0] == "text/plain": + mimetypes.add_type("application/javascript", ".js") + import save save.check_save() diff --git a/server/save.py b/server/save.py index e8e67a8d9..18592b4b6 100644 --- a/server/save.py +++ b/server/save.py @@ -11,7 +11,7 @@ from models import ALL_MODELS, Constants from models.db import db -SAVE_VERSION = 10 +SAVE_VERSION = 13 logger: logging.Logger = logging.getLogger("PlanarAllyServer") logger.setLevel(logging.INFO) @@ -101,6 +101,42 @@ def upgrade(version): ) db.foreign_keys = True Constants.update(save_version=Constants.save_version + 1).execute() + elif version == 10: + from models import Shape + + db.foreign_keys = False + migrator = SqliteMigrator(db) + with db.atomic(): + migrate(migrator.add_column("shape", "name_visible", Shape.name_visible)) + db.foreign_keys = True + Constants.update(save_version=Constants.save_version + 1).execute() + elif version == 11: + from models import Label, LocationUserOption, ShapeLabel + + db.foreign_keys = False + migrator = SqliteMigrator(db) + with db.atomic(): + db.create_tables([Label, ShapeLabel]) + migrate(migrator.add_column("location_user_option", "active_filters", LocationUserOption.active_filters)) + db.foreign_keys = True + Constants.update(save_version=Constants.save_version + 1).execute() + elif version == 12: + from models import Label, LabelSelection + + db.foreign_keys = False + migrator = SqliteMigrator(db) + with db.atomic(): + migrate(migrator.add_column("label", "category", Label.category)) + db.create_tables([LabelSelection]) + with db.atomic(): + for label in Label: + if ":" not in label.name: continue + cat, *name = label.name.split(":") + label.category = cat + label.name = ':'.join(name) + label.save() + db.foreign_keys = True + Constants.update(save_version=Constants.save_version + 1).execute() else: raise Exception(f"No upgrade code for save format {version} was found.") diff --git a/server/static/css/app.0ad52c65.css b/server/static/css/app.0ad52c65.css deleted file mode 100644 index 5c9d17b90..000000000 --- a/server/static/css/app.0ad52c65.css +++ /dev/null @@ -1 +0,0 @@ -@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css);@import url(https://fonts.googleapis.com/css?family=Open+Sans);#app,body,html{margin:0;padding:0;border:0;width:100%;height:100%;font-family:Open Sans,sans-serif;font-weight:200}#app{display:-webkit-box;display:-ms-flexbox;display:flex;background:url(/static/img/login_background.png) repeat fixed}.ContextMenu{position:fixed;z-index:11}.ContextMenu ul{border:1px solid #ff7052;border-radius:5px;background:#fff;padding:0;list-style:none;margin:0}.ContextMenu ul li{border-bottom:1px solid #ff7052;padding:5px;cursor:pointer}.ContextMenu ul li:hover{background-color:#ff7052}.ContextMenu ul li:last-child{border-bottom:none}.ContextMenu>ul>li{clear:left;position:relative}.ContextMenu>ul>li ul{display:none;position:absolute;left:100%;top:-1px}.ContextMenu>ul>li:hover ul{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.hide[data-v-12ed61ba]{display:none}.mask[data-v-12ed61ba]{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%}.dialog-mask[data-v-12ed61ba]{pointer-events:none}.modal-mask[data-v-12ed61ba]{background-color:rgba(0,0,0,.5);-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.modal-container[data-v-12ed61ba]{pointer-events:auto;position:absolute;width:auto;height:auto;background-color:#fff;border-radius:2px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.33);box-shadow:0 2px 8px rgba(0,0,0,.33);font-family:Helvetica,Arial,sans-serif}.modal-enter[data-v-12ed61ba],.modal-leave-active[data-v-12ed61ba]{opacity:0}.modal-enter .modal-container[data-v-12ed61ba],.modal-leave-active .modal-container[data-v-12ed61ba]{-webkit-transform:scale(1.1);transform:scale(1.1)}.modal-header[data-v-1883e207]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-1883e207]{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}button[data-v-1883e207]:first-of-type{margin-right:10px}.modal-header[data-v-0602c2e6]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-0602c2e6]{padding:10px;padding-bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.modal-footer[data-v-0602c2e6]{padding-top:0;padding:10px;text-align:right}[v-cloak],[v-cloak] *{display:none}body,html{padding:0;margin:0;width:100%;height:100%;background:url(/static/img/login_background.png) repeat fixed;font-family:Open Sans,sans-serif}#AssetManager{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#titlebar{padding:15px;margin:10px;font-size:30px;font-weight:700;background-color:#ff7052;color:#fff;text-align:center;border:1px solid #000;-webkit-box-shadow:2px 2px grey;box-shadow:2px 2px grey}#main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;height:100%}#asset-details,#assets{background-color:#fff;border:1px solid #000;margin:10px;position:relative;padding-top:45px;padding-bottom:45px;-webkit-box-shadow:3px 3px grey;box-shadow:3px 3px grey}#assets{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}#asset-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:15px;max-width:50%;overflow:scroll}#asset-details img{width:100%}#breadcrumbs{position:absolute;left:0;top:0;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;z-index:1;background-color:#ff7052;color:#fff;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:5px;border-bottom-right-radius:10px}#breadcrumbs>div{position:relative;padding:10px;padding-left:20px;text-align:center}#breadcrumbs>div:first-child{padding-left:10px}#breadcrumbs div:last-child:after{content:none}#breadcrumbs div:after{content:"";position:absolute;display:inline-block;width:30px;height:30px;top:3px;right:-10px;background-color:transparent;border-top-right-radius:5px;-webkit-transform:scale(.707) rotate(45deg);transform:scale(.707) rotate(45deg);-webkit-box-shadow:1px -1px rgba(0,0,0,.25);box-shadow:1px -1px rgba(0,0,0,.25);z-index:1}#actionbar{position:absolute;right:0;top:0;padding:8px;border-bottom-left-radius:10px;background-color:#ff7052;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff}#actionbar>div{margin:5px}#actionbar>div:hover{cursor:pointer}#explorer{position:relative;left:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));max-width:100%;max-height:100%;overflow:auto}.inode{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:15px}.inode-selected,.inode:hover{cursor:pointer;background-color:#ff7052}.inode *{pointer-events:none}.title{word-break:break-all}#asset-detail-title{font-weight:700;font-size:30px;border-bottom:2px solid #000;margin-bottom:15px;text-align:center}[data-v-bc30fc14]{-ms-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}form[data-v-bc30fc14]{position:relative;top:50%;width:250px;display:table;margin:-150px auto 0 auto;background:#fff;border-radius:4px}.legend[data-v-bc30fc14]{position:relative;text-align:center;width:100%;display:block;background:#ff7052;padding:15px;color:#fff;font-size:20px}.legend[data-v-bc30fc14]:after{content:"";opacity:.06;top:0;left:0;bottom:0;right:0;position:absolute}.input[data-v-bc30fc14]{position:relative;width:90%;margin:15px auto}.input span[data-v-bc30fc14]{position:absolute;display:block;color:#d4d4d4;left:10px;top:8px;font-size:20px}.input input[data-v-bc30fc14]{width:100%;padding:10px 5px 10px 40px;display:block;border:1px solid #ededed;border-radius:4px;-webkit-transition:.2s ease-out;transition:.2s ease-out;color:#a1a1a1}.input input[data-v-bc30fc14]:focus{padding:10px 5px 10px 10px;outline:0;border-color:#ff7052}.submit[data-v-bc30fc14]{width:45px;height:45px;display:block;margin:0 auto -15px auto;background:#fff;border-radius:100%;border:1px solid #ff7052;color:#ff7052;font-size:24px;cursor:pointer;-webkit-box-shadow:0 0 0 7px #fff;box-shadow:0 0 0 7px #fff;-webkit-transition:.2s ease-out;transition:.2s ease-out}.submit[data-v-bc30fc14]:focus,.submit[data-v-bc30fc14]:hover{background:#ff7052;color:#fff;outline:0}.feedback[data-v-bc30fc14]{position:absolute;bottom:-70px;width:100%;text-align:center;color:#fff;background:#c71585;padding:10px 0;font-size:12px}.feedback[data-v-bc30fc14]:before{bottom:100%;left:50%;border:solid transparent;content:"";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(46,204,113,0);border-bottom-color:#c71585;border-width:10px;margin-left:-10px}[data-v-61eb1455]{-ms-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}a[data-v-61eb1455]{text-decoration:inherit;color:inherit;width:100%;display:block;text-align:center;border:1px solid #ff7052}a[data-v-61eb1455]:hover{background-color:#ff7052;color:#fff}a[data-v-61eb1455]:first-child{border-radius:10px 10px 0 0}a[data-v-61eb1455]:last-child{border-radius:0 0 10px 10px}a[data-v-61eb1455]:only-child{border-radius:10px}#formcontainer[data-v-61eb1455]{margin:auto}form[data-v-61eb1455]{background:#fff;border-radius:4px}.legend[data-v-61eb1455]{position:relative;text-align:center;width:100%;display:block;background:#ff7052;padding:15px;color:#fff;font-size:20px}.legend[data-v-61eb1455]:after{content:"";opacity:.06;top:0;left:0;bottom:0;right:0;position:absolute}#account-options[data-v-61eb1455]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#fff;border-radius:4px;margin-top:50px;height:45px}#account-options form[data-v-61eb1455]{background:none;border-radius:0;width:50%}.input[data-v-61eb1455]{position:relative;width:90%;margin:15px auto}.input span[data-v-61eb1455]{position:absolute;display:block;color:#d4d4d4;left:10px;top:8px;font-size:20px}.input input[data-v-61eb1455]{width:100%;padding:10px 5px 10px 40px;display:block;border:1px solid #ededed;border-radius:4px;-webkit-transition:.2s ease-out;transition:.2s ease-out;color:#a1a1a1}.input input[data-v-61eb1455]:focus{outline:0;border-color:#ff7052}.submit[data-v-61eb1455]{width:45px;height:45px;display:block;margin:0 auto -15px auto;background:#fff;border-radius:100%;border:1px solid #ff7052;color:#ff7052;font-size:24px;cursor:pointer;-webkit-box-shadow:0 0 0 7px #fff;box-shadow:0 0 0 7px #fff;-webkit-transition:.2s ease-out;transition:.2s ease-out}.submit[data-v-61eb1455]:focus,.submit[data-v-61eb1455]:hover{background:#ff7052;color:#fff;outline:0}.feedback[data-v-61eb1455]{position:absolute;bottom:-70px;width:100%;text-align:center;color:#fff;background:#c71585;padding:10px 0;font-size:12px}.feedback[data-v-61eb1455]:before{bottom:100%;left:50%;border:solid transparent;content:"";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(46,204,113,0);border-bottom-color:#c71585;border-width:10px;margin-left:-10px}h4[data-v-61eb1455]{background-color:#fff;width:100%;text-align:center;border-bottom:1px solid #000;line-height:.1em}h4 span[data-v-61eb1455]{background:#fff;padding:0 10px}.modal-header[data-v-ccaf03d6]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-ccaf03d6]{position:absolute;top:5px;right:5px}.modal-body[data-v-ccaf03d6]{padding:10px}#initiative-list[data-v-ccaf03d6]{padding:0;-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}#initiative-list[data-v-ccaf03d6],.initiative-actor[data-v-ccaf03d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.initiative-actor[data-v-ccaf03d6]{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 5px;margin-bottom:2px;border-radius:5px;border:2px solid transparent}.initiative-selected[data-v-ccaf03d6]{border:2px solid #82c8a0;background-color:#82c8a0}.initiative-actor:hover+.initiative-effect[data-v-ccaf03d6],.initiative-effect[data-v-ccaf03d6]:hover,.initiative-selected+.initiative-effect[data-v-ccaf03d6]{display:-webkit-box;display:-ms-flexbox;display:flex;border-color:rgba(130,200,160,.6);background-color:rgba(130,200,160,.6)}.initiative-actor[data-v-ccaf03d6]:hover{border:2px solid #82c8a0}.initiative-actor>[data-v-ccaf03d6]{width:30px;margin-left:2px}.initiative-effect[data-v-ccaf03d6]{display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;margin-right:5px;margin-top:-2px;margin-bottom:5px;padding:2px;border:2px solid transparent;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top:none}.initiative-effect>[data-v-ccaf03d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.initiative-effect>*>[data-v-ccaf03d6]{border:none;background-color:inherit;text-align:right;margin-left:20px;min-width:10px}.initiative-effect>*>[data-v-ccaf03d6]:first-child{margin-left:0}#initiative-bar[data-v-ccaf03d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:10px;margin-left:10px;margin-top:10px;margin-bottom:-10px;padding:2px}.initiative-bar-button[data-v-ccaf03d6]{border:2px solid #82c8a0;border-radius:5px;padding:5px}.initiative-bar-button[data-v-ccaf03d6]:hover{color:#fff;background-color:#82c8a0;cursor:pointer}.outer[data-v-b4f2c0b0]{padding:5px;border:1px solid #000;border-radius:3px;cursor:pointer}.current-color[data-v-b4f2c0b0]{width:13px;height:13px;background-color:#000;border:1px solid #000}.mask[data-v-b4f2c0b0]{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%}.preview[data-v-62c91cd3]{position:fixed;z-index:50;left:200px;top:0}.asset-preview-image[data-v-62c91cd3]{width:100%;max-width:250px}.draggable[data-v-62c91cd3]{list-style:none;font-family:helvetica}.token[data-v-62c91cd3]{padding-top:5px;padding-bottom:5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.token img[data-v-62c91cd3]{margin-right:5px}.token svg[data-v-62c91cd3]{margin-left:auto}.folder>[data-v-62c91cd3]{display:none}.directory>.file[data-v-62c91cd3],.directory>.folder[data-v-62c91cd3]{display:block}.folder[data-v-62c91cd3]:hover{font-weight:700;cursor:pointer}.folder:hover>[data-v-62c91cd3]{font-weight:400}.folder>[data-v-aaf3f05e]{display:none}.directory>.file[data-v-aaf3f05e],.directory>.folder[data-v-aaf3f05e]{display:block}.folder[data-v-aaf3f05e]:hover{font-weight:700;cursor:pointer}.folder:hover>[data-v-aaf3f05e]{font-weight:400}#menuContainer[data-v-aaf3f05e]{position:absolute;z-index:20;top:0;left:0;height:100%;width:100%;pointer-events:none}#menu[data-v-aaf3f05e]{height:100%;max-width:200px}#locations-menu[data-v-aaf3f05e],#menu[data-v-aaf3f05e]{position:absolute;top:0;left:0;z-index:21;background-color:#fa5a5a;overflow:auto;pointer-events:auto}#locations-menu[data-v-aaf3f05e]{max-height:100px;width:100%}#locations-menu>div[data-v-aaf3f05e]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}#locations-menu>div>div[data-v-aaf3f05e]{background-color:#fff;text-align:center;line-height:100px;width:100px;border-right:1px solid #82c8a0}#locations-menu>div>div[data-v-aaf3f05e]:hover{cursor:pointer;background-color:#82c8a0}.actionButton[data-v-aaf3f05e]{position:absolute;right:0;margin:5px;margin-right:10px;padding:0}.accordion[data-v-aaf3f05e]{background-color:#eee;color:#444;cursor:pointer;padding:18px;text-align:left;border:none;outline:none;-webkit-transition:.4s;transition:.4s;border-top:1px solid #82c8a0;width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}.accordion-active[data-v-aaf3f05e],.accordion[data-v-aaf3f05e]:hover{background-color:#82c8a0}.accordion-panel[data-v-aaf3f05e]{background-color:#fff;display:none;overflow:hidden;min-height:2em}.accordion-subpanel[data-v-aaf3f05e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.accordion-subpanel>[data-v-aaf3f05e]{padding:5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.accordion-subpanel>[data-v-aaf3f05e]:hover{background-color:#82c8a0}#exitButton[data-v-aaf3f05e]{position:fixed;bottom:0;width:100%}#radialmenu[data-v-aaf3f05e]{position:absolute;z-index:20;width:0;height:0;pointer-events:auto}.rm-list-dm #rm-locations svg[data-v-aaf3f05e]{margin-left:50px}.rm-list-dm #rm-settings svg[data-v-aaf3f05e]{margin-bottom:50px}.rm-wrapper[data-v-aaf3f05e]{position:relative;width:200px;height:200px;top:-100px;left:-100px}.rm-wrapper .rm-topper[data-v-aaf3f05e]{pointer-events:none;text-align:center;line-height:50px;font-size:25px}.rm-wrapper .rm-toggler[data-v-aaf3f05e],.rm-wrapper .rm-topper[data-v-aaf3f05e]{display:block;position:absolute;width:50px;height:50px;left:50%;top:50%;margin-left:-25px;margin-top:-25px;background:#fa5a5a;color:#fff;border-radius:50%}.rm-wrapper .rm-toggler .rm-list[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list[data-v-aaf3f05e]{opacity:.5;list-style:none;padding:0;width:200px;height:200px;overflow:hidden;display:block;border-radius:50%;-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,.2);box-shadow:0 0 10px 0 rgba(0,0,0,.2);margin:-75px 0 0 -75px}.rm-list-dm[data-v-aaf3f05e]{-webkit-transform:rotate(135deg)!important;transform:rotate(135deg)!important}.rm-wrapper .rm-toggler:hover .rm-list[data-v-aaf3f05e],.rm-wrapper .rm-topper:hover .rm-list[data-v-aaf3f05e]{opacity:1}.rm-wrapper .rm-toggler .rm-list .rm-item[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list .rm-item[data-v-aaf3f05e]{display:table;width:50%;height:50%;float:left;text-align:center;-webkit-box-shadow:inset 0 0 2px 0 rgba(0,0,0,.2);box-shadow:inset 0 0 2px 0 rgba(0,0,0,.2);background-color:#fff}.rm-wrapper .rm-toggler .rm-list .rm-item[data-v-aaf3f05e]:hover,.rm-wrapper .rm-topper .rm-list .rm-item[data-v-aaf3f05e]:hover{background-color:#82c8a0}.rm-wrapper .rm-toggler .rm-list .rm-item:hover a[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list .rm-item:hover a[data-v-aaf3f05e]{color:#fff}.rm-wrapper .rm-toggler .rm-list .rm-item a[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list .rm-item a[data-v-aaf3f05e]{display:table-cell;vertical-align:middle;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);text-decoration:none;font-size:25px;color:#82c8a0;border:none;outline:none}.settings-enter-active[data-v-aaf3f05e],.settings-leave-active[data-v-aaf3f05e]{-webkit-transition:width .5s;transition:width .5s}.settings-enter[data-v-aaf3f05e],.settings-leave-to[data-v-aaf3f05e]{width:0}.settings-enter-to[data-v-aaf3f05e],.settings-leave[data-v-aaf3f05e]{width:200px}.locations-enter-active[data-v-aaf3f05e],.locations-leave-active[data-v-aaf3f05e]{-webkit-transition:height .5s;transition:height .5s}.locations-enter[data-v-aaf3f05e],.locations-leave-to[data-v-aaf3f05e]{height:0}.locations-enter-to[data-v-aaf3f05e],.locations-leave[data-v-aaf3f05e]{height:100px}.modal-header[data-v-7a3669fd]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-header>input[data-v-7a3669fd]{background-color:inherit;border:none;font-weight:700;font-size:large}.header-close[data-v-7a3669fd]{position:absolute;top:5px;right:5px}.modal-body[data-v-7a3669fd]{padding:10px}.modal-body>textarea[data-v-7a3669fd]{width:100%;min-height:100px;max-height:500px}.modal-footer[data-v-7a3669fd]{padding-top:0;padding:10px;text-align:right}.modal-header[data-v-7c80ae3a]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-7c80ae3a]{position:absolute;top:5px;right:5px}.modal-body[data-v-7c80ae3a]{padding:10px;display:grid;grid-template-columns:[name] 1fr [numerator] 30px [slash] 5px [denominator] 30px [colour] 40px [visible] 30px [light] 30px [remove] 30px [end];grid-column-gap:5px}.colours[data-v-7c80ae3a],.modal-body[data-v-7c80ae3a]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.colours[data-v-7c80ae3a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header[data-v-7c80ae3a]{line-height:.1em;margin:20px 0 15px}.header[data-v-7c80ae3a]:after{position:absolute;right:5px;width:75%;border-bottom:1px solid #000;content:""}.spanrow[data-v-7c80ae3a]{grid-column:1/end}#selection-menu[data-v-32cec914]{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;top:75px;right:0;z-index:10;opacity:.5;border-top-left-radius:5px;border-bottom-left-radius:5px;border:1px solid #82c8a0;border-right:none;padding:10px 35px 10px 10px;background-color:#eee}#selection-menu[data-v-32cec914]:hover{background-color:#82c8a0;opacity:1}#selection-edit-button[data-v-32cec914]{position:absolute;right:10px;top:10px;cursor:pointer}#selection-auras[data-v-32cec914],#selection-trackers[data-v-32cec914]{display:grid;grid-template-columns:[name] 1fr [value] 1fr}.selection-aura-value[data-v-32cec914],.selection-tracker-value[data-v-32cec914]{justify-self:center;padding:2px}.selection-aura-value[data-v-32cec914]:hover,.selection-tracker-value[data-v-32cec914]:hover{cursor:pointer;background-color:rgba(20,20,20,.2)}#selection-name[data-v-32cec914]{font-size:20px;font-weight:700;margin-bottom:10px}.ContextMenu ul[data-v-759e5a8a]{border:1px solid #82c8a0}.ContextMenu ul li[data-v-759e5a8a]{border-bottom:1px solid #82c8a0}.ContextMenu ul li[data-v-759e5a8a]:hover{background-color:#82c8a0}canvas[data-v-73816298]{grid-column:label/end;justify-self:center}.modal-header[data-v-73816298]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-73816298]{padding:10px;display:grid;grid-template-columns:[label] 1fr [value] 2fr [end];grid-row-gap:10px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.modal-footer[data-v-73816298]{padding-top:0;padding:10px;text-align:right}.colours[data-v-73816298]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.tool-detail{position:absolute;right:var(--detailRight);bottom:80px;z-index:11;border:1px solid #2b2b2b;background-color:#fff;display:grid;padding:10px;grid-template-columns:auto auto;grid-column-gap:5px;grid-row-gap:2px}.tool-detail:after{content:"";position:absolute;right:var(--detailArrow);bottom:0;width:0;height:0;border:14px solid transparent;border-top-color:#000;border-bottom:0;margin-left:-14px;margin-bottom:-14px}.tool-detail input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.option[data-v-639cd890]{padding:6px;border:1px solid #82c8a0;border-radius:0;-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:13px;min-width:25px}.option-selected[data-v-639cd890],.option[data-v-639cd890]:hover{background-color:#82c8a0}.selectgroup[data-v-639cd890]{display:-webkit-box;display:-ms-flexbox;display:flex}.selectgroup>.option[data-v-639cd890]:first-of-type{border-top-left-radius:10px;border-bottom-left-radius:10px}.selectgroup>.option[data-v-639cd890]:last-of-type{border-top-right-radius:10px;border-bottom-right-radius:10px}.ContextMenu ul[data-v-44a31e42]{border:1px solid #82c8a0}.ContextMenu ul li[data-v-44a31e42]{border-bottom:1px solid #82c8a0}.ContextMenu ul li[data-v-44a31e42]:hover{background-color:#82c8a0}#toolselect[data-v-1fee50f5]{position:absolute;bottom:25px;right:25px;z-index:10}#toolselect>ul[data-v-1fee50f5]{display:-webkit-box;display:-ms-flexbox;display:flex;list-style:none;padding:0;margin:0;border:1px solid #82c8a0;border-radius:7px}#toolselect>ul>li[data-v-1fee50f5]{display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#eee;border-right:1px solid #82c8a0}#toolselect>ul>li[data-v-1fee50f5]:last-child{border-right:none;border-radius:0 4px 4px 0}#toolselect>ul>li[data-v-1fee50f5]:first-child{border-radius:4px 0 0 4px}#toolselect>ul>li[data-v-1fee50f5]:hover{background-color:#82c8a0}#toolselect>ul>li a[data-v-1fee50f5]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px;text-decoration:none}#toolselect .tool-selected[data-v-1fee50f5]{background-color:#82c8a0}a,a:active,a:hover,a:visited{color:inherit}svg{cursor:pointer}.notAllowed,.notAllowed>*{cursor:not-allowed!important}#layers,#layers canvas{width:100%;height:100%;position:absolute;left:0;top:0;overflow:hidden}#main[data-v-6d744362]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}#board[data-v-6d744362]{position:relative;width:100%;height:100%}#layerselect[data-v-6d744362]{position:absolute;bottom:25px;left:25px;z-index:10}#layerselect ul[data-v-6d744362]{display:-webkit-box;display:-ms-flexbox;display:flex;list-style:none;padding:0;margin:0;border:1px solid #82c8a0;border-radius:6px}#layerselect li[data-v-6d744362]{display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#eee;border-right:1px solid #82c8a0}#layerselect li[data-v-6d744362]:first-child{border-radius:4px 0 0 4px}#layerselect li[data-v-6d744362]:last-child{border-right:none;border-radius:0 4px 4px 0}#layerselect li[data-v-6d744362]:hover{background-color:#82c8a0}#layerselect li a[data-v-6d744362]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px;text-decoration:none}#layerselect .layer-selected[data-v-6d744362]{background-color:#82c8a0}#zoomer[data-v-6d744362]{position:absolute;top:15px;right:25px;z-index:11}#FPS[data-v-6d744362]{position:absolute;top:0;right:75px;z-index:11;color:#fff} \ No newline at end of file diff --git a/server/static/css/app.880b3dbe.css b/server/static/css/app.880b3dbe.css new file mode 100644 index 000000000..753d7ac04 --- /dev/null +++ b/server/static/css/app.880b3dbe.css @@ -0,0 +1 @@ +@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css);@import url(https://fonts.googleapis.com/css?family=Open+Sans);#app,body,html{margin:0;padding:0;border:0;width:100%;height:100%;font-family:Open Sans,sans-serif;font-weight:200}#app{display:-webkit-box;display:-ms-flexbox;display:flex;background:url(/static/img/login_background.png) repeat fixed}.ContextMenu{position:fixed;z-index:11}.ContextMenu ul{border:1px solid #ff7052;border-radius:5px;background:#fff;padding:0;list-style:none;margin:0}.ContextMenu ul li{border-bottom:1px solid #ff7052;padding:5px;cursor:pointer}.ContextMenu ul li:hover{background-color:#ff7052}.ContextMenu ul li:last-child{border-bottom:none}.ContextMenu>ul>li{clear:left;position:relative}.ContextMenu>ul>li ul{display:none;position:absolute;left:100%;top:-1px}.ContextMenu>ul>li:hover ul{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.hide[data-v-12ed61ba]{display:none}.mask[data-v-12ed61ba]{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%}.dialog-mask[data-v-12ed61ba]{pointer-events:none}.modal-mask[data-v-12ed61ba]{background-color:rgba(0,0,0,.5);-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.modal-container[data-v-12ed61ba]{pointer-events:auto;position:absolute;width:auto;height:auto;background-color:#fff;border-radius:2px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.33);box-shadow:0 2px 8px rgba(0,0,0,.33);font-family:Helvetica,Arial,sans-serif}.modal-enter[data-v-12ed61ba],.modal-leave-active[data-v-12ed61ba]{opacity:0}.modal-enter .modal-container[data-v-12ed61ba],.modal-leave-active .modal-container[data-v-12ed61ba]{-webkit-transform:scale(1.1);transform:scale(1.1)}.modal-header[data-v-1883e207]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-1883e207]{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}button[data-v-1883e207]:first-of-type{margin-right:10px}.modal-header[data-v-0602c2e6]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-0602c2e6]{padding:10px;padding-bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.modal-footer[data-v-0602c2e6]{padding-top:0;padding:10px;text-align:right}[v-cloak],[v-cloak] *{display:none}body,html{padding:0;margin:0;width:100%;height:100%;background:url(/static/img/login_background.png) repeat fixed;font-family:Open Sans,sans-serif}#AssetManager{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#titlebar{padding:15px;margin:10px;font-size:30px;font-weight:700;background-color:#ff7052;color:#fff;text-align:center;border:1px solid #000;-webkit-box-shadow:2px 2px grey;box-shadow:2px 2px grey}#main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;height:100%}#asset-details,#assets{background-color:#fff;border:1px solid #000;margin:10px;position:relative;padding-top:45px;padding-bottom:45px;-webkit-box-shadow:3px 3px grey;box-shadow:3px 3px grey}#assets{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}#asset-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:15px;max-width:50%;overflow:scroll}#asset-details img{width:100%}#breadcrumbs{position:absolute;left:0;top:0;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;z-index:1;background-color:#ff7052;color:#fff;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:5px;border-bottom-right-radius:10px}#breadcrumbs>div{position:relative;padding:10px;padding-left:20px;text-align:center}#breadcrumbs>div:first-child{padding-left:10px}#breadcrumbs div:last-child:after{content:none}#breadcrumbs div:after{content:"";position:absolute;display:inline-block;width:30px;height:30px;top:3px;right:-10px;background-color:transparent;border-top-right-radius:5px;-webkit-transform:scale(.707) rotate(45deg);transform:scale(.707) rotate(45deg);-webkit-box-shadow:1px -1px rgba(0,0,0,.25);box-shadow:1px -1px rgba(0,0,0,.25);z-index:1}#actionbar{position:absolute;right:0;top:0;padding:8px;border-bottom-left-radius:10px;background-color:#ff7052;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff}#actionbar>div{margin:5px}#actionbar>div:hover{cursor:pointer}#explorer{position:relative;left:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));max-width:100%;max-height:100%;overflow:auto}.inode{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:15px}.inode-selected,.inode:hover{cursor:pointer;background-color:#ff7052}.inode *{pointer-events:none}.title{word-break:break-all}#asset-detail-title{font-weight:700;font-size:30px;border-bottom:2px solid #000;margin-bottom:15px;text-align:center}[data-v-bc30fc14]{-ms-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}form[data-v-bc30fc14]{position:relative;top:50%;width:250px;display:table;margin:-150px auto 0 auto;background:#fff;border-radius:4px}.legend[data-v-bc30fc14]{position:relative;text-align:center;width:100%;display:block;background:#ff7052;padding:15px;color:#fff;font-size:20px}.legend[data-v-bc30fc14]:after{content:"";opacity:.06;top:0;left:0;bottom:0;right:0;position:absolute}.input[data-v-bc30fc14]{position:relative;width:90%;margin:15px auto}.input span[data-v-bc30fc14]{position:absolute;display:block;color:#d4d4d4;left:10px;top:8px;font-size:20px}.input input[data-v-bc30fc14]{width:100%;padding:10px 5px 10px 40px;display:block;border:1px solid #ededed;border-radius:4px;-webkit-transition:.2s ease-out;transition:.2s ease-out;color:#a1a1a1}.input input[data-v-bc30fc14]:focus{padding:10px 5px 10px 10px;outline:0;border-color:#ff7052}.submit[data-v-bc30fc14]{width:45px;height:45px;display:block;margin:0 auto -15px auto;background:#fff;border-radius:100%;border:1px solid #ff7052;color:#ff7052;font-size:24px;cursor:pointer;-webkit-box-shadow:0 0 0 7px #fff;box-shadow:0 0 0 7px #fff;-webkit-transition:.2s ease-out;transition:.2s ease-out}.submit[data-v-bc30fc14]:focus,.submit[data-v-bc30fc14]:hover{background:#ff7052;color:#fff;outline:0}.feedback[data-v-bc30fc14]{position:absolute;bottom:-70px;width:100%;text-align:center;color:#fff;background:#c71585;padding:10px 0;font-size:12px}.feedback[data-v-bc30fc14]:before{bottom:100%;left:50%;border:solid transparent;content:"";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(46,204,113,0);border-bottom-color:#c71585;border-width:10px;margin-left:-10px}[data-v-61eb1455]{-ms-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}a[data-v-61eb1455]{text-decoration:inherit;color:inherit;width:100%;display:block;text-align:center;border:1px solid #ff7052}a[data-v-61eb1455]:hover{background-color:#ff7052;color:#fff}a[data-v-61eb1455]:first-child{border-radius:10px 10px 0 0}a[data-v-61eb1455]:last-child{border-radius:0 0 10px 10px}a[data-v-61eb1455]:only-child{border-radius:10px}#formcontainer[data-v-61eb1455]{margin:auto}form[data-v-61eb1455]{background:#fff;border-radius:4px}.legend[data-v-61eb1455]{position:relative;text-align:center;width:100%;display:block;background:#ff7052;padding:15px;color:#fff;font-size:20px}.legend[data-v-61eb1455]:after{content:"";opacity:.06;top:0;left:0;bottom:0;right:0;position:absolute}#account-options[data-v-61eb1455]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#fff;border-radius:4px;margin-top:50px;height:45px}#account-options form[data-v-61eb1455]{background:none;border-radius:0;width:50%}.input[data-v-61eb1455]{position:relative;width:90%;margin:15px auto}.input span[data-v-61eb1455]{position:absolute;display:block;color:#d4d4d4;left:10px;top:8px;font-size:20px}.input input[data-v-61eb1455]{width:100%;padding:10px 5px 10px 40px;display:block;border:1px solid #ededed;border-radius:4px;-webkit-transition:.2s ease-out;transition:.2s ease-out;color:#a1a1a1}.input input[data-v-61eb1455]:focus{outline:0;border-color:#ff7052}.submit[data-v-61eb1455]{width:45px;height:45px;display:block;margin:0 auto -15px auto;background:#fff;border-radius:100%;border:1px solid #ff7052;color:#ff7052;font-size:24px;cursor:pointer;-webkit-box-shadow:0 0 0 7px #fff;box-shadow:0 0 0 7px #fff;-webkit-transition:.2s ease-out;transition:.2s ease-out}.submit[data-v-61eb1455]:focus,.submit[data-v-61eb1455]:hover{background:#ff7052;color:#fff;outline:0}.feedback[data-v-61eb1455]{position:absolute;bottom:-70px;width:100%;text-align:center;color:#fff;background:#c71585;padding:10px 0;font-size:12px}.feedback[data-v-61eb1455]:before{bottom:100%;left:50%;border:solid transparent;content:"";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(46,204,113,0);border-bottom-color:#c71585;border-width:10px;margin-left:-10px}h4[data-v-61eb1455]{background-color:#fff;width:100%;text-align:center;border-bottom:1px solid #000;line-height:.1em}h4 span[data-v-61eb1455]{background:#fff;padding:0 10px}.modal-header[data-v-af4dc61a]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-af4dc61a]{position:absolute;top:5px;right:5px}.modal-body[data-v-af4dc61a]{padding:10px}#initiative-list[data-v-af4dc61a]{padding:0;-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}#initiative-list[data-v-af4dc61a],.initiative-actor[data-v-af4dc61a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.initiative-actor[data-v-af4dc61a]{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 5px;margin-bottom:2px;border-radius:5px;border:2px solid transparent}.initiative-selected[data-v-af4dc61a]{border:2px solid #82c8a0;background-color:#82c8a0}.initiative-actor:hover+.initiative-effect[data-v-af4dc61a],.initiative-effect[data-v-af4dc61a]:hover,.initiative-selected+.initiative-effect[data-v-af4dc61a]{display:-webkit-box;display:-ms-flexbox;display:flex;border-color:rgba(130,200,160,.6);background-color:rgba(130,200,160,.6)}.initiative-actor[data-v-af4dc61a]:hover{border:2px solid #82c8a0}.initiative-actor>[data-v-af4dc61a]{width:30px;margin-left:2px}.initiative-effect[data-v-af4dc61a]{display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;margin-right:5px;margin-top:-2px;margin-bottom:5px;padding:2px;border:2px solid transparent;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top:none}.initiative-effect>[data-v-af4dc61a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.initiative-effect>*>[data-v-af4dc61a]{border:none;background-color:inherit;text-align:right;margin-left:20px;min-width:10px}.initiative-effect>*>[data-v-af4dc61a]:first-child{margin-left:0}#initiative-bar[data-v-af4dc61a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:10px;margin-left:10px;margin-top:10px;margin-bottom:-10px;padding:2px}.initiative-bar-button[data-v-af4dc61a]{border:2px solid #82c8a0;border-radius:5px;padding:5px}.initiative-bar-button[data-v-af4dc61a]:hover{color:#fff;background-color:#82c8a0;cursor:pointer}abbr[data-v-4697341e]{text-decoration:none}.scroll[data-v-4697341e]{max-height:20em;overflow-y:auto}.modal-header[data-v-4697341e]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-4697341e]{position:absolute;top:5px;right:5px}.modal-body[data-v-4697341e]{padding:10px;max-width:450px}.separator[data-v-4697341e]{line-height:.1em;margin:7px 0}.separator[data-v-4697341e]:after{position:absolute;left:10px;right:10px;border-bottom:1px solid #000;content:""}.spanrow[data-v-4697341e]{grid-column:start/end}.lower-opacity>[data-v-4697341e]{opacity:.3}.grid[data-v-4697341e]{display:grid;grid-template-columns:[start] 50px [name] 1fr [visible] 30px [remove] 30px [end];grid-row-gap:5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.grid>[data-v-4697341e]{text-align:center}.name[data-v-4697341e]{text-align:left!important}.row[data-v-4697341e]{display:contents}.row>[data-v-4697341e]{padding:5px;height:20px;border:1px solid transparent}.row:hover>[data-v-4697341e]{cursor:pointer;border-top:1px solid #ff7052;border-bottom:1px solid #ff7052;background-color:rgba(0,0,0,.2)}.row:hover>[data-v-4697341e]:first-child{border-left:1px solid #ff7052;border-top-left-radius:10px;border-bottom-left-radius:10px}.row:hover>[data-v-4697341e]:last-child{border-right:1px solid #ff7052;border-top-right-radius:10px;border-bottom-right-radius:10px}#no-labels[data-v-4697341e]{grid-column:start/end;font-style:italic;padding-left:50px}#addLabelButton[data-v-4697341e]{grid-column:visible/end}.outer[data-v-d32461a4]{padding:5px;border:1px solid #000;border-radius:3px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.current-color[data-v-d32461a4]{width:13px;height:13px;background-color:#000;border:1px solid #000}.mask[data-v-d32461a4]{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%}.preview[data-v-6d718094]{position:fixed;z-index:50;left:200px;top:0}.asset-preview-image[data-v-6d718094]{width:100%;max-width:250px}.draggable[data-v-6d718094]{list-style:none;font-family:helvetica}.token[data-v-6d718094]{padding-top:5px;padding-bottom:5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.token img[data-v-6d718094]{margin-right:5px}.token svg[data-v-6d718094]{margin-left:auto}.folder>[data-v-6d718094]{display:none}.directory>.file[data-v-6d718094],.directory>.folder[data-v-6d718094]{display:block}.folder[data-v-6d718094]:hover{font-weight:700;cursor:pointer}.folder:hover>[data-v-6d718094]{font-weight:400}.folder>[data-v-aaf3f05e]{display:none}.directory>.file[data-v-aaf3f05e],.directory>.folder[data-v-aaf3f05e]{display:block}.folder[data-v-aaf3f05e]:hover{font-weight:700;cursor:pointer}.folder:hover>[data-v-aaf3f05e]{font-weight:400}#menuContainer[data-v-aaf3f05e]{position:absolute;z-index:20;top:0;left:0;height:100%;width:100%;pointer-events:none}#menu[data-v-aaf3f05e]{height:100%;max-width:200px}#locations-menu[data-v-aaf3f05e],#menu[data-v-aaf3f05e]{position:absolute;top:0;left:0;z-index:21;background-color:#fa5a5a;overflow:auto;pointer-events:auto}#locations-menu[data-v-aaf3f05e]{max-height:100px;width:100%}#locations-menu>div[data-v-aaf3f05e]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}#locations-menu>div>div[data-v-aaf3f05e]{background-color:#fff;text-align:center;line-height:100px;width:100px;border-right:1px solid #82c8a0}#locations-menu>div>div[data-v-aaf3f05e]:hover{cursor:pointer;background-color:#82c8a0}.actionButton[data-v-aaf3f05e]{position:absolute;right:0;margin:5px;margin-right:10px;padding:0}.accordion[data-v-aaf3f05e]{background-color:#eee;color:#444;cursor:pointer;padding:18px;text-align:left;border:none;outline:none;-webkit-transition:.4s;transition:.4s;border-top:1px solid #82c8a0;width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}.accordion-active[data-v-aaf3f05e],.accordion[data-v-aaf3f05e]:hover{background-color:#82c8a0}.accordion-panel[data-v-aaf3f05e]{background-color:#fff;display:none;overflow:hidden;min-height:2em}.accordion-subpanel[data-v-aaf3f05e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.accordion-subpanel>[data-v-aaf3f05e]{padding:5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.accordion-subpanel>[data-v-aaf3f05e]:hover{background-color:#82c8a0}#exitButton[data-v-aaf3f05e]{position:fixed;bottom:0;width:100%}#radialmenu[data-v-aaf3f05e]{position:absolute;z-index:20;width:0;height:0;pointer-events:auto}.rm-list-dm #rm-locations svg[data-v-aaf3f05e]{margin-left:50px}.rm-list-dm #rm-settings svg[data-v-aaf3f05e]{margin-bottom:50px}.rm-wrapper[data-v-aaf3f05e]{position:relative;width:200px;height:200px;top:-100px;left:-100px}.rm-wrapper .rm-topper[data-v-aaf3f05e]{pointer-events:none;text-align:center;line-height:50px;font-size:25px}.rm-wrapper .rm-toggler[data-v-aaf3f05e],.rm-wrapper .rm-topper[data-v-aaf3f05e]{display:block;position:absolute;width:50px;height:50px;left:50%;top:50%;margin-left:-25px;margin-top:-25px;background:#fa5a5a;color:#fff;border-radius:50%}.rm-wrapper .rm-toggler .rm-list[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list[data-v-aaf3f05e]{opacity:.5;list-style:none;padding:0;width:200px;height:200px;overflow:hidden;display:block;border-radius:50%;-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,.2);box-shadow:0 0 10px 0 rgba(0,0,0,.2);margin:-75px 0 0 -75px}.rm-list-dm[data-v-aaf3f05e]{-webkit-transform:rotate(135deg)!important;transform:rotate(135deg)!important}.rm-wrapper .rm-toggler:hover .rm-list[data-v-aaf3f05e],.rm-wrapper .rm-topper:hover .rm-list[data-v-aaf3f05e]{opacity:1}.rm-wrapper .rm-toggler .rm-list .rm-item[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list .rm-item[data-v-aaf3f05e]{display:table;width:50%;height:50%;float:left;text-align:center;-webkit-box-shadow:inset 0 0 2px 0 rgba(0,0,0,.2);box-shadow:inset 0 0 2px 0 rgba(0,0,0,.2);background-color:#fff}.rm-wrapper .rm-toggler .rm-list .rm-item[data-v-aaf3f05e]:hover,.rm-wrapper .rm-topper .rm-list .rm-item[data-v-aaf3f05e]:hover{background-color:#82c8a0}.rm-wrapper .rm-toggler .rm-list .rm-item:hover a[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list .rm-item:hover a[data-v-aaf3f05e]{color:#fff}.rm-wrapper .rm-toggler .rm-list .rm-item a[data-v-aaf3f05e],.rm-wrapper .rm-topper .rm-list .rm-item a[data-v-aaf3f05e]{display:table-cell;vertical-align:middle;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);text-decoration:none;font-size:25px;color:#82c8a0;border:none;outline:none}.settings-enter-active[data-v-aaf3f05e],.settings-leave-active[data-v-aaf3f05e]{-webkit-transition:width .5s;transition:width .5s}.settings-enter[data-v-aaf3f05e],.settings-leave-to[data-v-aaf3f05e]{width:0}.settings-enter-to[data-v-aaf3f05e],.settings-leave[data-v-aaf3f05e]{width:200px}.locations-enter-active[data-v-aaf3f05e],.locations-leave-active[data-v-aaf3f05e]{-webkit-transition:height .5s;transition:height .5s}.locations-enter[data-v-aaf3f05e],.locations-leave-to[data-v-aaf3f05e]{height:0}.locations-enter-to[data-v-aaf3f05e],.locations-leave[data-v-aaf3f05e]{height:100px}.modal-header[data-v-7a3669fd]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-header>input[data-v-7a3669fd]{background-color:inherit;border:none;font-weight:700;font-size:large}.header-close[data-v-7a3669fd]{position:absolute;top:5px;right:5px}.modal-body[data-v-7a3669fd]{padding:10px}.modal-body>textarea[data-v-7a3669fd]{width:100%;min-height:100px;max-height:500px}.modal-footer[data-v-7a3669fd]{padding-top:0;padding:10px;text-align:right}.modal-header[data-v-23de098e]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-23de098e]{position:absolute;top:5px;right:5px}.modal-body[data-v-23de098e]{padding:10px;max-width:450px}.grid[data-v-23de098e]{display:grid;grid-template-columns:[name] 1fr [numerator] 30px [slash] 5px [denominator] 30px [colour] 40px [visible] 30px [light] 30px [remove] 30px [end];grid-column-gap:5px}.colours[data-v-23de098e],.grid[data-v-23de098e]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.colours[data-v-23de098e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header[data-v-23de098e]{line-height:.1em;margin:20px 0 15px}.header[data-v-23de098e]:after{position:absolute;right:5px;width:75%;border-bottom:1px solid #000;content:""}.spanrow[data-v-23de098e]{grid-column:1/end}#labels[data-v-23de098e]{-ms-flex-wrap:wrap;flex-wrap:wrap}.label[data-v-23de098e]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;font-size:13px;margin:5px}.label:hover>.label-main[data-v-23de098e]:before{content:"\D7";position:absolute;color:red;font-size:20px;font-weight:700;cursor:pointer;top:-8px;right:-4px;pointer-events:auto}#label-add:hover>.label-main[data-v-23de098e]{pointer-events:auto;cursor:pointer;color:#fff;font-weight:700;background-color:#ff7052}#label-add:hover>.label-main[data-v-23de098e]:before{content:""}.label-user[data-v-23de098e]{border-top-left-radius:10px;border-bottom-left-radius:10px;background-color:#ff7052;border:1px solid #ff7052;padding:5px}.label-main[data-v-23de098e]{border:1px solid #ff7052;border-radius:10px;padding:5px;pointer-events:none}.label-user+.label-main[data-v-23de098e]{border-top-left-radius:0;border-bottom-left-radius:0}input[type=checkbox][data-v-23de098e]{width:16px;height:23px;margin:0 8px 0 8px;white-space:nowrap;display:inline-block}#selection-menu[data-v-674cf937]{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;top:75px;right:0;z-index:10;opacity:.5;border-top-left-radius:5px;border-bottom-left-radius:5px;border:1px solid #82c8a0;border-right:none;padding:10px 35px 10px 10px;background-color:#eee}#selection-menu[data-v-674cf937]:hover{background-color:#82c8a0;opacity:1}#selection-edit-button[data-v-674cf937]{position:absolute;right:10px;top:10px;cursor:pointer}#selection-auras[data-v-674cf937],#selection-trackers[data-v-674cf937]{display:grid;grid-template-columns:[name] 1fr [value] 1fr}.selection-aura-value[data-v-674cf937],.selection-tracker-value[data-v-674cf937]{justify-self:center;padding:2px}.selection-aura-value[data-v-674cf937]:hover,.selection-tracker-value[data-v-674cf937]:hover{cursor:pointer;background-color:rgba(20,20,20,.2)}#selection-name[data-v-674cf937]{font-size:20px;font-weight:700;margin-bottom:10px}.ContextMenu ul[data-v-759e5a8a]{border:1px solid #82c8a0}.ContextMenu ul li[data-v-759e5a8a]{border-bottom:1px solid #82c8a0}.ContextMenu ul li[data-v-759e5a8a]:hover{background-color:#82c8a0}canvas[data-v-73816298]{grid-column:label/end;justify-self:center}.modal-header[data-v-73816298]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-73816298]{padding:10px;display:grid;grid-template-columns:[label] 1fr [value] 2fr [end];grid-row-gap:10px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.modal-footer[data-v-73816298]{padding-top:0;padding:10px;text-align:right}.colours[data-v-73816298]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.tool-detail{position:absolute;right:var(--detailRight);bottom:80px;z-index:11;border:1px solid #2b2b2b;background-color:#fff;display:grid;padding:10px;grid-template-columns:auto auto;grid-column-gap:5px;grid-row-gap:2px}.tool-detail:after{content:"";position:absolute;right:var(--detailArrow);bottom:0;width:0;height:0;border:14px solid transparent;border-top-color:#000;border-bottom:0;margin-left:-14px;margin-bottom:-14px}.tool-detail input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.option[data-v-639cd890]{padding:6px;border:1px solid #82c8a0;border-radius:0;-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:13px;min-width:25px}.option-selected[data-v-639cd890],.option[data-v-639cd890]:hover{background-color:#82c8a0}.selectgroup[data-v-639cd890]{display:-webkit-box;display:-ms-flexbox;display:flex}.selectgroup>.option[data-v-639cd890]:first-of-type{border-top-left-radius:10px;border-bottom-left-radius:10px}.selectgroup>.option[data-v-639cd890]:last-of-type{border-top-right-radius:10px;border-bottom-right-radius:10px}.accordion[data-v-0bf2b7ba]{border:2px solid #ff7052;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;-webkit-user-drag:none!important}#header[data-v-0bf2b7ba]{background-color:#ff7052;cursor:pointer;padding:.5em;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[type=checkbox][data-v-0bf2b7ba]{width:-webkit-min-content;width:-moz-min-content;width:min-content;margin-right:10px}#body[data-v-0bf2b7ba]{padding:.3em;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#body[data-v-0bf2b7ba],.item[data-v-0bf2b7ba]{display:-webkit-box;display:-ms-flexbox;display:flex}.item[data-v-0bf2b7ba]{padding:.2em;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.item[data-v-0bf2b7ba]:hover{background-color:#ff7052;cursor:pointer}.accordion{margin-bottom:.2em}.accordion:last-of-type{margin-bottom:0}.tool-detail{display:block}#accordion-container[data-v-847e7ec4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;overflow-y:auto;max-height:25em}.ContextMenu ul[data-v-44a31e42]{border:1px solid #82c8a0}.ContextMenu ul li[data-v-44a31e42]{border-bottom:1px solid #82c8a0}.ContextMenu ul li[data-v-44a31e42]:hover{background-color:#82c8a0}#toolselect[data-v-cf33581e]{position:absolute;bottom:25px;right:25px;z-index:10}#toolselect [data-v-cf33581e]{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;-webkit-user-drag:none!important}#toolselect>ul[data-v-cf33581e]{display:-webkit-box;display:-ms-flexbox;display:flex;list-style:none;padding:0;margin:0;border:1px solid #82c8a0;border-radius:7px}#toolselect>ul>li[data-v-cf33581e]{display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#eee;border-right:1px solid #82c8a0}#toolselect>ul>li[data-v-cf33581e]:last-child{border-right:none;border-radius:0 4px 4px 0}#toolselect>ul>li[data-v-cf33581e]:first-child{border-radius:4px 0 0 4px}#toolselect>ul>li[data-v-cf33581e]:hover{background-color:#82c8a0}#toolselect>ul>li a[data-v-cf33581e]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px;text-decoration:none}#toolselect .tool-selected[data-v-cf33581e]{background-color:#82c8a0}a,a:active,a:hover,a:visited{color:inherit}svg{cursor:pointer}.notAllowed,.notAllowed>*{cursor:not-allowed!important}#layers,#layers canvas{width:100%;height:100%;position:absolute;left:0;top:0;overflow:hidden}#main[data-v-05b88da7]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}#board[data-v-05b88da7]{position:relative;width:100%;height:100%}#layerselect[data-v-05b88da7]{position:absolute;bottom:25px;left:25px;z-index:10}#layerselect [data-v-05b88da7]{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;-webkit-user-drag:none!important}#layerselect ul[data-v-05b88da7]{display:-webkit-box;display:-ms-flexbox;display:flex;list-style:none;padding:0;margin:0;border:1px solid #82c8a0;border-radius:6px}#layerselect li[data-v-05b88da7]{display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#eee;border-right:1px solid #82c8a0}#layerselect li[data-v-05b88da7]:first-child{border-radius:4px 0 0 4px}#layerselect li[data-v-05b88da7]:last-child{border-right:none;border-radius:0 4px 4px 0}#layerselect li[data-v-05b88da7]:hover{background-color:#82c8a0}#layerselect li a[data-v-05b88da7]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px;text-decoration:none}#layerselect .layer-selected[data-v-05b88da7]{background-color:#82c8a0}#zoomer[data-v-05b88da7]{position:absolute;top:15px;right:25px;z-index:11}#FPS[data-v-05b88da7]{position:absolute;top:0;right:75px;z-index:11;color:#fff} \ No newline at end of file diff --git a/server/static/extern/css/jquery-ui-1.12.1.css b/server/static/extern/css/jquery-ui-1.12.1.css deleted file mode 100644 index a22ecb05c..000000000 --- a/server/static/extern/css/jquery-ui-1.12.1.css +++ /dev/null @@ -1,1311 +0,0 @@ -/*! jQuery UI - v1.12.1 - 2016-09-14 -* http://jqueryui.com -* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { - display: none; -} -.ui-helper-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} -.ui-helper-reset { - margin: 0; - padding: 0; - border: 0; - outline: 0; - line-height: 1.3; - text-decoration: none; - font-size: 100%; - list-style: none; -} -.ui-helper-clearfix:before, -.ui-helper-clearfix:after { - content: ""; - display: table; - border-collapse: collapse; -} -.ui-helper-clearfix:after { - clear: both; -} -.ui-helper-zfix { - width: 100%; - height: 100%; - top: 0; - left: 0; - position: absolute; - opacity: 0; - filter:Alpha(Opacity=0); /* support: IE8 */ -} - -.ui-front { - z-index: 100; -} - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { - cursor: default !important; - pointer-events: none; -} - - -/* Icons -----------------------------------*/ -.ui-icon { - display: inline-block; - vertical-align: middle; - margin-top: -.25em; - position: relative; - text-indent: -99999px; - overflow: hidden; - background-repeat: no-repeat; -} - -.ui-widget-icon-block { - left: 50%; - margin-left: -8px; - display: block; -} - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.ui-accordion .ui-accordion-header { - display: block; - cursor: pointer; - position: relative; - margin: 2px 0 0 0; - padding: .5em .5em .5em .7em; - font-size: 100%; -} -.ui-accordion .ui-accordion-content { - padding: 1em 2.2em; - border-top: 0; - overflow: auto; -} -.ui-autocomplete { - position: absolute; - top: 0; - left: 0; - cursor: default; -} -.ui-menu { - list-style: none; - padding: 0; - margin: 0; - display: block; - outline: 0; -} -.ui-menu .ui-menu { - position: absolute; -} -.ui-menu .ui-menu-item { - margin: 0; - cursor: pointer; - /* support: IE10, see #8844 */ - list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); -} -.ui-menu .ui-menu-item-wrapper { - position: relative; - padding: 3px 1em 3px .4em; -} -.ui-menu .ui-menu-divider { - margin: 5px 0; - height: 0; - font-size: 0; - line-height: 0; - border-width: 1px 0 0 0; -} -.ui-menu .ui-state-focus, -.ui-menu .ui-state-active { - margin: -1px; -} - -/* icon support */ -.ui-menu-icons { - position: relative; -} -.ui-menu-icons .ui-menu-item-wrapper { - padding-left: 2em; -} - -/* left-aligned */ -.ui-menu .ui-icon { - position: absolute; - top: 0; - bottom: 0; - left: .2em; - margin: auto 0; -} - -/* right-aligned */ -.ui-menu .ui-menu-icon { - left: auto; - right: 0; -} -.ui-button { - padding: .4em 1em; - display: inline-block; - position: relative; - line-height: normal; - margin-right: .1em; - cursor: pointer; - vertical-align: middle; - text-align: center; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - /* Support: IE <= 11 */ - overflow: visible; -} - -.ui-button, -.ui-button:link, -.ui-button:visited, -.ui-button:hover, -.ui-button:active { - text-decoration: none; -} - -/* to make room for the icon, a width needs to be set here */ -.ui-button-icon-only { - width: 2em; - box-sizing: border-box; - text-indent: -9999px; - white-space: nowrap; -} - -/* no icon support for input elements */ -input.ui-button.ui-button-icon-only { - text-indent: 0; -} - -/* button icon element(s) */ -.ui-button-icon-only .ui-icon { - position: absolute; - top: 50%; - left: 50%; - margin-top: -8px; - margin-left: -8px; -} - -.ui-button.ui-icon-notext .ui-icon { - padding: 0; - width: 2.1em; - height: 2.1em; - text-indent: -9999px; - white-space: nowrap; - -} - -input.ui-button.ui-icon-notext .ui-icon { - width: auto; - height: auto; - text-indent: 0; - white-space: normal; - padding: .4em 1em; -} - -/* workarounds */ -/* Support: Firefox 5 - 40 */ -input.ui-button::-moz-focus-inner, -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; -} -.ui-controlgroup { - vertical-align: middle; - display: inline-block; -} -.ui-controlgroup > .ui-controlgroup-item { - float: left; - margin-left: 0; - margin-right: 0; -} -.ui-controlgroup > .ui-controlgroup-item:focus, -.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus { - z-index: 9999; -} -.ui-controlgroup-vertical > .ui-controlgroup-item { - display: block; - float: none; - width: 100%; - margin-top: 0; - margin-bottom: 0; - text-align: left; -} -.ui-controlgroup-vertical .ui-controlgroup-item { - box-sizing: border-box; -} -.ui-controlgroup .ui-controlgroup-label { - padding: .4em 1em; -} -.ui-controlgroup .ui-controlgroup-label span { - font-size: 80%; -} -.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item { - border-left: none; -} -.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item { - border-top: none; -} -.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content { - border-right: none; -} -.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content { - border-bottom: none; -} - -/* Spinner specific style fixes */ -.ui-controlgroup-vertical .ui-spinner-input { - - /* Support: IE8 only, Android < 4.4 only */ - width: 75%; - width: calc( 100% - 2.4em ); -} -.ui-controlgroup-vertical .ui-spinner .ui-spinner-up { - border-top-style: solid; -} - -.ui-checkboxradio-label .ui-icon-background { - box-shadow: inset 1px 1px 1px #ccc; - border-radius: .12em; - border: none; -} -.ui-checkboxradio-radio-label .ui-icon-background { - width: 16px; - height: 16px; - border-radius: 1em; - overflow: visible; - border: none; -} -.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon, -.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon { - background-image: none; - width: 8px; - height: 8px; - border-width: 4px; - border-style: solid; -} -.ui-checkboxradio-disabled { - pointer-events: none; -} -.ui-datepicker { - width: 17em; - padding: .2em .2em 0; - display: none; -} -.ui-datepicker .ui-datepicker-header { - position: relative; - padding: .2em 0; -} -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-next { - position: absolute; - top: 2px; - width: 1.8em; - height: 1.8em; -} -.ui-datepicker .ui-datepicker-prev-hover, -.ui-datepicker .ui-datepicker-next-hover { - top: 1px; -} -.ui-datepicker .ui-datepicker-prev { - left: 2px; -} -.ui-datepicker .ui-datepicker-next { - right: 2px; -} -.ui-datepicker .ui-datepicker-prev-hover { - left: 1px; -} -.ui-datepicker .ui-datepicker-next-hover { - right: 1px; -} -.ui-datepicker .ui-datepicker-prev span, -.ui-datepicker .ui-datepicker-next span { - display: block; - position: absolute; - left: 50%; - margin-left: -8px; - top: 50%; - margin-top: -8px; -} -.ui-datepicker .ui-datepicker-title { - margin: 0 2.3em; - line-height: 1.8em; - text-align: center; -} -.ui-datepicker .ui-datepicker-title select { - font-size: 1em; - margin: 1px 0; -} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { - width: 45%; -} -.ui-datepicker table { - width: 100%; - font-size: .9em; - border-collapse: collapse; - margin: 0 0 .4em; -} -.ui-datepicker th { - padding: .7em .3em; - text-align: center; - font-weight: bold; - border: 0; -} -.ui-datepicker td { - border: 0; - padding: 1px; -} -.ui-datepicker td span, -.ui-datepicker td a { - display: block; - padding: .2em; - text-align: right; - text-decoration: none; -} -.ui-datepicker .ui-datepicker-buttonpane { - background-image: none; - margin: .7em 0 0 0; - padding: 0 .2em; - border-left: 0; - border-right: 0; - border-bottom: 0; -} -.ui-datepicker .ui-datepicker-buttonpane button { - float: right; - margin: .5em .2em .4em; - cursor: pointer; - padding: .2em .6em .3em .6em; - width: auto; - overflow: visible; -} -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { - float: left; -} - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { - width: auto; -} -.ui-datepicker-multi .ui-datepicker-group { - float: left; -} -.ui-datepicker-multi .ui-datepicker-group table { - width: 95%; - margin: 0 auto .4em; -} -.ui-datepicker-multi-2 .ui-datepicker-group { - width: 50%; -} -.ui-datepicker-multi-3 .ui-datepicker-group { - width: 33.3%; -} -.ui-datepicker-multi-4 .ui-datepicker-group { - width: 25%; -} -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { - border-left-width: 0; -} -.ui-datepicker-multi .ui-datepicker-buttonpane { - clear: left; -} -.ui-datepicker-row-break { - clear: both; - width: 100%; - font-size: 0; -} - -/* RTL support */ -.ui-datepicker-rtl { - direction: rtl; -} -.ui-datepicker-rtl .ui-datepicker-prev { - right: 2px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next { - left: 2px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-prev:hover { - right: 1px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next:hover { - left: 1px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane { - clear: right; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button { - float: left; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, -.ui-datepicker-rtl .ui-datepicker-group { - float: right; -} -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} - -/* Icons */ -.ui-datepicker .ui-icon { - display: block; - text-indent: -99999px; - overflow: hidden; - background-repeat: no-repeat; - left: .5em; - top: .3em; -} -.ui-dialog { - position: absolute; - top: 0; - left: 0; - padding: .2em; - outline: 0; -} -.ui-dialog .ui-dialog-titlebar { - padding: .4em 1em; - position: relative; -} -.ui-dialog .ui-dialog-title { - float: left; - margin: .1em 0; - white-space: nowrap; - width: 90%; - overflow: hidden; - text-overflow: ellipsis; -} -.ui-dialog .ui-dialog-titlebar-close { - position: absolute; - right: .3em; - top: 50%; - width: 20px; - margin: -10px 0 0 0; - padding: 1px; - height: 20px; -} -.ui-dialog .ui-dialog-content { - position: relative; - border: 0; - padding: .5em 1em; - background: none; - overflow: auto; -} -.ui-dialog .ui-dialog-buttonpane { - text-align: left; - border-width: 1px 0 0 0; - background-image: none; - margin-top: .5em; - padding: .3em 1em .5em .4em; -} -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { - float: right; -} -.ui-dialog .ui-dialog-buttonpane button { - margin: .5em .4em .5em 0; - cursor: pointer; -} -.ui-dialog .ui-resizable-n { - height: 2px; - top: 0; -} -.ui-dialog .ui-resizable-e { - width: 2px; - right: 0; -} -.ui-dialog .ui-resizable-s { - height: 2px; - bottom: 0; -} -.ui-dialog .ui-resizable-w { - width: 2px; - left: 0; -} -.ui-dialog .ui-resizable-se, -.ui-dialog .ui-resizable-sw, -.ui-dialog .ui-resizable-ne, -.ui-dialog .ui-resizable-nw { - width: 7px; - height: 7px; -} -.ui-dialog .ui-resizable-se { - right: 0; - bottom: 0; -} -.ui-dialog .ui-resizable-sw { - left: 0; - bottom: 0; -} -.ui-dialog .ui-resizable-ne { - right: 0; - top: 0; -} -.ui-dialog .ui-resizable-nw { - left: 0; - top: 0; -} -.ui-draggable .ui-dialog-titlebar { - cursor: move; -} -.ui-draggable-handle { - -ms-touch-action: none; - touch-action: none; -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; - -ms-touch-action: none; - touch-action: none; -} -.ui-resizable-disabled .ui-resizable-handle, -.ui-resizable-autohide .ui-resizable-handle { - display: none; -} -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.ui-progressbar { - height: 2em; - text-align: left; - overflow: hidden; -} -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; -} -.ui-progressbar .ui-progressbar-overlay { - background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edq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Il2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); - height: 100%; - filter: alpha(opacity=25); /* support: IE8 */ - opacity: 0.25; -} -.ui-progressbar-indeterminate .ui-progressbar-value { - background-image: none; -} -.ui-selectable { - -ms-touch-action: none; - touch-action: none; -} -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} -.ui-selectmenu-menu { - padding: 0; - margin: 0; - position: absolute; - top: 0; - left: 0; - display: none; -} -.ui-selectmenu-menu .ui-menu { - overflow: auto; - overflow-x: hidden; - padding-bottom: 1px; -} -.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { - font-size: 1em; - font-weight: bold; - line-height: 1.5; - padding: 2px 0.4em; - margin: 0.5em 0 0 0; - height: auto; - border: 0; -} -.ui-selectmenu-open { - display: block; -} -.ui-selectmenu-text { - display: block; - margin-right: 20px; - overflow: hidden; - text-overflow: ellipsis; -} -.ui-selectmenu-button.ui-button { - text-align: left; - white-space: nowrap; - width: 14em; -} -.ui-selectmenu-icon.ui-icon { - float: right; - margin-top: 0; -} -.ui-slider { - position: relative; - text-align: left; -} -.ui-slider .ui-slider-handle { - position: absolute; - z-index: 2; - width: 1.2em; - height: 1.2em; - cursor: default; - -ms-touch-action: none; - touch-action: none; -} -.ui-slider .ui-slider-range { - position: absolute; - z-index: 1; - font-size: .7em; - display: block; - border: 0; - background-position: 0 0; -} - -/* support: IE8 - See #6727 */ -.ui-slider.ui-state-disabled .ui-slider-handle, -.ui-slider.ui-state-disabled .ui-slider-range { - filter: inherit; -} - -.ui-slider-horizontal { - height: .8em; -} -.ui-slider-horizontal .ui-slider-handle { - top: -.3em; - margin-left: -.6em; -} -.ui-slider-horizontal .ui-slider-range { - top: 0; - height: 100%; -} -.ui-slider-horizontal .ui-slider-range-min { - left: 0; -} -.ui-slider-horizontal .ui-slider-range-max { - right: 0; -} - -.ui-slider-vertical { - width: .8em; - height: 100px; -} -.ui-slider-vertical .ui-slider-handle { - left: -.3em; - margin-left: 0; - margin-bottom: -.6em; -} -.ui-slider-vertical .ui-slider-range { - left: 0; - width: 100%; -} -.ui-slider-vertical .ui-slider-range-min { - bottom: 0; -} -.ui-slider-vertical .ui-slider-range-max { - top: 0; -} -.ui-sortable-handle { - -ms-touch-action: none; - touch-action: none; -} -.ui-spinner { - position: relative; - display: inline-block; - overflow: hidden; - padding: 0; - vertical-align: middle; -} -.ui-spinner-input { - border: none; - background: none; - color: inherit; - padding: .222em 0; - margin: .2em 0; - vertical-align: middle; - margin-left: .4em; - margin-right: 2em; -} -.ui-spinner-button { - width: 1.6em; - height: 50%; - font-size: .5em; - padding: 0; - margin: 0; - text-align: center; - position: absolute; - cursor: default; - display: block; - overflow: hidden; - right: 0; -} -/* more specificity required here to override default borders */ -.ui-spinner a.ui-spinner-button { - border-top-style: none; - border-bottom-style: none; - border-right-style: none; -} -.ui-spinner-up { - top: 0; -} -.ui-spinner-down { - bottom: 0; -} -.ui-tabs { - position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ - padding: .2em; -} -.ui-tabs .ui-tabs-nav { - margin: 0; - padding: .2em .2em 0; -} -.ui-tabs .ui-tabs-nav li { - list-style: none; - float: left; - position: relative; - top: 0; - margin: 1px .2em 0 0; - border-bottom-width: 0; - padding: 0; - white-space: nowrap; -} -.ui-tabs .ui-tabs-nav .ui-tabs-anchor { - float: left; - padding: .5em 1em; - text-decoration: none; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active { - margin-bottom: -1px; - padding-bottom: 1px; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, -.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, -.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { - cursor: text; -} -.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { - cursor: pointer; -} -.ui-tabs .ui-tabs-panel { - display: block; - border-width: 0; - padding: 1em 1.4em; - background: none; -} -.ui-tooltip { - padding: 8px; - position: absolute; - z-index: 9999; - max-width: 300px; -} -body .ui-tooltip { - border-width: 2px; -} -/* Component containers -----------------------------------*/ -.ui-widget { - font-family: Arial,Helvetica,sans-serif; - font-size: 1em; -} -.ui-widget .ui-widget { - font-size: 1em; -} -.ui-widget input, -.ui-widget select, -.ui-widget textarea, -.ui-widget button { - font-family: Arial,Helvetica,sans-serif; - font-size: 1em; -} -.ui-widget.ui-widget-content { - border: 1px solid #c5c5c5; -} -.ui-widget-content { - border: 1px solid #dddddd; - background: #ffffff; - color: #333333; -} -.ui-widget-content a { - color: #333333; -} -.ui-widget-header { - border: 1px solid #dddddd; - background: #e9e9e9; - color: #333333; - font-weight: bold; -} -.ui-widget-header a { - color: #333333; -} - -/* Interaction states -----------------------------------*/ -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default, -.ui-button, - -/* We use html here because we need a greater specificity to make sure disabled -works properly when clicked or hovered */ -html .ui-button.ui-state-disabled:hover, -html .ui-button.ui-state-disabled:active { - border: 1px solid #c5c5c5; - background: #f6f6f6; - font-weight: normal; - color: #454545; -} -.ui-state-default a, -.ui-state-default a:link, -.ui-state-default a:visited, -a.ui-button, -a:link.ui-button, -a:visited.ui-button, -.ui-button { - color: #454545; - text-decoration: none; -} -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus, -.ui-button:hover, -.ui-button:focus { - border: 1px solid #cccccc; - background: #ededed; - font-weight: normal; - color: #2b2b2b; -} -.ui-state-hover a, -.ui-state-hover a:hover, -.ui-state-hover a:link, -.ui-state-hover a:visited, -.ui-state-focus a, -.ui-state-focus a:hover, -.ui-state-focus a:link, -.ui-state-focus a:visited, -a.ui-button:hover, -a.ui-button:focus { - color: #2b2b2b; - text-decoration: none; -} - -.ui-visual-focus { - box-shadow: 0 0 3px 1px rgb(94, 158, 214); -} -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active, -a.ui-button:active, -.ui-button:active, -.ui-button.ui-state-active:hover { - border: 1px solid #003eff; - background: #007fff; - font-weight: normal; - color: #ffffff; -} -.ui-icon-background, -.ui-state-active .ui-icon-background { - border: #003eff; - background-color: #ffffff; -} -.ui-state-active a, -.ui-state-active a:link, -.ui-state-active a:visited { - color: #ffffff; - text-decoration: none; -} - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, -.ui-widget-content .ui-state-highlight, -.ui-widget-header .ui-state-highlight { - border: 1px solid #dad55e; - background: #fffa90; - color: #777620; -} -.ui-state-checked { - border: 1px solid #dad55e; - background: #fffa90; -} -.ui-state-highlight a, -.ui-widget-content .ui-state-highlight a, -.ui-widget-header .ui-state-highlight a { - color: #777620; -} -.ui-state-error, -.ui-widget-content .ui-state-error, -.ui-widget-header .ui-state-error { - border: 1px solid #f1a899; - background: #fddfdf; - color: #5f3f3f; -} -.ui-state-error a, -.ui-widget-content .ui-state-error a, -.ui-widget-header .ui-state-error a { - color: #5f3f3f; -} -.ui-state-error-text, -.ui-widget-content .ui-state-error-text, -.ui-widget-header .ui-state-error-text { - color: #5f3f3f; -} -.ui-priority-primary, -.ui-widget-content .ui-priority-primary, -.ui-widget-header .ui-priority-primary { - font-weight: bold; -} -.ui-priority-secondary, -.ui-widget-content .ui-priority-secondary, -.ui-widget-header .ui-priority-secondary { - opacity: .7; - filter:Alpha(Opacity=70); /* support: IE8 */ - font-weight: normal; -} -.ui-state-disabled, -.ui-widget-content .ui-state-disabled, -.ui-widget-header .ui-state-disabled { - opacity: .35; - filter:Alpha(Opacity=35); /* support: IE8 */ - background-image: none; -} -.ui-state-disabled .ui-icon { - filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ -} - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - width: 16px; - height: 16px; -} -.ui-icon, -.ui-widget-content .ui-icon { - background-image: url("images/ui-icons_444444_256x240.png"); -} -.ui-widget-header .ui-icon { - background-image: url("images/ui-icons_444444_256x240.png"); -} -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon, -.ui-button:hover .ui-icon, -.ui-button:focus .ui-icon { - background-image: url("images/ui-icons_555555_256x240.png"); -} -.ui-state-active .ui-icon, -.ui-button:active .ui-icon { - background-image: url("images/ui-icons_ffffff_256x240.png"); -} -.ui-state-highlight .ui-icon, -.ui-button .ui-state-highlight.ui-icon { - background-image: url("images/ui-icons_777620_256x240.png"); -} -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon { - background-image: url("images/ui-icons_cc0000_256x240.png"); -} -.ui-button .ui-icon { - background-image: url("images/ui-icons_777777_256x240.png"); -} - -/* positioning */ -.ui-icon-blank { background-position: 16px 16px; } -.ui-icon-caret-1-n { background-position: 0 0; } -.ui-icon-caret-1-ne { background-position: -16px 0; } -.ui-icon-caret-1-e { background-position: -32px 0; } -.ui-icon-caret-1-se { background-position: -48px 0; } -.ui-icon-caret-1-s { background-position: -65px 0; } -.ui-icon-caret-1-sw { background-position: -80px 0; } -.ui-icon-caret-1-w { background-position: -96px 0; } -.ui-icon-caret-1-nw { background-position: -112px 0; } -.ui-icon-caret-2-n-s { background-position: -128px 0; } -.ui-icon-caret-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -65px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -65px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 1px -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-on { background-position: -96px -144px; } -.ui-icon-radio-off { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, -.ui-corner-top, -.ui-corner-left, -.ui-corner-tl { - border-top-left-radius: 3px; -} -.ui-corner-all, -.ui-corner-top, -.ui-corner-right, -.ui-corner-tr { - border-top-right-radius: 3px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-left, -.ui-corner-bl { - border-bottom-left-radius: 3px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-right, -.ui-corner-br { - border-bottom-right-radius: 3px; -} - -/* Overlays */ -.ui-widget-overlay { - background: #aaaaaa; - opacity: .3; - filter: Alpha(Opacity=30); /* support: IE8 */ -} -.ui-widget-shadow { - -webkit-box-shadow: 0px 0px 5px #666666; - box-shadow: 0px 0px 5px #666666; -} diff --git a/server/static/extern/css/spectrum.css b/server/static/extern/css/spectrum.css deleted file mode 100644 index a8ad9e4f8..000000000 --- a/server/static/extern/css/spectrum.css +++ /dev/null @@ -1,507 +0,0 @@ -/*** -Spectrum Colorpicker v1.8.0 -https://github.com/bgrins/spectrum -Author: Brian Grinstead -License: MIT -***/ - -.sp-container { - position:absolute; - top:0; - left:0; - display:inline-block; - *display: inline; - *zoom: 1; - /* https://github.com/bgrins/spectrum/issues/40 */ - z-index: 9999994; - overflow: hidden; -} -.sp-container.sp-flat { - position: relative; -} - -/* Fix for * { box-sizing: border-box; } */ -.sp-container, -.sp-container * { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ -.sp-top { - position:relative; - width: 100%; - display:inline-block; -} -.sp-top-inner { - position:absolute; - top:0; - left:0; - bottom:0; - right:0; -} -.sp-color { - position: absolute; - top:0; - left:0; - bottom:0; - right:20%; -} -.sp-hue { - position: absolute; - top:0; - right:0; - bottom:0; - left:84%; - height: 100%; -} - -.sp-clear-enabled .sp-hue { - top:33px; - height: 77.5%; -} - -.sp-fill { - padding-top: 80%; -} -.sp-sat, .sp-val { - position: absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.sp-alpha-enabled .sp-top { - margin-bottom: 18px; -} -.sp-alpha-enabled .sp-alpha { - display: block; -} -.sp-alpha-handle { - position:absolute; - top:-4px; - bottom: -4px; - width: 6px; - left: 50%; - cursor: pointer; - border: 1px solid black; - background: white; - opacity: .8; -} -.sp-alpha { - display: none; - position: absolute; - bottom: -14px; - right: 0; - left: 0; - height: 8px; -} -.sp-alpha-inner { - border: solid 1px #333; -} - -.sp-clear { - display: none; -} - -.sp-clear.sp-clear-display { - background-position: center; -} - -.sp-clear-enabled .sp-clear { - display: block; - position:absolute; - top:0px; - right:0; - bottom:0; - left:84%; - height: 28px; -} - -/* Don't allow text selection */ -.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { - -webkit-user-select:none; - -moz-user-select: -moz-none; - -o-user-select:none; - user-select: none; -} - -.sp-container.sp-input-disabled .sp-input-container { - display: none; -} -.sp-container.sp-buttons-disabled .sp-button-container { - display: none; -} -.sp-container.sp-palette-buttons-disabled .sp-palette-button-container { - display: none; -} -.sp-palette-only .sp-picker-container { - display: none; -} -.sp-palette-disabled .sp-palette-container { - display: none; -} - -.sp-initial-disabled .sp-initial { - display: none; -} - - -/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ -.sp-sat { - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; - filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); -} -.sp-val { - background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); - background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); - background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); - background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; - filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); -} - -.sp-hue { - background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); - background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); - background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); -} - -/* IE filters do not support multiple color stops. - Generate 6 divs, line them up, and do two color gradients for each. - Yes, really. - */ -.sp-1 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); -} -.sp-2 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); -} -.sp-3 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); -} -.sp-4 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); -} -.sp-5 { - height:16%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); -} -.sp-6 { - height:17%; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); -} - -.sp-hidden { - display: none !important; -} - -/* Clearfix hack */ -.sp-cf:before, .sp-cf:after { content: ""; display: table; } -.sp-cf:after { clear: both; } -.sp-cf { *zoom: 1; } - -/* Mobile devices, make hue slider bigger so it is easier to slide */ -@media (max-device-width: 480px) { - .sp-color { right: 40%; } - .sp-hue { left: 63%; } - .sp-fill { padding-top: 60%; } -} -.sp-dragger { - border-radius: 5px; - height: 5px; - width: 5px; - border: 1px solid #fff; - background: #000; - cursor: pointer; - position:absolute; - top:0; - left: 0; -} -.sp-slider { - position: absolute; - top:0; - cursor:pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid #000; - background: white; - opacity: .8; -} - -/* -Theme authors: -Here are the basic themeable display options (colors, fonts, global widths). -See http://bgrins.github.io/spectrum/themes/ for instructions. -*/ - -.sp-container { - border-radius: 0; - background-color: #ECECEC; - border: solid 1px #f0c49B; - padding: 0; -} -.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear { - font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} -.sp-top { - margin-bottom: 3px; -} -.sp-color, .sp-hue, .sp-clear { - border: solid 1px #666; -} - -/* Input */ -.sp-input-container { - float:right; - width: 100px; - margin-bottom: 4px; -} -.sp-initial-disabled .sp-input-container { - width: 100%; -} -.sp-input { - font-size: 12px !important; - border: 1px inset; - padding: 4px 5px; - margin: 0; - width: 100%; - background:transparent; - border-radius: 3px; - color: #222; -} -.sp-input:focus { - border: 1px solid orange; -} -.sp-input.sp-validation-error { - border: 1px solid red; - background: #fdd; -} -.sp-picker-container , .sp-palette-container { - float:left; - position: relative; - padding: 10px; - padding-bottom: 300px; - margin-bottom: -290px; -} -.sp-picker-container { - width: 172px; - border-left: solid 1px #fff; -} - -/* Palettes */ -.sp-palette-container { - border-right: solid 1px #ccc; -} - -.sp-palette-only .sp-palette-container { - border: 0; -} - -.sp-palette .sp-thumb-el { - display: block; - position:relative; - float:left; - width: 24px; - height: 15px; - margin: 3px; - cursor: pointer; - border:solid 2px transparent; -} -.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { - border-color: orange; -} -.sp-thumb-el { - position:relative; -} - -/* Initial */ -.sp-initial { - float: left; - border: solid 1px #333; -} -.sp-initial span { - width: 30px; - height: 25px; - border:none; - display:block; - float:left; - margin:0; -} - -.sp-initial .sp-clear-display { - background-position: center; -} - -/* Buttons */ -.sp-palette-button-container, -.sp-button-container { - float: right; -} - -/* Replacer (the little preview div that shows up instead of the ) */ -.sp-replacer { - margin:0; - overflow:hidden; - cursor:pointer; - padding: 4px; - display:inline-block; - *zoom: 1; - *display: inline; - border: solid 1px #91765d; - background: #eee; - color: #333; - vertical-align: middle; -} -.sp-replacer:hover, .sp-replacer.sp-active { - border-color: #F0C49B; - color: #111; -} -.sp-replacer.sp-disabled { - cursor:default; - border-color: silver; - color: silver; -} -.sp-dd { - padding: 2px 0; - height: 16px; - line-height: 16px; - float:left; - font-size:10px; -} -.sp-preview { - position:relative; - width:25px; - height: 20px; - border: solid 1px #222; - margin-right: 5px; - float:left; - z-index: 0; -} - -.sp-palette { - *width: 220px; - max-width: 220px; -} -.sp-palette .sp-thumb-el { - width:16px; - height: 16px; - margin:2px 1px; - border: solid 1px #d0d0d0; -} - -.sp-container { - padding-bottom:0; -} - - -/* Buttons: http://hellohappy.org/css3-buttons/ */ -.sp-container button { - background-color: #eeeeee; - background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); - background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); - background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); - background-image: -o-linear-gradient(top, #eeeeee, #cccccc); - background-image: linear-gradient(to bottom, #eeeeee, #cccccc); - border: 1px solid #ccc; - border-bottom: 1px solid #bbb; - border-radius: 3px; - color: #333; - font-size: 14px; - line-height: 1; - padding: 5px 4px; - text-align: center; - text-shadow: 0 1px 0 #eee; - vertical-align: middle; -} -.sp-container button:hover { - background-color: #dddddd; - background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); - background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); - background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); - border: 1px solid #bbb; - border-bottom: 1px solid #999; - cursor: pointer; - text-shadow: 0 1px 0 #ddd; -} -.sp-container button:active { - border: 1px solid #aaa; - border-bottom: 1px solid #888; - -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; - box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; -} -.sp-cancel { - font-size: 11px; - color: #d93f3f !important; - margin:0; - padding:2px; - margin-right: 5px; - vertical-align: middle; - text-decoration:none; - -} -.sp-cancel:hover { - color: #d93f3f !important; - text-decoration: underline; -} - - -.sp-palette span:hover, .sp-palette span.sp-thumb-active { - border-color: #000; -} - -.sp-preview, .sp-alpha, .sp-thumb-el { - position:relative; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); -} -.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner { - display:block; - position:absolute; - top:0;left:0;bottom:0;right:0; -} - -.sp-palette .sp-thumb-inner { - background-position: 50% 50%; - background-repeat: no-repeat; -} - -.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); -} - -.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); -} - -.sp-clear-display { - background-repeat:no-repeat; - background-position: center; - background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AAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==); -} diff --git a/server/static/js/app-legacy.41dd580f.js b/server/static/js/app-legacy.41dd580f.js new file mode 100644 index 000000000..b07349894 --- /dev/null +++ b/server/static/js/app-legacy.41dd580f.js @@ -0,0 +1,2 @@ +(function(e){function t(t){for(var s,r,a=t[0],l=t[1],c=t[2],d=0,h=[];de.fillText(t.text,t.x,t.y)),e.restore()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){}getMaxHeight(e){const t=this.getLines(e),i=30;return i*t.length}getMaxWidth(e){const t=this.getLines(e),i=t.map(t=>e.measureText(t.text).width);return Math.max(...i)}getLines(e){const t=this.text.split("\n"),i=[],s=e.canvas.width,n=30,o=0;let r=0;for(const a of t){let t="";const l=a.split(" ");for(const a of l){const l=t+a+" ",c=e.measureText(l),u=c.width;u>s?(e.fillText(t,o,r),i.push({text:t,x:o,y:r}),t=a+" ",r+=n):t=l}i.push({text:t,x:o,y:r}),r+=n}return i}}t.Text=r},"01be":function(e,t,i){"use strict";var s=i("919a"),n=i.n(s);n.a},"033f":function(e,t,i){"use strict";i.r(t);var s=i("a1f4"),n=i("a68b");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("7997");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"759e5a8a",null);a.options.__file="shapecontext.vue",t["default"]=a.exports},"034f":function(e,t,i){"use strict";var s=i("64a9"),n=i.n(s);n.a},"0584":function(e,t,i){"use strict";var s=i("de21"),n=i.n(s);n.a},"0634":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("66cb")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("c345a"),l=i("60a3");let c=class extends o.default{constructor(){super(...arguments),this.display=!1,this.left=0,this.top=0,this.transparent=!1}mounted(){this.transparent=0===this.$refs.chromePicker.val.rgba.a,this.setPosition()}open(){this.display||this.disabled||(this.setPosition(),this.display=!0,this.$nextTick(()=>this.$children[0].$el.focus()))}updateColor(e){this.transparent=0===e.rgba.a;const t=n.default(e.rgba).toRgbString();this.$emit("update:color",t),this.$emit("input",t)}closePicker(){this.display=!1,this.$emit("change",this.color)}setPosition(){const e=this.$el.getBoundingClientRect();e.right+224>window.innerWidth?this.left=e.left-224:this.left=e.right,e.bottom+242>window.innerHeight?this.top=e.top-242:this.top=e.bottom}};s.__decorate([l.Prop(String)],c.prototype,"color",void 0),s.__decorate([l.Prop(Boolean)],c.prototype,"disabled",void 0),c=s.__decorate([r.default({components:{"chrome-picker":a.Chrome}})],c),t.default=c},"07f5":function(e,t,i){"use strict";i.r(t);var s=i("412c"),n=i("d588");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("561b"),i("b62e");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"05b88da7",null);a.options.__file="game.vue",t["default"]=a.exports},"0a75":function(e,t,i){},"0b13":function(e,t,i){},"0bc6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("8055"));function o(e){t.socket.io.opts.query=`user=${e.params.creator}&room=${e.params.room}`,t.socket.connect()}t.socket=n.default(location.protocol+"//"+location.host+"/planarally",{autoConnect:!1}),t.createConnection=o},"0cf7":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("4aec")),a=s.__importDefault(i("a535")),l=s.__importDefault(i("cec2")),c=i("5338"),u=i("2d5b"),d=i("4a5b");let h=class extends n.default{constructor(){super(...arguments),this.path=[],this.draggingSelection=!1}get folders(){return u.assetStore.folders}get files(){return u.assetStore.files}get selected(){return u.assetStore.selected}get idMap(){return u.assetStore.idMap}get currentFolder(){return this.path.length?this.path[this.path.length-1]:u.assetStore.root}get parentFolder(){let e=this.path[this.path.length-2];return void 0===e&&(e=u.assetStore.root),e}get firstSelectedFile(){for(const e of u.assetStore.selected)if(u.assetStore.idMap.get(e).file_hash)return u.assetStore.idMap.get(e);return null}changeDirectory(e){e<0?this.path.pop():this.path.push(e),u.assetStore.clearSelected(),c.socket.emit("Folder.Get",this.currentFolder)}createDirectory(){const e=window.prompt("New folder name");null!==e&&c.socket.emit("Folder.Create",{name:e,parent:this.currentFolder})}moveInode(e,t){u.assetStore.files.includes(e)?u.assetStore.files.splice(u.assetStore.files.indexOf(e),1):u.assetStore.folders.splice(u.assetStore.folders.indexOf(e),1),u.assetStore.idMap.delete(e),c.socket.emit("Inode.Move",{inode:e,target:t})}select(e,t){if(e.shiftKey&&u.assetStore.selected.length>0){const e=[...u.assetStore.files,...u.assetStore.folders],i=e.indexOf(u.assetStore.selected[u.assetStore.selected.length-1]),s=e.indexOf(t);for(let t=i;t!==s;i0&&this.upload(e.dataTransfer.files,t);this.draggingSelection=!1}prepareUpload(){document.getElementById("files").click()}upload(e,t){const i=document.getElementById("files").files;if(void 0===e){if(!i)return;e=i}void 0===t&&(t=this.currentFolder);const s=1e5;for(const n of e){const e=d.uuidv4(),i=Math.ceil(n.size/s);for(let o=0;o{c.socket.emit("Asset.Upload",{name:n.name,directory:t,data:r.result,slice:o,totalSlices:i,uuid:e})})}}}};h=s.__decorate([o.default({components:{Prompt:l.default,ConfirmDialog:a.default,AssetContextMenu:r.default},beforeRouteEnter(e,t,i){c.socket.connect(),i()},beforeRouteLeave(e,t,i){c.socket.disconnect(),i()}})],h),t.default=h},"0ddd":function(e,t,i){"use strict";i.r(t);var s=i("8f54"),n=i("4bc3");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("9dd4");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"6d718094",null);a.options.__file="asset_node.vue",t["default"]=a.exports},1:function(e,t){},"104d":function(e,t,i){"use strict";var s=i("5722"),n=i.n(s);n.a},1077:function(e,t,i){"use strict";i.r(t);var s=i("f994"),n=i("1eee");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("3cd3");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"bc30fc14",null);a.options.__file="login.vue",t["default"]=a.exports},1216:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("6f92"),n=i("92b1"),o=i("98ef"),r=i("4aee");function a(e,t){const i=s.layerManager.getLayer("draw");if(void 0===i)return;const o=i.ctx;o.lineJoin="round",o.lineJoin="round",o.beginPath(),o.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,o.moveTo(n.g2lx(e[0][0]),n.g2ly(e[0][1]));for(const s of e)o.lineTo(n.g2lx(s[0]),n.g2ly(s[1]));o.closePath(),o.stroke()}function l(e,t){const i=s.layerManager.getLayer("draw");if(void 0===i)return;const n=i.ctx;n.lineJoin="round",n.lineJoin="round",n.beginPath(),n.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,n.moveTo(e[0][0],e[0][1]);for(const s of e)n.lineTo(s[0],s[1]);n.closePath(),n.stroke()}function c(e,t){return t?e:n.g2lx(e)}function u(e,t){return t?e:n.g2ly(e)}t.drawPolygon=a,t.drawPolygonL=l;let d=0,h=0;function f(e,t,i,s,n){e.beginPath(),e.strokeStyle=s?"rgba(255, 0, 0, 0.30)":"rgba(0, 0, 0, 0.30)",e.moveTo(c(t[0],n),u(t[1],n)),e.lineTo(c(i[0],n),u(i[1],n)),e.closePath(),e.stroke()}function p(e,t=!0,i=!0,n=0){d=0,h=0;let a=0;const l=s.layerManager.getLayer("draw");if(void 0===l)return;const p=l.ctx;i&&p.clearRect(0,0,2e3,1e3),p.lineJoin="round",p.lineJoin="round";const g=new o.EdgeIterator(e);while(g.valid)g.next(),g.collect();g.collect();do{const e=g.edge.first.vertices[r.ccw(g.edge.second)].point,t=g.edge.first.vertices[r.cw(g.edge.second)].point;if(n>0){if(e[0]===-1/0||t[0]===-1/0){g.next();continue}h++,g.edge.first.constraints[g.edge.second]?(d++,2===n&&console.log(`Edge: (*) ${e} > ${t}`)):2===n&&console.log(`Edge: ${e} > ${t}`)}do{g.next(),g.collect()}while(g.valid)}while(null!==g.pos);for(const s of e.triangles){if(s.isInfinite())continue;a++;const e=[];p.fillStyle="red",void 0!==s.vertices[0]&&(e.push(s.vertices[0].point),p.beginPath(),p.arc(c(s.vertices[0].point[0],t),u(s.vertices[0].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==s.vertices[1]&&(e.push(s.vertices[1].point),p.arc(c(s.vertices[1].point[0],t),u(s.vertices[1].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==s.vertices[2]&&(e.push(s.vertices[2].point),p.arc(c(s.vertices[2].point[0],t),u(s.vertices[2].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),2===n&&console.log("[T] ",...e,s.constraints),p.moveTo(c(s.vertices[0].point[0],t),u(s.vertices[0].point[1],t)),void 0!==s.vertices[0]&&void 0!==s.vertices[1]&&f(p,s.vertices[0].point,s.vertices[1].point,s.constraints[2],t),void 0!==s.vertices[1]&&void 0!==s.vertices[2]&&f(p,s.vertices[1].point,s.vertices[2].point,s.constraints[0],t),void 0!==s.vertices[2]&&void 0!==s.vertices[0]&&f(p,s.vertices[2].point,s.vertices[0].point,s.constraints[1],t)}n>0&&(console.log(`Edges: ${d}/${h}`),console.log(`Faces: ${a}`))}window.DP=a,window.DPL=l,window.DPT=p},1289:function(e,t,i){"use strict";i.r(t);var s=i("df64"),n=i("d677");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("8790");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"0bf2b7ba",null);a.options.__file="accordion.vue",t["default"]=a.exports},"12d3":function(e,t,i){"use strict";var s=i("a260"),n=i.n(s);n.a},1327:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importStar(i("66cb")),o=i("4a5b"),r=i("4709"),a=i("f10f"),l=i("92b1");class c extends r.Circle{constructor(e,t,i,s,n,o,r){super(e,t,n,o,r),this.type="circulartoken",this.text=i,this.font=s}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r,text:this.text,font:this.font})}fromDict(e){super.fromDict(e),this.r=e.radius,this.text=e.text,this.font=e.font}draw(e){super.draw(e),e.font=this.font,e.save();const t=l.g2l(this.center());e.textAlign="center",e.textBaseline="middle";const i=o.calcFontScale(e,this.text,l.g2lz(this.r),l.g2lz(this.r)),s=0;e.transform(i,s,-s,i,t.x,t.y),e.fillStyle=n.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}getInitiativeRepr(){return{uuid:this.uuid,visible:!a.gameStore.IS_DM,group:!1,source:""===this.name||"Unknown shape"===this.name?this.text:this.name,has_img:!1,effects:[],index:1/0}}}t.CircularToken=c},1625:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6f92"),o=i("b2ed"),r=i("0180"),a=i("f10f"),l=i("92b1");class c{constructor(){this.shown=!1;const e=new s.GlobalPoint(0,0);this.annotationText=new r.Text(e,"","bold 20px serif",0,"rgba(230, 230, 230, 1)"),this.annotationRect=new o.Rect(e,0,0,"rgba(0, 0, 0, 0.6)")}setActiveText(e){if(void 0===this.layer){if(!n.layerManager.hasLayer("draw"))return void console.warn("There is no draw layer to draw annotations on!");this.layer=n.layerManager.getLayer("draw"),this.layer.addShape(this.annotationRect,!1),this.layer.addShape(this.annotationText,!1)}this.shown=""!==e,this.annotationText.refPoint=l.l2g(new s.LocalPoint(this.layer.canvas.width/2,50)),this.annotationText.text=e;const t=this.shown?this.annotationText.getMaxWidth(this.layer.ctx)+10:0,i=this.shown?this.annotationText.getMaxHeight(this.layer.ctx)+10:0;this.annotationRect.refPoint=l.l2g(new s.LocalPoint(this.layer.canvas.width/2-t/2,30)),this.annotationRect.w=t/a.gameStore.zoomFactor,this.annotationRect.h=i/a.gameStore.zoomFactor,this.layer.invalidate(!0)}}t.AnnotationManager=c},"19f9":function(e,t,i){"use strict";i.r(t);var s=i("45bf"),n=i("8cd4");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("c242");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"aaf3f05e",null);a.options.__file="menu.vue",t["default"]=a.exports},"1c76":function(e,t,i){"use strict";i.r(t);var s=i("2c88"),n=i("300e");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("7f1e");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="contextmenu.vue",t["default"]=a.exports},"1dd6":function(e,t,i){"use strict";i.r(t);var s=i("5ae5"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"1eee":function(e,t,i){"use strict";i.r(t);var s=i("d30b"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"206a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6f92"),o=i("6c30"),r=i("4709"),a=i("1327"),l=i("5e7c"),c=i("574e"),u=i("b2ed"),d=i("0180"),h=i("e4ea");function f(e){let t;const i=new s.GlobalPoint(e.x,e.y);if("rect"===e.type_){const s=e;t=new u.Rect(i,s.width,s.height,s.fill_colour,s.stroke_colour,s.uuid)}else if("circle"===e.type_){const s=e;t=new r.Circle(i,s.radius,s.fill_colour,s.stroke_colour,s.uuid)}else if("circulartoken"===e.type_){const s=e;t=new a.CircularToken(i,s.radius,s.text,s.font,s.fill_colour,s.stroke_colour,s.uuid)}else if("line"===e.type_){const n=e;t=new l.Line(i,new s.GlobalPoint(n.x2,n.y2),n.line_width,n.stroke_colour,n.uuid)}else if("multiline"===e.type_){const n=e;t=new c.MultiLine(i,n.points.map(e=>new s.GlobalPoint(e.x,e.y)),n.line_width,n.stroke_colour,n.uuid)}else if("polygon"===e.type_){const n=e;t=new h.Polygon(i,n.vertices.map(e=>new s.GlobalPoint(e.x,e.y)),n.fill_colour,n.stroke_colour,n.uuid)}else if("text"===e.type_){const s=e;t=new d.Text(i,s.text,s.font,s.angle,s.fill_colour,s.stroke_colour,s.uuid)}else{if("assetrect"!==e.type_)return;{const s=e,r=new Image(s.width,s.height);s.src.startsWith("http")?r.src=new URL(s.src).pathname:r.src=s.src,t=new o.Asset(r,i,s.width,s.height,s.uuid),r.onload=(()=>{n.layerManager.getLayer(e.layer).invalidate(!1)})}}return t.fromDict(e),t}t.createShapeFromDict=f},"223d":function(e,t,i){"use strict";var s=i("e756"),n=i.n(s);n.a},"22bd":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("SelectContext",{ref:"selectcontext"})},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},2469:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("66cb")),o=i("4a5b"),r=i("0bc6"),a=i("f312"),l=i("8f0a"),c=i("6f92"),u=i("f10f"),d=i("92b1");class h{constructor(e,t,i,s){this.fillColour="#000",this.strokeColour="rgba(0,0,0,0)",this.name="Unknown shape",this.nameVisible=!0,this.trackers=[],this.auras=[],this.labels=[],this._owners=[],this.visionObstruction=!1,this.movementObstruction=!1,this.isToken=!1,this.showHighlight=!1,this.annotation="",this.globalCompositeOperation="source-over",this.options=new Map,this._refPoint=e,this.uuid=s||o.uuidv4(),void 0!==t&&(this.fillColour=t),void 0!==i&&(this.strokeColour=i)}get refPoint(){return this._refPoint}set refPoint(e){this._refPoint=e}visibleInCanvas(e){return!1}getPointIndex(e,t=0){for(const[i,s]of this.points.entries())if(Math.abs(e.x-s[0])<=t&&Math.abs(e.y-s[1])<=t)return i;return-1}getPointOrientation(e){const t=l.GlobalPoint.fromArray(this.points[(this.points.length+e-1)%this.points.length]),i=l.GlobalPoint.fromArray(this.points[e]),s=l.GlobalPoint.fromArray(this.points[(e+1)%this.points.length]),n=s.subtract(t),o=t.add(n.multiply(.5));return i.subtract(o).normalize()}invalidate(e){const t=c.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(e=!0){const t=this,i=u.gameStore.visionBlockers.indexOf(this.uuid);let s=!1;this.visionObstruction&&-1===i?(u.gameStore.visionBlockers.push(this.uuid),s=!0):!this.visionObstruction&&i>=0&&(u.gameStore.visionBlockers.splice(i,1),s=!0),s&&e&&u.gameStore.recalculateVision(),this.auras.forEach(e=>{const i=u.gameStore.visionSources,s=i.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===s?i.push({shape:t.uuid,aura:e.uuid}):!e.visionSource&&s>=0&&i.splice(s,1)});for(let n=u.gameStore.visionSources.length-1;n>=0;n--){const e=u.gameStore.visionSources[n];e.shape===t.uuid&&(t.auras.some(t=>t.uuid===e.aura&&t.visionSource)||u.gameStore.visionSources.splice(n,1))}}setMovementBlock(e,t=!0){this.movementObstruction=e||!1;const i=u.gameStore.movementblockers.indexOf(this.uuid);let s=!1;this.movementObstruction&&-1===i?(u.gameStore.movementblockers.push(this.uuid),s=!0):!this.movementObstruction&&i>=0&&(u.gameStore.movementblockers.splice(i,1),s=!0),s&&t&&u.gameStore.recalculateMovement()}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=u.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?u.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&u.gameStore.ownedtokens.splice(e,1)}}getBaseDict(){return{type_:this.type,uuid:this.uuid,x:this.refPoint.x,y:this.refPoint.y,layer:this.layer,draw_operator:this.globalCompositeOperation,movement_obstruction:this.movementObstruction,vision_obstruction:this.visionObstruction,auras:a.aurasToServer(this.auras),trackers:this.trackers,labels:this.labels,owners:this._owners,fill_colour:this.fillColour,stroke_colour:this.strokeColour,name:this.name,name_visible:this.nameVisible,annotation:this.annotation,is_token:this.isToken,options:JSON.stringify([...this.options])}}fromDict(e){this.layer=e.layer,this.globalCompositeOperation=e.draw_operator,this.movementObstruction=e.movement_obstruction,this.visionObstruction=e.vision_obstruction,this.auras=a.aurasFromServer(e.auras),this.trackers=e.trackers,this.labels=e.labels,this._owners=e.owners,this.isToken=e.is_token,this.nameVisible=e.name_visible,e.annotation&&(this.annotation=e.annotation),e.name&&(this.name=e.name),e.options&&(this.options=new Map(JSON.parse(e.options)))}draw(e){if(void 0!==this.globalCompositeOperation?e.globalCompositeOperation=this.globalCompositeOperation:e.globalCompositeOperation="source-over",this.showHighlight){const t=this.getBoundingBox();e.strokeStyle="red",e.strokeRect(d.g2lx(t.topLeft.x)-5,d.g2ly(t.topLeft.y)-5,d.g2lz(t.w)+10,d.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const s=d.g2l(this.center()),o=d.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(s.x,s.y,d.g2lr(i.value),s.x,s.y,d.g2lr(i.value+i.dim)),o=n.default(i.colour);e.fillStyle=t,t.addColorStop(0,i.colour),t.addColorStop(1,o.setAlpha(0).toRgbString())}if(i.visionSource&&void 0!==i.lastPath)try{e.fill(i.lastPath)}catch(t){e.arc(s.x,s.y,o,0,2*Math.PI),e.fill(),console.warn(t)}else e.arc(s.x,s.y,o,0,2*Math.PI),e.fill()}}getInitiativeRepr(){return{uuid:this.uuid,visible:!u.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=c.layerManager.getLayer(this.layer),s=c.layerManager.getLayer(e);void 0!==i&&void 0!==s&&(this.layer=e,i.shapes.splice(i.shapes.indexOf(this),1),s.shapes.push(this),i.invalidate(!0),s.invalidate(!1),t&&r.socket.emit("Shape.Layer.Change",{uuid:this.uuid,layer:e}))}get owners(){return Object.freeze(this._owners.slice())}ownedBy(e){return void 0===e&&(e=u.gameStore.username),u.gameStore.IS_DM||this._owners.includes(e)}addOwner(e){this._owners.includes(e)||this._owners.push(e)}updateOwner(e,t){const i=this._owners.findIndex(t=>t===e);i>=0?this._owners.splice(i,1,t):this.addOwner(t)}removeOwner(e){const t=this._owners.findIndex(t=>t===e);this._owners.splice(t,1)}}t.Shape=h},"255e":function(e,t,i){"use strict";i.r(t);var s=i("851c"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},2686:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!==e.note?i("modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("span",{on:{click:function(t){e.$refs.title.select()}}},[i("i",{staticClass:"fas fa-pencil-alt",staticStyle:{"font-size":"15px"}})]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.note.title,expression:"note.title"}],ref:"title",domProps:{value:e.note.title},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"title",t.target.value)}}}),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.note.text,expression:"note.text"}],ref:"textarea",style:{height:e.calcHeight()},domProps:{value:e.note.text},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"text",t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.removeNote}},[i("i",{staticClass:"far fa-trash-alt"}),e._v(" Remove\n ")])])]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"26a5":function(e,t,i){"use strict";var s=i("f2d0"),n=i.n(s);n.a},2756:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=s.__importDefault(i("496c")),r=s.__importDefault(i("ea6a")),a=i("4a5b"),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("b2ed"),h=i("f10f"),f=i("2838"),p=i("92b1"),g=i("5a5c");var v;(function(e){e[e["Noop"]=0]="Noop",e[e["Resize"]=1]="Resize",e[e["Drag"]=2]="Drag",e[e["GroupSelect"]=3]="GroupSelect"})(v=t.SelectOperations||(t.SelectOperations={}));const m=new c.GlobalPoint(-1e3,-1e3);let y=class extends r.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizePoint=0,this.deltaChanged=!1,this.dragRay=new c.Ray(new c.LocalPoint(0,0),new c.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new d.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(h.gameStore.username)||this.selectionHelper.addOwner(h.gameStore.username);const i=g.getMouse(e),s=p.l2g(i);let n,o=!1;n=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let r=n.length-1;r>=0;r--){const e=n[r];if(this.resizePoint=e.getPointIndex(s,p.l2gz(3)),this.resizePoint>=0){t.selection=[e],a.getRef("selectionInfo").shape=e,this.mode=v.Resize,t.invalidate(!0),o=!0;break}if(e.contains(s)){const s=e;-1===t.selection.indexOf(s)&&(t.selection=[s],a.getRef("selectionInfo").shape=s),this.mode=v.Drag;const n=p.g2l(s.refPoint);this.dragRay=new c.Ray(n,i.subtract(n)),t.invalidate(!0),o=!0;break}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)a.getRef("selectionInfo").shape=e;this.selectionStartPoint=s,this.selectionHelper.refPoint=this.selectionStartPoint,this.selectionHelper.w=0,this.selectionHelper.h=0,t.selection=[this.selectionHelper],t.invalidate(!0)}this.active=!0}onMouseMove(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=g.getMouse(e),s=p.l2g(i);if(this.deltaChanged=!1,this.mode===v.GroupSelect){const e=s;this.selectionHelper.w=Math.abs(e.x-this.selectionStartPoint.x),this.selectionHelper.h=Math.abs(e.y-this.selectionStartPoint.y),this.selectionHelper.refPoint=new c.GlobalPoint(Math.min(this.selectionStartPoint.x,e.x),Math.min(this.selectionStartPoint.y,e.y)),t.invalidate(!0)}else if(t.selection.length){const n=p.g2l(t.selection[t.selection.length-1].refPoint),o=n.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/h.gameStore.zoomFactor);const a=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!h.gameStore.IS_DM))for(const e of t.selection)e.ownedBy()&&e.uuid!==this.selectionHelper.uuid&&(r=f.calculateDelta(r,e),r!==a&&(this.deltaChanged=!0));for(const e of t.selection)e.ownedBy()&&(e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})));t.invalidate(!1)}else if(this.mode===v.Resize)for(const e of t.selection)e.ownedBy()&&(e.resize(this.resizePoint,i),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1),this.updateCursor(t,s));else this.updateCursor(t,s)}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer();this.mode===v.GroupSelect?(t.clearSelection(),t.shapes.forEach(e=>{if(!e.ownedBy())return;if(e===this.selectionHelper)return;const i=e.getBoundingBox();e.ownedBy()&&this.selectionHelper.refPoint.x<=i.topRight.x&&this.selectionHelper.refPoint.x+this.selectionHelper.w>=i.topLeft.x&&this.selectionHelper.refPoint.y<=i.botLeft.y&&this.selectionHelper.refPoint.y+this.selectionHelper.h>=i.topLeft.y&&t.selection.push(e)}),t.selection.length>0&&t.selection.push(this.selectionHelper),t.invalidate(!0)):t.selection.length&&t.selection.forEach(i=>{if(i.ownedBy()){if(this.mode===v.Drag){if(this.dragRay.origin.x===p.g2lx(i.refPoint.x)&&this.dragRay.origin.y===p.g2ly(i.refPoint.y))return;!h.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(h.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1))}}),this.mode=v.Noop,this.active=!1}onContextMenu(e){if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer(),i=g.getMouse(e),s=p.l2g(i);for(const n of t.selection)if(n.contains(s)&&n!==this.selectionHelper)return t.selection=[n],a.getRef("selectionInfo").shape=n,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,n);this.$refs.selectcontext.open(e)}updateCursor(e,t){for(const i of e.selection){const e=i.getPointIndex(t,p.l2gz(3));if(e<0)document.body.style.cursor="default";else{let t=i.getPointOrientation(e).angle();t<0&&(t+=360);const s=22.5;(t>=315+s||t=135+s&&t<225-s)&&(document.body.style.cursor="ew-resize"),(t>=45+s&&t<135-s||t>=225+s&&t<315-s)&&(document.body.style.cursor="ns-resize"),(t>=s&&t<90-s||t>=180+s&&t<270-s)&&(document.body.style.cursor="nwse-resize"),(t>=90+s&&t<180-s||t>=270+s&&t<360-s)&&(document.body.style.cursor="nesw-resize")}}}};y=s.__decorate([n.default({components:{SelectContext:o.default}})],y),t.default=y},2838:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6f92"),o=i("f10f"),r=i("d6be"),a=i("98ef"),l=i("4aee");function c(e,t,i){if(0===e.x&&0===e.y)return e;if("bvh"===o.gameStore.visionMode){void 0===i&&(i=[]);const r=t.getBoundingBox(),a=r.offset(e);let l=!1;for(const t of o.gameStore.movementblockers){if(i.includes(t))continue;const o=n.layerManager.UUIDMap.get(t),c=o.getBoundingBox();let u=c.intersectsWithInner(a);if(!u){const t=s.Ray.fromPoints(r.topLeft.add(e.normalize()),a.topLeft),i=t.direction.inverse(),n=[i.x<0,i.y<0];u=c.intersectP(t,i,n).hit}if(u){const n=c.center(),o=r.center(),a=o.subtract(n),u=new s.Vector(1,0),d=new s.Vector(0,1);let h=a.dot(u),f=a.dot(d);h>c.w/2&&(h=c.w/2),h<-c.w/2&&(h=-c.w/2),f>c.h/2&&(f=c.h/2),f<-c.h/2&&(f=-c.h/2);const p=n.add(u.multiply(h)).add(d.multiply(f));p.x===r.topLeft.x||p.x===r.topRight.x?e=new s.Vector(0,e.y):p.y===r.topLeft.y||p.y===r.botLeft.y?e=new s.Vector(e.x,0):p.xr.topRight.x?e=new s.Vector(p.x-r.topRight.x,e.y):p.yr.botLeft.y&&(e=new s.Vector(e.x,p.y-r.botLeft.y)),l=!0,i.push(t);break}}return l&&(e=c(e,t,i)),e}{const i=r.PA_CDT.movement.locate(t.center().asArray(),null).loc;for(const s of t.points){const t=r.PA_CDT.movement.locate(s,i),n=t.loc;null!==n&&(e=u(s,n,e))}return e}}function u(e,t,i,n=[]){const o=new s.GlobalPoint(e[0],e[1]),r=o.add(i).asArray();if(t.contains(r))return i;n.push(t);for(let c=0;c<3;c++){if(n.includes(t.neighbours[c]))continue;const d=t.vertices[l.cw(c)].point,h=t.vertices[l.ccw(c)].point,f=l.intersection(e,r,d,h);if(null===f)continue;if(!t.isConstrained(c))return u(e,t.neighbours[c],i,n);if(f[0]===o.x&&f[1]===o.y){l.orientation;const t=l.orientation(e,r,h);if(t===a.Sign.LEFT_TURN)continue;if(t===a.Sign.ZERO)continue}let p=new s.GlobalPoint(f[0],f[1]).subtract(o).multiply(.8);p.length()<1&&(p=new s.Vector(0,0)),p.length()!["__files"].includes(e)).sort(a.alphSort)}get files(){return this.asset.__files?this.asset.__files.concat().sort((e,t)=>e.name.toLowerCase()>t.name.toLowerCase()?1:-1):[]}toggle(e){for(let t=0;tthis.$children[0].$el.focus())}close(){this.visible=!1,this.shape=null}getLayers(){return c.layerManager.layers.filter(e=>e.selectable&&(u.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return c.layerManager.getLayer()}getInitiativeWord(){return null===this.shape?"":a.getRef("initiative").contains(this.shape.uuid)?"Show":"Add"}setLayer(e){null!==this.shape&&(this.shape.moveLayer(e,!0),this.close())}moveToBack(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,0,!0),this.close()}moveToFront(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,e.shapes.length-1,!0),this.close()}addInitiative(){if(null===this.shape)return;const e=a.getRef("initiative");e.contains(this.shape.uuid)||e.addInitiative(this.shape.getInitiativeRepr()),e.visible=!0,this.close()}openEditDialog(){l.EventBus.$emit("EditDialog.Open",this.shape),this.close()}};d=s.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},3481:function(e,t,i){"use strict";i.r(t);var s=i("47e6"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"38c9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("bab4"),n=i("f10f");class o extends s.Layer{invalidate(){this.valid=!1}draw(e){this.valid||this.drawGrid()}drawGrid(){const e=this.ctx;this.clear(),e.beginPath();const t=n.gameStore.gridSize;for(let i=0;i1,expression:"showUI && layers.length>1"}],attrs:{id:"layerselect"}},[i("ul",e._l(e.layers,function(t){return i("li",{key:t.name,class:{"layer-selected":t===e.selectedLayer},on:{mousedown:function(i){e.selectLayer(t)}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])])}))])],2),i("selection-info",{directives:[{name:"show",rawName:"v-show",value:e.showUI,expression:"showUI"}],ref:"selectionInfo"}),i("initiative-dialog",{ref:"initiative",attrs:{id:"initiativedialog"}}),i("note-dialog",{ref:"note"}),i("label-dialog",{ref:"labels"}),i("zoom-slider",{directives:[{name:"show",rawName:"v-show",value:e.showUI,expression:"showUI"}],attrs:{id:"zoomer",height:6,width:200,min:0,max:1,interval:.1,"dot-width":8,"dot-height":20,"tooltip-dir":"bottom",tooltip:"hover",formatter:e.zoomDisplay.toFixed(1),"slider-style":{"border-radius":"15%"},"bg-style":{"background-color":"#fff","box-shadow":"0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)"},"process-style":{"background-color":"#fff"}},model:{value:e.zoomDisplay,callback:function(t){e.zoomDisplay=t},expression:"zoomDisplay"}}),i("prompt-dialog",{ref:"prompt"}),i("confirm-dialog",{ref:"confirm"})],1)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},4185:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("bab4"),o=i("6f92"),r=i("d1ec"),a=i("4709"),l=i("f10f"),c=i("92b1"),u=i("5a5c"),d=i("cee3");class h extends n.Layer{constructor(e,t){super(e,t),this.isVisionLayer=!0,this.preFogShapes=[],this.virtualCanvas=document.createElement("canvas"),this.virtualCanvas.width=window.innerWidth,this.virtualCanvas.height=window.innerHeight,this.vCtx=this.virtualCanvas.getContext("2d")}addShape(e,t,i,s=!0){super.addShape(e,t,i,s),e.options.has("preFogShape")&&e.options.get("preFogShape")&&this.preFogShapes.push(e)}removeShape(e,t,i){if(e.options.has("preFogShape")&&e.options.get("preFogShape")){const t=this.preFogShapes.findIndex(t=>t.uuid===e.uuid);this.preFogShapes.splice(t,1)}super.removeShape(e,t,i)}draw(){if(!this.valid){const e=this.ctx;if(r.Settings.skipLightFOW)return e.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);const t=e.globalCompositeOperation;e.clearRect(0,0,this.canvas.width,this.canvas.height),e.fillStyle="rgba(0, 0, 0, 1)";const i=o.layerManager.getLayer("draw").ctx;(r.Settings.drawAngleLines||r.Settings.drawFirstLightHit)&&i.clearRect(0,0,i.canvas.width,i.canvas.height),l.gameStore.fullFOW&&o.layerManager.hasLayer("tokens")&&o.layerManager.getLayer("tokens").shapes.forEach(t=>{if(!t.ownedBy()||!t.isToken)return;const i=t.getBoundingBox(),s=c.g2l(t.center()),n=.8*c.g2lz(i.w);e.beginPath(),e.arc(s.x,s.y,n,0,2*Math.PI);const o=e.createRadialGradient(s.x,s.y,n/2,s.x,s.y,n);o.addColorStop(0,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=o,e.fill()}),this.vCtx.clearRect(0,0,window.innerWidth,window.innerHeight);for(const n of l.gameStore.visionSources){const t=o.layerManager.UUIDMap.get(n.shape);if(void 0===t)continue;const u=t.auras.find(e=>e.uuid===n.aura);if(void 0===u)continue;const h=c.getUnitDistance(u.value+u.dim),f=t.center(),p=c.g2l(f),g=new a.Circle(f,h);if(g.visibleInCanvas(e.canvas))if("bvh"===l.gameStore.visionMode){let t=-1;const n=new Path2D;let o;n.moveTo(p.x,p.y);for(let a=0;a<2*Math.PI;a+=r.Settings.angleSteps/180*Math.PI){const d=new s.GlobalPoint(f.x+h*Math.cos(a),f.y+h*Math.sin(a));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(f.x),c.g2ly(f.y)),i.lineTo(c.g2lx(d.x),c.g2ly(d.y)),i.stroke());const g=s.Ray.fromPoints(f,d),v=l.gameStore.BV.intersect(g);if(0===a&&(o=v.hit?v.intersect:d),v.hit)-1!==t&&(n.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,a),t=-1),n.lineTo(c.g2lx(v.intersect.x),c.g2ly(v.intersect.y));else if(-1===t){t=a;const i=c.g2l(d);e.lineTo(i.x,i.y)}}if(-1===t?n.lineTo(c.g2lx(o.x),c.g2ly(o.y)):n.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));t.addColorStop(0,"rgba(0, 0, 0, 1)"),t.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=t}else e.fillStyle="rgba(0, 0, 0, 1)";e.fill(n)}u.lastPath=n}else{this.vCtx.globalCompositeOperation="source-over",this.vCtx.fillStyle="rgba(0, 0, 0, 1)";const t=d.computeVisibility(f,"vision");this.vCtx.beginPath(),this.vCtx.moveTo(c.g2lx(t[0][0]),c.g2ly(t[0][1]));for(const e of t)this.vCtx.lineTo(c.g2lx(e[0]),c.g2ly(e[1]));if(this.vCtx.closePath(),this.vCtx.fill(),u.dim>0){const e=this.vCtx.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),this.vCtx.fillStyle=e}else this.vCtx.fillStyle="rgba(0, 0, 0, 1)";this.vCtx.globalCompositeOperation="source-in",this.vCtx.beginPath(),this.vCtx.arc(p.x,p.y,c.g2lr(u.value+u.dim),0,2*Math.PI),this.vCtx.fill(),e.drawImage(this.virtualCanvas,0,0)}}l.gameStore.fowLOS&&(e.globalCompositeOperation="source-in",e.drawImage(o.layerManager.getLayer("fow-players").canvas,0,0));for(const s of this.preFogShapes){if(!s.visibleInCanvas(this.canvas))continue;const t=s.globalCompositeOperation;l.gameStore.fullFOW||("source-over"===s.globalCompositeOperation?s.globalCompositeOperation="destination-out":"destination-out"===s.globalCompositeOperation&&(s.globalCompositeOperation="source-over")),s.draw(e),s.globalCompositeOperation=t}l.gameStore.fullFOW&&(e.globalCompositeOperation="source-out",e.fillStyle=u.getFogColour(),e.fillRect(0,0,e.canvas.width,e.canvas.height)),super.draw(!1),e.globalCompositeOperation=t}}}t.FOWLayer=h},4486:function(e,t,i){"use strict";i.r(t);var s=i("a097"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"45bf":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"menuContainer"}},[i("div",{ref:"rm",style:{left:e.visible.settings?"200px":"0",top:e.visible.locations?"100px":"0"},attrs:{id:"radialmenu"}},[i("div",{staticClass:"rm-wrapper"},[i("div",{staticClass:"rm-toggler"},[i("ul",{staticClass:"rm-list",class:{"rm-list-dm":e.IS_DM}},[e.IS_DM?i("li",{staticClass:"rm-item",attrs:{id:"rm-locations"},on:{click:function(t){e.visible.locations=!e.visible.locations}}},[e._m(0)]):e._e(),i("li",{staticClass:"rm-item",attrs:{id:"rm-settings"},on:{click:function(t){e.visible.settings=!e.visible.settings}}},[e._m(1)])])]),e._m(2)])]),i("transition",{attrs:{name:"settings"},on:{enter:function(t){e.$refs.rm.style.transition="left 500ms"}}},[e.visible.settings?i("div",{ref:"settings",attrs:{id:"menu"},on:{click:e.settingsClick}},[i("div",{staticStyle:{width:"200px",height:"90%","overflow-y":"auto","overflow-x":"hidden"}},[e.IS_DM?[i("button",{staticClass:"accordion"},[e._v("Assets")]),i("div",{staticClass:"accordion-panel"},[i("a",{staticClass:"actionButton",attrs:{href:"/assets",target:"blank",title:"Open asset manager"}},[i("i",{staticClass:"fas fa-external-link-alt"})]),i("div",{staticClass:"directory",attrs:{id:"menu-tokens"}},[i("asset-node",{attrs:{asset:e.assets}}),e.assets?e._e():i("div",[e._v("No assets")])],1)]),i("button",{staticClass:"accordion"},[e._v("Notes")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel",attrs:{id:"menu-notes"}},[i("a",{staticClass:"actionButton",on:{click:e.createNote}},[i("i",{staticClass:"far fa-plus-square"})]),e._l(e.notes,function(t){return i("div",{key:t.uuid,staticStyle:{cursor:"pointer"},on:{click:function(i){e.openNote(t)}}},[e._v(e._s(t.title||"[?]"))])}),e.notes.length?e._e():i("div",[e._v("No notes")])],2)]),i("button",{staticClass:"accordion"},[e._v("DM Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"useGridInput"}},[e._v("Use grid:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.useGrid,expression:"useGrid"}],attrs:{id:"useGridInput",type:"checkbox",checked:"checked"},domProps:{checked:Array.isArray(e.useGrid)?e._i(e.useGrid,null)>-1:e.useGrid},on:{change:function(t){var i=e.useGrid,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&(e.useGrid=i.concat([o])):r>-1&&(e.useGrid=i.slice(0,r).concat(i.slice(r+1)))}else e.useGrid=n}}}),i("label",{attrs:{for:"useFOWInput"}},[e._v("Fill entire canvas with FOW:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fullFOW,expression:"fullFOW"}],attrs:{id:"useFOWInput",type:"checkbox"},domProps:{checked:Array.isArray(e.fullFOW)?e._i(e.fullFOW,null)>-1:e.fullFOW},on:{change:function(t){var i=e.fullFOW,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&(e.fullFOW=i.concat([o])):r>-1&&(e.fullFOW=i.slice(0,r).concat(i.slice(r+1)))}else e.fullFOW=n}}}),i("label",{attrs:{for:"fowOpacity"}},[e._v("FOW opacity:")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.fowOpacity,expression:"fowOpacity",modifiers:{number:!0}}],attrs:{id:"fowOpacity",type:"number",min:"0",max:"1",step:"0.1"},domProps:{value:e.fowOpacity},on:{input:function(t){t.target.composing||(e.fowOpacity=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"fowLOS"}},[e._v("Only show lights in LoS:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fowLOS,expression:"fowLOS"}],attrs:{id:"fowLOS",type:"checkbox"},domProps:{checked:Array.isArray(e.fowLOS)?e._i(e.fowLOS,null)>-1:e.fowLOS},on:{change:function(t){var i=e.fowLOS,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&(e.fowLOS=i.concat([o])):r>-1&&(e.fowLOS=i.slice(0,r).concat(i.slice(r+1)))}else e.fowLOS=n}}}),i("label",{attrs:{for:"unitSizeInput"}},[e._v("Unit Size (in ft.):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.unitSize,expression:"unitSize",modifiers:{number:!0}}],attrs:{id:"unitSizeInput",type:"number"},domProps:{value:e.unitSize},on:{input:function(t){t.target.composing||(e.unitSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"gridSizeInput"}},[e._v("Grid Size (in pixels):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridSize,expression:"gridSize",modifiers:{number:!0}}],attrs:{id:"gridSizeInput",type:"number",min:"0"},domProps:{value:e.gridSize},on:{input:function(t){t.target.composing||(e.gridSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",{domProps:{selected:"bvh"===e.$store.state.game.visionMode}},[e._v("BVH")]),i("option",{domProps:{selected:"triangle"===e.$store.state.game.visionMode}},[e._v("Triangle")])]),i("label",{attrs:{for:"vmininp"}},[e._v("Minimal full vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMin,expression:"visionRangeMin",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmininp",type:"number",min:"0"},domProps:{value:e.visionRangeMin},on:{change:function(t){e.visionRangeMin=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"vmaxinp"}},[e._v("Maximal vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMax,expression:"visionRangeMax",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmaxinp",type:"number",min:"0"},domProps:{value:e.visionRangeMax},on:{change:function(t){e.visionRangeMax=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"invitation"}},[e._v("Invitation Code:")]),i("input",{attrs:{id:"invitation",type:"text",readonly:"readonly"},domProps:{value:e.invitationCode}})])])]:e._e(),i("button",{staticClass:"accordion"},[e._v("Client Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"gridColour"}},[e._v("Grid Colour:")]),i("color-picker",{attrs:{id:"gridColour",color:e.gridColour},on:{"update:color":function(t){e.gridColour=t}}}),i("label",{attrs:{for:"fowColour"}},[e._v("FOW Colour:")]),i("color-picker",{attrs:{id:"fowColour",color:e.fowColour},on:{"update:color":function(t){e.fowColour=t}}}),i("label",{attrs:{for:"rulerColour"}},[e._v("Ruler Colour:")]),i("color-picker",{attrs:{id:"rulerColour",color:e.rulerColour},on:{"update:color":function(t){e.rulerColour=t}}})],1)])],2),i("router-link",{staticClass:"accordion",staticStyle:{"text-decoration":"none",display:"inline-block",position:"absolute",bottom:"0"},attrs:{to:"/dashboard"}},[e._v("Exit")])],1):e._e()]),i("transition",{attrs:{name:"locations"},on:{enter:function(t){e.$refs.rm.style.transition="top 500ms"}}},[e.IS_DM&&e.visible.locations?i("div",{attrs:{id:"locations-menu"}},[i("div",[e._l(e.locations,function(t){return i("div",{key:t,on:{click:function(i){e.changeLocation(t)}}},[e._v(e._s(t))])}),i("div",{on:{click:e.createLocation}},[i("i",{staticClass:"fas fa-plus"})])],2)]):e._e()]),i("img",{attrs:{id:"dragImage"}})],1)},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"far fa-compass"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"fas fa-cog"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"rm-topper"},[i("i",{staticClass:"icon-share-alt"})])}];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"45fb":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Edit asset")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("div",{staticClass:"grid"},[i("label",{attrs:{for:"shapeselectiondialog-name"}},[e._v("Name")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.name,expression:"shape.name"}],staticStyle:{"grid-column":"numerator / remove"},attrs:{type:"text",id:"shapeselectiondialog-name",disabled:!e.owned},domProps:{value:e.shape.name},on:{change:function(t){e.updateShape(!1)},input:function(t){t.target.composing||e.$set(e.shape,"name",t.target.value)}}}),i("div",{style:{opacity:e.shape.nameVisible?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(t){e.shape.nameVisible=!e.shape.nameVisible,e.updateShape(!1)}}},[i("i",{staticClass:"fas fa-eye"})]),i("label",{attrs:{for:"shapeselectiondialog-istoken"}},[e._v("Is a token")]),i("input",{staticClass:"styled-checkbox",staticStyle:{"grid-column-start":"remove"},attrs:{type:"checkbox",id:"shapeselectiondialog-istoken",disabled:!e.owned},domProps:{checked:e.shape.isToken},on:{click:e.setToken}}),i("label",{attrs:{for:"shapeselectiondialog-visionblocker"}},[e._v("Blocks vision/light")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.visionObstruction,expression:"shape.visionObstruction"}],staticStyle:{"grid-column-start":"remove"},attrs:{type:"checkbox",id:"shapeselectiondialog-visionblocker",disabled:!e.owned},domProps:{checked:Array.isArray(e.shape.visionObstruction)?e._i(e.shape.visionObstruction,null)>-1:e.shape.visionObstruction},on:{change:[function(t){var i=e.shape.visionObstruction,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&e.$set(e.shape,"visionObstruction",i.concat([o])):r>-1&&e.$set(e.shape,"visionObstruction",i.slice(0,r).concat(i.slice(r+1)))}else e.$set(e.shape,"visionObstruction",n)},e.setVisionBlocker]}}),i("label",{attrs:{for:"shapeselectiondialog-moveblocker"}},[e._v("Blocks movement")]),i("input",{staticStyle:{"grid-column-start":"remove"},attrs:{type:"checkbox",id:"shapeselectiondialog-moveblocker",disabled:!e.owned},domProps:{checked:e.shape.movementObstruction},on:{click:e.setMovementBlocker}}),i("label",{attrs:{for:"shapeselectiondialog-strokecolour"}},[e._v("Border colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove"},attrs:{color:e.shape.strokeColour,disabled:!e.owned},on:{"update:color":function(t){e.$set(e.shape,"strokeColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("label",{attrs:{for:"shapeselectiondialog-fillcolour"}},[e._v("Fill colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove"},attrs:{color:e.shape.fillColour,disabled:!e.owned},on:{"update:color":function(t){e.$set(e.shape,"fillColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("div",{staticClass:"spanrow header"},[e._v("Access")]),e._l(e.shape.owners,function(t){return[i("input",{key:t,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name",disabled:!e.owned},domProps:{value:t},on:{change:function(i){e.updateOwner(i,t)}}}),""!==t?i("div",{key:"remove-"+t,style:{opacity:e.owned?1:.3,textAlign:"center",gridColumnStart:"remove"},attrs:{disabled:!e.owned},on:{click:function(i){e.removeOwner(t)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Trackers")]),e._l(e.shape.trackers,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"tracker.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name",disabled:!e.owned},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"tracker.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value",disabled:!e.owned},domProps:{value:t.value},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.maxvalue,expression:"tracker.maxvalue",modifiers:{number:!0}}],key:"maxvalue-"+t.uuid,attrs:{type:"text",title:"Current value",disabled:!e.owned},domProps:{value:t.maxvalue},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"maxvalue",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"sspan-"+t.uuid}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){t.visible=!t.visible,e.updateShape(!1)}}},[i("i",{staticClass:"fas fa-eye"})]),i("span",{key:"tspan-"+t.uuid}),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,style:{opacity:e.owned?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){e.removeTracker(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Auras")]),e._l(e.shape.auras,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"aura.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name",disabled:!e.owned},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"aura.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value",disabled:!e.owned},domProps:{value:t.value},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.dim,expression:"aura.dim",modifiers:{number:!0}}],key:"dimvalue-"+t.uuid,attrs:{type:"text",title:"Dim value",disabled:!e.owned},domProps:{value:t.dim},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"dim",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("color-picker",{key:"colour-"+t.uuid,attrs:{color:t.colour,disabled:!e.owned},on:{"update:color":function(i){e.$set(t,"colour",i)},input:function(i){e.updateAuraColour(t,i)},change:function(t){e.updateShape(!0)}}}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){t.visible=!t.visible,e.updateShape(!0)}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{key:"visionsource-"+t.uuid,style:{opacity:t.visionSource?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){e.updateAuraVisionSource(t)}}},[i("i",{staticClass:"fas fa-lightbulb"})]),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,style:{opacity:e.owned?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){e.removeAura(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Labels")]),i("div",{staticClass:"spanrow",attrs:{id:"labels"}},[e._l(e.shape.labels,function(t){return i("div",{key:t.uuid,staticClass:"label"},[t.category?[i("div",{staticClass:"label-user"},[e._v(e._s(t.category))]),i("div",{staticClass:"label-main",on:{click:function(i){e.removeLabel(t.uuid)}}},[e._v(e._s(t.name))])]:e._e(),t.category?e._e():[i("div",{staticClass:"label-main",on:{click:function(i){e.removeLabel(t.uuid)}}},[e._v(e._s(t.name))])]],2)}),e.owned?i("div",{staticClass:"label",attrs:{id:"label-add"}},[i("div",{staticClass:"label-main",on:{click:e.openLabelManager}},[e._v("+")])]):e._e()],2),i("div",{staticClass:"spanrow header"},[e._v("Annotation")]),i("textarea",{staticClass:"spanrow",attrs:{disabled:!e.owned},domProps:{value:e.shape.annotation},on:{change:e.updateAnnotation}})],2)])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},4709:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1"),c=i("5a5c");class u extends o.Shape{constructor(e,t,i,s,n){super(e,i,s,n),this.type="circle",this.r=t||1}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r})}fromDict(e){super.fromDict(e),this.r=e.radius}getBoundingBox(){return new n.BoundingRect(new s.GlobalPoint(this.refPoint.x-this.r,this.refPoint.y-this.r),2*this.r,2*this.r)}get points(){return this.getBoundingBox().points}draw(e){super.draw(e),e.beginPath(),"fog"===this.fillColour?e.fillStyle=c.getFogColour():e.fillStyle=this.fillColour;const t=l.g2l(this.refPoint);e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.beginPath(),e.lineWidth=l.g2lz(5),e.strokeStyle=this.strokeColour,e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.stroke())}contains(e){return Math.pow(e.x-this.refPoint.x,2)+Math.pow(e.y-this.refPoint.y,2){const t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t){return e.toLowerCase()t(e)?i[1].push(e):i[0].push(e)),i}function u(e,t,i,s){const n=.2*Number(e.font.split("px")[0]),o=e.measureText(t).width;return Math.min(i/o,s/n)}function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,e=>{return"%"+e.charCodeAt(0).toString(16)})}t.uuidv4=n,t.capitalize=o,t.alphSort=r,t.getHTMLFont=a,t.getHTMLTextWidth=l,t.partition=c,t.calcFontScale=u,t.fixedEncodeURIComponent=d;class h{constructor(){this.keys=[],this.values=[]}get length(){return this.keys.length}get(e){return this.values[this.keys.indexOf(e)]}getIndexValue(e){return this.values[e]}getIndexKey(e){return this.keys[e]}set(e,t){this.keys.push(e),this.values.push(t)}has(e){return this.indexOf(e)>=0}indexOf(e){return this.keys.indexOf(e)}remove(e){const t=this.indexOf(e);this.keys.splice(t,1),this.values.splice(t,1)}}function f(){return s.app.$children[0].$refs.activeComponent}function p(e){const t=s.app.$children[0].$refs.activeComponent;return t.$refs[e]}t.OrderedMap=h,t.getComponent=f,t.getRef=p},"4aec":function(e,t,i){"use strict";i.r(t);var s=i("a755"),n=i("f51a");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="contextMenu.vue",t["default"]=a.exports},"4aee":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("98ef");function n(e){return(e+2)%3}function o(e){return(e+1)%3}function r(e,t){const i=new s.EdgeCirculator(e,null);if(i.valid)do{const n=3-i.t.indexV(e)-i.ri,o=i.t.vertices[n];if(!o.infinite){if(o===t)return{includes:!0,vi:t,fr:i.t,i:i.ri};{const n=c(e.point,t.point,o.point);if(n===s.Sign.COLLINEAR&&a(e.point,o.point,t.point))return{includes:!0,vi:o,fr:i.t,i:i.ri}}}}while(i.next());return{includes:!1}}function a(e,t,i){let n,o;return l(0,e,i)===s.Sign.EQUAL?(n=l(1,e,t),o=l(1,t,i)):(n=l(0,e,t),o=l(0,t,i)),n===s.Sign.SMALLER&&o===s.Sign.SMALLER||n===s.Sign.LARGER&&o===s.Sign.LARGER}function l(e,t,i){return t[e]i[e]?s.Sign.LARGER:s.Sign.EQUAL}function c(e,t,i){const n=e[0],o=e[1],r=t[0],a=t[1],l=i[0],c=i[1],d=r-n,h=a-o,f=l-n,p=c-o,g=u(d,h,f,p);let v=Math.abs(d),m=Math.abs(h);const y=Math.abs(f),b=Math.abs(p);if(vm&&([v,m]=[m,v]),v<2e-162&&0===v)return s.Sign.ZERO;if(m<1e153){const e=Number.EPSILON*v*m;if(g>e)return s.Sign.POSITIVE;if(g<-e)return s.Sign.NEGATIVE}return s.Sign.ZERO}function u(e,t,i,s){return e*s-t*i}function d(e,t,i){return u(t[0]-e[0],t[1]-e[1],i[0]-e[0],i[1]-e[1])<0}function h(e,t,i){if(!e.isInfinite())return f(e.vertices[0].point,e.vertices[1].point,e.vertices[2].point,t,i);throw new Error("SSS")}function f(e,t,i,n,o){const r=m(e,t,i,n);if(r!==s.Sign.ON_ORIENTED_BOUNDARY||!o)return r;const a=[e,t,i,n];a.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);for(const l of a.reverse()){if(l===n)return s.Sign.ON_NEGATIVE_SIDE;let o=c(e,t,n);if(l===i&&o!==s.Sign.COLLINEAR)return o;if(o=c(e,n,i),l===t&&o!==s.Sign.COLLINEAR)return o;if(o=c(n,t,i),l===e&&o!==s.Sign.COLLINEAR)return o}return s.Sign.ON_NEGATIVE_SIDE}function p(e,t){return e[0]===t[0]&&e[1]===t[1]}function g(e,t){return e[0]y&&([m,y]=[y,m]),m<1e-73&&0===m)return s.Sign.ON_ORIENTED_BOUNDARY;if(y<1e76){const e=Number.EPSILON*m*y*(y*y);if(v>e)return s.Sign.ON_POSITIVE_SIDE;if(v<-e)return s.Sign.ON_NEGATIVE_SIDE}return s.Sign.ZERO}function y(e,t,i,n){switch(c(e,t,i)){case s.Sign.LEFT_TURN:return c(i,n,t)!==s.Sign.RIGHT_TURN;case s.Sign.RIGHT_TURN:return c(i,n,t)!==s.Sign.LEFT_TURN;case s.Sign.COLLINEAR:return!0}}function b(e,t,i,n){switch(c(e,t,i)){case s.Sign.LEFT_TURN:return c(e,t,n)!==s.Sign.LEFT_TURN;case s.Sign.RIGHT_TURN:return c(e,t,n)!==s.Sign.RIGHT_TURN;case s.Sign.COLLINEAR:return!0}}function _(e,t,i,s){const n=x(e,t,i,s);switch(n.intersectionType){case w.POINT:return n.point;case w.NO_INTERSECTION:return null}throw new Error("sdfgighowen")}var w;function S(e,t){if(e[0]===t[0])return[1,0,-e[0]];if(e[1]===t[1])return[0,1,-e[1]];const i=t[0]-e[0],s=t[1]-e[1];return[-s,i,-i*e[1]+s*e[0]]}function x(e,t,i,s){if(!C(e,t,i,s))return{intersectionType:w.NO_INTERSECTION,point:null};const n=S(e,t),o=S(i,s),r=M(n,o);switch(r.intersectionType){case w.POINT:return r}throw new Error("gzseuihgpib")}function M(e,t){const i=e[0]*t[1]-t[0]*e[1],s=e[1]*t[2]-t[1]*e[2],n=t[0]*e[2]-e[0]*t[2];return{intersectionType:w.POINT,point:[s/i,n/i]}}function C(e,t,i,n){if(g(e,t)){if(g(i,n)){if(g(t,i)||g(n,e))return!1}else if(g(t,n)||g(i,e))return!1}else if(g(i,n)){if(g(e,i)||g(n,t))return!1}else if(g(e,n)||g(i,t))return!1;if(g(e,t))if(g(i,n))switch(v(e,i)){case s.Sign.SMALLER:switch(v(t,i)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(t,n)){case s.Sign.SMALLER:return y(e,t,i,n);case s.Sign.EQUAL:return!0;default:return b(e,t,i,n)}}case s.Sign.EQUAL:return!0;default:switch(v(n,e)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(n,t)){case s.Sign.SMALLER:return y(i,n,e,t);case s.Sign.EQUAL:return!0;default:return b(i,n,e,t)}}}else switch(v(e,n)){case s.Sign.SMALLER:switch(v(t,n)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(t,i)){case s.Sign.SMALLER:return y(e,t,n,i);case s.Sign.EQUAL:return!0;default:return b(e,t,n,i)}}case s.Sign.EQUAL:return!0;default:switch(v(i,e)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(i,t)){case s.Sign.SMALLER:return y(n,i,e,t);case s.Sign.EQUAL:return!0;default:return b(n,i,e,t)}}}else if(g(i,n))switch(v(t,i)){case s.Sign.SMALLER:switch(v(e,i)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(e,n)){case s.Sign.SMALLER:return y(t,e,i,n);case s.Sign.EQUAL:return!0;default:return b(t,e,i,n)}}case s.Sign.EQUAL:return!0;default:switch(v(n,t)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(n,e)){case s.Sign.SMALLER:return y(i,n,t,e);case s.Sign.EQUAL:return!0;default:return b(i,n,t,e)}}}else switch(v(t,n)){case s.Sign.SMALLER:switch(v(e,n)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(e,i)){case s.Sign.SMALLER:return y(t,e,n,i);case s.Sign.EQUAL:return!0;default:return b(t,e,n,i)}}case s.Sign.EQUAL:return!0;default:switch(v(i,t)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(i,e)){case s.Sign.SMALLER:return y(n,i,t,e);case s.Sign.EQUAL:return!0;default:return b(n,i,t,e)}}}}function L(e){if(e!==e)return e;if(e===-1/0)return-Number.MAX_VALUE;if(e===1/0)return 1/0;if(e===+Number.MAX_VALUE)return 1/0;let t=e*(e<0?1-Number.EPSILON/2:1+Number.EPSILON);t===e&&(t=Number.MIN_VALUE*Number.EPSILON>0?e+Number.MIN_VALUE*Number.EPSILON:e+Number.MIN_VALUE),t===1/0&&(t=+Number.MAX_VALUE);const i=e+(t-e)/2;ewindow.innerWidth-100&&(t=window.innerWidth-100),i<0&&(i=0),i>window.innerHeight-100&&(i=window.innerHeight-100),this.$refs.container.style.left=t+"px",this.$refs.container.style.top=i+"px",this.$refs.container.style.display="block"}dragOver(e){this.dragging&&(this.$refs.container.style.display="none")}};s.__decorate([r.Prop(Boolean)],a.prototype,"visible",void 0),s.__decorate([r.Prop({type:Boolean,default:!0})],a.prototype,"mask",void 0),a=s.__decorate([o.default],a),t.default=a},5338:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("8055")),o=i("2d5b");t.socket=n.default(location.protocol+"//"+location.host+"/pa_assetmgmt",{autoConnect:!1}),t.socket.on("connect",()=>{console.log("Connected")}),t.socket.on("disconnect",()=>{console.log("Disconnected")}),t.socket.on("redirect",e=>{console.log("redirecting"),window.location.href=e}),t.socket.on("Folder.Root.Set",e=>{o.assetStore.setRoot(e)}),t.socket.on("Folder.Set",e=>{if(o.assetStore.clear(),e.children)for(const t of e.children)o.assetStore.idMap.set(t.id,t),t.file_hash?o.assetStore.files.push(t.id):o.assetStore.folders.push(t.id)}),t.socket.on("Folder.Create",e=>{o.assetStore.folders.push(e.id),o.assetStore.idMap.set(e.id,e)}),t.socket.on("Asset.Upload.Finish",e=>{o.assetStore.idMap.set(e.id,e),o.assetStore.files.push(e.id)})},5394:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=s.__importDefault(i("1289")),r=s.__importDefault(i("ea6a")),a=i("0bc6"),l=i("6f92"),c=i("f10f");let u=class extends r.default{constructor(){super(...arguments),this.name="Filter",this.active=!1}get labels(){const e={};for(const t of Object.keys(c.gameStore.labels)){const i=c.gameStore.labels[t];i.category?(i.category in e||(e[i.category]=[]),e[i.category].push([i.uuid,i.name]),e[i.category].sort((e,t)=>e[1].localeCompare(t[1]))):e[""].push([i.uuid,i.name])}return e}get initalValues(){const e={};for(const t of Object.keys(this.labels))e[t]=c.gameStore.labelFilters.filter(e=>this.labels[t].map(e=>e[0]).includes(e));return e}get categories(){return Object.keys(this.labels).sort()}isFilter(e){return c.gameStore.labelFilters.includes(e)}toggleFilter(e){const t=c.gameStore.labelFilters.indexOf(e);t>=0?c.gameStore.labelFilters.splice(t,1):c.gameStore.labelFilters.push(e),l.layerManager.invalidate()}toggleUnlabeled(){c.gameStore.toggleUnlabeledFilter(),l.layerManager.invalidate()}updateSelection(e){if(e.title in this.labels){for(const[t,i]of this.labels[e.title]){const i=c.gameStore.labelFilters.indexOf(t),s=e.selection.includes(t);i>=0&&!s?(c.gameStore.labelFilters.splice(i,1),a.socket.emit("Labels.Filter.Remove",t)):i<0&&s&&(c.gameStore.labelFilters.push(t),a.socket.emit("Labels.Filter.Add",t))}l.layerManager.invalidate()}}};u=s.__decorate([n.default({components:{accordion:o.default}})],u),t.default=u},"53ec":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=i("60a3");let a=class extends n.default{constructor(){super(...arguments),this.selected=[],this.active=!1}mounted(){this.selected=this.initialValues,this.updateCategory()}toggleDisplay(e){this.active=!this.active}toggleCategory(){const e=this.$refs.overall;e.checked?this.selected=this.items.map(e=>e[0]):this.selected=[],this.$emit("selectionupdate",{title:this.title,selection:this.selected})}updateCategory(){const e=this.$refs.overall;0===this.selected.length?(e.checked=!1,e.indeterminate=!1):this.selected.length===this.items.length?(e.checked=!0,e.indeterminate=!1):(e.checked=!1,e.indeterminate=!0)}toggleSelection(e){const t=this.selected.indexOf(e);-1===t?this.selected.push(e):this.selected.splice(t,1),this.updateCategory(),this.$emit("selectionupdate",{title:this.title,selection:this.selected})}};s.__decorate([r.Prop(String)],a.prototype,"title",void 0),s.__decorate([r.Prop({default:!0,type:Boolean})],a.prototype,"showArrow",void 0),s.__decorate([r.Prop({default:()=>[]})],a.prototype,"items",void 0),s.__decorate([r.Prop({default:()=>[]})],a.prototype,"initialValues",void 0),a=s.__decorate([o.default],a),t.default=a},"561b":function(e,t,i){"use strict";var s=i("a450"),n=i.n(s);n.a},5722:function(e,t,i){},"574e":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("92b1"),a=i("5a5c");class l extends o.Shape{constructor(e,t,i,s,n){super(e,"rgba(0, 0, 0, 0)",s||"#000",n),this.type="multiline",this._points=[],this._points=t||[],this.lineWidth=i||3}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._points=e.points.map(e=>new s.GlobalPoint(e.x,e.y))}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,o=this.refPoint.y;for(const s of this._points)s.xt&&(t=s.x),s.yo&&(o=s.y);return new n.BoundingRect(new s.GlobalPoint(e,i),t-e,o-i)}draw(e){super.draw(e),e.beginPath(),e.lineCap="round",e.lineJoin="round",e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y));for(const t of this._points)e.lineTo(r.g2lx(t.x),r.g2ly(t.y));"fog"===this.strokeColour?e.strokeStyle=a.getFogColour():e.strokeStyle=this.strokeColour,e.lineWidth=r.g2lz(this.lineWidth),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=r.l2g(t):this._points[e-1]=r.l2g(t)}}t.MultiLine=l},"59d8":function(e,t,i){"use strict";i.r(t);var s=i("e5ca"),n=i("6f8d");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("a7b3");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"639cd890",null);a.options.__file="draw.vue",t["default"]=a.exports},"59f0":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Initiative")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("draggable",{attrs:{id:"initiative-list",options:{setData:e.fakeSetData,disabled:!e.$store.state.game.IS_DM}},on:{change:e.updateOrder},model:{value:e.data,callback:function(t){e.data=t},expression:"data"}},[e._l(e.data,function(t){return[i("div",{key:t.uuid,staticStyle:{display:"flex","flex-direction":"column","align-items":"flex-end"}},[i("div",{staticClass:"initiative-actor",class:{"initiative-selected":e.currentActor===t.uuid},style:{cursor:e.$store.state.game.IS_DM&&"move"},on:{mouseenter:function(i){e.toggleHighlight(t,!0)},mouseleave:function(i){e.toggleHighlight(t,!1)}}},[t.has_img?[i("img",{attrs:{src:t.source,width:"30px",height:"30px"}})]:[i("span",{staticStyle:{width:"auto"}},[e._v(e._s(t.source))])],i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:t.initiative,expression:"actor.initiative",modifiers:{lazy:!0,number:!0}}],class:{notAllowed:!e.owns(t)},attrs:{type:"text",placeholder:"value",disabled:!e.owns(t)},domProps:{value:t.initiative},on:{change:[function(i){e.$set(t,"initiative",e._n(i.target.value))},function(i){e.syncInitiative(t)}],blur:function(t){e.$forceUpdate()}}}),i("div",{staticClass:"initiative-effects-icon",class:{notAllowed:!e.owns(t)},staticStyle:{opacity:"0.6"},on:{click:function(i){e.createEffect(t,e.getDefaultEffect(),!0)}}},[i("i",{staticClass:"fas fa-stopwatch"}),t.effects?[e._v(e._s(t.effects.length))]:[e._v("0")]],2),i("div",{class:{notAllowed:!e.owns(t)},style:{opacity:t.visible?"1.0":"0.3"},on:{click:function(i){e.toggleOption(t,"visible")}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{class:{notAllowed:!e.owns(t)},style:{opacity:t.group?"1.0":"0.3"},on:{click:function(i){e.toggleOption(t,"group")}}},[i("i",{staticClass:"fas fa-users"})]),i("div",{class:{notAllowed:!e.owns(t)},style:{opacity:e.owns(t)?"1.0":"0.3"},on:{click:function(i){e.removeInitiative(t.uuid,!0,!0)}}},[i("i",{staticClass:"fas fa-trash-alt"})])],2),t.effects?i("div",{staticClass:"initiative-effect"},e._l(t.effects,function(s){return i("div",{key:s.uuid},[i("input",{directives:[{name:"model",rawName:"v-model",value:s.name,expression:"effect.name"}],attrs:{type:"text",size:s.name.length||1},domProps:{value:s.name},on:{change:function(i){e.updateEffect(t.uuid,s,!0)},input:function(t){t.target.composing||e.$set(s,"name",t.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model",value:s.turns,expression:"effect.turns"}],attrs:{type:"text",size:s.turns.toString().length||1},domProps:{value:s.turns},on:{change:function(i){e.updateEffect(t.uuid,s,!0)},input:function(t){t.target.composing||e.$set(s,"turns",t.target.value)}}})])})):e._e()])]})],2),i("div",{attrs:{id:"initiative-bar"}},[i("div",{attrs:{id:"initiative-round"}},[e._v("Round "+e._s(e.roundCounter))]),i("div",{staticStyle:{display:"flex"}}),i("div",{staticClass:"initiative-bar-button",class:{notAllowed:!e.$store.state.game.IS_DM},on:{click:function(t){e.setRound(0,!0),e.updateTurn(e.data[0].uuid,!0)}}},[i("i",{staticClass:"fas fa-sync-alt"})]),i("div",{staticClass:"initiative-bar-button",class:{notAllowed:!e.$store.state.game.IS_DM},on:{click:e.nextTurn}},[i("i",{staticClass:"fas fa-chevron-right"})])])],1)])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"5a5c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("66cb")),o=i("8f0a"),r=i("f10f");function a(e){return new o.LocalPoint(e.pageX,e.pageY)}function l(e=!1){const t=n.default(r.gameStore.fowColour);return r.gameStore.IS_DM?t.setAlpha(e?1:r.gameStore.fowOpacity):t.setAlpha(1),t.toRgbString()}function c(e){return 1/(-5/3+28/15*Math.exp(1.83*e))}function u(e){return Math.log(15/28*(1/e+5/3))/1.83}t.getMouse=a,t.getFogColour=l,t.zoomValue=c,t.zoomDisplay=u},"5a81":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importStar(i("66cb")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("2f62"),l=s.__importDefault(i("3b36")),c=s.__importDefault(i("d65f")),u=i("4a5b"),d=i("8f0a"),h=i("6f92"),f=i("1327"),p=i("f10f"),g=i("92b1"),v=i("60a3");let m=class extends o.default{constructor(){super(...arguments),this.x=0,this.y=0,this.visible=!1,this.text="X",this.fillColour="rgba(255, 255, 255, 1)",this.borderColour="rgba(0, 0, 0, 1)"}mounted(){this.updatePreview()}onTextChange(e,t){this.updatePreview()}onFillChange(e,t){this.updatePreview()}onBorderChange(e,t){this.updatePreview()}open(e,t){this.visible=!0,this.x=e,this.y=t}submit(){const e=h.layerManager.getLayer();if(void 0===e)return;const t=new f.CircularToken(g.l2g(new d.LocalPoint(this.x,this.y)),g.getUnitDistance(p.gameStore.unitSize/2),this.text,"10px serif",this.fillColour,this.borderColour);t.addOwner(p.gameStore.username),e.addShape(t,!0),e.invalidate(!1),this.visible=!1}updatePreview(){const e=this.$refs.canvas.getContext("2d");e.clearRect(0,0,e.canvas.width,e.canvas.height),e.beginPath();const t={x:e.canvas.width/2,y:e.canvas.height/2},i=.9*Math.min(t.x,t.y);e.fillStyle=this.fillColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.borderColour&&(e.beginPath(),e.lineWidth=5,e.strokeStyle=this.borderColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.stroke()),e.save(),e.textAlign="center",e.textBaseline="middle";const s=u.calcFontScale(e,this.text,i,i),o=0;e.transform(s,o,-o,s,t.x,t.y),e.fillStyle=n.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}};s.__decorate([v.Watch("text")],m.prototype,"onTextChange",null),s.__decorate([v.Watch("fillColour")],m.prototype,"onFillChange",null),s.__decorate([v.Watch("borderColour")],m.prototype,"onBorderChange",null),m=s.__decorate([r.default({components:{Modal:c.default,"color-picker":l.default},computed:Object.assign({},a.mapState("game",["unitSize"]))})],m),t.default=m},"5ae5":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f")),a=i("4a5b"),l=i("f10f");let c=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.note=null}open(e){this.visible=!0,this.note=e}calcHeight(){if(this.$refs.textarea){const e=this.$refs.textarea;return e.style.height="auto",e.style.height=e.scrollHeight+"px",e.scrollHeight+"px"}return"100px"}updateNote(){this.note&&l.gameStore.updateNote({note:this.note,sync:!0})}removeNote(){a.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{e&&this.note&&(l.gameStore.removeNote({note:this.note,sync:!0}),this.visible=!1)},()=>{})}};c=s.__decorate([o.default({components:{Modal:r.default}})],c),t.default=c},"5b69":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=i("60a3"),r=s.__importDefault(i("3b36")),a=s.__importDefault(i("ea6a")),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("4709"),h=i("5e7c"),f=i("574e"),p=i("e4ea"),g=i("b2ed"),v=i("f10f"),m=i("92b1"),y=i("5a5c");let b=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.ruler=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","draw-polygon","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=m.getUnitDistance(v.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:m.getUnitDistance(this.unitSize)/8}get IS_DM(){return v.gameStore.IS_DM}get unitSize(){return v.gameStore.unitSize}get useGrid(){return v.gameStore.useGrid}onFillChange(){this.brushHelper&&(this.brushHelper.fillColour=this.fillColour)}onModeUpdate(e,t){this.onModeChange(e,t)}setupBrush(){null!==this.brushHelper&&("reveal"===this.modeSelect||"hide"===this.modeSelect?(this.brushHelper.options.set("preFogShape",!0),this.brushHelper.options.set("skipDraw",!0),this.brushHelper.fillColour="rgba(0, 0, 0, 1)","reveal"===this.modeSelect?this.brushHelper.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.brushHelper.globalCompositeOperation="destination-out")):(this.brushHelper.options.delete("preFogShape"),this.brushHelper.options.delete("skipDraw"),this.brushHelper.globalCompositeOperation="source-over",this.brushHelper.fillColour=this.fillColour))}onModeChange(e,t){if(null===this.brushHelper)return;const i=u.layerManager.getLayer("fow"),s=u.layerManager.getLayer();void 0!==i&&void 0!==s&&(this.setupBrush(),"normal"!==e&&"normal"===t?(s.removeShape(this.brushHelper,!1),i.addShape(this.brushHelper,!1)):"normal"===e&&"normal"!==t&&(s.addShape(this.brushHelper,!1),i.removeShape(this.brushHelper,!1)))}getLayer(){return"normal"===this.modeSelect?u.layerManager.getLayer():u.layerManager.getLayer("fow")}onMouseDown(e){const t=this.getLayer();if(void 0!==t){if(this.active)null!==this.shape&&this.shape instanceof p.Polygon&&this.shape._vertices.push(m.l2g(y.getMouse(e)));else{switch(this.startPoint=m.l2g(y.getMouse(e)),this.active=!0,this.shapeSelect){case"square":this.shape=new g.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);break;case"circle":this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);break;case"paint-brush":this.shape=new f.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour;break;case"draw-polygon":this.shape=new p.Polygon(this.startPoint.clone(),[],this.fillColour,this.borderColour);break;default:return}"normal"!==this.modeSelect&&(this.shape.options.set("preFogShape",!0),this.shape.options.set("skipDraw",!0),this.shape.fillColour="rgba(0, 0, 0, 1)"),"reveal"===this.modeSelect?this.shape.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.shape.globalCompositeOperation="destination-out"),this.shape.addOwner(v.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),t.addShape(this.shape,!0,!1,!1),this.pushBrushBack()}if(null!==this.shape&&this.shape instanceof p.Polygon){const i=m.l2g(y.getMouse(e));null===this.ruler?(this.ruler=new h.Line(i,i,3,"black"),t.addShape(this.ruler,!1)):(this.ruler.refPoint=i,this.ruler.endPoint=i),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0),t.invalidate(!1),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0})}}else console.log("No active layer!")}onMouseMove(e){const t=m.l2g(y.getMouse(e)),i=this.getLayer();if(void 0!==i){if(null!==this.brushHelper&&(this.brushHelper.r=this.helperSize,this.brushHelper.refPoint=t,this.active||i.invalidate(!1)),this.active&&null!==this.startPoint&&null!==this.shape){switch(this.shapeSelect){case"square":this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint=new c.GlobalPoint(Math.min(this.startPoint.x,t.x),Math.min(this.startPoint.y,t.y));break;case"circle":this.shape.r=t.subtract(this.startPoint).length();break;case"paint-brush":this.shape._points.push(t);break;case"draw-polygon":this.ruler.endPoint=t;break}this.shape instanceof p.Polygon||(l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0)),i.invalidate(!1)}}else console.log("No active layer!")}onMouseUp(e){!this.active||null===this.shape||this.shape instanceof p.Polygon||(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.finaliseShape())}onContextMenu(e){if(!this.active||null===this.shape||!(this.shape instanceof p.Polygon))return;const t=this.getLayer();void 0!==t?(t.removeShape(this.ruler,!1),this.ruler=null,this.finaliseShape()):console.log("No active layer!")}finaliseShape(){null!==this.shape&&(this.shape.visionObstruction&&v.gameStore.recalculateVision(),this.shape.movementObstruction&&v.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!1}),this.active=!1)}onSelect(){const e=this.getLayer();void 0!==e&&(this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1))}onDeselect(){const e=this.getLayer();null!==this.brushHelper&&void 0!==e&&e.removeShape(this.brushHelper,!1),this.active&&void 0!==e&&null!==this.shape&&(e.removeShape(this.shape,!0,!1),this.shape=null,this.active=!1,e.invalidate(!1))}pushBrushBack(){const e=this.getLayer();void 0!==e?(null!==this.brushHelper&&e.removeShape(this.brushHelper,!1),this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1)):console.log("No active layer!")}};s.__decorate([o.Watch("fillColour")],b.prototype,"onFillChange",null),s.__decorate([o.Watch("modeSelect")],b.prototype,"onModeUpdate",null),b=s.__decorate([n.default({components:{"color-picker":r.default}})],b),t.default=b},"5e7c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("92b1");class a extends o.Shape{constructor(e,t,i,s,n){super(e,"rgba(0, 0, 0, 0)",s||"#000",n),this.type="line",this.endPoint=t,this.lineWidth=void 0===i?1:i}asDict(){return Object.assign(this.getBaseDict(),{x2:this.endPoint.x,y2:this.endPoint.y,line_width:this.lineWidth})}get points(){return[[this.refPoint.x,this.refPoint.y],[this.endPoint.x,this.endPoint.y]]}getBoundingBox(){return new n.BoundingRect(new s.GlobalPoint(Math.min(this.refPoint.x,this.endPoint.x),Math.min(this.refPoint.y,this.endPoint.y)),Math.abs(this.refPoint.x-this.endPoint.x),Math.abs(this.refPoint.y-this.endPoint.y))}draw(e){super.draw(e),e.strokeStyle=this.strokeColour,e.beginPath(),e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y)),e.lineTo(r.g2lx(this.endPoint.x),r.g2ly(this.endPoint.y)),e.lineWidth=this.lineWidth,e.stroke()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this.refPoint=r.l2g(t):this.endPoint=r.l2g(t)}}t.Line=a},"5f86":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("8c4f"));o.default.use(r.default);const a=s.__importDefault(i("e914")),l=s.__importDefault(i("1077")),c=s.__importDefault(i("cad7")),u=s.__importDefault(i("47f7")),d=s.__importDefault(i("c6b4")),h=s.__importDefault(i("07f5")),f=s.__importDefault(i("ce87")),p=i("cc67");t.router=new r.default({mode:"history",base:"/",routes:[{path:"/",redirect:"/dashboard"},{path:"/_load",name:"load",component:u.default},{path:"/assets",component:a.default,meta:{auth:!0}},{path:"/auth",component:{template:""},children:[{path:"login",component:l.default},{path:"logout",component:c.default}]},{path:"/invite/:code",component:f.default,meta:{auth:!0}},{path:"/dashboard",component:d.default,meta:{auth:!0}},{path:"/game/:creator/:room",component:h.default,meta:{auth:!0}}]}),t.router.beforeEach((e,i,s)=>{p.coreStore.initialized||"/_load"===e.path?e.matched.some(e=>e.meta.auth)&&!p.coreStore.authenticated?s({path:"/auth/login",query:{redirect:e.path}}):s():(s({path:"/_load"}),n.default.get("/api/auth").then(i=>{i.data.auth&&(p.coreStore.setAuthenticated(!0),p.coreStore.setUsername(i.data.username)),p.coreStore.setInitialized(!0),t.router.push(e.path)}).catch(()=>{console.error("Authentication check could not be fulfilled.")}))})},"5fa9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9"));let r=class extends n.default{constructor(){super(...arguments),this.name="",this.selected=!1,this.active=!1}get detailRight(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2;return`${window.innerWidth-Math.min(window.innerWidth-25,t+75)}px`}get detailArrow(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2,i=Math.min(window.innerWidth-25,t+75);return`${i-t-14}px`}created(){this.$parent.$on("mousedown",(e,t)=>{t===this.name&&this.onMouseDown(e)}),this.$parent.$on("mouseup",(e,t)=>{t===this.name&&this.onMouseUp(e)}),this.$parent.$on("mousemove",(e,t)=>{t===this.name&&this.onMouseMove(e)}),this.$parent.$on("contextmenu",(e,t)=>{t===this.name&&this.onContextMenu(e)}),this.$parent.$on("tools-select-change",(e,t)=>{t===this.name?(this.selected=!1,this.onDeselect()):e===this.name&&(this.selected=!0,this.onSelect())})}onSelect(){}onDeselect(){}onMouseDown(e){}onMouseUp(e){}onMouseMove(e){}onContextMenu(e){}};r=s.__decorate([o.default],r),t.default=r},"602f":function(e,t,i){},6100:function(e,t,i){"use strict";i.r(t);var s=i("f3c9"),n=i("e94f");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("a5a4");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"cf33581e",null);a.options.__file="tools.vue",t["default"]=a.exports},6465:function(e,t,i){"use strict";i.r(t);var s=i("5fa9"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"64a9":function(e,t,i){},6542:function(e,t,i){},"6c30":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("c266"),n=i("f10f"),o=i("92b1");class r extends s.BaseRect{constructor(e,t,i,s,n){super(t,i,s,void 0,void 0,n),this.type="assetrect",this.src="",this.img=e}asDict(){return Object.assign(this.getBaseDict(),{src:this.src})}fromDict(e){super.fromDict(e),this.src=e.src}draw(e){super.draw(e);try{e.drawImage(this.img,o.g2lx(this.refPoint.x),o.g2ly(this.refPoint.y),o.g2lz(this.w),o.g2lz(this.h))}catch(t){console.warn(`Shape ${this.uuid} could not load the image ${this.src}`)}}getInitiativeRepr(){return{uuid:this.uuid,visible:!n.gameStore.IS_DM,group:!1,source:this.src,has_img:!0,effects:[],index:1/0}}}t.Asset=r},"6e4a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("98ef"),n=i("4aee");class o{constructor(){this.tds=new s.TDS}insertConstraint(e,t){const i=this.insert(e),s=this.insert(t);i!==s&&this.insertConstraintV(i,s)}insertConstraintV(e,t){const i=[[e,t]];while(i.length>0){const e=i.pop(),t=n.edgeInfo(e[0],e[1]);if(t.includes){this.markConstraint(t.fr,t.i),t.vi!==e[1]&&i.push([t.vi,e[1]]);continue}const s=this.findIntersectedFaces(e[0],e[1]);s.found?s.vi!==e[0]&&s.vi!==e[1]?(i.push([e[0],s.vi]),i.push([s.vi,e[1]])):i.push(e):(this.triangulateHole(s.intersectedFaces,s.listAB,s.listBA),s.vi!==e[1]&&i.push([s.vi,e[1]]))}}triangulateHole(e,t,i){const s=[];this.triangulateHole2(e,t,i,s),this.propagatingFlipE(s)}triangulateHole2(e,t,i,s){if(t.length>0){this.triangulateHalfHole(t,s),this.triangulateHalfHole(i,s);const n=t[0][0],o=i[0][0];n.neighbours[2]=o,o.neighbours[2]=n,n.constraints[2]=!0,o.constraints[2]=!0;while(e.length>0)this.tds.deleteTriangle(e.shift())}}triangulateHalfHole(e,t){let i,o,r=0;const a=()=>e[r],l=()=>e[i],c=a()[0].vertices[n.ccw(a()[1])];let u,d,h,f,p,g;i=r,++i;do{d=a()[0],p=a()[1],null!==d.neighbours[p]&&(u=d.neighbours[p],f=n.cw(u.indexV(d.vertices[n.cw(p)])),d=u.neighbours[f],p=this.tds.mirrorIndex(u,f)),h=l()[0],g=l()[1],null!==h.neighbours[g]&&(u=h.neighbours[g],f=n.cw(u.indexV(h.vertices[n.cw(g)])),h=u.neighbours[f],g=this.tds.mirrorIndex(u,f));const v=d.vertices[n.ccw(p)],m=d.vertices[n.cw(p)],y=h.vertices[n.cw(g)],b=n.orientation(v.point,m.point,y.point);switch(b){case s.Sign.RIGHT_TURN:{const s=this.tds.createTriangle(v,y,m,null,null,null);t.push([s,2]),s.neighbours[1]=d,s.neighbours[0]=h,d.neighbours[p]=s,h.neighbours[g]=s,d.isConstrained(p)&&(s.constraints[1]=!0),h.isConstrained(g)&&(s.constraints[0]=!0),v.triangle=s,m.triangle=s,y.triangle=s,o=r+1,e.splice(r,0,[s,2]),e.splice(Math.max(o,i),1),e.splice(Math.min(o,i),1),i=r,v!==c?--r:++i;break}case s.Sign.LEFT_TURN:case s.Sign.COLLINEAR:++r,++i;break}}while(i0){t=r[0][0],a=r[0][1],l=t.neighbours[a],c=this.tds.mirrorIndex(t,a),u=[t,a],r.splice(r.findIndex(e=>e[0]===u[0]&&e[1]===u[1]),1),d[0]=[t,n.cw(a)],d[1]=[t,n.ccw(a)],d[2]=[l,n.cw(c)],d[3]=[l,n.ccw(c)];for(const e of d){const t=e[0],i=e[1];s=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,s)?r.splice(r.findIndex(t=>t[0]===e[0]&&t[1]===e[1]),1):r.splice(r.findIndex(e=>e[0]===s[0]&&e[1]===s[1]),1)}this.flip(t,a);for(const e of d){const t=e[0],i=e[1];this.isFlipable(t,i)&&(s=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,s)?r.push(e):r.push(s))}}}flip(e,t){const i=e.neighbours[t],s=this.tds.mirrorIndex(e,t),o=e.neighbours[n.cw(t)],r=this.tds.mirrorIndex(e,n.cw(t)),a=e.neighbours[n.ccw(t)],l=this.tds.mirrorIndex(e,n.ccw(t)),c=i.neighbours[n.cw(s)],u=this.tds.mirrorIndex(i,n.cw(s)),d=i.neighbours[n.ccw(s)],h=this.tds.mirrorIndex(i,n.ccw(s));this.tds.flip(e,t),e.constraints[e.indexT(i)]=!1,i.constraints[i.indexT(e)]=!1,o.neighbours[r].constraints[this.tds.mirrorIndex(o,r)]=o.constraints[r],a.neighbours[l].constraints[this.tds.mirrorIndex(a,l)]=a.constraints[l],c.neighbours[u].constraints[this.tds.mirrorIndex(c,u)]=c.constraints[u],d.neighbours[h].constraints[this.tds.mirrorIndex(d,h)]=d.constraints[h]}isFlipable(e,t,i=!0){const o=e.neighbours[t];return!e.isInfinite()&&!o.isInfinite()&&(!e.constraints[t]&&n.sideOfOrientedCircle(o,e.vertices[t].point,i)===s.Sign.ON_POSITIVE_SIDE)}insertb(e,t,i,o){let r,a,l=!1;i===s.LocateType.EDGE&&t.isConstrained(o)&&(l=!0,r=t.vertices[n.ccw(o)],a=t.vertices[n.cw(o)]);const c=this.insertc(e,t,i,o);return l?this.updateConstraintsIncident(c,r,a):i!==s.LocateType.VERTEX&&this.clearConstraintsIncident(c),2===this.tds.dimension&&this.updateConstraintsOpposite(c),c}updateConstraintsIncident(e,t,i){if(0!==this.tds.dimension)if(1===this.tds.dimension){const t=new s.EdgeCirculator(e,null);do{t.t.constraints[2]=!0}while(t.next())}else{const o=new s.FaceCirculator(e,null);do{const s=o.t.indexV(e),r=n.cw(s),a=n.ccw(s);o.t.vertices[r]===t||o.t.vertices[r]===i?(o.t.constraints[a]=!0,o.t.constraints[r]=!1):(o.t.constraints[a]=!1,o.t.constraints[r]=!0)}while(o.next())}}clearConstraintsIncident(e){const t=new s.EdgeCirculator(e,null);if(t.valid)do{const e=t.t,i=t.ri;e.constraints[i]=!1,2===this.tds.dimension&&(e.neighbours[i].constraints[this.tds.mirrorIndex(e,i)]=!1)}while(t.next())}insertc(e,t,i,n){if(1===this.tds.vertices.length)return this.insertFirst(e);if(2===this.tds.vertices.length)return i===s.LocateType.VERTEX?this.tds.finiteVertex:this.insertSecond(e);switch(i){case s.LocateType.VERTEX:return t.vertices[n];case s.LocateType.OUTSIDE_AFFINE_HULL:return this.insertOutsideAffineHull(e);case s.LocateType.OUTSIDE_CONVEX_HULL:return this.insertOutsideConvexHull(e,t);case s.LocateType.EDGE:return this.insertInEdge(e,t,n);case s.LocateType.FACE:return this.insertInFace(e,t)}throw new Error("qwe")}insertInEdge(e,t,i){const s=this.tds.insertInEdge(t,i);return s.point=e,s}insertInFace(e,t){const i=this.tds.insertInFace(t);return i.point=e,i}insertFirst(e){const t=this.tds.insertDimUp();return t.point=e,t}insertSecond(e){const t=this.tds.insertDimUp(this.tds._infinite,!0);return t.point=e,t}insertOutsideAffineHull(e){let t=!1;if(1===this.tds.dimension){const i=this.tds.finiteEdge.first,o=n.orientation(i.vertices[0].point,i.vertices[1].point,e);t=o===s.Sign.COUNTERCLOCKWISE}const i=this.tds.insertDimUp(this.tds._infinite,t);return i.point=e,i}insertOutsideConvexHull(e,t){let i;if(1===this.tds.dimension)throw new Error("sdfasdasd");return i=this.insertOutsideConvexHull2(e,t),i.point=e,i}insertOutsideConvexHull2(e,t){let i=t.indexV(this.tds._infinite);const o=[],r=[];let a=new s.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.prev(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[n.ccw(i)].point,r=a.t.vertices[n.cw(i)].point;n.orientation(e,t,r)===s.Sign.LEFT_TURN?o.push(a.t):l=!0}a=new s.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.next(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[n.ccw(i)].point,o=a.t.vertices[n.cw(i)].point;n.orientation(e,t,o)===s.Sign.LEFT_TURN?r.push(a.t):l=!0}const c=this.tds.insertInFace(t);let u;c.point=e;while(o.length>0)u=o[0],i=n.ccw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),o.shift();while(r.length>0)u=r[0],i=n.cw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),r.shift();a=new s.FaceCirculator(c,null);while(!a.t.isInfinite())a.next();return this.tds._infinite.triangle=a.t,c}locate(e,t){let i=0,o=0;if(this.tds.dimension<0)return i=s.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(0===this.tds.dimension)return i=n.xyEqual(e,this.tds.finiteVertex.triangle.vertices[0].point)?s.LocateType.VERTEX:s.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(1===this.tds.dimension)return this.marchLocate1D(e);if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);return this.marchLocate2D(t,e)}marchLocate1D(e){const t=this.tds._infinite.triangle,i=t.indexV(this.tds._infinite),o=t.neighbours[i],r=n.orientation(o.vertices[0].point,o.vertices[1].point,e);if(r===s.Sign.RIGHT_TURN||r===s.Sign.LEFT_TURN)return{loc:new s.Triangle,lt:s.LocateType.OUTSIDE_AFFINE_HULL,li:4};const a=o.indexT(t);if(n.collinearBetween(e,o.vertices[1-a].point,o.vertices[a].point))return{loc:t,lt:s.LocateType.OUTSIDE_CONVEX_HULL,li:i};if(n.xyEqual(e,o.vertices[1-a].point))return{loc:o,lt:s.LocateType.VERTEX,li:1-a};throw new Error("sdfsdf")}marchLocate2D(e,t){let i,o,r=null,a=!0;while(1){if(e.isInfinite())return{loc:e,lt:s.LocateType.OUTSIDE_CONVEX_HULL,li:e.indexV(this.tds._infinite)};const l=0,c=e.vertices[0].point,u=e.vertices[1].point,d=e.vertices[2].point;let h,f,p;if(a){if(r=e,a=!1,h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}}else if(l)if(e.neighbours[0]===r){if(r=e,h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}if(p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}f=s.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}if(h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}p=s.Sign.POSITIVE}else{if(r=e,p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}if(f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}h=s.Sign.POSITIVE}else if(e.neighbours[0]===r){if(r=e,p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}if(h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}f=s.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}p=s.Sign.POSITIVE}else{if(r=e,f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}h=s.Sign.POSITIVE}const g=(h===s.Sign.COLLINEAR?1:0)+(f===s.Sign.COLLINEAR?1:0)+(p===s.Sign.COLLINEAR?1:0);switch(g){case 0:i=s.LocateType.FACE,o=4;break;case 1:i=s.LocateType.EDGE,o=h===s.Sign.COLLINEAR?2:f===s.Sign.COLLINEAR?0:1;break;case 2:i=s.LocateType.VERTEX,o=h!==s.Sign.COLLINEAR?2:f!==s.Sign.COLLINEAR?0:1;break}if(void 0===i||void 0===o)throw new Error("ert");return{loc:e,lt:i,li:o}}}iLocate(e,t){if(this.tds.dimension<2)return t;if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);let i=null,s=t,o=!0,r=2500;while(1){if(!r--)return s;if(s.isInfinite())return s;const t=s.vertices[0].point,a=s.vertices[1].point,l=s.vertices[2].point;if(o){if(i=s,o=!1,n.hasInexactNegativeOrientation(t,a,e)){s=s.neighbours[2];continue}if(n.hasInexactNegativeOrientation(a,l,e)){s=s.neighbours[0];continue}if(n.hasInexactNegativeOrientation(l,t,e)){s=s.neighbours[1];continue}}else if(s.neighbours[0]===i){if(i=s,n.hasInexactNegativeOrientation(t,a,e)){s=s.neighbours[2];continue}if(n.hasInexactNegativeOrientation(l,t,e)){s=s.neighbours[1];continue}}else if(s.neighbours[1]===i){if(i=s,n.hasInexactNegativeOrientation(t,a,e)){s=s.neighbours[2];continue}if(n.hasInexactNegativeOrientation(a,l,e)){s=s.neighbours[0];continue}}else{if(i=s,n.hasInexactNegativeOrientation(l,t,e)){s=s.neighbours[1];continue}if(n.hasInexactNegativeOrientation(a,l,e)){s=s.neighbours[0];continue}}break}return s}}t.CDT=o},"6f8d":function(e,t,i){"use strict";i.r(t);var s=i("5b69"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"6f92":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6c30"),o=i("f10f"),r=i("92b1");class a{constructor(){this.layers=[],this.width=window.innerWidth,this.height=window.innerHeight,this.UUIDMap=new Map,this.interval=30,this.drawLoop=(()=>{for(let e=this.layers.length-1;e>=0;e--)this.layers[e].draw();requestAnimationFrame(this.drawLoop)}),requestAnimationFrame(this.drawLoop)}reset(){this.layers=[],this.UUIDMap=new Map}setWidth(e){this.width=e;for(const t of this.layers)t.canvas.width=e,t.width=e}setHeight(e){this.height=e;for(const t of this.layers)t.canvas.height=e,t.height=e}addLayer(e){this.layers.push(e),(o.gameStore.IS_DM||e.playerEditable)&&e.selectable&&o.gameStore.addLayer(e.name)}hasLayer(e){return this.layers.some(t=>t.name===e)}getLayer(e){e=void 0===e?o.gameStore.selectedLayer:e;for(const t of this.layers)if(t.name===e)return t}selectLayer(e,t=!0){let i=!1;for(const s of this.layers)s.selectable&&(i&&"fow"!==s.name?s.ctx.globalAlpha=.3:s.ctx.globalAlpha=1,e===s.name&&(o.gameStore.selectLayer({name:e,sync:t}),i=!0),s.clearSelection(),s.invalidate(!0))}getGridLayer(){return this.getLayer("grid")}hasSelection(){const e=this.getSelection();return void 0!==e&&e.length>0}getSelection(){const e=this.getLayer();if(void 0!==e)return e.selection}invalidate(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].invalidate(!0)}invalidateLight(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].isVisionLayer&&this.layers[e].invalidate(!0)}dropAsset(e){const t=this.getLayer();if(void 0===t||null===e||null===e.dataTransfer)return;const i=document.createElement("img");i.src=e.dataTransfer.getData("text/plain");const a=new n.Asset(i,new s.GlobalPoint(r.l2gx(e.clientX),r.l2gy(e.clientY)),r.l2gz(i.width),r.l2gz(i.height));if(a.src=new URL(i.src).pathname,o.gameStore.useGrid){const e=o.gameStore.gridSize;a.refPoint=new s.GlobalPoint(Math.round(a.refPoint.x/e)*e,Math.round(a.refPoint.y/e)*e),a.w=Math.max(Math.round(a.w/e)*e,e),a.h=Math.max(Math.round(a.h/e)*e,e)}t.addShape(a,!0)}}t.layerManager=new a,window.lm=t.layerManager},7018:function(e,t,i){"use strict";i.r(t);var s=i("ebb9"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},7420:function(e,t,i){"use strict";i.r(t);var s=i("d320"),n=i("778b");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("c969");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"73816298",null);a.options.__file="createtoken_modal.vue",t["default"]=a.exports},"76b3":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(e,t){this.children=[],this.nPrimitives=e,this.bbox=t}}t.BoundingNode=s;class n extends s{constructor(e,t,i){super(t,i),this.firstPrimOffset=e}}t.LeafNode=n;class o extends s{constructor(e,t,i){super(0,t.bbox.union(i.bbox)),this.dimension=e,this.children.push(t),this.children.push(i)}}t.InteriorNode=o},"778b":function(e,t,i){"use strict";i.r(t);var s=i("5a81"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"77a6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("4a5b"),n=i("0bc6"),o=i("2b48"),r=i("af17"),a=i("8f0a"),l=i("6f92"),c=i("206a"),u=i("f10f"),d=i("2838");function h(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement);else if("Delete"===e.key||"Del"===e.key||"Backspace"===e.key){if(void 0===l.layerManager.getLayer)return void console.log("No active layer selected for delete operation");const e=l.layerManager.getLayer();for(let t=e.selection.length-1;t>=0;t--){const i=e.selection[t];s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==i.uuid?(e.removeShape(i,!0,!1),r.EventBus.$emit("SelectionInfo.Shape.Set",null),r.EventBus.$emit("Initiative.Remove",i.uuid)):e.selection.splice(t,1)}}}function f(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)65===e.keyCode&&e.ctrlKey&&e.target.select();else if(e.keyCode>=37&&e.keyCode<=40){const t=Math.round(u.gameStore.gridSize);let i=t*(e.keyCode%2),r=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const t=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,r*=e.keyCode<=38?-1:1;let o=new a.Vector(i,r);if(!e.shiftKey||!u.gameStore.IS_DM)for(const e of t)s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(o=d.calculateDelta(o,e));for(const e of t)s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(e.refPoint=e.refPoint.add(o),n.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1}));u.gameStore.recalculateVision(),l.layerManager.getLayer().invalidate(!1)}else u.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),u.gameStore.increasePanY(r*(e.keyCode<=38?1:-1)),l.layerManager.invalidate(),o.sendClientOptions()}else if(68===e.keyCode){const e=l.layerManager.getLayer();e&&(e.clearSelection(),e.invalidate(!0))}else if("u"===e.key&&e.ctrlKey)e.preventDefault(),e.stopPropagation(),u.gameStore.toggleUI();else if("c"===e.key&&e.ctrlKey){const e=l.layerManager.getLayer();if(!e)return;if(!e.selection)return;const t=[];for(const i of e.selection)s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==i.uuid&&t.push(i.asDict());u.gameStore.setClipboard(t)}else if("v"===e.key&&e.ctrlKey){const e=l.layerManager.getLayer();if(!e)return;if(!u.gameStore.clipboard)return;e.selection=[];for(const t of u.gameStore.clipboard){t.x+=10,t.y+=10,t.uuid=s.uuidv4();const i=t.trackers;t.trackers=[];for(const e of i){const i=Object.assign({},e,{uuid:s.uuidv4()});t.trackers.push(i)}const n=t.auras;t.auras=[];for(const e of n){const i=Object.assign({},e,{uuid:s.uuidv4()});t.auras.push(i)}const o=c.createShapeFromDict(t);void 0!==o&&(e.addShape(o,!0),e.selection.push(o))}1===e.selection.length?r.EventBus.$emit("SelectionInfo.Shape.Set",e.selection[0]):r.EventBus.$emit("SelectionInfo.Shape.Set",null),e.invalidate(!1)}}t.onKeyUp=h,t.onKeyDown=f},"78c7":function(e,t,i){"use strict";var s=i("9227"),n=i.n(s);n.a},7997:function(e,t,i){"use strict";var s=i("39a7"),n=i.n(s);n.a},"7aaa":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("033f")),r=s.__importDefault(i("7420")),a=s.__importDefault(i("59d8")),l=s.__importDefault(i("bea6")),c=s.__importDefault(i("dec1")),u=s.__importDefault(i("4899")),d=s.__importDefault(i("c277")),h=i("6f92"),f=i("9cb7"),p=i("f10f"),g=i("d5df"),v=i("92b1"),m=i("5a5c"),y=s.__importDefault(i("65d9"));let b=class extends n.default{constructor(){super(...arguments),this.currentTool="Select",this.tools=["Select","Pan","Draw","Ruler","Map","Filter"],this.dmTools=["Map"]}get IS_DM(){return p.gameStore.IS_DM}get currentToolComponent(){return`${this.currentTool.toLowerCase()}-tool`}get visibleTools(){return this.tools.filter(e=>!this.dmTools.includes(e)||this.IS_DM)}mousedown(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mousedown",e,t)}mouseup(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mouseup",e,t)}mousemove(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(0!==(4&e.buttons))t="Pan";else if((1&e.button)>1)return;this.$emit("mousemove",e,t);let i=!1;for(const s of p.gameStore.annotations)if(h.layerManager.UUIDMap.has(s)&&h.layerManager.hasLayer("draw")){const t=h.layerManager.UUIDMap.get(s);t.contains(v.l2g(m.getMouse(e)))&&(i=!0,f.gameManager.annotationManager.setActiveText(t.annotation))}!i&&f.gameManager.annotationManager.shown&&f.gameManager.annotationManager.setActiveText("")}mouseleave(e){0!==(1&e.buttons)&&this.$emit("mouseup",e,this.currentTool)}contextmenu(e){"CANVAS"===e.target.tagName&&2===e.button&&"CANVAS"===e.target.tagName&&this.$emit("contextmenu",e,this.currentTool)}};b=s.__decorate([y.default({components:{"select-tool":d.default,"pan-tool":u.default,"draw-tool":a.default,"ruler-tool":g.RulerTool,"map-tool":c.default,"filter-tool":l.default,"shape-menu":o.default,"createtoken-dialog":r.default},watch:{currentTool(e,t){this.$emit("tools-select-change",e,t)}}})],b),t.default=b},"7ba5":function(e,t,i){"use strict";i.r(t);var s=i("fbdd"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"7e15":function(e,t,i){"use strict";i.r(t);var s=i("52a8"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"7f1e":function(e,t,i){"use strict";var s=i("fe11"),n=i.n(s);n.a},"851c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f"));let a=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.question="",this.answer="",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}submit(){this.resolve(this.answer),this.close()}close(){this.reject(),this.visible=!1,this.question="",this.answer="",this.title=""}prompt(e,t){return this.question=e,this.title=t,this.visible=!0,this.$nextTick(()=>{this.$refs.answer.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=s.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},8790:function(e,t,i){"use strict";var s=i("a912"),n=i.n(s);n.a},"88af":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e._v(e._s(e.message))])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"8cd4":function(e,t,i){"use strict";i.r(t);var s=i("9587"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"8db6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("92b1");class o{constructor(e,t,i){this.w=t,this.h=i,this.topLeft=e,this.topRight=new s.GlobalPoint(e.x+t,e.y),this.botRight=new s.GlobalPoint(e.x+t,e.y+i),this.botLeft=new s.GlobalPoint(e.x,e.y+i)}contains(e){return this.topLeft.x<=e.x&&this.topRight.x>=e.x&&this.topLeft.y<=e.y&&this.botLeft.y>=e.y}get points(){return 0===this.w||0===this.h?[[this.topLeft.x,this.topLeft.y]]:[[this.topLeft.x,this.topLeft.y],[this.botLeft.x,this.botLeft.y],[this.botRight.x,this.botRight.y],[this.topRight.x,this.topRight.y]]}offset(e){return new o(this.topLeft.add(e),this.w,this.h)}union(e){const t=Math.min(this.topLeft.x,e.topLeft.x),i=Math.max(this.topRight.x,e.topRight.x),n=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new o(new s.GlobalPoint(t,n),i-t,r-n)}getDiagCorner(e){return e?this.botRight:this.topLeft}intersectsWith(e){return!(e.topLeft.x>this.topRight.x||e.topRight.xthis.botLeft.y||e.botLeft.y=this.topRight.x||e.topRight.x<=this.topLeft.x||e.topLeft.y>=this.botLeft.y||e.botLeft.y<=this.topLeft.y)}intersectP(e,t,i){let s=t.x*(this.getDiagCorner(i[0]).x-e.origin.x),n=t.x*(this.getDiagCorner(!i[0]).x-e.origin.x);const o=t.y*(this.getDiagCorner(i[1]).y-e.origin.y),r=t.y*(this.getDiagCorner(!i[1]).y-e.origin.y);return s>r||o>n?{hit:!1,min:s,max:n}:(o>s&&(s=o),r0,min:s,max:n})}center(){return this.topLeft.add(new s.Vector(this.w/2,this.h/2))}getMaxExtent(){return this.w>this.h?0:1}visibleInCanvas(e){const t=!(n.g2lx(this.topLeft.x)>e.width||n.g2ly(this.topLeft.y)>e.height||n.g2lx(this.topRight.x)<0||n.g2ly(this.botRight.y)<0);return!!t}}t.BoundingRect=o},"8e60":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"formcontainer"}},[e.owned||e.joined?i("form",[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("Your sessions")]),i("div",{staticClass:"input"},[e._l(e.owned,function(t,s){return i("router-link",{key:"o-"+s,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[0]))])}),e._l(e.joined,function(t,s){return i("router-link",{key:"j-"+s,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[1])+"/"+e._s(t[0]))])})],2),0===e.owned.length?i("div",{staticClass:"input"},[e._v("No active sessions")]):e._e()])]):e._e(),e._m(0),i("form",{on:{submit:function(t){return t.preventDefault(),e.createRoom(t)}}},[i("fieldset",[e.owned||e.joined?i("div",{staticClass:"input"},[e._v("Create a new session")]):i("legend",{staticClass:"legend"},[e._v("Create a session")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newSessionName,expression:"newSessionName"}],attrs:{type:"text",name:"room_name",placeholder:"Session Name"},domProps:{value:e.newSessionName},on:{input:function(t){t.target.composing||(e.newSessionName=t.target.value)}}}),e._m(1)]),e._m(2)])]),i("div",{attrs:{id:"account-options"}},[i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Account Settings",to:"/account"}},[i("i",{staticClass:"fas fa-cog"})])],1),i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Logout",to:"/auth/logout"}},[i("i",{staticClass:"fas fa-sign-out-alt"})])],1)])])},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("h4",[i("span",[e._v("OR")])])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fab fa-d-and-d"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",title:"Create"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"8f0a":function(e,t,i){"use strict";function s(e,t){const i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}Object.defineProperty(t,"__esModule",{value:!0}),t.getPointDistance=s;class n{constructor(e,t){this.x=e,this.y=t}static fromArray(e){return new n(e[0],e[1])}add(e){return new n(this.x+e.x,this.y+e.y)}subtract(e){return new a(this.x-e.x,this.y-e.y)}clone(){return new n(this.x,this.y)}get(e){return 0===e?this.x:this.y}asArray(){return[this.x,this.y]}}t.Point=n;class o extends n{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}static fromArray(e){return new o(e[0],e[1])}}t.GlobalPoint=o;class r extends n{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}t.LocalPoint=r;class a{constructor(e,t){this.x=e,this.y=t}dot(e){return this.x*e.x+this.y*e.y}inverse(){return new a(0===this.x?0:1/this.x,0===this.y?0:1/this.y)}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}normalize(){const e=this.length();return new a(this.x/e,this.y/e)}reverse(){return new a(-this.x,-this.y)}multiply(e){return new a(this.x*e,this.y*e)}angle(){return 180*Math.atan2(this.y,this.x)/Math.PI}}t.Vector=a;class l{constructor(e,t,i){this.direction=t,this.origin=e,void 0===i&&(i=1/0),this.tMax=i}static fromPoints(e,t){const i=new a(t.x-e.x,t.y-e.y);let s;return s=Math.abs(i.x)>.01?(t.x-e.x)/i.x:(t.y-e.y)/i.y,new l(e,i,s)}get(e){return new n(this.origin.x+e*this.direction.x,this.origin.y+e*this.direction.y)}getDistance(e,t){return Math.sqrt(Math.pow(t-e,2)*(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}getT(e,t){return e+Math.sqrt(Math.pow(t,2)/(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}}t.Ray=l},"8f54":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ul",[e._l(e.folders,function(t){return i("li",{key:t,staticClass:"folder",on:{click:function(t){return t.stopPropagation(),e.toggle(t)}}},[e._v("\n "+e._s(t)+"\n "),i("asset-node",{attrs:{asset:e.asset[t]}})],1)}),e._l(e.files,function(t){return i("li",{key:t.name,staticClass:"file draggable token",attrs:{draggable:"true"},on:{mouseover:function(i){e.showImage=t.hash},mouseout:function(t){e.showImage=null},dragstart:function(i){e.dragStart(i,"/static/assets/"+t.hash)}}},[e._v("\n "+e._s(t.name)+"\n "),e.showImage==t.hash?i("div",{staticClass:"preview"},[i("img",{staticClass:"asset-preview-image",attrs:{src:"/static/assets/"+t.hash}})]):e._e()])})],2)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},9104:function(e,t,i){"use strict";var s=i("afd3"),n=i.n(s);n.a},"919a":function(e,t,i){},"91df":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("6f79"));i("fe80");const a=i("2ef0"),l=s.__importDefault(i("a535")),c=s.__importDefault(i("cec2")),u=s.__importDefault(i("f5fe")),d=s.__importDefault(i("f74c")),h=s.__importDefault(i("19f9")),f=s.__importDefault(i("f551")),p=s.__importDefault(i("f086")),g=s.__importDefault(i("6100")),v=i("0bc6"),m=i("77a6"),y=i("bb17"),b=i("6f92"),_=i("f10f"),w=i("92b1"),S=i("8f0a");let x=class extends n.default{constructor(){super(...arguments),this.ready={manager:!1,tools:!1}}get showUI(){return _.gameStore.showUI}get IS_DM(){return _.gameStore.IS_DM}get layers(){return _.gameStore.layers}get selectedLayer(){return _.gameStore.selectedLayer}get zoomDisplay(){return _.gameStore.zoomDisplay}set zoomDisplay(e){_.gameStore.updateZoom({newZoomDisplay:e,zoomLocation:w.l2g(new S.LocalPoint(window.innerWidth/2,window.innerHeight/2))})}mounted(){window.addEventListener("resize",this.resizeWindow),window.addEventListener("keyup",m.onKeyUp),window.addEventListener("keydown",m.onKeyDown),this.ready.manager=!0}destroyed(){window.removeEventListener("resize",this.resizeWindow),window.removeEventListener("keyup",m.onKeyUp),window.removeEventListener("keydown",m.onKeyDown),this.ready.manager=!1}zoom(e){a.throttle(y.scrollZoom)(e)}resizeWindow(){b.layerManager.setWidth(window.innerWidth),b.layerManager.setHeight(window.innerHeight),b.layerManager.invalidate()}mousedown(e){this.$refs.tools.mousedown(e)}mouseup(e){this.$refs.tools.mouseup(e)}mousemove(e){this.$refs.tools.mousemove(e)}mouseleave(e){this.$refs.tools.mouseleave(e)}contextmenu(e){this.$refs.tools.contextmenu(e)}selectLayer(e){b.layerManager.selectLayer(e)}drop(e){if(null!==e&&null!==e.dataTransfer)if(e.dataTransfer.files.length>0)this.$refs.confirm.open("Uploading files should be done through the asset manager.","Ok","").then(()=>{},()=>{});else{if(""===e.dataTransfer.getData("text/plain"))return;b.layerManager.dropAsset(e)}}};x=s.__decorate([o.default({components:{"tool-bar":g.default,"selection-info":p.default,"prompt-dialog":c.default,"confirm-dialog":l.default,"menu-bar":h.default,"initiative-dialog":u.default,"zoom-slider":r.default,"note-dialog":f.default,"label-dialog":d.default},beforeRouteEnter(e,t,i){v.createConnection(e),i()},beforeRouteLeave(e,t,i){v.socket.disconnect(),i()}})],x),t.default=x},9227:function(e,t,i){},"92b1":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("f10f");function o(e){const t=n.gameStore.zoomFactor,i=n.gameStore.panX,o=n.gameStore.panY;return new s.LocalPoint((e.x+i)*t,(e.y+o)*t)}function r(e){return o(new s.GlobalPoint(e,0)).x}function a(e){return o(new s.GlobalPoint(0,e)).y}function l(e){return e*n.gameStore.zoomFactor}function c(e){return e/n.gameStore.unitSize*n.gameStore.gridSize}function u(e){return l(c(e))}function d(e){const t=n.gameStore.zoomFactor,i=n.gameStore.panX,o=n.gameStore.panY;return e instanceof s.LocalPoint?new s.GlobalPoint(e.x/t-i,e.y/t-o):new s.Ray(d(e.origin),e.direction.multiply(1/t),e.tMax)}function h(e){return d(new s.LocalPoint(e,0)).x}function f(e){return d(new s.LocalPoint(0,e)).y}function p(e){return e/n.gameStore.zoomFactor}function g(e){return p(c(e))}t.g2l=o,t.g2lx=r,t.g2ly=a,t.g2lz=l,t.getUnitDistance=c,t.g2lr=u,t.l2g=d,t.l2gx=h,t.l2gy=f,t.l2gz=p,t.l2gr=g,window.g2lx=r,window.g2ly=a},9587:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=i("2f62"),a=s.__importDefault(i("3b36")),l=s.__importDefault(i("0ddd")),c=i("4a5b"),u=i("0bc6"),d=i("6f92"),h=i("f10f");let f=class extends n.default{constructor(){super(...arguments),this.visible={settings:!1,locations:!1}}get useGrid(){return h.gameStore.useGrid}set useGrid(e){h.gameStore.setUseGrid({useGrid:e,sync:!0})}get fullFOW(){return h.gameStore.fullFOW}set fullFOW(e){h.gameStore.setFullFOW({fullFOW:e,sync:!0})}get fowOpacity(){return h.gameStore.fowOpacity}set fowOpacity(e){"number"===typeof e&&h.gameStore.setFOWOpacity({fowOpacity:e,sync:!0})}get fowLOS(){return h.gameStore.fowLOS}set fowLOS(e){h.gameStore.setLineOfSight({fowLOS:e,sync:!0})}get unitSize(){return h.gameStore.unitSize}set unitSize(e){"number"===typeof e&&h.gameStore.setUnitSize({unitSize:e,sync:!0})}get gridSize(){return h.gameStore.gridSize}set gridSize(e){"number"===typeof e&&h.gameStore.setGridSize({gridSize:e,sync:!0})}get gridColour(){return h.gameStore.gridColour}set gridColour(e){h.gameStore.setGridColour({colour:e,sync:!0})}get fowColour(){return h.gameStore.fowColour}set fowColour(e){h.gameStore.setFOWColour({colour:e,sync:!0})}get rulerColour(){return h.gameStore.rulerColour}set rulerColour(e){h.gameStore.setRulerColour({colour:e,sync:!0})}get visionRangeMin(){return h.gameStore.visionRangeMin}set visionRangeMin(e){"number"===typeof e&&h.gameStore.setVisionRangeMin({value:e,sync:!0})}get visionRangeMax(){return h.gameStore.visionRangeMax}set visionRangeMax(e){"number"===typeof e&&h.gameStore.setVisionRangeMax({value:e,sync:!0})}settingsClick(e){if(e.target.classList.contains("accordion")){e.target.classList.toggle("accordion-active");const t=e.target.nextElementSibling;null!==t&&(t.style.display=""===t.style.display?"block":"")}}changeLocation(e){u.socket.emit("Location.Change",e)}createLocation(){c.getRef("prompt").prompt("New location name:","Create new location").then(e=>{u.socket.emit("Location.New",e)},()=>{})}createNote(){const e={title:"New note",text:"",uuid:c.uuidv4()};h.gameStore.newNote({note:e,sync:!0}),this.openNote(e)}openNote(e){c.getRef("note").open(e)}changeVisionMode(e){const t=e.target.value.toLowerCase();"bvh"!==t&&"triangle"!==t||(h.gameStore.setVisionMode({mode:t,sync:!0}),h.gameStore.recalculateVision(),h.gameStore.recalculateMovement(),d.layerManager.invalidate())}};f=s.__decorate([o.default({components:{"color-picker":a.default,"asset-node":l.default},computed:Object.assign({},r.mapState("game",["invitationCode","IS_DM","locations","assets","notes"]))})],f),t.default=f},"979e":function(e,t,i){"use strict";i.r(t);var s=i("0634"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},9845:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.IS_DM?i("li",{on:{click:e.bringPlayers}},[e._v("Bring players")]):e._e(),i("li",{on:{click:e.createToken}},[e._v("Create basic token")]),i("li",{on:{click:e.showInitiative}},[e._v("Show initiative")])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"98ef":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("4aee");let n;var o,r;function a(){return[t.INFINITE,t.INFINITE]}t.INFINITE=-Infinity,function(e){e[e["NEGATIVE"]=-1]="NEGATIVE",e[e["ZERO"]=0]="ZERO",e[e["POSITIVE"]=1]="POSITIVE",e[e["RIGHT_TURN"]=-1]="RIGHT_TURN",e[e["LEFT_TURN"]=1]="LEFT_TURN",e[e["SMALLER"]=-1]="SMALLER",e[e["EQUAL"]=0]="EQUAL",e[e["LARGER"]=1]="LARGER",e[e["CLOCKWISE"]=-1]="CLOCKWISE",e[e["COUNTERCLOCKWISE"]=1]="COUNTERCLOCKWISE",e[e["COLLINEAR"]=0]="COLLINEAR",e[e["COPLANAR"]=0]="COPLANAR",e[e["DEGENERATE"]=0]="DEGENERATE",e[e["ON_NEGATIVE_SIDE"]=-1]="ON_NEGATIVE_SIDE",e[e["ON_ORIENTED_BOUNDARY"]=0]="ON_ORIENTED_BOUNDARY",e[e["ON_POSITIVE_SIDE"]=1]="ON_POSITIVE_SIDE"}(o=t.Sign||(t.Sign={})),function(e){e[e["UNDEFINED"]=-1]="UNDEFINED",e[e["VERTEX_VERTEX"]=0]="VERTEX_VERTEX",e[e["VERTEX_EDGE"]=1]="VERTEX_EDGE",e[e["EDGE_VERTEX"]=2]="EDGE_VERTEX",e[e["EDGE_EDGE"]=3]="EDGE_EDGE"}(r||(r={}));class l{constructor(...e){this.vertices=[],this.neighbours=[null,null,null],this.constraints=[!1,!1,!1],this.uid=l._counter++,this.vertices=e}from(e){return this.vertices=e.vertices.slice(0,e.vertices.length),this.neighbours=e.neighbours.slice(0,e.neighbours.length),this.constraints=e.constraints.slice(0,e.constraints.length),this}get dimension(){return this.vertices.length-1}addVertex(e){void 0===e&&console.log("UNDEFINED HIERE"),this.vertices.push(e),e.triangle=this}isConstrained(e){return this.constraints[e]}reorient(){this.vertices=[this.vertices[1],this.vertices[0],this.vertices[2]].slice(0,this.vertices.length),this.neighbours=[this.neighbours[1],this.neighbours[0],this.neighbours[2]],this.constraints=[this.constraints[1],this.constraints[0],this.constraints[2]]}indexV(e){return this.vertices.indexOf(e)}indexT(e){return this.neighbours.indexOf(e)}isInfinite(e){return void 0===e?this.vertices.includes(n):this.vertices[s.ccw(e)].infinite||this.vertices[s.cw(e)].infinite}contains(e){const t=-this.vertices[1].point[1]*this.vertices[2].point[0]+this.vertices[0].point[1]*(-this.vertices[1].point[0]+this.vertices[2].point[0])+this.vertices[0].point[0]*(this.vertices[1].point[1]-this.vertices[2].point[1])+this.vertices[1].point[0]*this.vertices[2].point[1],i=t<0?-1:1,s=(this.vertices[0].point[1]*this.vertices[2].point[0]-this.vertices[0].point[0]*this.vertices[2].point[1]+(this.vertices[2].point[1]-this.vertices[0].point[1])*e[0]+(this.vertices[0].point[0]-this.vertices[2].point[0])*e[1])*i;if(s<0)return!1;const n=(this.vertices[0].point[0]*this.vertices[1].point[1]-this.vertices[0].point[1]*this.vertices[1].point[0]+(this.vertices[0].point[1]-this.vertices[1].point[1])*e[0]+(this.vertices[1].point[0]-this.vertices[0].point[0])*e[1])*i;return n>0&&s+nt!==e)}setAdjacency(e,t,i,s){e.neighbours[t]=i,i.neighbours[s]=e}get finiteVertex(){return this.vertices[1]}get infiniteVertex(){const e=new c(a());return e.infinite=!0,e}get finiteEdge(){if(this.dimension<1)throw new Error("aspo");const e=new d(this);while(e.valid)e.next();return e.collect()}insertDimUp(e=new c,t=!0){const i=this.createVertex();let s,n;switch(this.dimension++,this.dimension){case 0:s=this.triangles[0],n=new l(i),this.triangles.push(n),this.setAdjacency(s,0,n,0),i.triangle=n;break;case 1:case 2:{const o=[],r=this.triangles.slice(0,this.triangles.length);for(const t of r){const s=(new l).from(t);this.triangles.push(s),t.vertices[this.dimension]=i,s.vertices[this.dimension]=e,this.setAdjacency(t,this.dimension,s,this.dimension),t.vertices.includes(e)&&o.push(s)}for(const e of r){const t=e.neighbours[this.dimension];for(let i=0;ie.center.center().get(r)0){if(i=!0,s=e.tMax=d.min,n=d.max,0===o||t)break;r=a[--o]}else c[u.dimension]?(a[o++]=r+1,r=u.secondChildOffset):(a[o++]=u.secondChildOffset,r++);else{if(0===o)break;r=a[--o]}}return{hit:i,intersect:e.get(s),tMin:s,tMax:n}}compact(){this.offset=0,null!==this.root&&this.flatten(this.root)}flatten(e){const t=this.offset,i=this.offset++;if(0===e.nPrimitives){this.flatten(e.children[0]);const i=this.flatten(e.children[1]);this.nodes[t]={bbox:e.bbox,dimension:e.dimension,nPrimitives:0,secondChildOffset:i}}else this.nodes[t]={bbox:e.bbox,primitivesOffset:e.firstPrimOffset,nPrimitives:e.nPrimitives};return i}createLeaf(e,t,i,s){const n=this.orderedPrims.length;for(let o=e;o1?i("li",[e._v("Layer\n "),i("ul",e._l(e.getLayers(),function(t){return i("li",{key:t.name,style:[e.getActiveLayer().name===t.name?{"background-color":"#82c8a0"}:{}],on:{click:function(i){e.setLayer(t.name)}}},[e._v(e._s(t.name))])}))]):e._e(),i("li",{on:{click:e.moveToBack}},[e._v("Move to back")]),i("li",{on:{click:e.moveToFront}},[e._v("Move to front")]),i("li",{on:{click:e.addInitiative}},[e._v(e._s(e.getInitiativeWord())+" initiative")]),i("li",{on:{click:e.openEditDialog}},[e._v("Show properties")])]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},a260:function(e,t,i){},a280:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",{attrs:{id:"accordion-container"}},e._l(e.categories,function(t){return i("accordion",{key:t,attrs:{title:t,showArrow:!1,items:e.labels[t],initialValues:e.initalValues[t]},on:{selectionupdate:e.updateSelection}})}))]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},a450:function(e,t,i){},a474:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{constructor(){super(...arguments),this.owned=[],this.joined=[],this.error="",this.newSessionName=""}beforeRouteEnter(e,t,i){n.default.get("/api/rooms").then(e=>{i(t=>{t.owned=e.data.owned,t.joined=e.data.joined})}).catch(e=>{i(t=>{t.error=e.message})})}createRoom(e){n.default.post("/api/rooms",{name:this.newSessionName}).then(e=>{this.$router.push(`/game/${a.coreStore.username}/${this.newSessionName}`)}).catch(e=>{this.error=e.message})}};l=s.__decorate([r.default],l),t.default=l},a535:function(e,t,i){"use strict";i.r(t);var s=i("e06e"),n=i("f30c");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("223d");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"1883e207",null);a.options.__file="confirm.vue",t["default"]=a.exports},a5a4:function(e,t,i){"use strict";var s=i("0b13"),n=i.n(s);n.a},a68b:function(e,t,i){"use strict";i.r(t);var s=i("308b"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},a755:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.left+"px",top:e.top+"px"},on:{close:e.close}},[i("li",{on:{click:e.rename}},[e._v("Rename")]),i("li",{on:{click:e.remove}},[e._v("Remove")])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},a7b3:function(e,t,i){"use strict";var s=i("6542"),n=i.n(s);n.a},a912:function(e,t,i){},a9a6:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Label manager")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("div",{staticClass:"grid"},[i("div",{staticClass:"header"},[i("abbr",{attrs:{title:"Category"}},[e._v("Cat.")])]),i("div",{staticClass:"header name"},[e._v("Name")]),i("div",{staticClass:"header"},[i("abbr",{attrs:{title:"Visible"}},[e._v("Vis.")])]),i("div",{staticClass:"header"},[i("abbr",{attrs:{title:"Delete"}},[e._v("Del.")])]),i("div",{staticClass:"separator spanrow",staticStyle:{margin:"0 0 7px"}}),i("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],ref:"search",staticClass:"spanrow",attrs:{type:"text",placeholder:"search"},domProps:{value:e.search},on:{input:function(t){t.target.composing||(e.search=t.target.value)}}})]),i("div",{staticClass:"grid scroll"},[e._l(e.categories,function(t){return[e._l(e.labels[t],function(t){return[i("div",{key:"row-"+t.uuid,staticClass:"row",on:{click:function(i){e.selectLabel(t.uuid)}}},[t.category?[i("div",{key:"cat-"+t.uuid},[e._v(e._s(t.category))]),i("div",{key:"name-"+t.uuid,staticClass:"name"},[e._v(e._s(t.name))])]:e._e(),t.category?e._e():[i("div",{key:"cat-"+t.uuid}),i("div",{key:"name-"+t.uuid,staticClass:"name"},[e._v(e._s(t.name))])],i("div",{key:"visible-"+t.uuid,class:{"lower-opacity":!t.visible},style:{textAlign:"center"},on:{click:function(i){i.stopPropagation(),e.toggleVisibility(t)}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{key:"delete-"+t.uuid,on:{click:function(i){i.stopPropagation(),e.deleteLabel(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})])],2)]})]}),0===e.labels.length?[i("div",{attrs:{id:"no-labels"}},[e._v("No labels exist yet")])]:e._e()],2),i("div",{staticClass:"grid"},[i("div",{staticClass:"separator spanrow"}),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.newCategory,expression:"newCategory",modifiers:{trim:!0}}],attrs:{type:"text"},domProps:{value:e.newCategory},on:{input:function(t){t.target.composing||(e.newCategory=t.target.value.trim())},blur:function(t){e.$forceUpdate()}}}),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.newName,expression:"newName",modifiers:{trim:!0}}],attrs:{type:"text"},domProps:{value:e.newName},on:{input:function(t){t.target.composing||(e.newName=t.target.value.trim())},blur:function(t){e.$forceUpdate()}}}),i("button",{attrs:{id:"addLabelButton"},on:{click:function(t){return t.stopPropagation(),e.addLabel(t)}}},[e._v("Add")])])])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},aa69:function(e,t,i){"use strict";i.r(t);var s=i("0cf7"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},af17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026"));t.EventBus=new n.default},afd3:function(e,t,i){},b0ac:function(e,t,i){"use strict";i.r(t);var s=i("a474"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},b0c0:function(e,t,i){},b2ed:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("c266"),n=i("f10f"),o=i("92b1"),r=i("5a5c");class a extends s.BaseRect{constructor(e,t,i,s,n,o){super(e,t,i,s,n,o),this.type="rect"}asDict(){return super.getBaseDict()}draw(e){super.draw(e),"fog"===this.fillColour?e.fillStyle=r.getFogColour():e.fillStyle=this.fillColour;const t=n.gameStore.zoomFactor,i=o.g2l(this.refPoint);e.fillRect(i.x,i.y,this.w*t,this.h*t),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.strokeStyle=this.strokeColour,e.lineWidth=5,e.strokeRect(i.x,i.y,this.w*t,this.h*t))}}t.Rect=a},b62e:function(e,t,i){"use strict";var s=i("3eaf"),n=i.n(s);n.a},b6bc:function(e,t,i){"use strict";i.r(t);var s=i("5394"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},b809:function(e,t,i){"use strict";i.r(t);var s=i("ca56"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},b906:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("bab4"),o=i("6f92"),r=i("d1ec"),a=i("f10f"),l=i("92b1"),c=i("cee3");class u extends n.Layer{constructor(){super(...arguments),this.isVisionLayer=!0}draw(){if(!this.valid){const t=this.ctx;if(!a.gameStore.fowLOS||r.Settings.skipPlayerFOW)return t.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);t.clearRect(0,0,this.canvas.width,this.canvas.height);const i=t.globalCompositeOperation;t.fillStyle="rgba(0, 0, 0, 1)",a.gameStore.IS_DM||super.draw(!a.gameStore.fullFOW);const n=t.canvas.width+t.canvas.height;for(const u of a.gameStore.ownedtokens){const i=o.layerManager.UUIDMap.get(u);if(void 0===i)continue;const d=i.center(),h=l.g2l(d);if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const o=Math.cos(i),r=Math.sin(i),c=new s.Ray(d,new s.Vector(o,r)),u=a.gameStore.BV.intersect(c);u.hit?(-1!==e&&(t.arc(h.x,h.y,n,e,i),e=-1),t.lineTo(l.g2lx(u.intersect.x),l.g2ly(u.intersect.y))):-1===e&&(t.lineTo(h.x+n*o,h.y+n*r),e=i)}-1!==e?t.arc(h.x,h.y,n,e,2*Math.PI):t.closePath(),t.fill()}else{{const e=t.createRadialGradient(h.x,h.y,l.g2lr(a.gameStore.visionRangeMin),h.x,h.y,l.g2lr(a.gameStore.visionRangeMax));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=e}try{const s=c.computeVisibility(i.center(),"vision");t.beginPath(),t.moveTo(l.g2lx(s[0][0]),l.g2ly(s[0][1]));for(const e of s)t.lineTo(l.g2lx(e[0]),l.g2ly(e[1]));t.closePath(),t.fill()}catch(e){}}}a.gameStore.IS_DM&&super.draw(!a.gameStore.fullFOW),t.globalCompositeOperation=i}}}t.FOWPlayersLayer=u},bab4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("0bc6"),n=i("af17"),o=i("6f92"),r=i("206a"),a=i("f10f"),l=i("92b1");class c{constructor(e,t){this.selectable=!1,this.playerEditable=!1,this.isVisionLayer=!1,this.valid=!1,this.shapes=[],this.selection=[],this.selectionColor="#CC0000",this.selectionWidth=2,this.canvas=e,this.name=t,this.width=e.width,this.height=e.height,this.ctx=e.getContext("2d")}invalidate(e){this.valid=!1,e||o.layerManager.invalidateLight()}addShape(e,t,i,n=!0){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(n),e.setMovementBlock(e.movementObstruction,n),e.ownedBy(a.gameStore.username)&&e.isToken&&a.gameStore.ownedtokens.push(e.uuid),e.annotation.length&&a.gameStore.annotations.push(e.uuid),t&&s.socket.emit("Shape.Add",{shape:e.asDict(),temporary:i}),n&&this.invalidate(!t)}setShapes(e){for(const t of e){const e=r.createShapeFromDict(t);if(void 0===e)return void console.log(`Shape with unknown type ${t.type_} could not be added`);this.addShape(e,!1,!1,!1)}this.clearSelection(),this.invalidate(!1)}removeShape(e,t,i){void 0===i&&(i=!1),this.shapes.splice(this.shapes.indexOf(e),1),t&&s.socket.emit("Shape.Remove",{shape:e.asDict(),temporary:i});const n=a.gameStore.visionSources.findIndex(t=>t.shape===e.uuid),r=a.gameStore.visionBlockers.findIndex(t=>t===e.uuid),l=a.gameStore.movementblockers.findIndex(t=>t===e.uuid),c=a.gameStore.annotations.findIndex(t=>t===e.uuid);n>=0&&a.gameStore.visionSources.splice(n,1),r>=0&&a.gameStore.visionBlockers.splice(r,1),l>=0&&a.gameStore.movementblockers.splice(l,1),c>=0&&a.gameStore.annotations.splice(c,1);const u=a.gameStore.annotations.indexOf(e.uuid);u>=0&&a.gameStore.annotations.splice(u,1);const d=a.gameStore.ownedtokens.indexOf(e.uuid);d>=0&&a.gameStore.ownedtokens.splice(d,1),o.layerManager.UUIDMap.delete(e.uuid);const h=this.selection.indexOf(e);h>=0&&this.selection.splice(h,1),r>=0&&a.gameStore.recalculateVision(),l>=0&&a.gameStore.recalculateMovement(),this.invalidate(!t)}clear(){this.ctx.clearRect(0,0,this.width,this.height)}clearSelection(){this.selection=[],n.EventBus.$emit("SelectionInfo.Shape.Set",null)}draw(e){if(!this.valid){const t=this.ctx,i=t.globalCompositeOperation;e=void 0===e||e,e&&this.clear();const s=this;if(this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(s.canvas)&&("fow"===s.name&&e.visionObstruction&&o.layerManager.getLayer().name!==s.name||e.drawAuras(t))}),this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||0===e.labels.length&&a.gameStore.filterNoLabel||e.labels.length&&a.gameStore.labelFilters.length&&!e.labels.some(e=>a.gameStore.labelFilters.includes(e.uuid))||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(s.canvas)&&("fow"===s.name&&e.visionObstruction&&o.layerManager.getLayer().name!==s.name||e.draw(t))}),null!=this.selection){t.fillStyle=this.selectionColor,t.strokeStyle=this.selectionColor,t.lineWidth=this.selectionWidth;const e=a.gameStore.zoomFactor;this.selection.forEach(i=>{t.globalCompositeOperation=i.globalCompositeOperation;const s=i.getBoundingBox();t.strokeRect(l.g2lx(s.topLeft.x),l.g2ly(s.topLeft.y),s.w*e,s.h*e);for(const e of i.points)t.beginPath(),t.arc(l.g2lx(e[0]),l.g2ly(e[1]),3,0,2*Math.PI),t.fill();t.beginPath(),t.moveTo(l.g2lx(i.points[0][0]),l.g2ly(i.points[0][1]));for(let e=1;e<=i.points.length;e++){const s=i.points[e%i.points.length];t.lineTo(l.g2lx(s[0]),l.g2ly(s[1]))}t.stroke()})}t.globalCompositeOperation=i,this.valid=!0}}moveShapeOrder(e,t,i){const n=this.shapes.indexOf(e);n!==t&&(this.shapes.splice(n,1),this.shapes.splice(t,0,e),i&&s.socket.emit("Shape.Order.Set",{shape:e.asDict(),index:t}),this.invalidate(!0))}}t.Layer=c},bb17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("f10f"),n=i("92b1"),o=i("5a5c");function r(e){if(!e.target||!e.target.tagName||"CANVAS"!==e.target.tagName)return;let t;t=-1*Math.sign(e.deltaY),s.gameStore.updateZoom({newZoomDisplay:s.gameStore.zoomDisplay-.1*t,zoomLocation:n.l2g(o.getMouse(e))})}t.scrollZoom=r},bea6:function(e,t,i){"use strict";i.r(t);var s=i("a280"),n=i("b6bc");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("e3f5"),i("e037");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"847e7ec4",null);a.options.__file="filter.vue",t["default"]=a.exports},bf44:function(e,t,i){},c1e0:function(e,t,i){},c242:function(e,t,i){"use strict";var s=i("bf44"),n=i.n(s);n.a},c266:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1");class c extends o.Shape{constructor(e,t,i,s,n,o){super(e,s,n,o),this.w=t,this.h=i}getBaseDict(){return Object.assign(super.getBaseDict(),{width:this.w,height:this.h})}getBoundingBox(){return new n.BoundingRect(this.refPoint,this.w,this.h)}get points(){if(0===this.w||0===this.h)return[[this.refPoint.x,this.refPoint.y]];const e=this.refPoint.add(new s.Vector(0,this.h)),t=this.refPoint.add(new s.Vector(this.w,this.h)),i=this.refPoint.add(new s.Vector(this.w,0));return[[this.refPoint.x,this.refPoint.y],[e.x,e.y],[t.x,t.y],[i.x,i.y]]}contains(e){return this.refPoint.x<=e.x&&this.refPoint.x+this.w>=e.x&&this.refPoint.y<=e.y&&this.refPoint.y+this.h>=e.y}center(e){if(void 0===e)return this.refPoint.add(new s.Vector(this.w/2,this.h/2));this.refPoint=new s.GlobalPoint(e.x-this.w/2,e.y-this.h/2)}visibleInCanvas(e){if(super.visibleInCanvas(e))return!0;const t=!(l.g2lx(this.refPoint.x)>e.width||l.g2ly(this.refPoint.y)>e.height||l.g2lx(this.refPoint.x+this.w)<0||l.g2ly(this.refPoint.y+this.h)<0);return!!t}snapToGrid(){const e=r.gameStore.gridSize,t=this.center(),i=t.x,n=t.y;let o,l;o=this.w/e%2===0?Math.round(i/e)*e-this.w/2:(Math.round((i+e/2)/e)-.5)*e-this.w/2,l=this.h/e%2===0?Math.round(n/e)*e-this.h/2:(Math.round((n+e/2)/e)-.5)*e-this.h/2;const c=a.calculateDelta(new s.Vector(o-this.refPoint.x,l-this.refPoint.y),this);this.refPoint=this.refPoint.add(c),this.invalidate(!1)}resizeToGrid(){const e=r.gameStore.gridSize;this.refPoint=new s.GlobalPoint(Math.round(this.refPoint.x/e)*e,Math.round(this.refPoint.y/e)*e),this.w=Math.max(Math.round(this.w/e)*e,e),this.h=Math.max(Math.round(this.h/e)*e,e),this.invalidate(!1)}resize(e,t){const i=r.gameStore.zoomFactor;switch(e){case 0:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=l.l2g(t);break;case 1:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint=new s.GlobalPoint(l.l2gx(t.x),this.refPoint.y);break;case 2:this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y);break;case 3:this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=new s.GlobalPoint(this.refPoint.x,l.l2gy(t.y));break}this.w/=i,this.h/=i,this.w<0&&(this.refPoint=this.refPoint.add(new s.Vector(this.w,0)),this.w=Math.abs(this.w)),this.h<0&&(this.refPoint=this.refPoint.add(new s.Vector(0,this.h)),this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var s=i("22bd"),n=i("e27a");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="select.vue",t["default"]=a.exports},c31c:function(e,t,i){},c6b4:function(e,t,i){"use strict";i.r(t);var s=i("8e60"),n=i("b0ac");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("d767");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"61eb1455",null);a.options.__file="main.vue",t["default"]=a.exports},c969:function(e,t,i){"use strict";var s=i("3a20"),n=i.n(s);n.a},c9a2:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"AssetManager"}},[i("div",{attrs:{id:"titlebar"}},[e._v("Asset Manager")]),i("div",{attrs:{id:"main"}},[i("div",{attrs:{id:"assets"},on:{dragover:function(t){return t.preventDefault(),e.moveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.currentFolder)}}},[i("div",{attrs:{id:"breadcrumbs"}},[i("div",[e._v("/")]),e._l(e.path,function(t){return i("div",{key:t},[e._v(e._s(e.idMap.get(t).name))])})],2),i("div",{attrs:{id:"actionbar"}},[i("input",{attrs:{id:"files",type:"file",multiple:"",hidden:""},on:{change:function(t){e.upload()}}}),i("div",{attrs:{title:"Create folder"},on:{click:e.createDirectory}},[i("i",{staticClass:"fas fa-plus-square"})]),i("div",{attrs:{title:"Upload files"},on:{click:e.prepareUpload}},[i("i",{staticClass:"fas fa-upload"})])]),i("div",{attrs:{id:"explorer"}},[e.path.length?i("div",{staticClass:"inode folder",on:{dblclick:function(t){e.changeDirectory(-1)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.parentFolder)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v("..")])]):e._e(),e._l(e.folders,function(t){return i("div",{key:t,staticClass:"inode folder",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},dblclick:function(i){e.changeDirectory(t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(i){i.preventDefault(),i.stopPropagation(),e.stopDrag(i,t)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])}),e._l(e.files,function(t){return i("div",{key:t,staticClass:"inode file",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)}}},[i("img",{attrs:{src:"/static/assets/"+e.idMap.get(t).file_hash,width:"50"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])})],2)]),e.firstSelectedFile?i("div",{attrs:{id:"asset-details"}},[i("div",{attrs:{id:"asset-detail-title"}},[e._v(e._s(e.firstSelectedFile.name))]),i("img",{attrs:{src:"/static/assets/"+e.firstSelectedFile.file_hash}})]):e._e()]),i("AssetContextMenu",{ref:"cm"}),i("Prompt",{ref:"prompt"}),i("ConfirmDialog",{ref:"confirm"})],1)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},ca56:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("1c76")),a=i("0bc6"),l=i("af17"),c=i("f10f"),u=i("92b1");let d=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.x=0,this.y=0}get IS_DM(){return c.gameStore.IS_DM}open(e){this.visible=!0,this.x=e.pageX,this.y=e.pageY,this.$nextTick(()=>this.$children[0].$el.focus())}close(){this.visible=!1}bringPlayers(){c.gameStore.IS_DM&&(a.socket.emit("Players.Bring",{x:u.l2gx(this.x),y:u.l2gy(this.y)}),this.close())}createToken(){this.$parent.$parent.$refs.createtokendialog.open(this.x,this.y),this.close()}showInitiative(){l.EventBus.$emit("Initiative.Show"),this.close()}};d=s.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},cad7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{beforeRouteEnter(e,t,i){n.default.post("/api/logout").then(()=>{a.coreStore.setAuthenticated(!1),a.coreStore.setUsername(""),i({path:"/auth/login"})})}};l=s.__decorate([r.default({})],l),t.default=l},cc67:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=i("6fc5"),o=i("3a0b");let r=class extends n.VuexModule{constructor(){super(...arguments),this.authenticated=!1,this.initialized=!1,this.username=""}setAuthenticated(e){this.authenticated=e}setInitialized(e){this.initialized=e}setUsername(e){this.username=e}};s.__decorate([n.Mutation],r.prototype,"setAuthenticated",null),s.__decorate([n.Mutation],r.prototype,"setInitialized",null),s.__decorate([n.Mutation],r.prototype,"setUsername",null),r=s.__decorate([n.Module({dynamic:!0,store:o.rootStore,name:"core"})],r),t.coreStore=n.getModule(r)},cd49:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("3dfd")),r=i("5f86"),a=i("3a0b");n.default.config.productionTip=!1,n.default.config.devtools=!0,n.default.config.performance=!0,t.app=new n.default({router:r.router,store:a.rootStore,render:e=>e(o.default)}).$mount("#app"),window.app=t.app},cde6:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9"));let r=class extends n.default{};r=s.__decorate([o.default({props:["visible","left","top"]})],r),t.default=r},ce87:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9"));let a=class extends o.default{beforeRouteEnter(e,t,i){n.default.post("/api/invite",{code:e.params.code}).then(e=>{i({path:e.data.sessionUrl})}).catch(e=>{console.error("Invitation code could not be redeemed"),i({path:"/dashboard"})})}};a=s.__decorate([r.default({template:""})],a),t.default=a},cec2:function(e,t,i){"use strict";i.r(t);var s=i("eb57"),n=i("255e");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("0584");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"0602c2e6",null);a.options.__file="prompt.vue",t["default"]=a.exports},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("f10f"),n=i("1216"),o=i("d6be"),r=i("98ef"),a=i("4aee");function l(e,t,i){void 0===i&&(i=s.gameStore.drawTEContour);const r=[e.x,e.y],a=[],l=o.PA_CDT[t].locate(r,null).loc;return null===l?(console.error("Triangle not found"),[]):(a.push(l.vertices[1].point),l.isConstrained(0)||c(r,l.vertices[2].point,l.vertices[1].point,l,0,a),a.push(l.vertices[2].point),l.isConstrained(1)||c(r,l.vertices[0].point,l.vertices[2].point,l,1,a),a.push(l.vertices[0].point),l.isConstrained(2)||c(r,l.vertices[1].point,l.vertices[0].point,l,2,a),i&&n.drawPolygon(a,"red"),a)}function c(e,t,i,s,n,o){const l=s.neighbours[n],d=l.indexT(s),h=a.ccw(d),f=a.cw(d),p=l.vertices[d],g=l.vertices[f],v=l.vertices[h],m=[l,h],y=[l,f],b=a.orientation(e,i,p.point),_=a.orientation(e,t,p.point);if(b===r.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&o.push(u(e,i,p.point,g.point)),_===r.Sign.COUNTERCLOCKWISE&&o.push(u(e,t,p.point,g.point));else{if(_===r.Sign.COUNTERCLOCKWISE)return c(e,t,i,l,h,o);c(e,p.point,i,l,h,o)}if(b!==r.Sign.CLOCKWISE&&_!==r.Sign.COUNTERCLOCKWISE&&o.push(p.point),_===r.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===r.Sign.CLOCKWISE&&o.push(u(e,i,p.point,v.point)),void(t!==v.point&&o.push(u(e,t,p.point,v.point)))):b===r.Sign.CLOCKWISE?c(e,t,i,l,f,o):c(e,t,p.point,l,f,o)}function u(e,t,i,s){const n=(s[1]-i[1])*(t[0]-e[0])-(s[0]-i[0])*(t[1]-e[1]),o=((s[0]-i[0])*(e[1]-i[1])-(s[1]-i[1])*(e[0]-i[0]))/n,r=e[0]+o*(t[0]-e[0]),a=e[1]+o*(t[1]-e[1]);return[r,a]}t.computeVisibility=l},cf8f:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",[e._v("#X")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.xCount,expression:"xCount"}],attrs:{type:"text"},domProps:{value:e.xCount},on:{input:function(t){t.target.composing||(e.xCount=t.target.value)}}}),i("div",[e._v("#Y")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.yCount,expression:"yCount"}],attrs:{type:"text"},domProps:{value:e.yCount},on:{input:function(t){t.target.composing||(e.yCount=t.target.value)}}})]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d065:function(e,t,i){"use strict";i.r(t);var s=i("45fb"),n=i("f8b3");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("514b");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"23de098e",null);a.options.__file="edit_dialog.vue",t["default"]=a.exports},d1ec:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{}s.angleSteps=4,s.drawAngleLines=!1,s.drawFirstLightHit=!1,s.skipPlayerFOW=!1,s.skipLightFOW=!1,s.tempFill="fog",t.Settings=s},d30b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("cc67");let l=class extends o.default{constructor(){super(...arguments),this.username="",this.password="",this.error=""}login(){n.default.post("/api/login",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}register(){n.default.post("/api/register",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}focusin(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="0"}}focusout(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="1"}}};l=s.__decorate([r.default],l),t.default=l},d320:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v("Create basic token")])}}])},[i("div",{staticClass:"modal-body"},[i("label",{attrs:{for:"createtokendialog-text"}},[e._v("Text")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.text,expression:"text"}],attrs:{type:"text",id:"createtokendialog-name"},domProps:{value:e.text},on:{input:function(t){t.target.composing||(e.text=t.target.value)}}}),i("label",[e._v("Colours")]),i("div",{staticClass:"colours"},[i("span",[e._v("Fill:")]),i("color-picker",{attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("span",[e._v("Border:")]),i("color-picker",{attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("canvas",{ref:"canvas",attrs:{width:"100px",height:"100px"}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d323:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div")},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d445:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:"modal"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"mask",class:{"modal-mask":e.mask,"dialog-mask":!e.mask},on:{click:e.close,dragover:function(t){return t.preventDefault(),e.dragOver(t)}}},[i("div",{ref:"container",staticClass:"modal-container",on:{click:function(e){e.stopPropagation()}}},[e._t("header",null,{dragStart:e.dragStart,dragEnd:e.dragEnd}),e._t("default")],2)])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d588:function(e,t,i){"use strict";i.r(t);var s=i("91df"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},d5df:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=s.__importDefault(i("ea6a")),r=i("0bc6"),a=i("8f0a"),l=i("6f92"),c=i("5e7c"),u=i("0180"),d=i("f10f"),h=i("92b1"),f=i("5a5c");let p=class extends o.default{constructor(){super(...arguments),this.name="Ruler",this.active=!1,this.startPoint=null,this.ruler=null,this.text=null}onMouseDown(e){const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=h.l2g(f.getMouse(e)),this.ruler=new c.Line(this.startPoint,this.startPoint,3,d.gameStore.rulerColour),this.text=new u.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.addOwner(d.gameStore.username),this.text.addOwner(d.gameStore.username),t.addShape(this.ruler,!0,!0),t.addShape(this.text,!0,!0)):console.log("No draw layer!")}onMouseMove(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=h.l2g(f.getMouse(e));this.ruler.endPoint=i,r.socket.emit("Shape.Update",{shape:this.ruler.asDict(),redraw:!0,temporary:!0});const s=Math.sign(i.x-this.startPoint.x)*Math.sign(i.y-this.startPoint.y),n=Math.abs(i.x-this.startPoint.x),o=Math.abs(i.y-this.startPoint.y),c=Math.round(Math.sqrt(Math.pow(n,2)+Math.pow(o,2))*d.gameStore.unitSize/d.gameStore.gridSize)+" ft",u=Math.atan2(s*o,n),p=Math.min(this.startPoint.x,i.x)+n/2,g=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint=new a.GlobalPoint(p,g),this.text.text=c,this.text.angle=u,r.socket.emit("Shape.Update",{shape:this.text.asDict(),redraw:!0,temporary:!0}),t.invalidate(!0)}onMouseUp(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!1,t.removeShape(this.ruler,!0,!0),t.removeShape(this.text,!0,!0),t.invalidate(!0),this.ruler=this.startPoint=this.text=null):console.log("No active layer!")}};p=s.__decorate([n.default],p),t.RulerTool=p},d65f:function(e,t,i){"use strict";i.r(t);var s=i("d445"),n=i("7e15");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("26a5");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"12ed61ba",null);a.options.__file="modal.vue",t["default"]=a.exports},d677:function(e,t,i){"use strict";i.r(t);var s=i("53ec"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},d6be:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("6f92"),n=i("f10f"),o=i("6e4a");function r(e,i=!1){const r=new o.CDT;let a;a="vision"===e?n.gameStore.visionBlockers:n.gameStore.movementblockers;for(const t of a){const e=s.layerManager.UUIDMap.get(t);if(!i||e.visibleInCanvas(s.layerManager.getLayer().canvas))for(let t=0;t{this.shape=e,this.visible=!0}),d.EventBus.$on("EditDialog.AddLabel",e=>{this.visible&&(this.shape.labels.push(f.gameStore.labels[e]),this.updateShape(!0))})}beforeDestroy(){d.EventBus.$off("EditDialog.Open"),d.EventBus.$off("EditDialog.AddLabel")}updated(){this.addEmpty()}addEmpty(){""!==this.shape.owners[this.shape.owners.length-1]&&this.shape.addOwner(""),this.shape.trackers.length&&""===this.shape.trackers[this.shape.trackers.length-1].name&&0===this.shape.trackers[this.shape.trackers.length-1].value||this.shape.trackers.push({uuid:c.uuidv4(),name:"",value:0,maxvalue:0,visible:!1}),this.shape.auras.length&&""===this.shape.auras[this.shape.auras.length-1].name&&0===this.shape.auras[this.shape.auras.length-1].value||this.shape.auras.push({uuid:c.uuidv4(),name:"",value:0,dim:0,visionSource:!1,colour:"rgba(0,0,0,0)",visible:!1})}updateShape(e,t=!1){this.owned&&(u.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:e,temporary:t}),e&&h.layerManager.invalidate(),this.addEmpty())}setToken(e){this.owned&&(this.shape.setIsToken(e.target.checked),this.updateShape(!0))}setVisionBlocker(e){this.owned&&(this.shape.checkVisionSources(),this.updateShape(!0))}setMovementBlocker(e){this.owned&&(this.shape.setMovementBlock(e.target.checked),this.updateShape(!1))}updateAnnotation(e){if(!this.owned)return;const t=""!==this.shape.annotation;this.shape.annotation=e.target.value,""===this.shape.annotation||t?""===this.shape.annotation&&t&&(f.gameStore.annotations.splice(f.gameStore.annotations.findIndex(e=>e===this.shape.uuid)),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)):(f.gameStore.annotations.push(this.shape.uuid),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){this.owned&&(this.shape.updateOwner(t,e.target.value),this.updateShape(f.gameStore.fowLOS))}removeOwner(e){this.owned&&(this.shape.removeOwner(e),this.updateShape(f.gameStore.fowLOS))}removeTracker(e){this.owned&&(this.shape.trackers=this.shape.trackers.filter(t=>t.uuid!==e),this.updateShape(!1))}removeAura(e){this.owned&&(this.shape.auras=this.shape.auras.filter(t=>t.uuid!==e),this.shape.checkVisionSources(),this.updateShape(!0))}updateAuraVisionSource(e){if(!this.owned)return;e.visionSource=!e.visionSource;const t=f.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?f.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&f.gameStore.visionSources.splice(t,1),this.updateShape(!0)}updateAuraColour(e,t){if(!this.owned)return;const i=h.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}openLabelManager(){d.EventBus.$emit("LabelManager.Open")}removeLabel(e){this.owned&&(this.shape.labels=this.shape.labels.filter(t=>t.uuid!==e),this.updateShape(!0))}};s.__decorate([r.Prop()],p.prototype,"shape",void 0),p=s.__decorate([o.default({components:{Modal:l.default,"color-picker":a.default}})],p),t.default=p},da03:function(e,t,i){},dc37:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f"));let a=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.yes="Yes",this.no="No",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}confirm(){this.resolve(!0),this.close()}deny(){this.resolve(!1),this.close()}close(){this.reject(),this.visible=!1,this.title=""}open(e,t="yes",i="no"){return this.yes=t,this.no=i,this.title=e,this.visible=!0,this.$nextTick(()=>{this.$refs.confirm.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=s.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},de21:function(e,t,i){},deb9:function(e,t,i){"use strict";var s=i("c1e0"),n=i.n(s);n.a},dec1:function(e,t,i){"use strict";i.r(t);var s=i("cf8f"),n=i("3481");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="map.vue",t["default"]=a.exports},df64:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"accordion"},[i("div",{attrs:{id:"header"},on:{click:function(t){return t.preventDefault(),e.toggleDisplay(t)}}},[i("input",{ref:"overall",attrs:{type:"checkbox"},on:{click:function(t){return t.stopPropagation(),e.toggleCategory(t)}}}),i("strong",[e._v(e._s(e.title))]),e.showArrow?[i("span",{directives:[{name:"show",rawName:"v-show",value:e.showArrow&&!e.active,expression:"showArrow && !active"}],staticClass:"down-Arrow"},[e._v("▼")]),i("span",{directives:[{name:"show",rawName:"v-show",value:e.showArrow&&e.active,expression:"showArrow && active"}],staticClass:"up-Arrow"},[e._v("▲")])]:e._e()],2),i("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}],attrs:{id:"body"}},e._l(e.items,function(t){return i("div",{key:t[0],staticClass:"item",on:{click:function(i){e.toggleSelection(t[0])}}},[i("input",{attrs:{type:"checkbox"},domProps:{checked:e.selected.includes(t[0])},on:{click:function(e){e.preventDefault()}}}),e._v(" "+e._s(t[1])+"\n ")])}))])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e037:function(e,t,i){"use strict";var s=i("da03"),n=i.n(s);n.a},e06e:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[i("button",{ref:"confirm",on:{click:e.confirm}},[e._v(e._s(e.yes))]),e.no?i("button",{on:{click:e.deny}},[e._v(e._s(e.no))]):e._e()])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e0e9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("1c76")),a=i("5338"),l=i("2d5b"),c=i("4a5b");let u=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.left=0,this.top=0}open(e,t){l.assetStore.selected.includes(t)||c.getComponent().select(e,t),this.visible=!0,this.left=e.pageX,this.top=e.pageY,this.$nextTick(()=>{this.$children[0].$el.focus()})}close(){this.visible=!1}rename(){if(1!==l.assetStore.selected.length)return;const e=l.assetStore.idMap.get(l.assetStore.selected[0]);c.getRef("prompt").prompt("New name:",`Renaming ${e.name}`).then(t=>{a.socket.emit("Asset.Rename",{asset:e.id,name:t}),e.name=t,c.getComponent().$forceUpdate()},()=>{}),this.close()}remove(){0!==l.assetStore.selected.length&&(c.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{if(e){for(const e of l.assetStore.selected)a.socket.emit("Asset.Remove",e),l.assetStore.files.includes(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.clearSelected()}},()=>{}),this.close())}};u=s.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e27a:function(e,t,i){"use strict";i.r(t);var s=i("2756"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},e3f5:function(e,t,i){"use strict";var s=i("a126"),n=i.n(s);n.a},e4b0:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f")),a=i("4a5b"),l=i("0bc6"),c=i("af17"),u=i("f10f");let d=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.newCategory="",this.newName="",this.search=""}mounted(){c.EventBus.$on("LabelManager.Open",()=>{this.visible=!0,this.newCategory="",this.newName="",this.$nextTick(()=>this.$refs.search.focus())})}beforeDestroy(){c.EventBus.$off("LabelManager.Open")}get labels(){const e={};for(const t of Object.keys(u.gameStore.labels)){const i=u.gameStore.labels[t];this.search.length&&`${i.category.toLowerCase()}${i.name.toLowerCase()}`.search(this.search.toLowerCase())<0||i.user===u.gameStore.username&&(i.category?(i.category in e||(e[i.category]=[]),e[i.category].push(i),e[i.category].sort((e,t)=>e.name.localeCompare(t.name))):e[""].push(i))}return e}get categories(){return Object.keys(this.labels).sort()}selectLabel(e){c.EventBus.$emit("EditDialog.AddLabel",e),this.visible=!1}toggleVisibility(e){e.visible=!e.visible,l.socket.emit("Label.Visibility.Set",{uuid:e.uuid,visible:e.visible})}addLabel(){if(""===this.newName)return;const e={uuid:a.uuidv4(),category:this.newCategory,name:this.newName,visible:!1,user:u.gameStore.username};u.gameStore.addLabel(e),l.socket.emit("Label.Add",e),this.newCategory="",this.newName=""}deleteLabel(e){u.gameStore.deleteLabel({uuid:e,user:u.gameStore.username}),l.socket.emit("Label.Delete",e)}};d=s.__decorate([o.default({components:{Modal:r.default}})],d),t.default=d},e4ea:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("92b1"),o=i("5a5c"),r=i("8db6"),a=i("2469");class l extends a.Shape{constructor(e,t=[],i,s,n){super(e,i,s,n),this.type="polygon",this._vertices=[],this._vertices=t}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._vertices=e.vertices.map(e=>new s.GlobalPoint(e.x,e.y))}get points(){return this.vertices.map(e=>[e.x,e.y])}draw(e){super.draw(e),e.lineCap="round",e.lineJoin="round","fog"===this.strokeColour?e.strokeStyle=o.getFogColour():2===this.vertices.length?e.strokeStyle=this.fillColour:e.strokeStyle=this.strokeColour,"fog"===this.fillColour?e.fillStyle=o.getFogColour():e.fillStyle=this.fillColour,e.lineWidth=n.g2lz(2),e.beginPath(),e.moveTo(n.g2lx(this.vertices[0].x),n.g2ly(this.vertices[0].y));for(let t=1;t<=this.vertices.length;t++){const i=this.vertices[t%this.vertices.length];e.lineTo(n.g2lx(i.x),n.g2ly(i.y))}e.fill(),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=n.l2g(t):this._vertices[e-1]=n.l2g(t)}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,n=this.refPoint.y;for(const s of this._vertices)s.xt&&(t=s.x),s.yn&&(n=s.y);return new r.BoundingRect(new s.GlobalPoint(e,i),t-e,n-i)}}t.Polygon=l},e5ca:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}]},[e._v("Mode")]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}],staticClass:"selectgroup"},e._l(e.modes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.modeSelect===t},on:{click:function(i){e.modeSelect=t}}},[e._v(e._s(t))])})),i("div",[e._v("Shape")]),i("div",{staticClass:"selectgroup"},e._l(e.shapes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.shapeSelect===t},on:{click:function(i){e.shapeSelect=t}}},[i("i",{staticClass:"fas",class:"fa-"+t})])})),i("div",[e._v("Colours")]),i("div",{staticClass:"selectgroup"},[i("color-picker",{staticClass:"option",attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("color-picker",{staticClass:"option",attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("div",{directives:[{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}]},[e._v("Brush size")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.brushSize,expression:"brushSize"},{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}],staticStyle:{"max-width":"100px"},attrs:{type:"text"},domProps:{value:e.brushSize},on:{input:function(t){t.target.composing||(e.brushSize=t.target.value)}}})]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e756:function(e,t,i){},e7db:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"outer",on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}},[i("div",{staticClass:"current-color",style:e.transparent?"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)":"background-color:"+e.color,on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}}),i("div",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],staticClass:"mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.closePicker(t)}}}),i("chrome-picker",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],ref:"chromePicker",style:{position:"fixed",left:e.left+"px",top:e.top+"px","z-index":9999},attrs:{value:e.color,tabindex:"-1"},on:{input:e.updateColor}})],1)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e914:function(e,t,i){"use strict";i.r(t);var s=i("c9a2"),n=i("aa69");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("78c7");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="manager.vue",t["default"]=a.exports},e94f:function(e,t,i){"use strict";i.r(t);var s=i("7aaa"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},ea6a:function(e,t,i){"use strict";i.r(t);var s=i("d323"),n=i("6465");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("12d3");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="tool.vue",t["default"]=a.exports},eb57:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[e._v("\n "+e._s(e.question)+"\n "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.answer,expression:"answer"}],ref:"answer",attrs:{type:"text"},domProps:{value:e.answer},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.submit(t):null},input:function(t){t.target.composing||(e.answer=t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},ebb9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("1516"));n.default.component("draggable",r.default);const a=s.__importDefault(i("d65f")),l=i("4a5b"),c=i("0bc6"),u=i("af17"),d=i("6f92"),h=i("f10f");let f=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.data=[],this.currentActor=null,this.roundCounter=0}mounted(){u.EventBus.$on("Initiative.Clear",this.clear),u.EventBus.$on("Initiative.Remove",e=>this.removeInitiative(e)),u.EventBus.$on("Initiative.Show",()=>this.visible=!0),c.socket.on("Initiative.Set",e=>{this.data=e}),c.socket.on("Initiative.Turn.Set",e=>this.setTurn(e)),c.socket.on("Initiative.Turn.Update",e=>this.updateTurn(e,!1)),c.socket.on("Initiative.Round.Update",e=>this.setRound(e,!1)),c.socket.on("Initiative.Effect.New",e=>{const t=this.getActor(e.actor);void 0!==t&&this.createEffect(t,e.effect,!1)}),c.socket.on("Initiative.Effect.Update",e=>this.updateEffect(e.actor,e.effect,!1))}beforeDestroy(){u.EventBus.$off("Initiative.Clear"),u.EventBus.$off("Initiative.Remove"),u.EventBus.$off("Initiative.Show")}clear(){this.data=[],this.currentActor=null}getActor(e){return this.data.find(t=>t.uuid===e)}contains(e){return this.data.some(t=>t.uuid===e)}owns(e){if(h.gameStore.IS_DM)return!0;const t=d.layerManager.UUIDMap.get(e.uuid);return void 0!==t&&t.owners.includes(h.gameStore.username)}getDefaultEffect(){return{uuid:l.uuidv4(),name:"New Effect",turns:10}}fakeSetData(e){e.setData("Hack","")}syncInitiative(e){c.socket.emit("Initiative.Update",e)}addInitiative(e){const t=this.data.findIndex(t=>t.uuid===e.uuid);t>=0||(void 0===e.initiative&&(e.initiative=0),this.syncInitiative(e))}removeInitiative(e){const t=this.data.findIndex(t=>t.uuid===e);if(t<0||this.data[t].group)return;this.syncInitiative({uuid:e});const i=d.layerManager.UUIDMap.get(e);void 0!==i&&i.showHighlight&&(i.showHighlight=!1,d.layerManager.getLayer(i.layer).invalidate(!0))}updateOrder(){h.gameStore.IS_DM&&c.socket.emit("Initiative.Set",this.data.map(e=>e.uuid))}updateTurn(e,t){if(!h.gameStore.IS_DM&&t)return;this.currentActor=e;const i=this.data.find(t=>t.uuid===e);if(void 0!==i){if(i.effects)for(let e=i.effects.length-1;e>=0;e--)i.effects[e].turns<=0?i.effects.splice(e,1):i.effects[e].turns--;t&&c.socket.emit("Initiative.Turn.Update",e)}}setRound(e,t){!h.gameStore.IS_DM&&t||(this.roundCounter=e,t&&c.socket.emit("Initiative.Round.Update",e))}setTurn(e){this.currentActor=e}nextTurn(){if(!h.gameStore.IS_DM)return;const e=this.data,t=e[(e.findIndex(e=>e.uuid===this.currentActor)+1)%e.length];this.data[0].uuid===t.uuid&&this.setRound(this.roundCounter+1,!0),this.updateTurn(t.uuid,!0)}toggleHighlight(e,t){const i=d.layerManager.UUIDMap.get(e.uuid);void 0!==i&&(i.showHighlight=t,d.layerManager.getLayer(i.layer).invalidate(!0))}toggleOption(e,t){this.owns(e)&&(e[t]=!e[t],this.syncInitiative(e))}createEffect(e,t,i){this.owns(e)&&(e.effects.push(t),i&&c.socket.emit("Initiative.Effect.New",{actor:e.uuid,effect:t}))}syncEffect(e,t){this.owns(e)&&c.socket.emit("Initiative.Effect.Update",{actor:e.uuid,effect:t})}updateEffect(e,t,i){const s=this.data.find(t=>t.uuid===e);if(void 0===s)return;const n=s.effects.findIndex(e=>e.uuid===t.uuid);void 0!==n&&(s.effects[n]=t,i?this.syncEffect(s,t):this.$forceUpdate())}};f=s.__decorate([o.default({components:{Modal:a.default,draggable:r.default}})],f),t.default=f},ee96:function(e,t,i){},f086:function(e,t,i){"use strict";i.r(t);var s=i("a112"),n=i("7ba5");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("01be");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"674cf937",null);a.options.__file="selection_info.vue",t["default"]=a.exports},f10f:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=i("6fc5"),r=i("0bc6"),a=i("2b48"),l=i("6f92"),c=i("92b1"),u=i("5a5c"),d=i("99e3"),h=i("d6be"),f=i("3a0b");let p=class extends o.VuexModule{constructor(){super(...arguments),this.layers=[],this.selectedLayerIndex=-1,this.boardInitialized=!1,this.locations=[],this.assets={},this.notes=[],this.IS_DM=!1,this.gridSize=50,this.username="",this.roomName="",this.roomCreator="",this.invitationCode="",this.gridColour="rgba(0, 0, 0, 1)",this.fowColour="rgba(0, 0, 0, 1)",this.rulerColour="rgba(255, 0, 0, 1)",this.panX=0,this.panY=0,this.zoomDisplay=.5,this.unitSize=5,this.useGrid=!0,this.fullFOW=!1,this.fowOpacity=.3,this.fowLOS=!1,this.locationName="",this.visionSources=[],this.visionBlockers=[],this.annotations=[],this.movementblockers=[],this.ownedtokens=[],this.BV=Object.freeze(new d.BoundingVolume([])),this.visionMode="bvh",this.drawTEContour=!1,this.visionRangeMin=1640,this.visionRangeMax=3281,this.clipboard=[],this.labels={},this.filterNoLabel=!1,this.labelFilters=[],this.showUI=!0}get selectedLayer(){return this.layers[this.selectedLayerIndex]}get zoomFactor(){return u.zoomValue(this.zoomDisplay)}setZoomDisplay(e){e!==this.zoomDisplay&&(e<0&&(e=0),e>1&&(e=1),this.zoomDisplay=e,l.layerManager.invalidate())}setVisionMode(e){this.visionMode=e.mode,e.sync&&r.socket.emit("Location.Options.Set",{vision_mode:e.mode})}setBoardInitialized(e){this.boardInitialized=e}toggleUnlabeledFilter(){this.filterNoLabel=!this.filterNoLabel}addLabel(e){n.default.set(this.labels,e.uuid,e)}setLabelFilters(e){this.labelFilters=e}setLabelVisibility(e){e.uuid in this.labels&&(this.labels[e.uuid].visible=e.visible)}deleteLabel(e){if(!(e.uuid in this.labels))return;const t=this.labels[e.uuid],i=new Set;for(const s of l.layerManager.UUIDMap.values()){const e=s.labels.indexOf(t);e>=0&&(s.labels.splice(e,1),i.add(s.layer))}for(const s of i)l.layerManager.getLayer(s).invalidate(!1);n.default.delete(this.labels,e.uuid)}setDM(e){this.IS_DM=e}setUsername(e){this.username=e}setRoomName(e){this.roomName=e}setRoomCreator(e){this.roomCreator=e}setInvitationCode(e){this.invitationCode=e}addLayer(e){this.layers.push(e),-1===this.selectedLayerIndex&&(this.selectedLayerIndex=this.layers.indexOf(e))}selectLayer(e){const t=this.layers.indexOf(e.name);t>=0&&(this.selectedLayerIndex=t),e.sync&&r.socket.emit("Client.ActiveLayer.Set",e.name)}newNote(e){this.notes.push(e.note),e.sync&&r.socket.emit("Note.New",e.note)}setAssets(e){this.assets=e}setLocations(e){this.locations=e}resetLayerInfo(){this.layers=[],this.selectedLayerIndex=-1}recalculateVision(e=!1){this.boardInitialized&&("triangle"===this.visionMode?h.triangulate("vision",e):this.BV=Object.freeze(new d.BoundingVolume(this.visionBlockers)))}recalculateMovement(e=!1){this.boardInitialized&&"triangle"===this.visionMode&&h.triangulate("movement",e)}updateZoom(e){if(e.newZoomDisplay===this.zoomDisplay)return;e.newZoomDisplay<0&&(e.newZoomDisplay=0),e.newZoomDisplay>1&&(e.newZoomDisplay=1);const t=c.g2l(e.zoomLocation);this.zoomDisplay=e.newZoomDisplay;const i=c.l2g(t),s=i.subtract(e.zoomLocation);this.panX+=s.x,this.panY+=s.y,l.layerManager.invalidate(),a.sendClientOptions()}setGridColour(e){this.gridColour=e.colour,l.layerManager.getGridLayer().drawGrid(),e.sync&&r.socket.emit("Client.Options.Set",{gridColour:e.colour})}setFOWColour(e){this.fowColour=e.colour,l.layerManager.invalidate(),e.sync&&r.socket.emit("Client.Options.Set",{fowColour:e.colour})}setRulerColour(e){this.rulerColour=e.colour,e.sync&&r.socket.emit("Client.Options.Set",{rulerColour:e.colour})}setPanX(e){this.panX=e}setPanY(e){this.panY=e}increasePanX(e){this.panX+=e}increasePanY(e){this.panY+=e}setUnitSize(e){this.unitSize!==e.unitSize&&e.unitSize>0&&e.unitSize<1/0&&(this.unitSize=e.unitSize,l.layerManager.invalidate(),e.sync&&r.socket.emit("Location.Options.Set",{unit_size:e.unitSize}))}setUseGrid(e){if(this.useGrid!==e.useGrid){this.useGrid=e.useGrid;const t=l.layerManager.getGridLayer();e.useGrid?t.canvas.style.display="block":t.canvas.style.display="none",e.sync&&r.socket.emit("Location.Options.Set",{use_grid:e.useGrid})}}setGridSize(e){if(this.gridSize!==e.gridSize&&e.gridSize>0){this.gridSize=e.gridSize;const t=l.layerManager.getGridLayer();void 0!==t&&t.drawGrid(),e.sync&&r.socket.emit("Gridsize.Set",e.gridSize)}}setVisionRangeMin(e){this.visionRangeMin=e.value,l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{vision_min_range:e.value})}setVisionRangeMax(e){this.visionRangeMax=Math.max(e.value,this.visionRangeMin),l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{vision_max_range:this.visionRangeMax})}setFullFOW(e){this.fullFOW!==e.fullFOW&&(this.fullFOW=e.fullFOW,l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{full_fow:e.fullFOW}))}setFOWOpacity(e){this.fowOpacity=e.fowOpacity,l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{fow_opacity:e.fowOpacity})}setLineOfSight(e){this.fowLOS!==e.fowLOS&&(this.fowLOS=e.fowLOS,l.layerManager.invalidate(),e.sync&&r.socket.emit("Location.Options.Set",{fow_los:e.fowLOS}))}setLocationName(e){this.locationName=e}updateNote(e){const t=this.notes.find(t=>t.uuid===e.note.uuid);void 0!==t&&(t.title=e.note.title,t.text=e.note.text,e.sync&&r.socket.emit("Note.Update",t))}removeNote(e){this.notes=this.notes.filter(t=>t.uuid!==e.note.uuid),e.sync&&r.socket.emit("Note.Remove",e.note.uuid)}toggleUI(){this.showUI=!this.showUI}setClipboard(e){this.clipboard=e}clear(){this.context.state.visionSources=[],this.context.state.visionBlockers=[],this.context.state.ownedtokens=[],this.context.state.annotations=[],this.context.state.movementblockers=[],this.context.state.notes=[],this.context.commit("recalculateVision"),this.context.commit("recalculateMovement")}};s.__decorate([o.Mutation],p.prototype,"setZoomDisplay",null),s.__decorate([o.Mutation],p.prototype,"setVisionMode",null),s.__decorate([o.Mutation],p.prototype,"setBoardInitialized",null),s.__decorate([o.Mutation],p.prototype,"toggleUnlabeledFilter",null),s.__decorate([o.Mutation],p.prototype,"addLabel",null),s.__decorate([o.Mutation],p.prototype,"setLabelFilters",null),s.__decorate([o.Mutation],p.prototype,"setLabelVisibility",null),s.__decorate([o.Mutation],p.prototype,"deleteLabel",null),s.__decorate([o.Mutation],p.prototype,"setDM",null),s.__decorate([o.Mutation],p.prototype,"setUsername",null),s.__decorate([o.Mutation],p.prototype,"setRoomName",null),s.__decorate([o.Mutation],p.prototype,"setRoomCreator",null),s.__decorate([o.Mutation],p.prototype,"setInvitationCode",null),s.__decorate([o.Mutation],p.prototype,"addLayer",null),s.__decorate([o.Mutation],p.prototype,"selectLayer",null),s.__decorate([o.Mutation],p.prototype,"newNote",null),s.__decorate([o.Mutation],p.prototype,"setAssets",null),s.__decorate([o.Mutation],p.prototype,"setLocations",null),s.__decorate([o.Mutation],p.prototype,"resetLayerInfo",null),s.__decorate([o.Mutation],p.prototype,"recalculateVision",null),s.__decorate([o.Mutation],p.prototype,"recalculateMovement",null),s.__decorate([o.Mutation],p.prototype,"updateZoom",null),s.__decorate([o.Mutation],p.prototype,"setGridColour",null),s.__decorate([o.Mutation],p.prototype,"setFOWColour",null),s.__decorate([o.Mutation],p.prototype,"setRulerColour",null),s.__decorate([o.Mutation],p.prototype,"setPanX",null),s.__decorate([o.Mutation],p.prototype,"setPanY",null),s.__decorate([o.Mutation],p.prototype,"increasePanX",null),s.__decorate([o.Mutation],p.prototype,"increasePanY",null),s.__decorate([o.Mutation],p.prototype,"setUnitSize",null),s.__decorate([o.Mutation],p.prototype,"setUseGrid",null),s.__decorate([o.Mutation],p.prototype,"setGridSize",null),s.__decorate([o.Mutation],p.prototype,"setVisionRangeMin",null),s.__decorate([o.Mutation],p.prototype,"setVisionRangeMax",null),s.__decorate([o.Mutation],p.prototype,"setFullFOW",null),s.__decorate([o.Mutation],p.prototype,"setFOWOpacity",null),s.__decorate([o.Mutation],p.prototype,"setLineOfSight",null),s.__decorate([o.Mutation],p.prototype,"setLocationName",null),s.__decorate([o.Mutation],p.prototype,"updateNote",null),s.__decorate([o.Mutation],p.prototype,"removeNote",null),s.__decorate([o.Mutation],p.prototype,"toggleUI",null),s.__decorate([o.Mutation],p.prototype,"setClipboard",null),s.__decorate([o.Action],p.prototype,"clear",null),p=s.__decorate([o.Module({dynamic:!0,store:f.rootStore,name:"game",namespaced:!0})],p),t.gameStore=o.getModule(p)},f19c:function(e,t,i){"use strict";var s=i("602f"),n=i.n(s);n.a},f2d0:function(e,t,i){},f30c:function(e,t,i){"use strict";i.r(t);var s=i("dc37"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},f312:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aurasFromServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,visionSource:i.vision_source,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t}),t.aurasToServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,vision_source:i.visionSource,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t})},f3c9:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{attrs:{id:"toolselect"}},[i("ul",e._l(e.visibleTools,function(t){return i("li",{key:t,ref:t+"-selector",refInFor:!0,class:{"tool-selected":e.currentTool===t},on:{mousedown:function(i){e.currentTool=t}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])])}))]),i("div",[[i("select-tool",{directives:[{name:"show",rawName:"v-show",value:"Select"===e.currentTool,expression:"currentTool === 'Select'"}],ref:"selectTool"}),i("pan-tool",{directives:[{name:"show",rawName:"v-show",value:"Pan"===e.currentTool,expression:"currentTool === 'Pan'"}]}),i("keep-alive",[i("draw-tool",{directives:[{name:"show",rawName:"v-show",value:"Draw"===e.currentTool,expression:"currentTool === 'Draw'"}]})],1),i("ruler-tool",{directives:[{name:"show",rawName:"v-show",value:"Ruler"===e.currentTool,expression:"currentTool === 'Ruler'"}]}),i("map-tool",{directives:[{name:"show",rawName:"v-show",value:"Map"===e.currentTool,expression:"currentTool === 'Map'"}]}),i("filter-tool",{directives:[{name:"show",rawName:"v-show",value:"Filter"===e.currentTool,expression:"currentTool === 'Filter'"}]}),i("shape-menu",{ref:"shapecontext"}),i("createtoken-dialog",{ref:"createtokendialog"})]],2)])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},f51a:function(e,t,i){"use strict";i.r(t);var s=i("e0e9"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},f551:function(e,t,i){"use strict";i.r(t);var s=i("2686"),n=i("1dd6");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("28b6");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"7a3669fd",null);a.options.__file="note.vue",t["default"]=a.exports},f5fe:function(e,t,i){"use strict";i.r(t);var s=i("59f0"),n=i("7018");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("deb9");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"af4dc61a",null);a.options.__file="initiative.vue",t["default"]=a.exports},f692:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("4185"),n=i("b906"),o=i("38c9"),r=i("bab4"),a=i("6f92"),l=i("f10f");function c(e){const t=document.createElement("canvas");let i;t.style.zIndex=a.layerManager.layers.length.toString(),t.width=window.innerWidth,t.height=window.innerHeight,i="grid"===e.type_?new o.GridLayer(t,e.name):"fow"===e.type_?new s.FOWLayer(t,e.name):"fow-players"===e.type_?new n.FOWPlayersLayer(t,e.name):new r.Layer(t,e.name),i.selectable=e.selectable,i.playerEditable=e.player_editable,a.layerManager.addLayer(i);const c=document.getElementById("layers");null!==c?("fow-players"!==e.name&&c.appendChild(t),"grid"===e.type_&&e.size&&l.gameStore.setGridSize({gridSize:e.size,sync:!1}),i.setShapes(e.shapes)):console.warn("Layers div is missing, this will prevent the main game board from loading!")}t.createLayer=c},f74c:function(e,t,i){"use strict";i.r(t);var s=i("a9a6"),n=i("29a2");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("9104");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"4697341e",null);a.options.__file="labels.vue",t["default"]=a.exports},f8b3:function(e,t,i){"use strict";i.r(t);var s=i("d8ee"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},f994:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("form",{on:{focusin:e.focusin,focusout:e.focusout,submit:function(t){return t.preventDefault(),e.login(t)}}},[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("PlanarAlly")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],attrs:{type:"text",name:"username",placeholder:"Username",autocomplete:"username",required:""},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}}),e._m(0)]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",name:"password",placeholder:"Password",autocomplete:"current-password",required:""},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._m(1)]),i("div",{staticStyle:{display:"flex"}},[i("button",{staticStyle:{visibility:"hidden",display:"none"},attrs:{type:"submit",name:"login"}}),i("button",{staticClass:"submit",attrs:{type:"button",name:"register",title:"Register"},on:{click:e.register}},[i("i",{staticClass:"fas fa-plus"})]),e._m(2)])]),e.error?i("div",{staticClass:"feedback"},[i("p",{staticClass:"error"},[i("strong",[e._v("Error:")]),e._v("\n "+e._s(e.error)+"\n ")])]):e._e()])},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-user-circle"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-lock"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",name:"login",title:"Login"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},fbdd:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d065")),a=i("4a5b"),l=i("0bc6"),c=i("af17"),u=i("6f92");let d=class extends n.default{constructor(){super(...arguments),this.shape=null}mounted(){c.EventBus.$on("SelectionInfo.Shape.Set",e=>{this.shape=e})}beforeDestroy(){c.EventBus.$off("SelectionInfo.Shape.Set")}openEditDialog(){this.$refs.editDialog.visible=!0}changeValue(e,t){null!==this.shape&&a.getRef("prompt").prompt(`New ${e.name} value:`,`Updating ${e.name}`).then(i=>{if(null===this.shape)return;const s=e.value;"+"===i[0]||"-"===i[0]?e.value+=parseInt(i,10):e.value=parseInt(i,10),isNaN(e.value)&&(e.value=s),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:t,temporary:!1}),t&&u.layerManager.invalidate()},()=>{})}};d=s.__decorate([o.default({components:{"edit-dialog":r.default}})],d),t.default=d},fcac:function(e,t,i){},fe11:function(e,t,i){},fe80:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("0bc6"),n=i("af17"),o=i("8f0a"),r=i("6f92"),a=i("f692"),l=i("9cb7"),c=i("f10f"),u=i("5f86"),d=i("5a5c");s.socket.on("connect",()=>{console.log("Connected")}),s.socket.on("disconnect",()=>{console.log("Disconnected")}),s.socket.on("connect_error",e=>{console.error("Could not connect to game session."),u.router.push("/dashboard")}),s.socket.on("error",e=>{console.error("Game session does not exist."),u.router.push("/dashboard")}),s.socket.on("redirect",e=>{console.log("redirecting"),u.router.push(e)}),s.socket.on("Room.Info.Set",e=>{c.gameStore.setRoomName(e.name),c.gameStore.setRoomCreator(e.creator),c.gameStore.setInvitationCode(e.invitationCode)}),s.socket.on("Username.Set",e=>{c.gameStore.setUsername(e),c.gameStore.setDM(e===window.location.pathname.split("/")[2])}),s.socket.on("Client.Options.Set",e=>{c.gameStore.setGridColour({colour:e.grid_colour,sync:!1}),c.gameStore.setFOWColour({colour:e.fow_colour,sync:!1}),c.gameStore.setRulerColour({colour:e.ruler_colour,sync:!1}),c.gameStore.setPanX(e.pan_x),c.gameStore.setPanY(e.pan_y),c.gameStore.setZoomDisplay(d.zoomDisplay(e.zoom_factor)),e.active_layer&&r.layerManager.selectLayer(e.active_layer,!1),void 0!==r.layerManager.getGridLayer()&&r.layerManager.getGridLayer().invalidate()}),s.socket.on("Location.Set",e=>{void 0!==e.name&&c.gameStore.setLocationName(e.name),void 0!==e.unit_size&&c.gameStore.setUnitSize({unitSize:e.unit_size,sync:!1}),void 0!==e.use_grid&&c.gameStore.setUseGrid({useGrid:e.use_grid,sync:!1}),void 0!==e.full_fow&&c.gameStore.setFullFOW({fullFOW:e.full_fow,sync:!1}),void 0!==e.fow_opacity&&c.gameStore.setFOWOpacity({fowOpacity:e.fow_opacity,sync:!1}),void 0!==e.fow_los&&c.gameStore.setLineOfSight({fowLOS:e.fow_los,sync:!1}),void 0!==e.vision_min_range&&c.gameStore.setVisionRangeMin({value:e.vision_min_range,sync:!1}),void 0!==e.vision_max_range&&c.gameStore.setVisionRangeMax({value:e.vision_max_range,sync:!1}),void 0!==e.vision_mode&&(c.gameStore.setVisionMode({mode:e.vision_mode,sync:!1}),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement())}),s.socket.on("Position.Set",e=>{l.gameManager.setCenterPosition(new o.GlobalPoint(e.x,e.y))}),s.socket.on("Notes.Set",e=>{for(const t of e)c.gameStore.newNote({note:t,sync:!1})}),s.socket.on("Asset.List.Set",e=>{c.gameStore.setAssets(e)}),s.socket.on("Board.Set",e=>{c.gameStore.clear(),c.gameStore.setLocations(e.locations),document.getElementById("layers").innerHTML="",c.gameStore.resetLayerInfo(),r.layerManager.reset();for(const t of e.layers)a.createLayer(t);r.layerManager.selectLayer(r.layerManager.getLayer().name,!1),n.EventBus.$emit("Initiative.Clear"),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement(),c.gameStore.setBoardInitialized(!0)}),s.socket.on("Gridsize.Set",e=>{c.gameStore.setGridSize({gridSize:e,sync:!1})}),s.socket.on("Shape.Add",e=>{l.gameManager.addShape(e)}),s.socket.on("Shape.Remove",e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.getLayer(e.layer);t.removeShape(r.layerManager.UUIDMap.get(e.uuid),!1),t.invalidate(!1)}),s.socket.on("Shape.Order.Set",e=>{if(!r.layerManager.UUIDMap.has(e.shape.uuid))return void console.log("Attempted to move the shape order of an unknown shape");if(!r.layerManager.hasLayer(e.shape.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.shape.layer}`);const t=r.layerManager.UUIDMap.get(e.shape.uuid),i=r.layerManager.getLayer(t.layer);i.moveShapeOrder(t,e.index,!1)}),s.socket.on("Shape.Layer.Change",e=>{const t=r.layerManager.UUIDMap.get(e.uuid);void 0!==t&&t.moveLayer(e.layer,!1)}),s.socket.on("Shape.Update",e=>{l.gameManager.updateShape(e)}),s.socket.on("Temp.Clear",e=>{e.forEach(e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown temporary shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.UUIDMap.get(e.uuid);r.layerManager.getLayer(e.layer).removeShape(t,!1)})}),s.socket.on("Labels.Set",e=>{for(const t of e)c.gameStore.addLabel(t)}),s.socket.on("Label.Visibility.Set",e=>{c.gameStore.setLabelVisibility(e)}),s.socket.on("Label.Add",e=>{c.gameStore.addLabel(e)}),s.socket.on("Label.Delete",e=>{c.gameStore.deleteLabel(e)}),s.socket.on("Labels.Filter.Add",e=>{c.gameStore.labelFilters.push(e),r.layerManager.invalidate()}),s.socket.on("Labels.Filter.Remove",e=>{const t=c.gameStore.labelFilters.indexOf(e);t>=0&&(c.gameStore.labelFilters.splice(t,1),r.layerManager.invalidate())}),s.socket.on("Labels.Filters.Set",e=>{c.gameStore.setLabelFilters(e)})}}); +//# sourceMappingURL=app-legacy.41dd580f.js.map \ No newline at end of file diff --git a/server/static/js/app-legacy.41dd580f.js.map b/server/static/js/app-legacy.41dd580f.js.map new file mode 100644 index 000000000..2c12f9ca3 --- /dev/null +++ b/server/static/js/app-legacy.41dd580f.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/game/shapes/text.ts","webpack:///./src/game/ui/selection/selection_info.vue?cd1b","webpack:///./src/game/ui/selection/shapecontext.vue","webpack:///./src/App.vue?5b85","webpack:///./src/core/components/modals/prompt.vue?d33d","webpack:///./src/core/components/colorpicker.vue?4d88","webpack:///./src/game/game.vue","webpack:///./src/game/api/socket.ts","webpack:///./src/assetManager/manager.vue?5633","webpack:///./src/game/ui/menu/asset_node.vue","webpack:///./src/game/ui/tools/selectcontext.vue?02dc","webpack:///./src/auth/login.vue","webpack:///./src/game/visibility/te/draw.ts","webpack:///./src/core/components/accordion.vue","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/game/ui/annotation.ts","webpack:///./src/game/ui/menu/menu.vue","webpack:///./src/core/components/contextmenu.vue","webpack:///./src/game/ui/note.vue?49b7","webpack:///./src/auth/login.vue?c159","webpack:///./src/game/shapes/utils.ts","webpack:///./src/core/components/modals/confirm.vue?e6fb","webpack:///./src/game/ui/tools/select.vue?aed4","webpack:///./src/game/ui/tools/select.vue?29b9","webpack:///./src/game/shapes/shape.ts","webpack:///./src/core/components/modals/prompt.vue?d457","webpack:///./src/game/ui/note.vue?a34d","webpack:///./src/game/ui/note.vue?23aa","webpack:///./src/core/components/modals/modal.vue?33b9","webpack:///./src/game/ui/tools/select.vue?49f9","webpack:///./src/game/ui/tools/utils.ts","webpack:///./src/game/ui/note.vue?a508","webpack:///./src/game/ui/labels.vue?15af","webpack:///./src/game/api/utils.ts","webpack:///./src/game/ui/menu/asset_node.vue?f519","webpack:///./src/core/components/contextmenu.vue?f03a","webpack:///./src/core/components/contextmenu.vue?7efa","webpack:///./src/assetManager/store.ts","webpack:///./src/core/components/contextmenu.vue?50e1","webpack:///./src/game/ui/selection/shapecontext.vue?1cf6","webpack:///./src/game/ui/tools/map.vue?284a","webpack:///./src/game/layers/grid.ts","webpack:///./src/store.ts","webpack:///./src/core/components/colorpicker.vue","webpack:///./src/auth/login.vue?3521","webpack:///./src/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/game.vue?b3a0","webpack:///./src/game/game.vue?f5c6","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","webpack:///./src/game/ui/menu/menu.vue?002b","webpack:///./src/game/ui/menu/menu.vue?9e9a","webpack:///./src/game/ui/selection/edit_dialog.vue?db09","webpack:///./src/game/ui/selection/edit_dialog.vue?6334","webpack:///./src/game/shapes/circle.ts","webpack:///./src/game/ui/tools/map.vue?a3ab","webpack:///./src/core/components/load.vue","webpack:///./src/game/ui/tools/pan.ts","webpack:///./src/game/ui/tools/selectcontext.vue","webpack:///./src/core/utils.ts","webpack:///./src/assetManager/contextMenu.vue","webpack:///./src/game/visibility/te/triag.ts","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/edit_dialog.vue?1206","webpack:///./src/core/components/modals/modal.vue?44ae","webpack:///./src/assetManager/socket.ts","webpack:///./src/game/ui/tools/filter.vue?ee60","webpack:///./src/core/components/accordion.vue?3e09","webpack:///./src/game/game.vue?5550","webpack:///./src/game/shapes/multiline.ts","webpack:///./src/game/ui/tools/draw.vue","webpack:///./src/game/ui/initiative.vue?497e","webpack:///./src/game/ui/initiative.vue?527e","webpack:///./src/game/utils.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?d0df","webpack:///./src/game/ui/note.vue?f9bd","webpack:///./src/game/ui/tools/draw.vue?b96d","webpack:///./src/game/shapes/line.ts","webpack:///./src/router.ts","webpack:///./src/game/ui/tools/tool.vue?d136","webpack:///./src/game/ui/tools/tools.vue","webpack:///./src/game/ui/tools/tool.vue?8ce3","webpack:///./src/game/shapes/asset.ts","webpack:///./src/game/visibility/te/cdt.ts","webpack:///./src/game/ui/tools/draw.vue?1261","webpack:///./src/game/layers/manager.ts","webpack:///./src/game/ui/initiative.vue?c7e1","webpack:///./src/game/ui/tools/createtoken_modal.vue","webpack:///./src/game/visibility/bvh/node.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?f918","webpack:///./src/game/events/keyboard.ts","webpack:///./src/assetManager/manager.vue?433f","webpack:///./src/game/ui/selection/shapecontext.vue?17f5","webpack:///./src/game/ui/tools/tools.vue?25b2","webpack:///./src/game/ui/selection/selection_info.vue?2310","webpack:///./src/core/components/modals/modal.vue?09d2","webpack:///./src/core/components/contextmenu.vue?a0a2","webpack:///./src/core/components/modals/prompt.vue?4e1b","webpack:///./src/core/components/accordion.vue?3d26","webpack:///./src/core/components/load.vue?4ab2","webpack:///./src/core/components/load.vue?0f87","webpack:///./src/game/ui/menu/menu.vue?8b23","webpack:///./src/game/shapes/boundingrect.ts","webpack:///./src/dashboard/main.vue?5e14","webpack:///./src/dashboard/main.vue?94d1","webpack:///./src/game/geom.ts","webpack:///./src/game/ui/menu/asset_node.vue?c55a","webpack:///./src/game/ui/menu/asset_node.vue?3fe9","webpack:///./src/game/ui/labels.vue?33c0","webpack:///./src/game/game.vue?5592","webpack:///./src/game/units.ts","webpack:///./src/game/ui/menu/menu.vue?ae57","webpack:///./src/core/components/colorpicker.vue?1682","webpack:///./src/game/ui/tools/selectcontext.vue?0020","webpack:///./src/game/ui/tools/selectcontext.vue?758c","webpack:///./src/game/visibility/te/tds.ts","webpack:///./src/game/visibility/bvh/bvh.ts","webpack:///./src/game/manager.ts","webpack:///./src/game/ui/menu/asset_node.vue?0d0e","webpack:///./src/core/components/load.vue?8cd0","webpack:///./src/game/ui/selection/selection_info.vue?7cd0","webpack:///./src/game/ui/selection/selection_info.vue?4f48","webpack:///./src/game/ui/selection/shapecontext.vue?4b66","webpack:///./src/game/ui/selection/shapecontext.vue?0558","webpack:///./src/game/ui/tools/filter.vue?5a71","webpack:///./src/game/ui/tools/filter.vue?0072","webpack:///./src/dashboard/main.vue?3f72","webpack:///./src/core/components/modals/confirm.vue","webpack:///./src/game/ui/tools/tools.vue?c704","webpack:///./src/game/ui/selection/shapecontext.vue?aac0","webpack:///./src/assetManager/contextMenu.vue?c131","webpack:///./src/assetManager/contextMenu.vue?a185","webpack:///./src/game/ui/tools/draw.vue?60f4","webpack:///./src/game/ui/labels.vue?6447","webpack:///./src/game/ui/labels.vue?86fc","webpack:///./src/assetManager/manager.vue?a11e","webpack:///./src/game/event-bus.ts","webpack:///./src/dashboard/main.vue?d5a9","webpack:///./src/game/shapes/rect.ts","webpack:///./src/game/game.vue?b235","webpack:///./src/game/ui/tools/filter.vue?b0f4","webpack:///./src/game/ui/tools/selectcontext.vue?6f66","webpack:///./src/game/layers/fowplayers.ts","webpack:///./src/game/layers/layer.ts","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/tools/filter.vue","webpack:///./src/game/ui/menu/menu.vue?904d","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","webpack:///./src/game/ui/tools/createtoken_modal.vue?6f0b","webpack:///./src/assetManager/manager.vue?765a","webpack:///./src/assetManager/manager.vue?a045","webpack:///./src/game/ui/tools/selectcontext.vue?d61f","webpack:///./src/auth/logout.ts","webpack:///./src/core/store.ts","webpack:///./src/main.ts","webpack:///./src/core/components/contextmenu.vue?f402","webpack:///./src/invitation/invitation.ts","webpack:///./src/core/components/modals/prompt.vue","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/game/ui/tools/map.vue?f96f","webpack:///./src/game/ui/tools/map.vue?7f60","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","webpack:///./src/game/ui/tools/createtoken_modal.vue?e7b2","webpack:///./src/game/ui/tools/createtoken_modal.vue?5fcc","webpack:///./src/game/ui/tools/tool.vue?6323","webpack:///./src/game/ui/tools/tool.vue?f5ba","webpack:///./src/core/components/modals/modal.vue?1854","webpack:///./src/core/components/modals/modal.vue?e329","webpack:///./src/game/game.vue?d01c","webpack:///./src/game/ui/tools/ruler.ts","webpack:///./src/core/components/modals/modal.vue","webpack:///./src/core/components/accordion.vue?4b34","webpack:///./src/game/visibility/te/pa.ts","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/game/ui/selection/edit_dialog.vue?9a84","webpack:///./src/core/components/modals/confirm.vue?f9ee","webpack:///./src/game/ui/initiative.vue?59ac","webpack:///./src/game/ui/tools/map.vue","webpack:///./src/core/components/accordion.vue?c7e6","webpack:///./src/core/components/accordion.vue?6229","webpack:///./src/game/ui/tools/filter.vue?77c9","webpack:///./src/core/components/modals/confirm.vue?e141","webpack:///./src/core/components/modals/confirm.vue?be48","webpack:///./src/assetManager/contextMenu.vue?1b1b","webpack:///./src/game/ui/tools/select.vue?b7fd","webpack:///./src/game/ui/tools/filter.vue?6447","webpack:///./src/game/ui/labels.vue?8d8f","webpack:///./src/game/shapes/polygon.ts","webpack:///./src/game/ui/tools/draw.vue?1866","webpack:///./src/game/ui/tools/draw.vue?03b4","webpack:///./src/core/components/colorpicker.vue?0fbc","webpack:///./src/core/components/colorpicker.vue?fb27","webpack:///./src/assetManager/manager.vue","webpack:///./src/game/ui/tools/tools.vue?fa4a","webpack:///./src/game/ui/tools/tool.vue","webpack:///./src/core/components/modals/prompt.vue?0a11","webpack:///./src/core/components/modals/prompt.vue?36e2","webpack:///./src/game/ui/initiative.vue?36c8","webpack:///./src/game/ui/selection/selection_info.vue","webpack:///./src/game/store.ts","webpack:///./src/core/components/colorpicker.vue?4d99","webpack:///./src/core/components/modals/confirm.vue?a22f","webpack:///./src/game/comm/conversion/aura.ts","webpack:///./src/game/ui/tools/tools.vue?47aa","webpack:///./src/game/ui/tools/tools.vue?e95e","webpack:///./src/assetManager/contextMenu.vue?1e9a","webpack:///./src/game/ui/note.vue","webpack:///./src/game/ui/initiative.vue","webpack:///./src/game/layers/utils.ts","webpack:///./src/game/ui/labels.vue","webpack:///./src/game/ui/selection/edit_dialog.vue?3800","webpack:///./src/auth/login.vue?e4a1","webpack:///./src/auth/login.vue?8f9e","webpack:///./src/game/ui/selection/selection_info.vue?5d62","webpack:///./src/game/api/events.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","app","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","boundingrect_1","shape_1","units_1","Text","Shape","[object Object]","position","text","font","angle","fillColour","strokeColour","uuid","super","this","type","assign","getBaseDict","points","refPoint","x","y","BoundingRect","ctx","draw","fillStyle","save","dest","g2l","translate","rotate","textAlign","getLines","map","line","fillText","restore","point","centerPoint","canvas","getBoundingBox","visibleInCanvas","resizePoint","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_674cf937_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_674cf937_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","__webpack_exports__","_shapecontext_vue_vue_type_template_id_759e5a8a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","__WEBPACK_IMPORT_KEY__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__","component","options","__file","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor2_1","tslib_1","__importDefault","vue_1","vue_class_component_1","vue_color_1","vue_property_decorator_1","ColorPicker","default","display","left","top","transparent","$refs","chromePicker","val","rgba","a","setPosition","disabled","$nextTick","$children","$el","focus","newColor","toRgbString","$emit","color","rect","getBoundingClientRect","right","innerWidth","bottom","innerHeight","__decorate","Prop","String","Boolean","components","chrome-picker","Chrome","_game_vue_vue_type_template_id_05b88da7_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_4__","socket_io_client_1","createConnection","route","socket","io","opts","query","params","creator","room","connect","location","protocol","host","autoConnect","contextMenu_vue_1","confirm_vue_1","prompt_vue_1","socket_1","store_1","utils_1","AssetManager","path","draggingSelection","folders","assetStore","files","selected","idMap","currentFolder","root","parentFolder","parent","undefined","firstSelectedFile","sel","file_hash","nextFolder","pop","clearSelected","emit","prompt","inode","target","includes","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","classList","contains","add","remove","moveInode","upload","document","getElementById","click","fls","CHUNK_SIZE","uuidv4","slices","ceil","size","fr","FileReader","readAsArrayBuffer","min","onload","e","directory","totalSlices","Prompt","ConfirmDialog","AssetContextMenu","to","from","next","disconnect","_asset_node_vue_vue_type_template_id_6d718094_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_login_vue_vue_type_template_id_bc30fc14_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","manager_1","tds_1","triag_1","drawPolygon","polygon","colour","dl","layerManager","getLayer","lineJoin","beginPath","strokeStyle","random","moveTo","g2lx","g2ly","lineTo","closePath","stroke","drawPolygonL","xx","local","yy","I","J","drl","constrained","drawPolygonT","tds","clear","logs","T","clearRect","ei","EdgeIterator","valid","collect","fromP","edge","first","vertices","ccw","second","toP","cw","Infinity","constraints","console","log","pos","triangles","isInfinite","po","arc","PI","fill","DP","DPL","DPT","_accordion_vue_vue_type_template_id_0bf2b7ba_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_accordion_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor","__importStar","circle_1","CircularToken","Circle","center","radius","fromDict","textBaseline","xs","calcFontScale","g2lz","ys","transform","mostReadable","toHexString","visible","gameStore","IS_DM","group","source","has_img","effects","index","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","height","getMaxHeight","w","zoomFactor","h","invalidate","_menu_vue_vue_type_template_id_aaf3f05e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_contextmenu_vue_vue_type_template_id_256dde9c___WEBPACK_IMPORTED_MODULE_0__","_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","asset_1","circulartoken_1","line_1","multiline_1","polygon_1","createShapeFromDict","shape","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","Polygon","v","asset","img","Image","src","startsWith","URL","pathname","Asset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","render","_vm","_h","$createElement","_c","_self","ref","staticRenderFns","aura_1","nameVisible","trackers","auras","labels","_owners","visionObstruction","movementObstruction","isToken","showHighlight","annotation","globalCompositeOperation","Map","_refPoint","delta","idx","entries","abs","prev","fromArray","vec","subtract","mid","multiply","normalize","skipLightUpdate","recalculate","self","obstructionIndex","visionBlockers","update","recalculateVision","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","recalculateMovement","ownedBy","ownedtokens","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","owners","name_visible","is_token","JSON","stringify","aurasFromServer","parse","bbox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","freeze","username","owner","oldValue","newValue","ownerIndex","addOwner","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","note","attrs","mask","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","title","select","staticStyle","font-size","directives","rawName","expression","domProps","change","updateNote","input","composing","$set","style","calcHeight","removeNote","_v","_e","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","selectcontext_vue_1","tool_vue_1","utils_2","utils_3","SelectOperations","SelectTool","showContextMenu","active","Noop","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","getPointIndex","l2gz","getRef","Resize","Drag","localRefPoint","GroupSelect","endPoint","og","direction","ogDelta","calculateDelta","asDict","redraw","temporary","resize","updateCursor","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","open","selectcontext","getPointOrientation","SelectContext","pa_1","done","visionMode","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","UUIDMap","blockerBBox","found","intersectsWithInner","ray","fromPoints","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","centerTriangle","PA_CDT","movement","locate","asArray","lt","triangle","checkTriangle","skip","endpoint","neighbours","_cw","_ccw","ix","intersection","isConstrained","orientation","Sign","LEFT_TURN","ZERO","newDelta","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","sendClientOptions","locationOptions","panX","panY","AssetNode","showImage","keys","filter","el","sort","alphSort","__files","b","toLowerCase","children","imageSource","querySelector","setDragImage","tabindex","blur","_t","vuex_module_decorators_1","AssetStore","VuexModule","Mutation","Module","dynamic","store","rootStore","namespaced","getModule","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","contextmenu_vue_1","event_bus_1","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","EventBus","ContextMenu","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","layer_1","GridLayer","Layer","doClear","drawGrid","gs","gridSize","gridColour","lineWidth","vuex_1","use","Store","_colorpicker_vue_vue_type_template_id_d32461a4_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","id","script","componentNormalizer","mouseleave","wheel","zoom","ready","mousedown","mouseup","mousemove","contextmenu","preventDefault","stopPropagation","dragover","drop","showUI","_l","class","layer-selected","selectedLayer","selectLayer","href","_s","interval","dot-width","dot-height","tooltip-dir","tooltip","formatter","zoomDisplay","toFixed","slider-style","border-radius","bg-style","background-color","box-shadow","process-style","model","callback","$$v","settings_1","te_1","FOWLayer","isVisionLayer","preFogShapes","virtualCanvas","createElement","vCtx","getContext","has","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","bb","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","computeVisibility","drawImage","fowLOS","preShape","ogComposite","getFogColour","fillRect","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","settings","locations","rm-list-dm","_m","enter","rm","transition","settingsClick","overflow-y","overflow-x","assets","createNote","openNote","notes","for","checked","Array","isArray","_i","$$a","$$el","$$c","$$i","modifiers","number","step","fowOpacity","_n","$forceUpdate","unitSize","changeVisionMode","$store","state","game","lazy","visionRangeMin","visionRangeMax","readonly","invitationCode","update:color","fowColour","rulerColour","text-decoration","changeLocation","createLocation","grid-column","owned","updateShape","opacity","grid-column-start","setToken","setVisionBlocker","setMovementBlocker","placeholder","updateOwner","gridColumnStart","removeOwner","tracker","removeTracker","updateAuraColour","updateAuraVisionSource","removeAura","label","category","removeLabel","openLabelManager","updateAnnotation","pow","targetX","targetY","round","diff","sqrt","baserect_1","MapTool","xCount","yCount","startPoint","clone","BaseRect","_load_vue_vue_type_template_id_ff095222___WEBPACK_IMPORTED_MODULE_0__","_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__","PanTool","panStart","distance","increasePanX","increasePanY","_selectcontext_vue_vue_type_template_id_44a31e42_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","main_1","replace","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","appendChild","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_606797b4___WEBPACK_IMPORTED_MODULE_0__","_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","edgeInfo","va","vb","ec","EdgeCirculator","indv","indexV","ri","infinite","vi","orient","COLLINEAR","collinearBetween","q","cPQ","cQR","compare","EQUAL","SMALLER","LARGER","px","py","qx","qy","rx","ry","pqx","pqy","prx","pry","det","determinant","maxX","maxY","aprX","aprY","eps","EPSILON","POSITIVE","NEGATIVE","a00","a01","a10","a11","hasInexactNegativeOrientation","sideOfOrientedCircle","perturb","sideOfOrientedCircleP","Error","p0","p1","p2","os","getOrientedSide","ON_ORIENTED_BOUNDARY","reverse","ON_NEGATIVE_SIDE","xyEqual","xySmaller","xyCompare","qpx","qpy","rpx","rpy","tpx","tpy","tqx","tqy","rqx","rqy","maxx","maxy","arpx","arpy","atqx","atqy","atpx","atpy","arqx","arqy","ON_POSITIVE_SIDE","segSegDoIntersectCrossing","p3","p4","RIGHT_TURN","segSegDoIntersectContained","pa","pb","pc","pd","getIntersectionType","intersectionType","IntersectionType","POINT","NO_INTERSECTION","getLine","doIntersect","l1","l2","info","getIntersectionTypeLine","la","lb","denom","nom1","nom2","A1","A2","B1","B2","nextUp","MAX_VALUE","MIN_VALUE","ulp","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_23de098e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_23de098e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","destination","setRoot","folder","child","set","accordion_vue_1","FilterTool","cat","localeCompare","initalValues","labelFilters","f","categories","toggleUnlabeledFilter","_","accordion","Accordion","initialValues","updateCategory","overall","items","indeterminate","item","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_points","minx","miny","lineCap","_draw_vue_vue_type_template_id_639cd890_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","fakeSetData","updateOrder","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","notAllowed","owns","syncInitiative","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","updateTurn","nextTurn","opposite","zoomValue","exp","colorpicker_vue_1","modal_vue_1","CreateTokenModal","borderColour","updatePreview","Watch","color-picker","computed","mapState","NoteDialog","textarea","scrollHeight","then","DrawTool","brushHelper","ruler","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","_vertices","pushBrushBack","lastPoint","finaliseShape","axios_1","vue_router_1","manager_vue_1","login_vue_1","logout_1","load_vue_1","main_vue_1","game_vue_1","invitation_1","router","base","routes","redirect","meta","auth","template","beforeEach","coreStore","initialized","matched","record","authenticated","response","setAuthenticated","setUsername","setInitialized","catch","error","Tool","detailRight","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","onDeselect","onSelect","_tools_vue_vue_type_template_id_cf33581e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","topleft","CDT","TDS","insert","insertConstraintV","stack","markConstraint","intersectionInfo","findIntersectedFaces","triangulateHole","intersectedFaces","listAB","listBA","edges","triangulateHole2","propagatingFlipE","triangulateHalfHole","fl","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","BoundingBox","dilate","overlaps","removeConstrainedEdge","dimension","indf","locateInfo","iLocate","insertb","li","flipAround","propagatingFlip","depth","isFlipable","maxDepth","ni","flip","e1","e2","uid","eni","eI","edgeSet","lessEdge","indn","ed","tt","ii","u","t1","t2","t3","i3","t4","i4","insertInConstrainedEdge","LocateType","EDGE","insertc","updateConstraintsIncident","VERTEX","clearConstraintsIncident","updateConstraintsOpposite","c1","c2","fc","FaceCirculator","cwi","ccwi","insertFirst","finiteVertex","insertSecond","OUTSIDE_AFFINE_HULL","insertOutsideAffineHull","OUTSIDE_CONVEX_HULL","insertOutsideConvexHull","insertInEdge","FACE","insertInFace","insertDimUp","_infinite","conform","finiteEdge","COUNTERCLOCKWISE","insertOutsideConvexHull2","ccwlist","cwlist","th","marchLocate1D","marchLocate2D","ff","iv","pqt","Triangle","leftFirst","o0","o1","o2","sum","nTurns","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","LayerManager","drawLoop","requestAnimationFrame","addLayer","globalAlpha","getSelection","image","getData","l2gx","l2gy","lm","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_createtoken_modal_vue_vue_type_template_id_73816298_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","BoundingNode","nPrimitives","LeafNode","firstPrimOffset","InteriorNode","union","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","utils_4","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","onKeyDown","keyCode","hasSelection","toggleUI","clipboard","setClipboard","clip","oldTrackers","newTracker","oldAuras","newAura","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","shapecontext_vue_1","createtoken_modal_vue_1","draw_vue_1","filter_vue_1","map_vue_1","pan_1","select_vue_1","manager_2","ruler_1","Tools","currentTool","tools","dmTools","currentToolComponent","visibleTools","tagName","targetTool","button","buttons","annotations","gameManager","annotationManager","setActiveText","select-tool","pan-tool","draw-tool","ruler-tool","RulerTool","map-tool","filter-tool","shape-menu","createtoken-dialog","watch","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","question","answer","resolve","reject","Promise","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_style_index_0_id_0bf2b7ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_style_index_0_id_0bf2b7ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","message","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","botRight","vector","other","xmin","xmax","ymin","ymax","botright","dirIsNeg","txmin","getDiagCorner","txmax","tymin","tymax","tMax","coreVisible","joined","submit","createRoom","newSessionName","tag","getPointDistance","Point","scale","atan2","maxT","toggle","mouseover","hash","mouseout","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_style_index_0_id_4697341e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_style_index_0_id_4697341e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","vue_slider_component_1","lodash_1","initiative_vue_1","labels_vue_1","menu_vue_1","note_vue_1","selection_info_vue_1","tools_vue_1","keyboard_1","mouse_1","Game","manager","updateZoom","newZoomDisplay","zoomLocation","addEventListener","resizeWindow","removeEventListener","throttle","scrollZoom","setWidth","setHeight","confirm","dropAsset","tool-bar","selection-info","prompt-dialog","confirm-dialog","menu-bar","initiative-dialog","zoom-slider","note-dialog","label-dialog","obj","z","l2gr","asset_node_vue_1","MenuBar","setUseGrid","setFullFOW","setFOWOpacity","setLineOfSight","setUnitSize","setGridSize","setGridColour","setFOWColour","setRulerColour","setVisionRangeMin","setVisionRangeMax","nextElementSibling","newNote","setVisionMode","asset-node","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","bringPlayers","createToken","showInitiative","_INFINITE_VERTEX","LineFaceState","newPoint","INFINITE","_counter","vertex","A","sign","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","dir","UNDEFINED","_tr","ic","vt","vr","pqr","VERTEX_VERTEX","VERTEX_EDGE","EDGE_VERTEX","EDGE_EDGE","createVertex","addVertex","infiniteVertex","n0","trig","t0","i0","setAdjacency","deleteList","copy","neighbour","lfit","reorient","vCW","vCCW","tri","bl","bli","vv","g","x1","y1","dist","node_1","BoundingVolume","totalNodes","buildData","orderedPrims","nodes","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","localPos","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_6d718094_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_6d718094_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","LoadComponent","openEditDialog","changeValue","maxvalue","getLayers","setLayer","moveToBack","moveToFront","getInitiativeWord","--detailRight","--detailArrow","showArrow","selectionupdate","updateSelection","registerHooks","Dashboard","vm","err","post","$router","_confirm_vue_vue_type_template_id_1883e207_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_cf33581e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_cf33581e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","rename","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","margin","search","selectLabel","lower-opacity","toggleVisibility","deleteLabel","trim","newCategory","newName","addLabel","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_05b88da7_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_05b88da7_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","FOWPlayersLayer","skipPlayerFOW","maxLength","tokenId","_a","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","filterNoLabel","destinationIndex","oldIdx","deltaY","_filter_vue_vue_type_template_id_847e7ec4_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_filter_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","topright","botleft","mx","my","_select_vue_vue_type_template_id_048b3482___WEBPACK_IMPORTED_MODULE_0__","_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_main_vue_vue_type_template_id_61eb1455_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","moveDrag","stopDrag","multiple","hidden","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","inode-selected","cm","startDrag","createtokendialog","Logout","CoreStore","init","App_vue_1","router_1","config","productionTip","devtools","performance","$mount","props","Initiative","code","sessionUrl","_prompt_vue_vue_type_template_id_0602c2e6_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","draw_1","drawt","drawTEContour","Q","rawOutput","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","_edit_dialog_vue_vue_type_template_id_23de098e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","tempFill","Login","password","$route","statusText","span","modal-mask","dialog-mask","dragOver","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","diffsign","xdiff","ydiff","xmid","ymid","_modal_vue_vue_type_template_id_12ed61ba_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","cdt_1","triangulate","partial","cdt","insertConstraint","vision","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","EditDialog","$off","addEmpty","hadAnnotation","an","yes","no","ok","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_af4dc61a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_af4dc61a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_map_vue_vue_type_template_id_2104f147___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","toggleDisplay","toggleCategory","toggleSelection","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_1_id_847e7ec4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_1_id_847e7ec4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","deny","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","LabelManager","user","option-selected","max-width","currentTarget","closePicker","z-index","updateColor","_manager_vue_vue_type_template_id_5b0def98___WEBPACK_IMPORTED_MODULE_0__","_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_tool_vue_vue_type_template_id_1e034b42___WEBPACK_IMPORTED_MODULE_0__","_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","keyup","_k","vuedraggable_1","setTurn","getActor","actorId","order","show","option","effectIndex","syncEffect","_selection_info_vue_vue_type_template_id_674cf937_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","bvh_1","GameStore","selectedLayerIndex","boardInitialized","roomName","roomCreator","locationName","vision_mode","filters","updatedLayers","Set","isDM","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","vision_min_range","vision_max_range","full_fow","fow_opacity","fow_los","actualNote","context","commit","Action","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_d32461a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_d32461a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","vision_source","refInFor","tool-selected","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_note_vue_vue_type_template_id_7a3669fd_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_initiative_vue_vue_type_template_id_af4dc61a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","fow_1","fowplayers_1","grid_1","createLayer","layerInfo","zIndex","player_editable","setShapes","_labels_vue_vue_type_template_id_4697341e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_labels_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","focusin","focusout","login","autocomplete","required","visibility","register","edit_dialog_vue_1","SelectionInfo","editDialog","ogValue","isNaN","edit-dialog","setRoomName","setRoomCreator","setInvitationCode","setDM","grid_colour","fow_colour","ruler_colour","setPanX","pan_x","setPanY","pan_y","setZoomDisplay","zoom_factor","active_layer","setLocationName","setCenterPosition","setAssets","locationInfo","setLocations","innerHTML","resetLayerInfo","reset","setBoardInitialized","realShape","setLabelVisibility","setLabelFilters"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAGAe,KAAAhB,GAEA,MAAAO,EAAAC,OACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,EAAA,GAKApB,EAAA,CACAqB,IAAA,GAGAZ,EAAA,GAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA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,OAAO4U,GAAG,uBAAyBlgB,IAC/BsM,EAAA0J,UAAUogD,mBAAmBp2D,KAEjCqM,EAAAf,OAAO4U,GAAG,YAAclgB,IACpBsM,EAAA0J,UAAUyvC,SAASzlD,KAEvBqM,EAAAf,OAAO4U,GAAG,eAAiBlgB,IACvBsM,EAAA0J,UAAUqvC,YAAYrlD,KAE1BqM,EAAAf,OAAO4U,GAAG,oBAAsBxb,IAC5B4H,EAAA0J,UAAU2sB,aAAajiC,KAAKgE,GAC5BsM,EAAAO,aAAasG,eAEjBxL,EAAAf,OAAO4U,GAAG,uBAAyBxb,IAC/B,MAAMkX,EAAMtP,EAAA0J,UAAU2sB,aAAa30B,QAAQtJ,GACvCkX,GAAO,IACPtP,EAAA0J,UAAU2sB,aAAajhC,OAAOka,EAAK,GACnC5K,EAAAO,aAAasG,gBAGrBxL,EAAAf,OAAO4U,GAAG,qBAAuBgxC,IAC7B5kD,EAAA0J,UAAUqgD,gBAAgBnF","file":"static/js/app-legacy.41dd580f.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2l } from \"@/game/units\";\n\nexport class Text extends Shape {\n type = \"text\";\n text: string;\n font: string;\n angle: number;\n constructor(\n position: GlobalPoint,\n text: string,\n font: string,\n angle?: number,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(position, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n this.angle = angle || 0;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n text: this.text,\n font: this.font,\n angle: this.angle,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(this.refPoint, 5, 5); // TODO: fix this bounding box\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.fillStyle = this.fillColour;\n ctx.save();\n const dest = g2l(this.refPoint);\n ctx.translate(dest.x, dest.y);\n ctx.rotate(this.angle);\n ctx.textAlign = \"center\";\n this.getLines(ctx).map(line => ctx.fillText(line.text, line.x, line.y));\n ctx.restore();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {}\n\n getMaxHeight(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const lineHeight = 30;\n return lineHeight * lines.length;\n }\n\n getMaxWidth(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const widths = lines.map(line => ctx.measureText(line.text).width);\n return Math.max(...widths);\n }\n\n private getLines(ctx: CanvasRenderingContext2D) {\n const lines = this.text.split(\"\\n\");\n const allLines: { text: string; x: number; y: number }[] = [];\n const maxWidth = ctx.canvas.width;\n const lineHeight = 30;\n const x = 0; // this.refPoint.x;\n let y = 0; // this.refPoint.y;\n\n for (const line of lines) {\n let targetLine = \"\";\n const words = line.split(\" \");\n for (const word of words) {\n const testLine = targetLine + word + \" \";\n const metrics = ctx.measureText(testLine);\n const testWidth = metrics.width;\n if (testWidth > maxWidth) {\n ctx.fillText(targetLine, x, y);\n allLines.push({ text: targetLine, x, y });\n targetLine = word + \" \";\n y += lineHeight;\n } else {\n targetLine = testLine;\n }\n }\n allLines.push({ text: targetLine, x, y });\n y += lineHeight;\n }\n return allLines;\n }\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=674cf937&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=674cf937&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"\nimport script from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"759e5a8a\",\n null\n \n)\n\ncomponent.options.__file = \"shapecontext.vue\"\nexport default component.exports","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Chrome } from \"vue-color\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component({\n components: {\n \"chrome-picker\": Chrome,\n },\n})\nexport default class ColorPicker extends Vue {\n @Prop(String) color!: string;\n @Prop(Boolean) disabled!: boolean;\n\n display = false;\n left = 0;\n top = 0;\n transparent = false;\n\n mounted() {\n this.transparent = (this.$refs.chromePicker).val.rgba.a === 0;\n this.setPosition();\n }\n\n open() {\n if (this.display || this.disabled) return; // click on the picker itself\n this.setPosition();\n this.display = true;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n updateColor(value: { rgba: { r: number; g: number; b: number; a: number } }) {\n this.transparent = value.rgba.a === 0;\n const newColor = tinycolor(value.rgba).toRgbString();\n this.$emit(\"update:color\", newColor);\n this.$emit(\"input\", newColor);\n }\n closePicker() {\n this.display = false;\n this.$emit(\"change\", this.color);\n }\n setPosition() {\n const rect = this.$el.getBoundingClientRect();\n // 224 is the width of the picker, 242 the height\n if (rect.right + 224 > window.innerWidth) this.left = rect.left - 224;\n else this.left = rect.right;\n if (rect.bottom + 242 > window.innerHeight) this.top = rect.top - 242;\n else this.top = rect.bottom;\n }\n}\n","import { render, staticRenderFns } from \"./game.vue?vue&type=template&id=05b88da7&scoped=true&\"\nimport script from \"./game.vue?vue&type=script&lang=ts&\"\nexport * from \"./game.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./game.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./game.vue?vue&type=style&index=1&id=05b88da7&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"05b88da7\",\n null\n \n)\n\ncomponent.options.__file = \"game.vue\"\nexport default component.exports","import io from \"socket.io-client\";\nimport { Route } from \"vue-router\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/planarally\", { autoConnect: false });\n\nexport function createConnection(route: Route) {\n socket.io.opts.query = `user=${route.params.creator}&room=${route.params.room}`;\n socket.connect();\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport AssetContextMenu from \"@/assetManager/contextMenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { Asset } from \"@/core/comm/types\";\nimport { uuidv4 } from \"@/core/utils\";\n\n@Component({\n components: {\n Prompt,\n ConfirmDialog,\n AssetContextMenu,\n },\n beforeRouteEnter(to, from, next) {\n socket.connect();\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class AssetManager extends Vue {\n path: number[] = [];\n draggingSelection = false;\n\n get folders(): number[] {\n return assetStore.folders;\n }\n\n get files(): number[] {\n return assetStore.files;\n }\n\n get selected(): number[] {\n return assetStore.selected;\n }\n\n get idMap() {\n return assetStore.idMap;\n }\n\n get currentFolder(): number {\n if (this.path.length) return this.path[this.path.length - 1];\n return assetStore.root;\n }\n get parentFolder(): number {\n let parent = this.path[this.path.length - 2];\n if (parent === undefined) parent = assetStore.root;\n return parent;\n }\n get firstSelectedFile(): Asset | null {\n for (const sel of assetStore.selected) {\n if (assetStore.idMap.get(sel)!.file_hash) {\n return assetStore.idMap.get(sel)!;\n }\n }\n return null;\n }\n changeDirectory(nextFolder: number) {\n if (nextFolder < 0) this.path.pop();\n else this.path.push(nextFolder);\n assetStore.clearSelected();\n socket.emit(\"Folder.Get\", this.currentFolder);\n }\n createDirectory() {\n const name = window.prompt(\"New folder name\");\n if (name !== null) {\n socket.emit(\"Folder.Create\", { name, parent: this.currentFolder });\n }\n }\n moveInode(inode: number, target: number) {\n if (assetStore.files.includes(inode)) assetStore.files.splice(assetStore.files.indexOf(inode), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(inode), 1);\n assetStore.idMap.delete(inode);\n socket.emit(\"Inode.Move\", { inode, target });\n }\n select(event: MouseEvent, inode: number) {\n if (event.shiftKey && assetStore.selected.length > 0) {\n const inodes = [...assetStore.files, ...assetStore.folders];\n const start = inodes.indexOf(assetStore.selected[assetStore.selected.length - 1]);\n const end = inodes.indexOf(inode);\n for (let i = start; i !== end; start < end ? i++ : i--) {\n if (i === start) continue;\n assetStore.selected.push(inodes[i]);\n }\n assetStore.selected.push(inodes[end]);\n } else {\n if (!event.ctrlKey) {\n assetStore.clearSelected();\n }\n assetStore.selected.push(inode);\n }\n }\n startDrag(event: DragEvent, file: number) {\n if (event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"ittyHack\");\n event.dataTransfer.dropEffect = \"move\";\n if (!assetStore.selected.includes(file)) assetStore.selected.push(file);\n this.draggingSelection = true;\n }\n moveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.add(\"inode-selected\");\n }\n leaveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.remove(\"inode-selected\");\n }\n stopDrag(event: DragEvent, target: number) {\n (event.target).classList.remove(\"inode-selected\");\n if (this.draggingSelection) {\n if (\n (target === assetStore.root || assetStore.folders.includes(target)) &&\n !assetStore.selected.includes(target)\n ) {\n for (const inode of assetStore.selected) {\n this.moveInode(inode, target);\n }\n }\n assetStore.clearSelected();\n } else if (event.dataTransfer && event.dataTransfer.files.length > 0) {\n this.upload(event.dataTransfer.files, target);\n }\n this.draggingSelection = false;\n }\n prepareUpload() {\n document.getElementById(\"files\")!.click();\n }\n upload(fls?: FileList, target?: number) {\n const files = (document.getElementById(\"files\")!).files;\n if (fls === undefined) {\n if (files) fls = files;\n else return;\n }\n if (target === undefined) target = this.currentFolder;\n const CHUNK_SIZE = 100000;\n for (const file of fls) {\n const uuid = uuidv4();\n const slices = Math.ceil(file.size / CHUNK_SIZE);\n for (let slice = 0; slice < slices; slice++) {\n const fr = new FileReader();\n fr.readAsArrayBuffer(\n file.slice(\n slice * CHUNK_SIZE,\n slice * CHUNK_SIZE + Math.min(CHUNK_SIZE, file.size - slice * CHUNK_SIZE),\n ),\n );\n fr.onload = e => {\n socket.emit(\"Asset.Upload\", {\n name: file.name,\n directory: target,\n data: fr.result,\n slice,\n totalSlices: slices,\n uuid,\n });\n };\n }\n }\n }\n}\n","import { render, staticRenderFns } from \"./asset_node.vue?vue&type=template&id=6d718094&scoped=true&\"\nimport script from \"./asset_node.vue?vue&type=script&lang=ts&\"\nexport * from \"./asset_node.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./asset_node.vue?vue&type=style&index=0&id=6d718094&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6d718094\",\n null\n \n)\n\ncomponent.options.__file = \"asset_node.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"\nimport script from \"./login.vue?vue&type=script&lang=ts&\"\nexport * from \"./login.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"bc30fc14\",\n null\n \n)\n\ncomponent.options.__file = \"login.vue\"\nexport default component.exports","import { layerManager } from \"@/game/layers/manager\";\nimport { g2lx, g2ly } from \"@/game/units\";\nimport { EdgeIterator, TDS } from \"./tds\";\nimport { ccw, cw } from \"./triag\";\n\nexport function drawPolygon(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) {\n ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nexport function drawPolygonL(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(polygon[0][0], polygon[0][1]);\n for (const point of polygon) {\n ctx.lineTo(point[0], point[1]);\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction x(xx: number, local: boolean) {\n if (local) return xx;\n else return g2lx(xx);\n}\n\nfunction y(yy: number, local: boolean) {\n if (local) return yy;\n else return g2ly(yy);\n}\n\nlet I = 0;\nlet J = 0;\n\nfunction drl(ctx: CanvasRenderingContext2D, from: number[], to: number[], constrained: boolean, local: boolean) {\n // J++;\n // if (constrained) {\n // I++;\n // console.log(\"*\", from, to);\n // } else {\n // console.log(\" \", from, to);\n // }\n ctx.beginPath();\n ctx.strokeStyle = constrained ? \"rgba(255, 0, 0, 0.30)\" : \"rgba(0, 0, 0, 0.30)\";\n ctx.moveTo(x(from[0], local), y(from[1], local));\n ctx.lineTo(x(to[0], local), y(to[1], local));\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction drawPolygonT(tds: TDS, local = true, clear = true, logs: 0 | 1 | 2 = 0) {\n I = 0;\n J = 0;\n let T = 0;\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n if (clear) ctx.clearRect(0, 0, 2000, 1000);\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n const ei = new EdgeIterator(tds);\n while (ei.valid) {\n ei.next();\n ei.collect();\n }\n ei.collect();\n do {\n const fromP = ei.edge.first!.vertices[ccw(ei.edge.second)]!.point!;\n const toP = ei.edge.first!.vertices[cw(ei.edge.second)]!.point!;\n if (logs > 0) {\n if (fromP[0] === -Infinity || toP[0] === -Infinity) {\n ei.next();\n continue;\n }\n J++;\n if (ei.edge.first!.constraints[ei.edge.second]) {\n I++;\n if (logs === 2) console.log(`Edge: (*) ${fromP} > ${toP}`);\n } else if (logs === 2) console.log(`Edge: ${fromP} > ${toP}`);\n }\n do {\n ei.next();\n ei.collect();\n } while (ei.valid);\n } while (ei.pos !== null);\n for (const t of tds.triangles) {\n if (t.isInfinite()) continue;\n T++;\n const po = [];\n ctx.fillStyle = \"red\";\n if (t.vertices[0] !== undefined) {\n po.push(t.vertices[0]!.point);\n ctx.beginPath();\n ctx.arc(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[1] !== undefined) {\n po.push(t.vertices[1]!.point);\n ctx.arc(x(t.vertices[1]!.point![0], local), y(t.vertices[1]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[2] !== undefined) {\n po.push(t.vertices[2]!.point);\n ctx.arc(x(t.vertices[2]!.point![0], local), y(t.vertices[2]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (logs === 2) console.log(\"[T] \", ...po, t.constraints);\n\n ctx.moveTo(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local));\n if (t.vertices[0] !== undefined && t.vertices[1] !== undefined)\n drl(ctx, t.vertices[0]!.point!, t.vertices[1]!.point!, t.constraints[2], local);\n if (t.vertices[1] !== undefined && t.vertices[2] !== undefined)\n drl(ctx, t.vertices[1]!.point!, t.vertices[2]!.point!, t.constraints[0], local);\n if (t.vertices[2] !== undefined && t.vertices[0] !== undefined)\n drl(ctx, t.vertices[2]!.point!, t.vertices[0]!.point!, t.constraints[1], local);\n }\n if (logs > 0) {\n console.log(`Edges: ${I}/${J}`);\n console.log(`Faces: ${T}`);\n }\n}\n\n(window).DP = drawPolygon;\n(window).DPL = drawPolygonL;\n(window).DPT = drawPolygonT;\n","import { render, staticRenderFns } from \"./accordion.vue?vue&type=template&id=0bf2b7ba&scoped=true&\"\nimport script from \"./accordion.vue?vue&type=script&lang=ts&\"\nexport * from \"./accordion.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./accordion.vue?vue&type=style&index=0&id=0bf2b7ba&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0bf2b7ba\",\n null\n \n)\n\ncomponent.options.__file = \"accordion.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"","import * as tinycolor from \"tinycolor2\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerCircularToken } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lz } from \"@/game/units\";\n\nexport class CircularToken extends Circle {\n type = \"circulartoken\";\n text: string;\n font: string;\n constructor(\n center: GlobalPoint,\n r: number,\n text: string,\n font: string,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(center, r, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n }\n asDict(): ServerCircularToken {\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n text: this.text,\n font: this.font,\n });\n }\n fromDict(data: ServerCircularToken) {\n super.fromDict(data);\n this.r = data.radius;\n this.text = data.text;\n this.font = data.font;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.save();\n const dest = g2l(this.center());\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, g2lz(this.r), g2lz(this.r));\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name === \"\" || this.name === \"Unknown shape\" ? this.text : this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\n\nexport class AnnotationManager {\n annotationText: Text;\n annotationRect: Rect;\n layer: Layer | undefined;\n shown: boolean = false;\n\n constructor() {\n const origin = new GlobalPoint(0, 0);\n this.annotationText = new Text(origin, \"\", \"bold 20px serif\", 0, \"rgba(230, 230, 230, 1)\");\n this.annotationRect = new Rect(origin, 0, 0, \"rgba(0, 0, 0, 0.6)\");\n }\n\n setActiveText(text: string) {\n if (this.layer === undefined) {\n if (layerManager.hasLayer(\"draw\")) {\n this.layer = layerManager.getLayer(\"draw\")!;\n this.layer.addShape(this.annotationRect, false);\n this.layer.addShape(this.annotationText, false);\n } else {\n console.warn(\"There is no draw layer to draw annotations on!\");\n return;\n }\n }\n this.shown = text !== \"\";\n this.annotationText.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2, 50));\n this.annotationText.text = text;\n const width = this.shown ? this.annotationText.getMaxWidth(this.layer.ctx) + 10 : 0;\n const height = this.shown ? this.annotationText.getMaxHeight(this.layer.ctx) + 10 : 0;\n this.annotationRect.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2 - width / 2, 30));\n this.annotationRect.w = width / gameStore.zoomFactor;\n this.annotationRect.h = height / gameStore.zoomFactor;\n this.layer.invalidate(true);\n }\n}\n","import { render, staticRenderFns } from \"./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"\nimport script from \"./menu.vue?vue&type=script&lang=ts&\"\nexport * from \"./menu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"aaf3f05e\",\n null\n \n)\n\ncomponent.options.__file = \"menu.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./contextmenu.vue?vue&type=template&id=256dde9c&\"\nimport script from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./contextmenu.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextmenu.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"","import {\n ServerAsset,\n ServerCircle,\n ServerCircularToken,\n ServerLine,\n ServerMultiLine,\n ServerPolygon,\n ServerRect,\n ServerShape,\n ServerText,\n} from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { Text } from \"@/game/shapes/text\";\nimport { Polygon } from \"./polygon\";\n\nexport function createShapeFromDict(shape: ServerShape) {\n let sh: Shape;\n\n // A fromJSON and toJSON on Shape would be cleaner but ts does not allow for static abstracts so yeah.\n\n // Shape Type specifics\n\n const refPoint = new GlobalPoint(shape.x, shape.y);\n if (shape.type_ === \"rect\") {\n const rect = shape;\n sh = new Rect(refPoint, rect.width, rect.height, rect.fill_colour, rect.stroke_colour, rect.uuid);\n } else if (shape.type_ === \"circle\") {\n const circ = shape;\n sh = new Circle(refPoint, circ.radius, circ.fill_colour, circ.stroke_colour, circ.uuid);\n } else if (shape.type_ === \"circulartoken\") {\n const token = shape;\n sh = new CircularToken(\n refPoint,\n token.radius,\n token.text,\n token.font,\n token.fill_colour,\n token.stroke_colour,\n token.uuid,\n );\n } else if (shape.type_ === \"line\") {\n const line = shape;\n sh = new Line(refPoint, new GlobalPoint(line.x2, line.y2), line.line_width, line.stroke_colour, line.uuid);\n } else if (shape.type_ === \"multiline\") {\n const multiline = shape;\n sh = new MultiLine(\n refPoint,\n multiline.points.map(p => new GlobalPoint(p.x, p.y)),\n multiline.line_width,\n multiline.stroke_colour,\n multiline.uuid,\n );\n } else if (shape.type_ === \"polygon\") {\n const polygon = shape;\n sh = new Polygon(\n refPoint,\n polygon.vertices.map(v => new GlobalPoint(v.x, v.y)),\n polygon.fill_colour,\n polygon.stroke_colour,\n polygon.uuid,\n );\n } else if (shape.type_ === \"text\") {\n const text = shape;\n sh = new Text(refPoint, text.text, text.font, text.angle, text.fill_colour, text.stroke_colour, text.uuid);\n } else if (shape.type_ === \"assetrect\") {\n const asset = shape;\n const img = new Image(asset.width, asset.height);\n if (asset.src.startsWith(\"http\")) img.src = new URL(asset.src).pathname;\n else img.src = asset.src;\n sh = new Asset(img, refPoint, asset.width, asset.height, asset.uuid);\n img.onload = () => {\n layerManager.getLayer(shape.layer)!.invalidate(false);\n };\n } else {\n return undefined;\n }\n sh.fromDict(shape);\n return sh;\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SelectContext',{ref:\"selectcontext\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=template&id=048b3482&\"","import tinycolor from \"tinycolor2\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { aurasFromServer, aurasToServer } from \"@/game/comm/conversion/aura\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport abstract class Shape {\n // Used to create class instance from server shape data\n abstract readonly type: string;\n // The unique ID of this shape\n readonly uuid: string;\n // The layer the shape is currently on\n layer!: string;\n\n // A reference point regarding that specific shape's structure\n protected _refPoint: GlobalPoint;\n\n // Fill colour of the shape\n fillColour: string = \"#000\";\n strokeColour: string = \"rgba(0,0,0,0)\";\n // The optional name associated with the shape\n name = \"Unknown shape\";\n nameVisible = true;\n\n // Associated trackers/auras/owners\n trackers: Tracker[] = [];\n auras: Aura[] = [];\n labels: Label[] = [];\n protected _owners: string[] = [];\n\n // Block light sources\n visionObstruction = false;\n // Prevent shapes from overlapping with this shape\n movementObstruction = false;\n // Does this shape represent a playable token\n isToken = false;\n // Show a highlight box\n showHighlight = false;\n\n // Mouseover annotation\n annotation: string = \"\";\n\n // Draw modus to use\n globalCompositeOperation: string = \"source-over\";\n\n // Additional options for specialized uses\n options: Map = new Map();\n\n constructor(refPoint: GlobalPoint, fillColour?: string, strokeColour?: string, uuid?: string) {\n this._refPoint = refPoint;\n this.uuid = uuid || uuidv4();\n if (fillColour !== undefined) this.fillColour = fillColour;\n if (strokeColour !== undefined) this.strokeColour = strokeColour;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n this._refPoint = point;\n }\n\n abstract getBoundingBox(): BoundingRect;\n\n // If inWorldCoord is\n abstract contains(point: GlobalPoint): boolean;\n\n abstract center(): GlobalPoint;\n abstract center(centerPoint: GlobalPoint): void;\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n // for (const aura of this.auras) {\n // if (aura.value > 0) {\n // const auraCircle = new Circle(this.center(), aura.value);\n // if (auraCircle.visibleInCanvas(canvas)) return true;\n // }\n // }\n return false;\n }\n\n // Code to snap a shape to the grid\n // This is shape dependent as the shape refPoints are shape specific in\n abstract snapToGrid(): void;\n abstract resizeToGrid(): void;\n abstract resize(resizePoint: number, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n getPointIndex(p: GlobalPoint, delta = 0): number {\n for (const [idx, point] of this.points.entries()) {\n if (Math.abs(p.x - point[0]) <= delta && Math.abs(p.y - point[1]) <= delta) return idx;\n }\n return -1;\n }\n\n getPointOrientation(i: number): Vector {\n const prev = GlobalPoint.fromArray(this.points[(this.points.length + i - 1) % this.points.length]);\n const point = GlobalPoint.fromArray(this.points[i]);\n const next = GlobalPoint.fromArray(this.points[(i + 1) % this.points.length]);\n const vec = next.subtract(prev);\n const mid = prev.add(vec.multiply(0.5));\n return point.subtract(mid).normalize();\n }\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources(recalculate = true) {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let update = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n update = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateVision();\n\n // Check if the visionsource auras are in the gameManager\n this.auras.forEach(au => {\n const ls = gameStore.visionSources;\n const i = ls.findIndex(o => o.aura === au.uuid);\n if (au.visionSource && i === -1) {\n ls.push({ shape: self.uuid, aura: au.uuid });\n } else if (!au.visionSource && i >= 0) {\n ls.splice(i, 1);\n }\n });\n // Check if anything in the gameManager referencing this shape is in fact still a visionsource\n for (let i = gameStore.visionSources.length - 1; i >= 0; i--) {\n const ls = gameStore.visionSources[i];\n if (ls.shape === self.uuid) {\n if (!self.auras.some(a => a.uuid === ls.aura && a.visionSource)) gameStore.visionSources.splice(i, 1);\n }\n }\n }\n\n setMovementBlock(blocksMovement: boolean, recalculate = true) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n let update = false;\n if (this.movementObstruction && obstructionIndex === -1) {\n gameStore.movementblockers.push(this.uuid);\n update = true;\n } else if (!this.movementObstruction && obstructionIndex >= 0) {\n gameStore.movementblockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateMovement();\n }\n\n setIsToken(isToken: boolean) {\n this.isToken = isToken;\n if (this.ownedBy()) {\n const i = gameStore.ownedtokens.indexOf(this.uuid);\n if (this.isToken && i === -1) gameStore.ownedtokens.push(this.uuid);\n else if (!this.isToken && i >= 0) gameStore.ownedtokens.splice(i, 1);\n }\n }\n\n abstract asDict(): ServerShape;\n getBaseDict(): ServerShape {\n return {\n type_: this.type,\n uuid: this.uuid,\n x: this.refPoint.x,\n y: this.refPoint.y,\n layer: this.layer,\n draw_operator: this.globalCompositeOperation,\n movement_obstruction: this.movementObstruction,\n vision_obstruction: this.visionObstruction,\n auras: aurasToServer(this.auras),\n trackers: this.trackers,\n labels: this.labels,\n owners: this._owners,\n fill_colour: this.fillColour,\n stroke_colour: this.strokeColour,\n name: this.name,\n name_visible: this.nameVisible,\n annotation: this.annotation,\n is_token: this.isToken,\n options: JSON.stringify([...this.options]),\n };\n }\n fromDict(data: ServerShape) {\n this.layer = data.layer;\n this.globalCompositeOperation = data.draw_operator;\n this.movementObstruction = data.movement_obstruction;\n this.visionObstruction = data.vision_obstruction;\n this.auras = aurasFromServer(data.auras);\n this.trackers = data.trackers;\n this.labels = data.labels;\n this._owners = data.owners;\n this.isToken = data.is_token;\n this.nameVisible = data.name_visible;\n if (data.annotation) this.annotation = data.annotation;\n if (data.name) this.name = data.name;\n if (data.options) this.options = new Map(JSON.parse(data.options));\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n if (this.globalCompositeOperation !== undefined) ctx.globalCompositeOperation = this.globalCompositeOperation;\n else ctx.globalCompositeOperation = \"source-over\";\n if (this.showHighlight) {\n const bbox = this.getBoundingBox();\n ctx.strokeStyle = \"red\";\n ctx.strokeRect(g2lx(bbox.topLeft.x) - 5, g2ly(bbox.topLeft.y) - 5, g2lz(bbox.w) + 10, g2lz(bbox.h) + 10);\n }\n }\n\n drawAuras(ctx: CanvasRenderingContext2D) {\n for (const aura of this.auras) {\n if (aura.value === 0 && aura.dim === 0) return;\n ctx.beginPath();\n\n const loc = g2l(this.center());\n const innerRange = g2lr(aura.value + aura.dim);\n\n if (aura.dim === 0) ctx.fillStyle = aura.colour;\n else {\n const gradient = ctx.createRadialGradient(\n loc.x,\n loc.y,\n g2lr(aura.value),\n loc.x,\n loc.y,\n g2lr(aura.value + aura.dim),\n );\n const tc = tinycolor(aura.colour);\n ctx.fillStyle = gradient;\n gradient.addColorStop(0, aura.colour);\n gradient.addColorStop(1, tc.setAlpha(0).toRgbString());\n }\n if (!aura.visionSource || aura.lastPath === undefined) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n } else {\n try {\n ctx.fill(aura.lastPath);\n } catch (e) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n console.warn(e);\n }\n }\n }\n }\n\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n\n moveLayer(layer: string, sync: boolean) {\n const oldLayer = layerManager.getLayer(this.layer);\n const newLayer = layerManager.getLayer(layer);\n if (oldLayer === undefined || newLayer === undefined) return;\n this.layer = layer;\n // Update layer shapes\n oldLayer.shapes.splice(oldLayer.shapes.indexOf(this), 1);\n newLayer.shapes.push(this);\n // Revalidate layers (light should at most be redone once)\n oldLayer.invalidate(true);\n newLayer.invalidate(false);\n // Sync!\n if (sync) socket.emit(\"Shape.Layer.Change\", { uuid: this.uuid, layer });\n }\n\n get owners() {\n return Object.freeze(this._owners.slice());\n }\n\n ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this._owners.includes(username);\n }\n\n addOwner(owner: string) {\n if (!this._owners.includes(owner)) this._owners.push(owner);\n }\n\n updateOwner(oldValue: string, newValue: string) {\n const ownerIndex = this._owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this._owners.splice(ownerIndex, 1, newValue);\n else this.addOwner(newValue);\n }\n\n removeOwner(owner: string) {\n const ownerIndex = this._owners.findIndex(o => o === owner);\n this._owners.splice(ownerIndex, 1);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.note !== null)?_c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('span',{on:{\"click\":function($event){_vm.$refs.title.select()}}},[_c('i',{staticClass:\"fas fa-pencil-alt\",staticStyle:{\"font-size\":\"15px\"}})]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.title),expression:\"note.title\"}],ref:\"title\",domProps:{\"value\":(_vm.note.title)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"title\", $event.target.value)}}}),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.text),expression:\"note.text\"}],ref:\"textarea\",style:({'height': _vm.calcHeight()}),domProps:{\"value\":(_vm.note.text)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"text\", $event.target.value)}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.removeNote}},[_c('i',{staticClass:\"far fa-trash-alt\"}),_vm._v(\" Remove\\n \")])])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"","\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport SelectContext from \"@/game/ui/tools/selectcontext.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\nimport SelectionInfo from \"../selection/selection_info.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint, LocalPoint, Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, l2g, l2gz } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport enum SelectOperations {\n Noop,\n Resize,\n Drag,\n GroupSelect,\n}\n\nconst start = new GlobalPoint(-1000, -1000);\n\n@Component({\n components: {\n SelectContext,\n },\n})\nexport default class SelectTool extends Tool {\n name = \"Select\";\n showContextMenu = false;\n active = false;\n\n mode = SelectOperations.Noop;\n resizePoint = 0;\n deltaChanged = false;\n // Because we never drag from the asset's (0, 0) coord and want a smoother drag experience\n // we keep track of the actual offset within the asset.\n dragRay = new Ray(new LocalPoint(0, 0), new Vector(0, 0));\n selectionStartPoint = start;\n selectionHelper = new Rect(start, 0, 0);\n created() {\n this.selectionHelper.globalCompositeOperation = \"source-over\";\n }\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (!this.selectionHelper.owners.includes(gameStore.username)) {\n this.selectionHelper.addOwner(gameStore.username);\n }\n\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n let hit = false;\n // The selectionStack allows for lower positioned objects that are selected to have precedence during overlap.\n let selectionStack;\n if (!layer.selection.length) selectionStack = layer.shapes;\n else selectionStack = layer.shapes.concat(layer.selection);\n for (let i = selectionStack.length - 1; i >= 0; i--) {\n const shape = selectionStack[i];\n\n this.resizePoint = shape.getPointIndex(globalMouse, l2gz(3));\n\n // Resize case, a corner is selected\n if (this.resizePoint >= 0) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n layer.invalidate(true);\n hit = true;\n break;\n\n // Drag case, a shape is selected\n } else if (shape.contains(globalMouse)) {\n const selection = shape;\n if (layer.selection.indexOf(selection) === -1) {\n layer.selection = [selection];\n getRef(\"selectionInfo\").shape = selection;\n }\n this.mode = SelectOperations.Drag;\n const localRefPoint = g2l(selection.refPoint);\n this.dragRay = new Ray(localRefPoint, mouse.subtract(localRefPoint));\n layer.invalidate(true);\n hit = true;\n break;\n }\n }\n\n // GroupSelect case, draw a selection box to select multiple shapes\n if (!hit) {\n this.mode = SelectOperations.GroupSelect;\n for (const selection of layer.selection) getRef(\"selectionInfo\").shape = selection;\n\n this.selectionStartPoint = globalMouse;\n\n this.selectionHelper.refPoint = this.selectionStartPoint;\n this.selectionHelper.w = 0;\n this.selectionHelper.h = 0;\n\n layer.selection = [this.selectionHelper];\n layer.invalidate(true);\n }\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n // if (!this.active) return; we require mousemove for the resize cursor\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n this.deltaChanged = false;\n\n if (this.mode === SelectOperations.GroupSelect) {\n // Currently draw on active layer\n const endPoint = globalMouse;\n\n this.selectionHelper.w = Math.abs(endPoint.x - this.selectionStartPoint.x);\n this.selectionHelper.h = Math.abs(endPoint.y - this.selectionStartPoint.y);\n this.selectionHelper.refPoint = new GlobalPoint(\n Math.min(this.selectionStartPoint.x, endPoint.x),\n Math.min(this.selectionStartPoint.y, endPoint.y),\n );\n layer.invalidate(true);\n } else if (layer.selection.length) {\n const og = g2l(layer.selection[layer.selection.length - 1].refPoint);\n const origin = og.add(this.dragRay.direction);\n let delta = mouse.subtract(origin).multiply(1 / gameStore.zoomFactor);\n const ogDelta = delta;\n if (this.mode === SelectOperations.Drag) {\n // If we are on the tokens layer do a movement block check.\n if (layer.name === \"tokens\" && !(event.shiftKey && gameStore.IS_DM)) {\n for (const sel of layer.selection) {\n if (!sel.ownedBy()) continue;\n if (sel.uuid === this.selectionHelper.uuid) continue; // the selection helper should not be treated as a real shape.\n delta = calculateDelta(delta, sel);\n if (delta !== ogDelta) this.deltaChanged = true;\n }\n }\n // Actually apply the delta on all shapes\n for (const sel of layer.selection) {\n if (!sel.ownedBy()) continue;\n sel.refPoint = sel.refPoint.add(delta);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n }\n layer.invalidate(false);\n } else if (this.mode === SelectOperations.Resize) {\n for (const sel of layer.selection) {\n if (!sel.ownedBy()) continue;\n sel.resize(this.resizePoint, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n this.updateCursor(layer, globalMouse);\n }\n } else {\n this.updateCursor(layer, globalMouse);\n }\n } else {\n document.body.style.cursor = \"default\";\n }\n }\n onMouseUp(e: MouseEvent): void {\n if (!this.active) return;\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n\n if (this.mode === SelectOperations.GroupSelect) {\n layer.clearSelection();\n layer.shapes.forEach(shape => {\n if (!shape.ownedBy()) return;\n if (shape === this.selectionHelper) return;\n const bbox = shape.getBoundingBox();\n if (!shape.ownedBy()) return;\n if (\n this.selectionHelper!.refPoint.x <= bbox.topRight.x &&\n this.selectionHelper!.refPoint.x + this.selectionHelper!.w >= bbox.topLeft.x &&\n this.selectionHelper!.refPoint.y <= bbox.botLeft.y &&\n this.selectionHelper!.refPoint.y + this.selectionHelper!.h >= bbox.topLeft.y\n ) {\n layer.selection.push(shape);\n }\n });\n\n // Push the selection helper as the last element of the selection\n // This makes sure that it will be the first one to be hit in the hit detection onMouseDown\n if (layer.selection.length > 0) layer.selection.push(this.selectionHelper);\n\n layer.invalidate(true);\n } else if (layer.selection.length) {\n layer.selection.forEach(sel => {\n if (!sel.ownedBy()) return;\n if (this.mode === SelectOperations.Drag) {\n if (\n this.dragRay.origin!.x === g2lx(sel.refPoint.x) &&\n this.dragRay.origin!.y === g2ly(sel.refPoint.y)\n )\n return;\n\n if (gameStore.useGrid && !e.altKey && !this.deltaChanged) {\n sel.snapToGrid();\n }\n\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n if (this.mode === SelectOperations.Resize) {\n if (gameStore.useGrid && !e.altKey) {\n sel.resizeToGrid();\n }\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n });\n }\n this.mode = SelectOperations.Noop;\n this.active = false;\n }\n onContextMenu(event: MouseEvent) {\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n for (const shape of layer.selection) {\n if (shape.contains(globalMouse) && shape !== this.selectionHelper) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n layer.invalidate(true);\n (this.$parent.$refs.shapecontext).open(event, shape);\n return;\n }\n }\n (this.$refs.selectcontext).open(event);\n }\n updateCursor(layer: Layer, globalMouse: GlobalPoint) {\n for (const sel of layer.selection) {\n const resizePoint = sel.getPointIndex(globalMouse, l2gz(3));\n if (resizePoint < 0) document.body.style.cursor = \"default\";\n else {\n let angle = sel.getPointOrientation(resizePoint).angle();\n if (angle < 0) angle += 360;\n const d = 45 / 2;\n if (angle >= 315 + d || angle < d || (angle >= 135 + d && angle < 225 - d))\n document.body.style.cursor = \"ew-resize\";\n if ((angle >= 45 + d && angle < 135 - d) || (angle >= 225 + d && angle < 315 - d))\n document.body.style.cursor = \"ns-resize\";\n if ((angle >= d && angle < 90 - d) || (angle >= 180 + d && angle < 270 - d))\n document.body.style.cursor = \"nwse-resize\";\n if ((angle >= 90 + d && angle < 180 - d) || (angle >= 270 + d && angle < 360 - d))\n document.body.style.cursor = \"nesw-resize\";\n }\n }\n }\n}\n","import { GlobalPoint, Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { PA_CDT } from \"@/game/visibility/te/pa\";\nimport { Point, Sign, Triangle } from \"@/game/visibility/te/tds\";\nimport { ccw, cw, intersection, orientation } from \"@/game/visibility/te/triag\";\n\n// First go through each shape in the selection and see if the delta has to be truncated due to movement blockers\n\n// This is definitely super convoluted and inefficient but I was tired and really wanted the smooth wall sliding collision stuff to work\n// And it does now, so hey ¯\\_(ツ)_/¯\nexport function calculateDelta(delta: Vector, sel: Shape, done?: string[]) {\n if (delta.x === 0 && delta.y === 0) return delta;\n if (gameStore.visionMode === \"bvh\") {\n if (done === undefined) done = [];\n const ogSelBBox = sel.getBoundingBox();\n const newSelBBox = ogSelBBox.offset(delta);\n let refine = false;\n for (const movementBlocker of gameStore.movementblockers) {\n if (done.includes(movementBlocker)) continue;\n const blocker = layerManager.UUIDMap.get(movementBlocker)!;\n const blockerBBox = blocker.getBoundingBox();\n let found = blockerBBox.intersectsWithInner(newSelBBox);\n if (!found) {\n // This is an edge case, precalculating the rays is not worth in this case.\n const ray = Ray.fromPoints(ogSelBBox.topLeft.add(delta.normalize()), newSelBBox.topLeft);\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n found = blockerBBox.intersectP(ray, invDir, dirIsNegative).hit;\n }\n // Check if the bounding box of our destination would intersect with the bounding box of the movementblocker\n if (found) {\n const bCenter = blockerBBox.center();\n const sCenter = ogSelBBox.center();\n\n const d = sCenter.subtract(bCenter);\n const ux = new Vector(1, 0);\n const uy = new Vector(0, 1);\n let dx = d.dot(ux);\n let dy = d.dot(uy);\n if (dx > blockerBBox.w / 2) dx = blockerBBox.w / 2;\n if (dx < -blockerBBox.w / 2) dx = -blockerBBox.w / 2;\n if (dy > blockerBBox.h / 2) dy = blockerBBox.h / 2;\n if (dy < -blockerBBox.h / 2) dy = -blockerBBox.h / 2;\n\n // Closest point / intersection point between the two bboxes. Not the delta intersect!\n const p = bCenter.add(ux.multiply(dx)).add(uy.multiply(dy));\n\n if (p.x === ogSelBBox.topLeft.x || p.x === ogSelBBox.topRight.x) delta = new Vector(0, delta.y);\n else if (p.y === ogSelBBox.topLeft.y || p.y === ogSelBBox.botLeft.y) delta = new Vector(delta.x, 0);\n else {\n if (p.x < ogSelBBox.topLeft.x) delta = new Vector(p.x - ogSelBBox.topLeft.x, delta.y);\n else if (p.x > ogSelBBox.topRight.x) delta = new Vector(p.x - ogSelBBox.topRight.x, delta.y);\n else if (p.y < ogSelBBox.topLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.topLeft.y);\n else if (p.y > ogSelBBox.botLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.botLeft.y);\n }\n refine = true;\n done.push(movementBlocker);\n break;\n }\n }\n if (refine) delta = calculateDelta(delta, sel, done);\n return delta;\n } else {\n const centerTriangle = PA_CDT.movement.locate(sel.center().asArray(), null).loc;\n for (const point of sel.points) {\n const lt = PA_CDT.movement.locate(point, centerTriangle);\n const triangle = lt.loc;\n if (triangle === null) continue;\n delta = checkTriangle(point, triangle, delta);\n }\n return delta;\n }\n}\n\nfunction checkTriangle(point: Point, triangle: Triangle, delta: Vector, skip: Triangle[] = []): Vector {\n const p = new GlobalPoint(point[0], point[1]);\n const endpoint = p.add(delta).asArray();\n if (triangle.contains(endpoint)) return delta;\n skip.push(triangle);\n\n for (let i = 0; i < 3; i++) {\n if (skip.includes(triangle.neighbours[i]!)) continue;\n\n const _cw = triangle.vertices[cw(i)]!.point!;\n const _ccw = triangle.vertices[ccw(i)]!.point!;\n const ix = intersection(point, endpoint, _cw, _ccw);\n\n if (ix === null) continue;\n\n if (!triangle.isConstrained(i)) return checkTriangle(point, triangle.neighbours[i]!, delta, skip);\n\n if (ix[0] === p.x && ix[1] === p.y) {\n const OR = orientation;\n const o = orientation(point, endpoint, _ccw);\n // Remember: canvas y axis is inverted\n if (o === Sign.LEFT_TURN) continue;\n if (o === Sign.ZERO) continue;\n }\n let newDelta = new GlobalPoint(ix[0], ix[1]).subtract(p).multiply(0.8);\n if (newDelta.length() < 1) newDelta = new Vector(0, 0);\n if (newDelta.length() < delta.length()) delta = newDelta;\n }\n return delta;\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=script&lang=ts&\"","import { socket } from \"@/game/api/socket\";\nimport { gameStore } from \"@/game/store\";\n\nexport function sendClientOptions() {\n socket.emit(\"Client.Options.Set\", {\n locationOptions: {\n panX: gameStore.panX,\n panY: gameStore.panY,\n zoomFactor: gameStore.zoomFactor,\n },\n });\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\nimport { AssetFile, AssetList } from \"@/core/comm/types\";\nimport { alphSort } from \"@/core/utils\";\n\n@Component({\n name: \"asset-node\",\n})\nexport default class AssetNode extends Vue {\n @Prop() asset!: AssetList;\n\n showImage = null;\n get folders(): string[] {\n return Object.keys(this.asset)\n .filter(el => ![\"__files\"].includes(el))\n .sort(alphSort);\n }\n\n get files(): AssetFile[] {\n if (this.asset.__files)\n return (this.asset.__files)\n .concat()\n .sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1));\n return [];\n }\n\n toggle(event: { target: HTMLElement }) {\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < event.target.children.length; i++) {\n const el = event.target.children[i];\n el.style.display = el.style.display === \"\" ? \"block\" : \"\";\n }\n }\n\n dragStart(event: DragEvent, imageSource: string) {\n this.showImage = null;\n if (event === null || event.dataTransfer === null) return;\n const img = (event.target).querySelector(\".preview\")!;\n event.dataTransfer.setDragImage(img, 0, 0);\n event.dataTransfer.setData(\"text/plain\", imageSource);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:\"ContextMenu\",style:({left:_vm.left, top:_vm.top}),attrs:{\"tabindex\":\"-1\"},on:{\"blur\":function($event){_vm.$emit('close')}}},[_c('ul',[_vm._t(\"default\")],2)]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=template&id=256dde9c&\"","// import Vuex from \"vuex\";\nimport { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { rootStore } from \"@/store\";\n\nexport interface AssetState {\n root: number;\n files: number[];\n folders: number[];\n idMap: Map;\n selected: number[];\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"assets\", namespaced: true })\nclass AssetStore extends VuexModule {\n root = -1;\n files: number[] = [];\n folders: number[] = [];\n idMap: Map = new Map();\n selected: number[] = [];\n\n @Mutation\n clear() {\n this.folders = [];\n this.files = [];\n }\n\n @Mutation\n clearSelected() {\n console.log(\"Cleared\");\n this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n}\n\nexport const assetStore = getModule(AssetStore);\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class ShapeContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n shape: Shape | null = null;\n get activeLayer(): string {\n const layer = layerManager.getLayer();\n return layer === undefined ? \"\" : layer.name;\n }\n open(event: MouseEvent, shape: Shape) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.shape = shape;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n this.shape = null;\n }\n getLayers() {\n return layerManager.layers.filter(l => l.selectable && (gameStore.IS_DM || l.playerEditable));\n }\n getActiveLayer() {\n return layerManager.getLayer();\n }\n getInitiativeWord() {\n if (this.shape === null) return \"\";\n return getRef(\"initiative\").contains(this.shape.uuid) ? \"Show\" : \"Add\";\n }\n setLayer(newLayer: string) {\n if (this.shape === null) return;\n this.shape.moveLayer(newLayer, true);\n this.close();\n }\n moveToBack() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, 0, true);\n this.close();\n }\n moveToFront() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, layer.shapes.length - 1, true);\n this.close();\n }\n addInitiative() {\n if (this.shape === null) return;\n const initiative = getRef(\"initiative\");\n if (!initiative.contains(this.shape.uuid)) initiative.addInitiative(this.shape.getInitiativeRepr());\n initiative.visible = true;\n this.close();\n }\n openEditDialog() {\n EventBus.$emit(\"EditDialog.Open\", this.shape);\n this.close();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"","import { Layer } from \"@/game/layers/layer\";\nimport { gameStore } from \"@/game/store\";\n\nexport class GridLayer extends Layer {\n invalidate(): void {\n this.valid = false;\n }\n draw(doClear?: boolean): void {\n if (!this.valid) {\n this.drawGrid();\n }\n }\n drawGrid(): void {\n const ctx = this.ctx;\n this.clear();\n ctx.beginPath();\n\n const gs = gameStore.gridSize;\n\n for (let i = 0; i < this.width; i += gs * gameStore.zoomFactor) {\n ctx.moveTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, 0);\n ctx.lineTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, this.height);\n ctx.moveTo(0, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n ctx.lineTo(this.width, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n }\n\n ctx.strokeStyle = gameStore.gridColour;\n ctx.lineWidth = 1;\n ctx.stroke();\n this.valid = true;\n }\n}\n","import Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nimport { AssetState } from \"@/assetManager/store\";\nimport { CoreState } from \"@/core/store\";\nimport { GameState } from \"@/game/store\";\n\nVue.use(Vuex);\n\nexport interface RootState {\n assets: AssetState;\n core: CoreState;\n game: GameState;\n}\n\nexport const rootStore = new Vuex.Store({});\n","import { render, staticRenderFns } from \"./colorpicker.vue?vue&type=template&id=d32461a4&scoped=true&\"\nimport script from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nexport * from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./colorpicker.vue?vue&type=style&index=0&id=d32461a4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d32461a4\",\n null\n \n)\n\ncomponent.options.__file = \"colorpicker.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view',{ref:\"activeComponent\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=196415f0&\"\nvar script = {}\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"App.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"main\"},on:{\"mouseleave\":_vm.mouseleave,\"wheel\":_vm.zoom}},[(_vm.showUI)?_c('menu-bar'):_vm._e(),_c('div',{attrs:{\"id\":\"board\"}},[(_vm.ready.manager)?[_c('tool-bar',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI),expression:\"showUI\"}],ref:\"tools\"})]:_vm._e(),_c('div',{attrs:{\"id\":\"layers\"},on:{\"mousedown\":_vm.mousedown,\"mouseup\":_vm.mouseup,\"mousemove\":_vm.mousemove,\"contextmenu\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.contextmenu($event)},\"dragover\":function($event){$event.preventDefault();},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.drop($event)}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI && _vm.layers.length>1),expression:\"showUI && layers.length>1\"}],attrs:{\"id\":\"layerselect\"}},[_c('ul',_vm._l((_vm.layers),function(layer){return _c('li',{key:layer.name,class:{ 'layer-selected': layer === _vm.selectedLayer },on:{\"mousedown\":function($event){_vm.selectLayer(layer)}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(layer))])])}))])],2),_c('selection-info',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI),expression:\"showUI\"}],ref:\"selectionInfo\"}),_c('initiative-dialog',{ref:\"initiative\",attrs:{\"id\":\"initiativedialog\"}}),_c('note-dialog',{ref:\"note\"}),_c('label-dialog',{ref:\"labels\"}),_c('zoom-slider',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI),expression:\"showUI\"}],attrs:{\"id\":\"zoomer\",\"height\":6,\"width\":200,\"min\":0,\"max\":1,\"interval\":0.1,\"dot-width\":8,\"dot-height\":20,\"tooltip-dir\":'bottom',\"tooltip\":'hover',\"formatter\":_vm.zoomDisplay.toFixed(1),\"slider-style\":{'border-radius': '15%'},\"bg-style\":{'background-color': '#fff', 'box-shadow': '0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)'},\"process-style\":{'background-color': '#fff'}},model:{value:(_vm.zoomDisplay),callback:function ($$v) {_vm.zoomDisplay=$$v},expression:\"zoomDisplay\"}}),_c('prompt-dialog',{ref:\"prompt\"}),_c('confirm-dialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=template&id=05b88da7&scoped=true&\"","import { GlobalPoint, Ray } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, getUnitDistance } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n virtualCanvas: HTMLCanvasElement;\n vCtx: CanvasRenderingContext2D;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n super(canvas, name);\n this.virtualCanvas = document.createElement(\"canvas\");\n this.virtualCanvas.width = window.innerWidth;\n this.virtualCanvas.height = window.innerHeight;\n this.vCtx = this.virtualCanvas.getContext(\"2d\")!;\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n super.addShape(shape, sync, temporary, invalidate);\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n this.preFogShapes.push(shape);\n }\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n const idx = this.preFogShapes.findIndex(s => s.uuid === shape.uuid);\n this.preFogShapes.splice(idx, 1);\n }\n super.removeShape(shape, sync, temporary);\n }\n\n draw(): void {\n if (!this.valid) {\n const ctx = this.ctx;\n\n if (Settings.skipLightFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n const originalOperation = ctx.globalCompositeOperation;\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n const dctx = layerManager.getLayer(\"draw\")!.ctx;\n if (Settings.drawAngleLines || Settings.drawFirstLightHit) {\n dctx.clearRect(0, 0, dctx.canvas.width, dctx.canvas.height);\n }\n\n // At all times provide a minimal vision range to prevent losing your tokens in fog.\n if (gameStore.fullFOW && layerManager.hasLayer(\"tokens\")) {\n layerManager.getLayer(\"tokens\")!.shapes.forEach(sh => {\n if (!sh.ownedBy() || !sh.isToken) return;\n const bb = sh.getBoundingBox();\n const lcenter = g2l(sh.center());\n const alm = 0.8 * g2lz(bb.w);\n ctx.beginPath();\n ctx.arc(lcenter.x, lcenter.y, alm, 0, 2 * Math.PI);\n const gradient = ctx.createRadialGradient(lcenter.x, lcenter.y, alm / 2, lcenter.x, lcenter.y, alm);\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n ctx.fill();\n });\n }\n\n this.vCtx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n\n // First cut out all the light sources\n for (const light of gameStore.visionSources) {\n const shape = layerManager.UUIDMap.get(light.shape);\n if (shape === undefined) continue;\n const aura = shape.auras.find(a => a.uuid === light.aura);\n if (aura === undefined) continue;\n\n const auraLength = getUnitDistance(aura.value + aura.dim);\n const center = shape.center();\n const lcenter = g2l(center);\n\n const auraCircle = new Circle(center, auraLength);\n if (!auraCircle.visibleInCanvas(ctx.canvas)) continue;\n\n if (gameStore.visionMode === \"bvh\") {\n let lastArcAngle = -1;\n\n const path = new Path2D();\n path.moveTo(lcenter.x, lcenter.y);\n let firstPoint: GlobalPoint;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 180) * Math.PI) {\n const anglePoint = new GlobalPoint(\n center.x + auraLength * Math.cos(angle),\n center.y + auraLength * Math.sin(angle),\n );\n if (Settings.drawAngleLines) {\n dctx!.beginPath();\n dctx!.moveTo(g2lx(center.x), g2ly(center.y));\n dctx!.lineTo(g2lx(anglePoint.x), g2ly(anglePoint.y));\n dctx!.stroke();\n }\n\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = Ray.fromPoints(center, anglePoint);\n const hitResult = gameStore.BV.intersect(lightRay);\n\n if (angle === 0) firstPoint = hitResult.hit ? hitResult.intersect : anglePoint;\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n // Draw a line from the last non arc location back to the arc\n const dest = g2l(anglePoint);\n ctx.lineTo(dest.x, dest.y);\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, angle);\n lastArcAngle = -1;\n }\n path.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n // Finish the final arc.\n if (lastArcAngle === -1) path.lineTo(g2lx(firstPoint!.x), g2ly(firstPoint!.y));\n else path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, 2 * Math.PI);\n\n if (gameStore.fullFOW) {\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n ctx.fill(path);\n }\n\n aura.lastPath = path;\n } else {\n this.vCtx.globalCompositeOperation = \"source-over\";\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n const polygon = computeVisibility(center, \"vision\");\n this.vCtx.beginPath();\n this.vCtx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) this.vCtx.lineTo(g2lx(point[0]), g2ly(point[1]));\n this.vCtx.closePath();\n this.vCtx.fill();\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = this.vCtx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n this.vCtx.fillStyle = gradient;\n } else {\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n this.vCtx.globalCompositeOperation = \"source-in\";\n this.vCtx.beginPath();\n this.vCtx.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), 0, 2 * Math.PI);\n this.vCtx.fill();\n ctx.drawImage(this.virtualCanvas, 0, 0);\n }\n }\n\n // At the DM Side due to opacity of the two fow layers, it looks strange if we just render them on top of eachother like players.\n if (gameStore.fowLOS) {\n ctx.globalCompositeOperation = \"source-in\";\n ctx.drawImage(layerManager.getLayer(\"fow-players\")!.canvas, 0, 0);\n }\n\n for (const preShape of this.preFogShapes) {\n if (!preShape.visibleInCanvas(this.canvas)) continue;\n const ogComposite = preShape.globalCompositeOperation;\n if (!gameStore.fullFOW) {\n if (preShape.globalCompositeOperation === \"source-over\")\n preShape.globalCompositeOperation = \"destination-out\";\n else if (preShape.globalCompositeOperation === \"destination-out\")\n preShape.globalCompositeOperation = \"source-over\";\n }\n preShape.draw(ctx);\n preShape.globalCompositeOperation = ogComposite;\n }\n\n if (gameStore.fullFOW) {\n ctx.globalCompositeOperation = \"source-out\";\n ctx.fillStyle = getFogColour();\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n super.draw(false);\n\n ctx.globalCompositeOperation = originalOperation;\n }\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"menuContainer\"}},[_c('div',{ref:\"rm\",style:({\n left: _vm.visible.settings ? '200px' : '0',\n top: _vm.visible.locations ? '100px' : '0'\n }),attrs:{\"id\":\"radialmenu\"}},[_c('div',{staticClass:\"rm-wrapper\"},[_c('div',{staticClass:\"rm-toggler\"},[_c('ul',{staticClass:\"rm-list\",class:{ 'rm-list-dm': _vm.IS_DM }},[(_vm.IS_DM)?_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-locations\"},on:{\"click\":function($event){_vm.visible.locations = !_vm.visible.locations}}},[_vm._m(0)]):_vm._e(),_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-settings\"},on:{\"click\":function($event){_vm.visible.settings = !_vm.visible.settings}}},[_vm._m(1)])])]),_vm._m(2)])]),_c('transition',{attrs:{\"name\":\"settings\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'left 500ms'}}},[(_vm.visible.settings)?_c('div',{ref:\"settings\",attrs:{\"id\":\"menu\"},on:{\"click\":_vm.settingsClick}},[_c('div',{staticStyle:{\"width\":\"200px\",\"height\":\"90%\",\"overflow-y\":\"auto\",\"overflow-x\":\"hidden\"}},[(_vm.IS_DM)?[_c('button',{staticClass:\"accordion\"},[_vm._v(\"Assets\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('a',{staticClass:\"actionButton\",attrs:{\"href\":\"/assets\",\"target\":\"blank\",\"title\":\"Open asset manager\"}},[_c('i',{staticClass:\"fas fa-external-link-alt\"})]),_c('div',{staticClass:\"directory\",attrs:{\"id\":\"menu-tokens\"}},[_c('asset-node',{attrs:{\"asset\":_vm.assets}}),(!_vm.assets)?_c('div',[_vm._v(\"No assets\")]):_vm._e()],1)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Notes\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\",attrs:{\"id\":\"menu-notes\"}},[_c('a',{staticClass:\"actionButton\",on:{\"click\":_vm.createNote}},[_c('i',{staticClass:\"far fa-plus-square\"})]),_vm._l((_vm.notes),function(note){return _c('div',{key:note.uuid,staticStyle:{\"cursor\":\"pointer\"},on:{\"click\":function($event){_vm.openNote(note)}}},[_vm._v(_vm._s(note.title || \"[?]\"))])}),(!_vm.notes.length)?_c('div',[_vm._v(\"No notes\")]):_vm._e()],2)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"DM Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"useGridInput\"}},[_vm._v(\"Use grid:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.useGrid),expression:\"useGrid\"}],attrs:{\"id\":\"useGridInput\",\"type\":\"checkbox\",\"checked\":\"checked\"},domProps:{\"checked\":Array.isArray(_vm.useGrid)?_vm._i(_vm.useGrid,null)>-1:(_vm.useGrid)},on:{\"change\":function($event){var $$a=_vm.useGrid,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.useGrid=$$a.concat([$$v]))}else{$$i>-1&&(_vm.useGrid=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.useGrid=$$c}}}}),_c('label',{attrs:{\"for\":\"useFOWInput\"}},[_vm._v(\"Fill entire canvas with FOW:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fullFOW),expression:\"fullFOW\"}],attrs:{\"id\":\"useFOWInput\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fullFOW)?_vm._i(_vm.fullFOW,null)>-1:(_vm.fullFOW)},on:{\"change\":function($event){var $$a=_vm.fullFOW,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fullFOW=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fullFOW=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fullFOW=$$c}}}}),_c('label',{attrs:{\"for\":\"fowOpacity\"}},[_vm._v(\"FOW opacity:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.fowOpacity),expression:\"fowOpacity\",modifiers:{\"number\":true}}],attrs:{\"id\":\"fowOpacity\",\"type\":\"number\",\"min\":\"0\",\"max\":\"1\",\"step\":\"0.1\"},domProps:{\"value\":(_vm.fowOpacity)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.fowOpacity=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"fowLOS\"}},[_vm._v(\"Only show lights in LoS:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fowLOS),expression:\"fowLOS\"}],attrs:{\"id\":\"fowLOS\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fowLOS)?_vm._i(_vm.fowLOS,null)>-1:(_vm.fowLOS)},on:{\"change\":function($event){var $$a=_vm.fowLOS,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fowLOS=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fowLOS=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fowLOS=$$c}}}}),_c('label',{attrs:{\"for\":\"unitSizeInput\"}},[_vm._v(\"Unit Size (in ft.):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.unitSize),expression:\"unitSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"unitSizeInput\",\"type\":\"number\"},domProps:{\"value\":(_vm.unitSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.unitSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"gridSizeInput\"}},[_vm._v(\"Grid Size (in pixels):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.gridSize),expression:\"gridSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"gridSizeInput\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.gridSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.gridSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'bvh'}},[_vm._v(\"BVH\")]),_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'triangle'}},[_vm._v(\"Triangle\")])]),_c('label',{attrs:{\"for\":\"vmininp\"}},[_vm._v(\"Minimal full vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMin),expression:\"visionRangeMin\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmininp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMin)},on:{\"change\":function($event){_vm.visionRangeMin=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"vmaxinp\"}},[_vm._v(\"Maximal vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMax),expression:\"visionRangeMax\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmaxinp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMax)},on:{\"change\":function($event){_vm.visionRangeMax=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"invitation\"}},[_vm._v(\"Invitation Code:\")]),_c('input',{attrs:{\"id\":\"invitation\",\"type\":\"text\",\"readonly\":\"readonly\"},domProps:{\"value\":_vm.invitationCode}})])])]:_vm._e(),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Client Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"gridColour\"}},[_vm._v(\"Grid Colour:\")]),_c('color-picker',{attrs:{\"id\":\"gridColour\",\"color\":_vm.gridColour},on:{\"update:color\":function($event){_vm.gridColour=$event}}}),_c('label',{attrs:{\"for\":\"fowColour\"}},[_vm._v(\"FOW Colour:\")]),_c('color-picker',{attrs:{\"id\":\"fowColour\",\"color\":_vm.fowColour},on:{\"update:color\":function($event){_vm.fowColour=$event}}}),_c('label',{attrs:{\"for\":\"rulerColour\"}},[_vm._v(\"Ruler Colour:\")]),_c('color-picker',{attrs:{\"id\":\"rulerColour\",\"color\":_vm.rulerColour},on:{\"update:color\":function($event){_vm.rulerColour=$event}}})],1)])],2),_c('router-link',{staticClass:\"accordion\",staticStyle:{\"text-decoration\":\"none\",\"display\":\"inline-block\",\"position\":\"absolute\",\"bottom\":\"0\"},attrs:{\"to\":\"/dashboard\"}},[_vm._v(\"Exit\")])],1):_vm._e()]),_c('transition',{attrs:{\"name\":\"locations\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'top 500ms'}}},[(_vm.IS_DM && _vm.visible.locations)?_c('div',{attrs:{\"id\":\"locations-menu\"}},[_c('div',[_vm._l((_vm.locations),function(location){return _c('div',{key:location,on:{\"click\":function($event){_vm.changeLocation(location)}}},[_vm._v(_vm._s(location))])}),_c('div',{on:{\"click\":_vm.createLocation}},[_c('i',{staticClass:\"fas fa-plus\"})])],2)]):_vm._e()]),_c('img',{attrs:{\"id\":\"dragImage\"}})],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"far fa-compass\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"fas fa-cog\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"rm-topper\"},[_c('i',{staticClass:\"icon-share-alt\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Edit asset\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('div',{staticClass:\"grid\"},[_c('label',{attrs:{\"for\":\"shapeselectiondialog-name\"}},[_vm._v(\"Name\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.name),expression:\"shape.name\"}],staticStyle:{\"grid-column\":\"numerator / remove\"},attrs:{\"type\":\"text\",\"id\":\"shapeselectiondialog-name\",\"disabled\":!_vm.owned},domProps:{\"value\":(_vm.shape.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.shape, \"name\", $event.target.value)}}}),_c('div',{style:({opacity: _vm.shape.nameVisible ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.shape.nameVisible = !_vm.shape.nameVisible;_vm.updateShape(false)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('label',{attrs:{\"for\":\"shapeselectiondialog-istoken\"}},[_vm._v(\"Is a token\")]),_c('input',{staticClass:\"styled-checkbox\",staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-istoken\",\"disabled\":!_vm.owned},domProps:{\"checked\":_vm.shape.isToken},on:{\"click\":_vm.setToken}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-visionblocker\"}},[_vm._v(\"Blocks vision/light\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.visionObstruction),expression:\"shape.visionObstruction\"}],staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-visionblocker\",\"disabled\":!_vm.owned},domProps:{\"checked\":Array.isArray(_vm.shape.visionObstruction)?_vm._i(_vm.shape.visionObstruction,null)>-1:(_vm.shape.visionObstruction)},on:{\"change\":[function($event){var $$a=_vm.shape.visionObstruction,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.shape, \"visionObstruction\", $$c)}},_vm.setVisionBlocker]}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-moveblocker\"}},[_vm._v(\"Blocks movement\")]),_c('input',{staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-moveblocker\",\"disabled\":!_vm.owned},domProps:{\"checked\":_vm.shape.movementObstruction},on:{\"click\":_vm.setMovementBlocker}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-strokecolour\"}},[_vm._v(\"Border colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"color\":_vm.shape.strokeColour,\"disabled\":!_vm.owned},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"strokeColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-fillcolour\"}},[_vm._v(\"Fill colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"color\":_vm.shape.fillColour,\"disabled\":!_vm.owned},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"fillColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Access\")]),_vm._l((_vm.shape.owners),function(owner){return [_c('input',{key:owner,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\",\"disabled\":!_vm.owned},domProps:{\"value\":owner},on:{\"change\":function($event){_vm.updateOwner($event, owner)}}}),(owner !== '')?_c('div',{key:'remove-' + owner,style:({opacity: _vm.owned ? 1.0 : 0.3, textAlign: 'center', gridColumnStart: 'remove'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.removeOwner(owner)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Trackers\")]),_vm._l((_vm.shape.trackers),function(tracker){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(tracker.name),expression:\"tracker.name\"}],key:'name-'+tracker.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\",\"disabled\":!_vm.owned},domProps:{\"value\":(tracker.name)},on:{\"change\":function($event){_vm.updateShape(false);},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.value),expression:\"tracker.value\",modifiers:{\"number\":true}}],key:'value-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\",\"disabled\":!_vm.owned},domProps:{\"value\":(tracker.value)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+tracker.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.maxvalue),expression:\"tracker.maxvalue\",modifiers:{\"number\":true}}],key:'maxvalue-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\",\"disabled\":!_vm.owned},domProps:{\"value\":(tracker.maxvalue)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"maxvalue\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'sspan-'+tracker.uuid}),_c('div',{key:'visibility-'+tracker.uuid,style:({opacity: tracker.visible ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){tracker.visible = !tracker.visible;_vm.updateShape(false)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('span',{key:'tspan-'+tracker.uuid}),(tracker.name !== '' || tracker.value !== 0)?_c('div',{key:'remove-'+tracker.uuid,style:({opacity: _vm.owned ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.removeTracker(tracker.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Auras\")]),_vm._l((_vm.shape.auras),function(aura){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(aura.name),expression:\"aura.name\"}],key:'name-'+aura.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\",\"disabled\":!_vm.owned},domProps:{\"value\":(aura.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.value),expression:\"aura.value\",modifiers:{\"number\":true}}],key:'value-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\",\"disabled\":!_vm.owned},domProps:{\"value\":(aura.value)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+aura.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.dim),expression:\"aura.dim\",modifiers:{\"number\":true}}],key:'dimvalue-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Dim value\",\"disabled\":!_vm.owned},domProps:{\"value\":(aura.dim)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"dim\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('color-picker',{key:'colour-'+aura.uuid,attrs:{\"color\":aura.colour,\"disabled\":!_vm.owned},on:{\"update:color\":function($event){_vm.$set(aura, \"colour\", $event)},\"input\":function($event){_vm.updateAuraColour(aura, $event)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{key:'visibility-'+aura.uuid,style:({opacity: aura.visible ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){aura.visible = !aura.visible;_vm.updateShape(true)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{key:'visionsource-'+aura.uuid,style:({opacity: aura.visionSource ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.updateAuraVisionSource(aura)}}},[_c('i',{staticClass:\"fas fa-lightbulb\"})]),(aura.name !== '' || aura.value !== 0)?_c('div',{key:'remove-'+aura.uuid,style:({opacity: _vm.owned ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.removeAura(aura.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Labels\")]),_c('div',{staticClass:\"spanrow\",attrs:{\"id\":\"labels\"}},[_vm._l((_vm.shape.labels),function(label){return _c('div',{key:label.uuid,staticClass:\"label\"},[(label.category)?[_c('div',{staticClass:\"label-user\"},[_vm._v(_vm._s(label.category))]),_c('div',{staticClass:\"label-main\",on:{\"click\":function($event){_vm.removeLabel(label.uuid)}}},[_vm._v(_vm._s(label.name))])]:_vm._e(),(!label.category)?[_c('div',{staticClass:\"label-main\",on:{\"click\":function($event){_vm.removeLabel(label.uuid)}}},[_vm._v(_vm._s(label.name))])]:_vm._e()],2)}),(_vm.owned)?_c('div',{staticClass:\"label\",attrs:{\"id\":\"label-add\"}},[_c('div',{staticClass:\"label-main\",on:{\"click\":_vm.openLabelManager}},[_vm._v(\"+\")])]):_vm._e()],2),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Annotation\")]),_c('textarea',{staticClass:\"spanrow\",attrs:{\"disabled\":!_vm.owned},domProps:{\"value\":_vm.shape.annotation},on:{\"change\":_vm.updateAnnotation}})],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=template&id=23de098e&scoped=true&\"","import { ServerCircle } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Circle extends Shape {\n type = \"circle\";\n r: number;\n constructor(center: GlobalPoint, r: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(center, fillColour, strokeColour, uuid);\n this.r = r || 1;\n }\n asDict(): ServerCircle {\n // const base = this.getBaseDict();\n // base.r = this.r;\n // base.border = this.border;\n // return base;\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n });\n }\n fromDict(data: ServerCircle) {\n super.fromDict(data);\n this.r = data.radius;\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(this.refPoint.x - this.r, this.refPoint.y - this.r),\n this.r * 2,\n this.r * 2,\n );\n }\n\n get points() {\n return this.getBoundingBox().points;\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const loc = g2l(this.refPoint);\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.fill();\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = g2lz(5);\n ctx.strokeStyle = this.strokeColour;\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.stroke();\n }\n }\n contains(point: GlobalPoint): boolean {\n return (point.x - this.refPoint.x) ** 2 + (point.y - this.refPoint.y) ** 2 < this.r ** 2;\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint;\n this.refPoint = centerPoint;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid() {\n const gs = gameStore.gridSize;\n let targetX;\n let targetY;\n if (((2 * this.r) / gs) % 2 === 0) {\n targetX = Math.round(this.refPoint.x / gs) * gs;\n } else {\n targetX = Math.round((this.refPoint.x - gs / 2) / gs) * gs + this.r;\n }\n if (((2 * this.r) / gs) % 2 === 0) {\n targetY = Math.round(this.refPoint.y / gs) * gs;\n } else {\n targetY = Math.round((this.refPoint.y - gs / 2) / gs) * gs + this.r;\n }\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.r = Math.max(Math.round(this.r / gs) * gs, gs / 2);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n const diff = l2g(point).subtract(this.refPoint);\n this.r = Math.sqrt(Math.pow(diff.length(), 2) / 2);\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class MapTool extends Tool {\n name = \"Map\";\n active = false;\n xCount = 3;\n yCount = 3;\n startPoint: GlobalPoint | null = null;\n rect: Rect | null = null;\n\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = true;\n\n this.startPoint = l2g(getMouse(event));\n this.rect = new Rect(this.startPoint.clone(), 0, 0, \"rgba(0,0,0,0)\", \"black\");\n layer.addShape(this.rect, false, false);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.rect === null || this.startPoint === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n const endPoint = l2g(getMouse(event));\n\n this.rect.w = Math.abs(endPoint.x - this.startPoint.x);\n this.rect.h = Math.abs(endPoint.y - this.startPoint.y);\n this.rect.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.rect === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n if (layer.selection.length !== 1) {\n layer.removeShape(this.rect, false, false);\n return;\n }\n\n const w = this.rect.w;\n const h = this.rect.h;\n const sel = layer.selection[0];\n\n if (sel instanceof BaseRect) {\n sel.w *= (this.xCount * gameStore.gridSize) / w;\n sel.h *= (this.yCount * gameStore.gridSize) / h;\n }\n\n layer.removeShape(this.rect, false, false);\n }\n}\n","import { render, staticRenderFns } from \"./load.vue?vue&type=template&id=ff095222&\"\nimport script from \"./load.vue?vue&type=script&lang=ts&\"\nexport * from \"./load.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"load.vue\"\nexport default component.exports","import Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class PanTool extends Tool {\n name = \"Pan\";\n panStart = new LocalPoint(0, 0);\n active = false;\n\n onMouseDown(event: MouseEvent) {\n this.panStart = getMouse(event);\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active) return;\n const mouse = getMouse(event);\n const distance = mouse.subtract(this.panStart).multiply(1 / gameStore.zoomFactor);\n gameStore.increasePanX(Math.round(distance.x));\n gameStore.increasePanY(Math.round(distance.y));\n this.panStart = mouse;\n layerManager.invalidate();\n }\n onMouseUp(event: MouseEvent) {\n this.active = false;\n sendClientOptions();\n }\n}\n","import { render, staticRenderFns } from \"./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"\nimport script from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"44a31e42\",\n null\n \n)\n\ncomponent.options.__file = \"selectcontext.vue\"\nexport default component.exports","import Vue from \"vue\";\n\nimport { app } from \"@/main\";\n\n// Reference: https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\nexport function uuidv4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport function capitalize(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nexport function alphSort(a: string, b: string) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n else return 1;\n}\n\nexport function getHTMLFont(element: HTMLElement) {\n let font = element.style.font;\n while (font === null && element.parentElement !== null) {\n element = element.parentElement;\n font = element.style.font;\n }\n if (font === null) font = window.getComputedStyle(document.body).getPropertyValue(\"font\");\n return font;\n}\n\nexport function getHTMLTextWidth(text: string, font: string): number {\n let fakeElement = document.getElementById(\"emptycanvas\");\n if (fakeElement === null) {\n fakeElement = document.createElement(\"canvas\");\n fakeElement.id = \"emptycanvas\";\n fakeElement.style.display = \"\";\n document.body.appendChild(fakeElement);\n }\n const ctx = fakeElement.getContext(\"2d\")!;\n ctx.font = font;\n return Math.ceil(ctx.measureText(text).width);\n}\n\nexport function partition(arr: T[], predicate: (n: T) => boolean) {\n const ret: T[][] = [[], []];\n arr.forEach(n => (predicate(n) ? ret[1].push(n) : ret[0].push(n)));\n return ret;\n}\n\nexport function calcFontScale(ctx: CanvasRenderingContext2D, text: string, width: number, height: number) {\n const points = Number(ctx.font.split(\"px\")[0]) * 0.2;\n const fontWidth = ctx.measureText(text).width;\n return Math.min(width / fontWidth, height / points);\n}\n\nexport function fixedEncodeURIComponent(str: string) {\n return encodeURIComponent(str).replace(/[!'()*]/g, c => {\n return \"%\" + c.charCodeAt(0).toString(16);\n });\n}\n\nexport class OrderedMap {\n keys: K[] = [];\n values: V[] = [];\n\n get length() {\n return this.keys.length;\n }\n\n get(key: K) {\n return this.values[this.keys.indexOf(key)];\n }\n getIndexValue(idx: number) {\n return this.values[idx];\n }\n getIndexKey(idx: number) {\n return this.keys[idx];\n }\n set(key: K, value: V) {\n this.keys.push(key);\n this.values.push(value);\n }\n has(key: K) {\n return this.indexOf(key) >= 0;\n }\n indexOf(element: K) {\n return this.keys.indexOf(element);\n }\n remove(element: K) {\n const idx = this.indexOf(element);\n this.keys.splice(idx, 1);\n this.values.splice(idx, 1);\n }\n}\n\nexport function getComponent(): T {\n return app.$children[0].$refs.activeComponent;\n}\n\nexport function getRef(ref: string): T {\n const active = app.$children[0].$refs.activeComponent;\n return active.$refs[ref];\n}\n","import { render, staticRenderFns } from \"./contextMenu.vue?vue&type=template&id=606797b4&\"\nimport script from \"./contextMenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextMenu.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextMenu.vue\"\nexport default component.exports","import { EdgeCirculator, Point, Sign, Triangle, Vertex } from \"./tds\";\n\ntype Line = number[];\n\nexport function cw(index: number) {\n return (index + 2) % 3;\n}\n\nexport function ccw(index: number) {\n return (index + 1) % 3;\n}\n\nexport function edgeInfo(va: Vertex, vb: Vertex) {\n const ec = new EdgeCirculator(va, null);\n if (ec.valid) {\n do {\n const indv = 3 - ec.t!.indexV(va) - ec.ri;\n const v = ec.t!.vertices[indv]!;\n if (!v.infinite) {\n if (v === vb) {\n return { includes: true, vi: vb, fr: ec.t!, i: ec.ri };\n } else {\n const orient = orientation(va.point!, vb.point!, v.point!);\n if (orient === Sign.COLLINEAR && collinearBetween(va.point!, v.point!, vb.point!)) {\n return { includes: true, vi: v, fr: ec.t!, i: ec.ri };\n }\n }\n }\n } while (ec.next());\n }\n return { includes: false };\n}\n\nexport function collinearBetween(p: Point, q: Point, r: Point): boolean {\n let cPQ: Sign;\n let cQR: Sign;\n if (compare(0, p, r) === Sign.EQUAL) {\n cPQ = compare(1, p, q);\n cQR = compare(1, q, r);\n } else {\n cPQ = compare(0, p, q);\n cQR = compare(0, q, r);\n }\n return (cPQ === Sign.SMALLER && cQR === Sign.SMALLER) || (cPQ === Sign.LARGER && cQR === Sign.LARGER);\n}\n\nfunction compare(index: number, a: Point, b: Point): Sign {\n if (a[index] < b[index]) return Sign.SMALLER;\n if (a[index] > b[index]) return Sign.LARGER;\n return Sign.EQUAL;\n}\n\nexport function orientation(p: Point, q: Point, r: Point) {\n const px = p[0];\n const py = p[1];\n const qx = q[0];\n const qy = q[1];\n const rx = r[0];\n const ry = r[1];\n const pqx = qx - px;\n const pqy = qy - py;\n const prx = rx - px;\n const pry = ry - py;\n const det = determinant(pqx, pqy, prx, pry);\n let maxX = Math.abs(pqx);\n let maxY = Math.abs(pqy);\n const aprX = Math.abs(prx);\n const aprY = Math.abs(pry);\n if (maxX < aprX) maxX = aprX;\n if (maxY < aprY) maxY = aprY;\n if (maxX > maxY) [maxX, maxY] = [maxY, maxX];\n // underflow proection in eps computation?? Math.sqrt(Number.MIN_VALUE, Number.EPSILON)\n if (maxX < 2e-162 && maxX === 0) {\n return Sign.ZERO;\n }\n // overflow protection in det computation\n if (maxY < 1e153) {\n const eps = Number.EPSILON * maxX * maxY;\n if (det > eps) return Sign.POSITIVE;\n if (det < -eps) return Sign.NEGATIVE;\n }\n return Sign.ZERO;\n}\n\nexport function determinant(a00: number, a01: number, a10: number, a11: number) {\n return a00 * a11 - a01 * a10;\n}\n\nexport function hasInexactNegativeOrientation(p: Point, q: Point, r: Point) {\n return determinant(q[0] - p[0], q[1] - p[1], r[0] - p[0], r[1] - p[1]) < 0;\n}\n\nexport function sideOfOrientedCircle(t: Triangle, p: Point, perturb: boolean): Sign {\n if (!t.isInfinite())\n return sideOfOrientedCircleP(t.vertices[0]!.point!, t.vertices[1]!.point!, t.vertices[2]!.point!, p, perturb);\n throw new Error(\"SSS\");\n}\n\nfunction sideOfOrientedCircleP(p0: Point, p1: Point, p2: Point, p: Point, perturb: boolean): Sign {\n const os = getOrientedSide(p0, p1, p2, p);\n if (os !== Sign.ON_ORIENTED_BOUNDARY || !perturb) return os;\n const points = [p0, p1, p2, p];\n points.sort((a, b) => a[0] - b[0] || a[1] - b[1]);\n for (const point of points.reverse()) {\n if (point === p) return Sign.ON_NEGATIVE_SIDE;\n let o = orientation(p0, p1, p);\n if (point === p2 && o !== Sign.COLLINEAR) return o;\n o = orientation(p0, p, p2);\n if (point === p1 && o !== Sign.COLLINEAR) return o;\n o = orientation(p, p1, p2);\n if (point === p0 && o !== Sign.COLLINEAR) return o;\n }\n return Sign.ON_NEGATIVE_SIDE;\n}\n\nexport function xyEqual(p: Point, q: Point) {\n return p[0] === q[0] && p[1] === q[1];\n}\n\nexport function xySmaller(p: Point, q: Point) {\n return p[0] < q[0] || (p[0] === q[0] && p[1] < q[1]);\n}\n\nexport function xyCompare(p: Point, q: Point) {\n if (xySmaller(p, q)) return Sign.SMALLER;\n if (xyEqual(p, q)) return Sign.EQUAL;\n return Sign.LARGER;\n}\n\nfunction getOrientedSide(p: Point, q: Point, r: Point, t: Point): Sign {\n const qpx = q[0] - p[0];\n const qpy = q[1] - p[1];\n const rpx = r[0] - p[0];\n const rpy = r[1] - p[1];\n const tpx = t[0] - p[0];\n const tpy = t[1] - p[1];\n const tqx = t[0] - q[0];\n const tqy = t[1] - q[1];\n const rqx = r[0] - q[0];\n const rqy = r[1] - q[1];\n\n const det = determinant(qpx * tpy - qpy * tpx, tpx * tqx + tpy * tqy, qpx * rpy - qpy * rpx, rpx * rqx + rpy * rqy);\n let maxx = Math.abs(qpx);\n let maxy = Math.abs(qpy);\n const arpx = Math.abs(rpx);\n const arpy = Math.abs(rpy);\n const atqx = Math.abs(tqx);\n const atqy = Math.abs(tqy);\n const atpx = Math.abs(tpx);\n const atpy = Math.abs(tpy);\n const arqx = Math.abs(rqx);\n const arqy = Math.abs(rqy);\n\n if (maxx < arpx) maxx = arpx;\n if (maxx < atpx) maxx = atpx;\n if (maxx < atqx) maxx = atqx;\n if (maxx < arqx) maxx = arqx;\n\n if (maxy < arpy) maxy = arpy;\n if (maxy < atpy) maxy = atpy;\n if (maxy < atqy) maxy = atqy;\n if (maxy < arqy) maxy = arqy;\n\n if (maxx > maxy) [maxx, maxy] = [maxy, maxx];\n\n if (maxx < 1e-73 && maxx === 0) return Sign.ON_ORIENTED_BOUNDARY;\n // sqrt(sqrt(max_double/16\n else if (maxy < 1e76) {\n const eps = Number.EPSILON * maxx * maxy * (maxy * maxy);\n if (det > eps) return Sign.ON_POSITIVE_SIDE;\n if (det < -eps) return Sign.ON_NEGATIVE_SIDE;\n }\n\n return Sign.ZERO;\n}\n\nfunction segSegDoIntersectCrossing(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p3, p4, p2) !== Sign.RIGHT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p3, p4, p2) !== Sign.LEFT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nfunction segSegDoIntersectContained(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p1, p2, p4) !== Sign.LEFT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p1, p2, p4) !== Sign.RIGHT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nexport function intersection(pa: Point, pb: Point, pc: Point, pd: Point) {\n const i = getIntersectionType(pa, pb, pc, pd);\n switch (i.intersectionType) {\n case IntersectionType.POINT:\n return i.point!;\n case IntersectionType.NO_INTERSECTION:\n return null;\n }\n throw new Error(\"sdfgighowen\");\n}\n\nenum IntersectionType {\n NO_INTERSECTION,\n POINT,\n SEGMENT,\n}\n\nfunction getLine(p0: Point, p1: Point): Line {\n if (p0[0] === p1[0]) return [1, 0, -p0[0]];\n if (p0[1] === p1[1]) return [0, 1, -p0[1]];\n const x = p1[0] - p0[0];\n const y = p1[1] - p0[1];\n return [-y, x, -x * p0[1] + y * p0[0]];\n}\n\nfunction getIntersectionType(pa: Point, pb: Point, pc: Point, pd: Point) {\n if (!doIntersect(pa, pb, pc, pd)) return { intersectionType: IntersectionType.NO_INTERSECTION, point: null };\n const l1 = getLine(pa, pb);\n const l2 = getLine(pc, pd);\n const info = getIntersectionTypeLine(l1, l2);\n switch (info.intersectionType) {\n case IntersectionType.POINT: {\n return info;\n }\n }\n throw new Error(\"gzseuihgpib\");\n}\n\nfunction getIntersectionTypeLine(la: Line, lb: Line) {\n const denom = la[0] * lb[1] - lb[0] * la[1];\n const nom1 = la[1] * lb[2] - lb[1] * la[2];\n const nom2 = lb[0] * la[2] - la[0] * lb[2];\n return {\n intersectionType: IntersectionType.POINT,\n point: [nom1 / denom, nom2 / denom],\n };\n}\n\nfunction doIntersect(A1: Point, A2: Point, B1: Point, B2: Point): boolean {\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A2, B1) || xySmaller(B2, A1)) return false;\n } else {\n if (xySmaller(A2, B2) || xySmaller(B1, A1)) return false;\n }\n } else {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A1, B1) || xySmaller(B2, A2)) return false;\n } else {\n if (xySmaller(A1, B2) || xySmaller(B1, A2)) return false;\n }\n }\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A1, A2);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A1, A2);\n }\n }\n }\n }\n }\n } else {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A2, A1);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A2, A1);\n }\n }\n }\n }\n }\n }\n}\n\nfunction nextUp(x: number) {\n if (x !== x) {\n return x;\n }\n if (x === -1 / 0) {\n return -Number.MAX_VALUE;\n }\n if (x === +1 / 0) {\n return +1 / 0;\n }\n if (x === +Number.MAX_VALUE) {\n return +1 / 0;\n }\n let y = x * (x < 0 ? 1 - Number.EPSILON / 2 : 1 + Number.EPSILON);\n if (y === x) {\n y = Number.MIN_VALUE * Number.EPSILON > 0 ? x + Number.MIN_VALUE * Number.EPSILON : x + Number.MIN_VALUE;\n }\n if (y === +1 / 0) {\n y = +Number.MAX_VALUE;\n }\n const b = x + (y - x) / 2;\n if (x < b && b < y) {\n y = b;\n }\n const c = (y + x) / 2;\n if (x < c && c < y) {\n y = c;\n }\n return y === 0 ? -0 : y;\n}\n\nexport function ulp(x: number) {\n return x < 0 ? nextUp(x) - x : x + nextUp(-x);\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=23de098e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=23de098e&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component\nexport default class Modal extends Vue {\n @Prop(Boolean) visible!: boolean;\n @Prop({ type: Boolean, default: true }) mask!: boolean;\n\n $refs!: {\n container: HTMLElement;\n };\n\n positioned = false;\n offsetX = 0;\n offsetY = 0;\n screenX = 0;\n screenY = 0;\n dragging = false;\n\n // Example of mounted required: opening note\n mounted() {\n this.updatePosition();\n }\n // Example of updated required: opening initiative\n updated() {\n this.updatePosition();\n }\n\n close(event: MouseEvent) {\n this.$emit(\"close\");\n }\n updatePosition() {\n if (!this.positioned) {\n const container = this.$refs.container;\n if (container.offsetWidth === 0 && container.offsetHeight === 0) return;\n this.$refs.container.style.left = (window.innerWidth - container.offsetWidth) / 2 + \"px\";\n this.$refs.container.style.top = (window.innerHeight - container.offsetHeight) / 2 + \"px\";\n this.positioned = true;\n }\n }\n dragStart(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"\");\n // Because the drag event is happening on the header, we have to change the drag image\n // in order to give the impression that the entire modal is dragged.\n event.dataTransfer.setDragImage(this.$refs.container, event.offsetX, event.offsetY);\n this.offsetX = event.offsetX;\n this.offsetY = event.offsetY;\n this.screenX = event.screenX;\n this.screenY = event.screenY;\n this.dragging = true;\n }\n dragEnd(event: DragEvent) {\n this.dragging = false;\n let left = event.clientX - this.offsetX;\n let top = event.clientY - this.offsetY;\n if (event.clientX === 0 && event.clientY === 0 && event.pageX === 0 && event.pageY === 0) {\n left = parseInt(this.$refs.container.style.left!, 10) - (this.screenX - event.screenX);\n top = parseInt(this.$refs.container.style.top!, 10) - (this.screenY - event.screenY);\n }\n if (left < 0) left = 0;\n if (left > window.innerWidth - 100) left = window.innerWidth - 100;\n if (top < 0) top = 0;\n if (top > window.innerHeight - 100) top = window.innerHeight - 100;\n this.$refs.container.style.left = left + \"px\";\n this.$refs.container.style.top = top + \"px\";\n this.$refs.container.style.display = \"block\";\n }\n dragOver(event: DragEvent) {\n if (this.dragging) this.$refs.container.style.display = \"none\";\n }\n}\n","import io from \"socket.io-client\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { assetStore } from \"./store\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\", { autoConnect: false });\n\n// export const socket = io.connect(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\");\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n window.location.href = destination;\n});\nsocket.on(\"Folder.Root.Set\", (root: number) => {\n assetStore.setRoot(root);\n});\nsocket.on(\"Folder.Set\", (folder: Asset) => {\n assetStore.clear();\n if (folder.children) {\n for (const child of folder.children) {\n assetStore.idMap.set(child.id, child);\n if (child.file_hash) {\n assetStore.files.push(child.id);\n } else {\n assetStore.folders.push(child.id);\n }\n }\n }\n});\nsocket.on(\"Folder.Create\", (folder: Asset) => {\n assetStore.folders.push(folder.id);\n assetStore.idMap.set(folder.id, folder);\n});\nsocket.on(\"Asset.Upload.Finish\", (asset: Asset) => {\n assetStore.idMap.set(asset.id, asset);\n assetStore.files.push(asset.id);\n});\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport Accordion from \"@/core/components/accordion.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n accordion: Accordion,\n },\n})\nexport default class FilterTool extends Tool {\n name = \"Filter\";\n active = false;\n\n get labels() {\n const cat: { [category: string]: [string, string][] } = {};\n for (const uuid of Object.keys(gameStore.labels)) {\n const label = gameStore.labels[uuid];\n if (!label.category) cat[\"\"].push([label.uuid, label.name]);\n else {\n if (!(label.category in cat)) cat[label.category] = [];\n cat[label.category].push([label.uuid, label.name]);\n cat[label.category].sort((a, b) => a[1].localeCompare(b[1]));\n }\n }\n return cat;\n }\n\n get initalValues() {\n const values: { [category: string]: string[] } = {};\n for (const cat of Object.keys(this.labels)) {\n values[cat] = gameStore.labelFilters.filter(f => this.labels[cat].map(l => l[0]).includes(f));\n }\n return values;\n }\n\n get categories() {\n return Object.keys(this.labels).sort();\n }\n\n isFilter(uuid: string): boolean {\n return gameStore.labelFilters.includes(uuid);\n }\n\n toggleFilter(uuid: string) {\n const i = gameStore.labelFilters.indexOf(uuid);\n if (i >= 0) gameStore.labelFilters.splice(i, 1);\n else gameStore.labelFilters.push(uuid);\n layerManager.invalidate();\n }\n\n toggleUnlabeled() {\n gameStore.toggleUnlabeledFilter();\n layerManager.invalidate();\n }\n\n updateSelection(data: { title: string; selection: string[] }) {\n if (!(data.title in this.labels)) return;\n for (const [uuid, _] of this.labels[data.title]) {\n const idx = gameStore.labelFilters.indexOf(uuid);\n const selected = data.selection.includes(uuid);\n if (idx >= 0 && !selected) {\n gameStore.labelFilters.splice(idx, 1);\n socket.emit(\"Labels.Filter.Remove\", uuid);\n } else if (idx < 0 && selected) {\n gameStore.labelFilters.push(uuid);\n socket.emit(\"Labels.Filter.Add\", uuid);\n }\n }\n layerManager.invalidate();\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Prop } from \"vue-property-decorator\";\nimport { gameStore } from '../../game/store';\n\n@Component\nexport default class Accordion extends Vue {\n @Prop(String) title!: string;\n @Prop({ default: true, type: Boolean }) showArrow!: boolean;\n @Prop({ default: () => []}) items!: [string, string][];\n @Prop({ default: () => []}) initialValues!: string[];\n\n selected: string[] = [];\n\n active = false;\n\n mounted() {\n this.selected = this.initialValues;\n this.updateCategory();\n }\n\n toggleDisplay(event: MouseEvent) {\n this.active = !this.active;\n }\n\n toggleCategory() {\n const overall = this.$refs.overall as HTMLInputElement;\n if (overall.checked) this.selected = this.items.map((i) => i[0]);\n else this.selected = [];\n this.$emit(\"selectionupdate\", {title: this.title, selection: this.selected});\n }\n\n updateCategory() {\n const overall = this.$refs.overall as HTMLInputElement;\n if (this.selected.length === 0) {\n overall.checked = false;\n overall.indeterminate = false;\n } else if(this.selected.length === this.items.length) {\n overall.checked = true;\n overall.indeterminate = false;\n } else {\n overall.checked = false;\n overall.indeterminate = true;\n }\n }\n\n toggleSelection(item: string) {\n const found = this.selected.indexOf(item);\n if (found === -1) this.selected.push(item);\n else this.selected.splice(found, 1);\n this.updateCategory();\n this.$emit(\"selectionupdate\", {title: this.title, selection: this.selected});\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { ServerMultiLine } from \"../comm/types/shapes\";\n\nexport class MultiLine extends Shape {\n type = \"multiline\";\n _points: GlobalPoint[] = [];\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n points?: GlobalPoint[],\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this._points = points || [];\n this.lineWidth = lineWidth || 3;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._points.length; i++) this._points[i] = this._points[i].add(delta);\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n line_width: this.lineWidth,\n points: this._points.map(p => ({ x: p.x, y: p.y })),\n });\n }\n fromDict(data: ServerMultiLine) {\n super.fromDict(data);\n this._points = data.points.map(p => new GlobalPoint(p.x, p.y));\n }\n get points() {\n return this._points.map(point => [point.x, point.y]);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._points) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n for (const p of this._points) ctx.lineTo(g2lx(p.x), g2ly(p.y));\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = g2lz(this.lineWidth);\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._points[resizePoint - 1] = l2g(point);\n }\n}\n","import { render, staticRenderFns } from \"./draw.vue?vue&type=template&id=639cd890&scoped=true&\"\nimport script from \"./draw.vue?vue&type=script&lang=ts&\"\nexport * from \"./draw.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"639cd890\",\n null\n \n)\n\ncomponent.options.__file = \"draw.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Initiative\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('draggable',{attrs:{\"id\":\"initiative-list\",\"options\":{setData: _vm.fakeSetData, disabled: !_vm.$store.state.game.IS_DM}},on:{\"change\":_vm.updateOrder},model:{value:(_vm.data),callback:function ($$v) {_vm.data=$$v},expression:\"data\"}},[_vm._l((_vm.data),function(actor){return [_c('div',{key:actor.uuid,staticStyle:{\"display\":\"flex\",\"flex-direction\":\"column\",\"align-items\":\"flex-end\"}},[_c('div',{staticClass:\"initiative-actor\",class:{'initiative-selected': _vm.currentActor === actor.uuid},style:({'cursor': _vm.$store.state.game.IS_DM && 'move'}),on:{\"mouseenter\":function($event){_vm.toggleHighlight(actor, true)},\"mouseleave\":function($event){_vm.toggleHighlight(actor, false)}}},[(actor.has_img)?[_c('img',{attrs:{\"src\":actor.source,\"width\":\"30px\",\"height\":\"30px\"}})]:[_c('span',{staticStyle:{\"width\":\"auto\"}},[_vm._v(_vm._s(actor.source))])],_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(actor.initiative),expression:\"actor.initiative\",modifiers:{\"lazy\":true,\"number\":true}}],class:{'notAllowed': !_vm.owns(actor)},attrs:{\"type\":\"text\",\"placeholder\":\"value\",\"disabled\":!_vm.owns(actor)},domProps:{\"value\":(actor.initiative)},on:{\"change\":[function($event){_vm.$set(actor, \"initiative\", _vm._n($event.target.value))},function($event){_vm.syncInitiative(actor)}],\"blur\":function($event){_vm.$forceUpdate()}}}),_c('div',{staticClass:\"initiative-effects-icon\",class:{'notAllowed': !_vm.owns(actor)},staticStyle:{\"opacity\":\"0.6\"},on:{\"click\":function($event){_vm.createEffect(actor, _vm.getDefaultEffect(), true)}}},[_c('i',{staticClass:\"fas fa-stopwatch\"}),(actor.effects)?[_vm._v(_vm._s(actor.effects.length))]:[_vm._v(\"0\")]],2),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.visible ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'visible')}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.group ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'group')}}},[_c('i',{staticClass:\"fas fa-users\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': _vm.owns(actor) ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.removeInitiative(actor.uuid, true, true)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})])],2),(actor.effects)?_c('div',{staticClass:\"initiative-effect\"},_vm._l((actor.effects),function(effect){return _c('div',{key:effect.uuid},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.name),expression:\"effect.name\"}],attrs:{\"type\":\"text\",\"size\":effect.name.length || 1},domProps:{\"value\":(effect.name)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.turns),expression:\"effect.turns\"}],attrs:{\"type\":\"text\",\"size\":effect.turns.toString().length || 1},domProps:{\"value\":(effect.turns)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"turns\", $event.target.value)}}})])})):_vm._e()])]})],2),_c('div',{attrs:{\"id\":\"initiative-bar\"}},[_c('div',{attrs:{\"id\":\"initiative-round\"}},[_vm._v(\"Round \"+_vm._s(_vm.roundCounter))]),_c('div',{staticStyle:{\"display\":\"flex\"}}),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":function($event){_vm.setRound(0, true); _vm.updateTurn(_vm.data[0].uuid, true)}}},[_c('i',{staticClass:\"fas fa-sync-alt\"})]),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":_vm.nextTurn}},[_c('i',{staticClass:\"fas fa-chevron-right\"})])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=template&id=af4dc61a&scoped=true&\"","import tinycolor from \"tinycolor2\";\n\nimport { LocalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function getMouse(e: MouseEvent): LocalPoint {\n return new LocalPoint(e.pageX, e.pageY);\n}\n\nexport function getFogColour(opposite: boolean = false): string {\n const tc = tinycolor(gameStore.fowColour);\n if (gameStore.IS_DM) tc.setAlpha(opposite ? 1 : gameStore.fowOpacity);\n else tc.setAlpha(1);\n return tc.toRgbString();\n}\n\nexport function zoomValue(display: number) {\n // Powercurve 0.2/3/10\n // Based on https://stackoverflow.com/a/17102320\n return 1 / (-5 / 3 + (28 / 15) * Math.exp(1.83 * display));\n}\n\nexport function zoomDisplay(value: number) {\n return Math.log((1 / value + 5 / 3) * (15 / 28)) / 1.83;\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport * as tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { Watch } from \"vue-property-decorator\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n computed: {\n ...mapState(\"game\", [\"unitSize\"]),\n },\n})\nexport default class CreateTokenModal extends Vue {\n x = 0;\n y = 0;\n visible = false;\n text = \"X\";\n fillColour = \"rgba(255, 255, 255, 1)\";\n borderColour = \"rgba(0, 0, 0, 1)\";\n\n mounted() {\n this.updatePreview();\n }\n\n @Watch(\"text\")\n onTextChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"fillColour\")\n onFillChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"borderColour\")\n onBorderChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n\n open(x: number, y: number) {\n this.visible = true;\n this.x = x;\n this.y = y;\n }\n submit() {\n const layer = layerManager.getLayer();\n if (layer === undefined) return;\n const token = new CircularToken(\n l2g(new LocalPoint(this.x, this.y)),\n getUnitDistance(gameStore.unitSize / 2),\n this.text,\n \"10px serif\",\n this.fillColour,\n this.borderColour,\n );\n token.addOwner(gameStore.username);\n layer.addShape(token, true);\n layer.invalidate(false);\n this.visible = false;\n }\n updatePreview() {\n const ctx = (this.$refs.canvas).getContext(\"2d\")!;\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.beginPath();\n const dest = { x: ctx.canvas.width / 2, y: ctx.canvas.height / 2 };\n const r = Math.min(dest.x, dest.y) * 0.9;\n\n ctx.fillStyle = this.fillColour;\n\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.fill();\n if (this.borderColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = 5;\n ctx.strokeStyle = this.borderColour;\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.save();\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, r, r);\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class NoteDialog extends Vue {\n visible = false;\n note: Note | null = null;\n\n open(note: Note) {\n this.visible = true;\n this.note = note;\n }\n calcHeight() {\n if (this.$refs.textarea) {\n const el = this.$refs.textarea;\n el.style.height = \"auto\";\n el.style.height = el.scrollHeight + \"px\";\n // Using the return value without the above did not achieve what I want, so hey /shrug\n return el.scrollHeight + \"px\";\n }\n return \"100px\";\n }\n updateNote() {\n if (this.note) gameStore.updateNote({ note: this.note, sync: true });\n }\n removeNote() {\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result && this.note) {\n gameStore.removeNote({ note: this.note, sync: true });\n this.visible = false;\n }\n },\n () => {},\n );\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport { Watch } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Polygon } from \"@/game/shapes/polygon\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n },\n})\nexport default class DrawTool extends Tool {\n name = \"Draw\";\n active = false;\n\n startPoint: GlobalPoint | null = null;\n shape: Shape | null = null;\n brushHelper: Circle | null = null;\n ruler: Line | null = null;\n\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"draw-polygon\", \"paint-brush\"];\n modeSelect = \"normal\";\n modes = [\"normal\", \"reveal\", \"hide\"];\n\n brushSize = getUnitDistance(gameStore.unitSize);\n\n get helperSize(): number {\n if (this.shapeSelect === \"paint-brush\") return this.brushSize / 2;\n return getUnitDistance(this.unitSize) / 8;\n }\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n\n @Watch(\"fillColour\")\n onFillChange() {\n if (this.brushHelper) this.brushHelper.fillColour = this.fillColour;\n }\n\n @Watch(\"modeSelect\")\n onModeUpdate(newValue: string, oldValue: string) {\n this.onModeChange(newValue, oldValue);\n }\n\n setupBrush() {\n if (this.brushHelper === null) return;\n if (this.modeSelect === \"reveal\" || this.modeSelect === \"hide\") {\n this.brushHelper.options.set(\"preFogShape\", true);\n this.brushHelper.options.set(\"skipDraw\", true);\n this.brushHelper.fillColour = \"rgba(0, 0, 0, 1)\";\n\n if (this.modeSelect === \"reveal\") this.brushHelper.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.brushHelper.globalCompositeOperation = \"destination-out\";\n } else {\n this.brushHelper.options.delete(\"preFogShape\");\n this.brushHelper.options.delete(\"skipDraw\");\n this.brushHelper.globalCompositeOperation = \"source-over\";\n this.brushHelper.fillColour = this.fillColour;\n }\n }\n onModeChange(newValue: string, oldValue: string) {\n if (this.brushHelper === null) return;\n\n const fowLayer = layerManager.getLayer(\"fow\");\n const normalLayer = layerManager.getLayer();\n if (fowLayer === undefined || normalLayer === undefined) return;\n\n this.setupBrush();\n\n if (newValue !== \"normal\" && oldValue === \"normal\") {\n normalLayer.removeShape(this.brushHelper, false);\n fowLayer.addShape(this.brushHelper, false);\n } else if (newValue === \"normal\" && oldValue !== \"normal\") {\n normalLayer.addShape(this.brushHelper, false);\n fowLayer.removeShape(this.brushHelper, false);\n }\n }\n getLayer() {\n if (this.modeSelect === \"normal\") return layerManager.getLayer();\n return layerManager.getLayer(\"fow\");\n }\n onMouseDown(event: MouseEvent) {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (!this.active) {\n this.startPoint = l2g(getMouse(event));\n this.active = true;\n switch (this.shapeSelect) {\n case \"square\": {\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n break;\n }\n case \"circle\": {\n this.shape = new Circle(\n this.startPoint.clone(),\n this.helperSize,\n this.fillColour,\n this.borderColour,\n );\n break;\n }\n case \"paint-brush\": {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n break;\n }\n case \"draw-polygon\": {\n this.shape = new Polygon(this.startPoint.clone(), [], this.fillColour, this.borderColour);\n break;\n }\n default:\n return;\n }\n\n if (this.modeSelect !== \"normal\") {\n this.shape.options.set(\"preFogShape\", true);\n this.shape.options.set(\"skipDraw\", true);\n this.shape.fillColour = \"rgba(0, 0, 0, 1)\";\n }\n if (this.modeSelect === \"reveal\") this.shape.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.shape.globalCompositeOperation = \"destination-out\";\n\n this.shape.addOwner(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n layer.addShape(this.shape, true, false, false);\n\n // Push brushhelper to back\n this.pushBrushBack();\n } else if (this.shape !== null && this.shape instanceof Polygon) {\n // For polygon draw\n this.shape._vertices.push(l2g(getMouse(event)));\n }\n if (this.shape !== null && this.shape instanceof Polygon) {\n const lastPoint = l2g(getMouse(event));\n if (this.ruler === null) {\n this.ruler = new Line(lastPoint, lastPoint, 3, \"black\");\n layer.addShape(this.ruler, false);\n } else {\n this.ruler.refPoint = lastPoint;\n this.ruler.endPoint = lastPoint;\n }\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n layer.invalidate(false);\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n }\n }\n onMouseMove(event: MouseEvent) {\n const endPoint = l2g(getMouse(event));\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (this.brushHelper !== null) {\n this.brushHelper.r = this.helperSize;\n this.brushHelper.refPoint = endPoint;\n if (!this.active) layer.invalidate(false);\n }\n\n if (!this.active || this.startPoint === null || this.shape === null) return;\n\n switch (this.shapeSelect) {\n case \"square\": {\n (this.shape).w = Math.abs(endPoint.x - this.startPoint.x);\n (this.shape).h = Math.abs(endPoint.y - this.startPoint.y);\n this.shape.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n break;\n }\n case \"circle\": {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n break;\n }\n case \"paint-brush\": {\n (this.shape)._points.push(endPoint);\n break;\n }\n case \"draw-polygon\": {\n this.ruler!.endPoint = endPoint;\n break;\n }\n }\n\n if (!(this.shape instanceof Polygon)) {\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n }\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null || this.shape instanceof Polygon) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n this.finaliseShape();\n }\n onContextMenu(event: MouseEvent) {\n if (!this.active || this.shape === null || !(this.shape instanceof Polygon)) return;\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n layer.removeShape(this.ruler!, false);\n this.ruler = null;\n this.finaliseShape();\n }\n\n private finaliseShape() {\n if (this.shape === null) return;\n if (this.shape.visionObstruction) gameStore.recalculateVision();\n if (this.shape.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\n }\n\n onSelect() {\n const layer = this.getLayer();\n if (layer === undefined) return;\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n onDeselect() {\n const layer = this.getLayer();\n if (this.brushHelper !== null && layer !== undefined) layer.removeShape(this.brushHelper, false);\n if (this.active && layer !== undefined && this.shape !== null) {\n layer.removeShape(this.shape, true, false);\n this.shape = null;\n this.active = false;\n layer.invalidate(false);\n }\n }\n\n private pushBrushBack() {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (this.brushHelper !== null) layer.removeShape(this.brushHelper, false);\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, l2g } from \"@/game/units\";\n\nexport class Line extends Shape {\n type = \"line\";\n endPoint: GlobalPoint;\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n endPoint: GlobalPoint,\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this.endPoint = endPoint;\n this.lineWidth = lineWidth === undefined ? 1 : lineWidth;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n x2: this.endPoint.x,\n y2: this.endPoint.y,\n line_width: this.lineWidth,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y], [this.endPoint.x, this.endPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(Math.min(this.refPoint.x, this.endPoint.x), Math.min(this.refPoint.y, this.endPoint.y)),\n Math.abs(this.refPoint.x - this.endPoint.x),\n Math.abs(this.refPoint.y - this.endPoint.y),\n );\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.strokeStyle = this.strokeColour;\n ctx.beginPath();\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n ctx.lineTo(g2lx(this.endPoint.x), g2ly(this.endPoint.y));\n ctx.lineWidth = this.lineWidth;\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this.refPoint = l2g(point);\n else this.endPoint = l2g(point);\n }\n}\n","// import \"./class-component-hooks\";\n\nimport axios, { AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Router from \"vue-router\";\n\nVue.use(Router);\n\nimport AssetManager from \"@/assetManager/manager.vue\";\nimport Login from \"@/auth/login.vue\";\nimport Logout from \"@/auth/logout\";\nimport LoadComponent from \"@/core/components/load.vue\";\nimport Dashboard from \"@/dashboard/main.vue\";\nimport Game from \"@/game/game.vue\";\nimport Invitation from \"@/invitation/invitation\";\n\nimport { coreStore } from \"@/core/store\";\n// import { AssetManager } from \"./assetManager/assets\";\n// const AssetManager = () => import(\"./assetManager/assets\").then(m => m.AssetManager);\n\nexport const router = new Router({\n mode: \"history\",\n base: process.env.BASE_URL,\n routes: [\n {\n path: \"/\",\n redirect: \"/dashboard\",\n },\n {\n path: \"/_load\",\n name: \"load\",\n component: LoadComponent,\n },\n {\n path: \"/assets\",\n component: AssetManager,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/auth\",\n component: { template: \"\" },\n children: [{ path: \"login\", component: Login }, { path: \"logout\", component: Logout }],\n },\n {\n path: \"/invite/:code\",\n component: Invitation,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/dashboard\",\n component: Dashboard,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/game/:creator/:room\",\n component: Game,\n meta: {\n auth: true,\n },\n },\n ],\n});\n\nrouter.beforeEach((to, from, next) => {\n if (!coreStore.initialized && to.path !== \"/_load\") {\n next({ path: \"/_load\" });\n axios\n .get(\"/api/auth\")\n .then((response: AxiosResponse) => {\n if (response.data.auth) {\n coreStore.setAuthenticated(true);\n coreStore.setUsername(response.data.username);\n }\n coreStore.setInitialized(true);\n router.push(to.path);\n })\n .catch(() => {\n console.error(\"Authentication check could not be fulfilled.\");\n });\n } else if (to.matched.some(record => record.meta.auth) && !coreStore.authenticated) {\n next({ path: \"/auth/login\", query: { redirect: to.path } });\n } else {\n next();\n }\n});\n","\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class Tool extends Vue {\n name = \"\";\n selected = false;\n active = false;\n get detailRight(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n\n return `${window.innerWidth - Math.min(window.innerWidth - 25, mid + 75)}px`;\n }\n get detailArrow(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n const right = Math.min(window.innerWidth - 25, mid + 75);\n return `${right - mid - 14}px`; // border width\n }\n created() {\n this.$parent.$on(\"mousedown\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseDown(event);\n });\n this.$parent.$on(\"mouseup\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseUp(event);\n });\n this.$parent.$on(\"mousemove\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseMove(event);\n });\n this.$parent.$on(\"contextmenu\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onContextMenu(event);\n });\n this.$parent.$on(\"tools-select-change\", (newValue: string, oldValue: string) => {\n if (oldValue === this.name) {\n this.selected = false;\n this.onDeselect();\n } else if (newValue === this.name) {\n this.selected = true;\n this.onSelect();\n }\n });\n }\n onSelect() {}\n onDeselect() {}\n onMouseDown(event: MouseEvent) {}\n onMouseUp(event: MouseEvent) {}\n onMouseMove(event: MouseEvent) {}\n onContextMenu(event: MouseEvent) {}\n}\n","import { render, staticRenderFns } from \"./tools.vue?vue&type=template&id=cf33581e&scoped=true&\"\nimport script from \"./tools.vue?vue&type=script&lang=ts&\"\nexport * from \"./tools.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tools.vue?vue&type=style&index=0&id=cf33581e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"cf33581e\",\n null\n \n)\n\ncomponent.options.__file = \"tools.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"","import { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerAsset } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport class Asset extends BaseRect {\n type = \"assetrect\";\n img: HTMLImageElement;\n src: string = \"\";\n constructor(img: HTMLImageElement, topleft: GlobalPoint, w: number, h: number, uuid?: string) {\n super(topleft, w, h, undefined, undefined, uuid);\n this.img = img;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n src: this.src,\n });\n }\n fromDict(data: ServerAsset) {\n super.fromDict(data);\n this.src = data.src;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n try {\n ctx.drawImage(this.img, g2lx(this.refPoint.x), g2ly(this.refPoint.y), g2lz(this.w), g2lz(this.h));\n } catch (error) {\n console.warn(`Shape ${this.uuid} could not load the image ${this.src}`);\n }\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.src,\n has_img: true,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import {\n BoundingBox,\n EdgeCirculator,\n FaceCirculator,\n LineFaceCirculator,\n LocateType,\n Point,\n Sign,\n TDS,\n Triangle,\n Vertex,\n} from \"./tds\";\nimport {\n ccw,\n collinearBetween,\n cw,\n edgeInfo,\n hasInexactNegativeOrientation,\n intersection,\n orientation,\n sideOfOrientedCircle,\n xyEqual,\n} from \"./triag\";\n\nexport type Edge = [Triangle, number];\n\nexport class CDT {\n tds: TDS;\n constructor() {\n this.tds = new TDS();\n }\n insertConstraint(a: Point, b: Point) {\n const va = this.insert(a);\n const vb = this.insert(b);\n if (va !== vb) this.insertConstraintV(va, vb);\n }\n\n insertConstraintV(va: Vertex, vb: Vertex) {\n const stack = [[va, vb]];\n while (stack.length > 0) {\n const v = stack.pop()!;\n const info = edgeInfo(v[0], v[1]);\n if (info.includes) {\n this.markConstraint(info.fr!, info.i!);\n if (info.vi! !== v[1]) {\n stack.push([info.vi!, v[1]]);\n }\n continue;\n }\n const intersectionInfo = this.findIntersectedFaces(v[0], v[1]);\n if (intersectionInfo.found) {\n if (intersectionInfo.vi !== v[0] && intersectionInfo.vi !== v[1]) {\n stack.push([v[0], intersectionInfo.vi]);\n stack.push([intersectionInfo.vi, v[1]]);\n } else {\n stack.push(v);\n }\n continue;\n }\n this.triangulateHole(intersectionInfo.intersectedFaces, intersectionInfo.listAB, intersectionInfo.listBA);\n if (intersectionInfo.vi !== v[1]) {\n stack.push([intersectionInfo.vi, v[1]]);\n }\n }\n }\n\n triangulateHole(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[]) {\n const edges: Edge[] = [];\n this.triangulateHole2(intersectedFaces, listAB, listBA, edges);\n this.propagatingFlipE(edges);\n }\n\n triangulateHole2(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[], edges: Edge[]) {\n if (listAB.length > 0) {\n this.triangulateHalfHole(listAB, edges);\n this.triangulateHalfHole(listBA, edges);\n const fl = listAB[0][0];\n const fr = listBA[0][0];\n fl.neighbours[2] = fr;\n fr.neighbours[2] = fl;\n fl.constraints[2] = true;\n fr.constraints[2] = true;\n\n while (intersectedFaces.length > 0) {\n this.tds.deleteTriangle(intersectedFaces.shift()!);\n }\n }\n }\n\n triangulateHalfHole(conflictBoundaries: Edge[], edges: Edge[]) {\n let iC = 0;\n let iN: number;\n let iT: number;\n const current = () => conflictBoundaries[iC];\n const next = () => conflictBoundaries[iN];\n const tempo = () => conflictBoundaries[iT];\n\n const va = current()[0].vertices[ccw(current()[1])]!;\n iN = iC;\n ++iN;\n\n let n: Triangle;\n let n1: Triangle;\n let n2: Triangle;\n let ind: number;\n let ind1: number;\n let ind2: number;\n do {\n n1 = current()[0];\n ind1 = current()[1];\n if (n1.neighbours[ind1] !== null) {\n n = n1.neighbours[ind1]!;\n ind = cw(n.indexV(n1.vertices[cw(ind1)]!));\n n1 = n.neighbours[ind]!;\n ind1 = this.tds.mirrorIndex(n, ind);\n }\n n2 = next()[0];\n ind2 = next()[1];\n if (n2.neighbours[ind2] !== null) {\n n = n2.neighbours[ind2]!;\n ind = cw(n.indexV(n2.vertices[cw(ind2)]!));\n n2 = n.neighbours[ind]!;\n ind2 = this.tds.mirrorIndex(n, ind);\n }\n const v0 = n1.vertices[ccw(ind1)]!;\n const v1 = n1.vertices[cw(ind1)]!;\n const v2 = n2.vertices[cw(ind2)]!;\n const orient = orientation(v0.point!, v1.point!, v2.point!);\n switch (orient) {\n case Sign.RIGHT_TURN: {\n const newlf = this.tds.createTriangle(v0, v2, v1, null, null, null);\n edges.push([newlf, 2]);\n newlf.neighbours[1] = n1;\n newlf.neighbours[0] = n2;\n n1.neighbours[ind1] = newlf;\n n2.neighbours[ind2] = newlf;\n if (n1.isConstrained(ind1)) newlf.constraints[1] = true;\n if (n2.isConstrained(ind2)) newlf.constraints[0] = true;\n v0.triangle = newlf;\n v1.triangle = newlf;\n v2.triangle = newlf;\n iT = iC + 1;\n conflictBoundaries.splice(iC, 0, [newlf, 2]);\n conflictBoundaries.splice(Math.max(iT, iN), 1);\n conflictBoundaries.splice(Math.min(iT, iN), 1);\n iN = iC;\n if (v0 !== va) --iC;\n else ++iN;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.COLLINEAR: {\n ++iC;\n ++iN;\n break;\n }\n }\n } while (iN < conflictBoundaries.length);\n }\n\n findIntersectedFaces(vaa: Vertex, vbb: Vertex) {\n const aa = vaa.point!;\n const bb = vbb.point!;\n const listAB: Edge[] = [];\n const listBA: Edge[] = [];\n const intersectedFaces: Triangle[] = [];\n const lfc = new LineFaceCirculator(vaa, this, bb);\n let ind = lfc.pos!.indexV(vaa);\n let vi: Vertex;\n if (lfc.pos!.isConstrained(ind)) {\n vi = this.intersect(lfc.pos!, ind, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n }\n let lf = lfc.pos!.neighbours[ccw(ind)]!;\n let rf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n intersectedFaces.unshift(lfc.pos!);\n let previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n let currentVertex = lfc.pos!.vertices[ind]!;\n let done = false;\n while (currentVertex !== vbb && !done) {\n let i1: number;\n let i2: number;\n const orient = orientation(aa, bb, currentVertex.point!);\n switch (orient) {\n case Sign.COLLINEAR: {\n done = true;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.RIGHT_TURN: {\n if (orient === Sign.LEFT_TURN) {\n i1 = ccw(ind);\n i2 = cw(ind);\n } else {\n i1 = cw(ind);\n i2 = ccw(ind);\n }\n if (lfc.pos!.isConstrained(i1)) {\n vi = this.intersect(lfc.pos!, i1, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n } else {\n lf = lfc.pos!.neighbours[i2]!;\n intersectedFaces.unshift(lfc.pos!);\n if (orient === Sign.LEFT_TURN) listAB.push([lf, lf.indexT(lfc.pos!)]);\n else listBA.unshift([lf, lf.indexT(lfc.pos!)]);\n previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n currentVertex = lfc.pos!.vertices[ind]!;\n }\n break;\n }\n }\n }\n vi = currentVertex;\n intersectedFaces.unshift(lfc.pos!);\n lf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n rf = lfc.pos!.neighbours[ccw(ind)]!;\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n return { found: false, vi, listAB, listBA, intersectedFaces };\n }\n\n intersect(t: Triangle, i: number, vaa: Vertex, vbb: Vertex): Vertex {\n const vcc = t.vertices[cw(i)]!;\n const vdd = t.vertices[ccw(i)]!;\n const pa = vaa.point!;\n const pb = vbb.point!;\n const pc = vcc.point!;\n const pd = vdd.point!;\n let pi = intersection(pa, pb, pc, pd);\n if (pi !== pa && pi !== pb && pi !== pc && pi !== pd) {\n const bbox = new BoundingBox(pi!);\n bbox.dilate(4);\n if (bbox.overlaps(new BoundingBox(pa))) pi = pa;\n if (bbox.overlaps(new BoundingBox(pb))) pi = pb;\n if (bbox.overlaps(new BoundingBox(pc))) pi = pc;\n if (bbox.overlaps(new BoundingBox(pd))) pi = pd;\n }\n let vi: Vertex;\n if (pi === null) throw new Error(\"what\");\n else {\n this.removeConstrainedEdge(t, i);\n vi = this.insert(pi, t);\n }\n\n if (vi !== vcc && vi !== vdd) {\n this.insertConstraintV(vcc, vi);\n this.insertConstraintV(vi, vdd);\n } else {\n this.insertConstraintV(vcc, vdd);\n }\n return vi;\n }\n\n removeConstrainedEdge(t: Triangle, i: number) {\n t.constraints[i] = false;\n if (this.tds.dimension === 2) t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = false;\n }\n\n updateConstraintsOpposite(v: Vertex) {\n let t = v.triangle!;\n const start = t;\n let indf: number;\n do {\n indf = t.indexV(v);\n if (t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)]) t.constraints[indf] = true;\n else t.constraints[indf] = false;\n t = t.neighbours[ccw(indf)]!;\n } while (t !== start);\n }\n\n markConstraint(t: Triangle, i: number) {\n if (this.tds.dimension === 1) t.constraints[2] = true;\n else {\n t.constraints[i] = true;\n t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = true;\n }\n }\n\n insert(p: Point, start: Triangle | null = null) {\n const locateInfo = this.locate(p, this.iLocate(p, start));\n const va = this.insertb(p, locateInfo.loc, locateInfo.lt, locateInfo.li);\n this.flipAround(va);\n return va;\n }\n\n flipAround(v: Vertex) {\n if (this.tds.dimension <= 1) return;\n let t = v.triangle!;\n let i: number;\n let next: Triangle;\n const start = t;\n do {\n i = t.indexV(v);\n next = t.neighbours[ccw(i)]!;\n this.propagatingFlip(t, i);\n t = next;\n } while (next !== start);\n }\n\n propagatingFlip(t: Triangle, i: number, depth = 0) {\n if (!this.isFlipable(t, i)) return;\n const maxDepth = 100;\n if (depth === maxDepth) {\n throw new Error(\"maxde\");\n return;\n }\n const ni = t.neighbours[i]!;\n this.flip(t, i);\n this.propagatingFlip(t, i, depth + 1);\n i = ni.indexV(t.vertices[i]!);\n this.propagatingFlip(ni, i, depth + 1);\n }\n\n lessEdge(e1: Edge, e2: Edge) {\n const ind1 = e1[1];\n const ind2 = e2[1];\n return e1[0].uid < e2[0].uid || (e1[0].uid === e2[0].uid && ind1 < ind2);\n }\n\n propagatingFlipE(edges: Edge[]) {\n let eI = 0;\n let t: Triangle;\n let i: number;\n let eni: Edge;\n const edgeSet: Edge[] = [];\n while (eI < edges.length) {\n t = edges[eI][0];\n i = edges[eI][1];\n if (this.isFlipable(t, i)) {\n eni = [t.neighbours[i]!, this.tds.mirrorIndex(t, i)];\n if (this.lessEdge(edges[eI], eni)) edgeSet.push(edges[eI]);\n else edgeSet.push(eni);\n }\n ++eI;\n }\n let indf: number;\n let ni: Triangle;\n let indn: number;\n let ei: Edge;\n const e: (Edge | null)[] = [null, null, null, null];\n while (edgeSet.length > 0) {\n t = edgeSet[0][0];\n indf = edgeSet[0][1];\n ni = t.neighbours[indf]!;\n indn = this.tds.mirrorIndex(t, indf);\n ei = [t, indf];\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === ei[0] && ed[1] === ei[1]), 1);\n e[0] = [t, cw(indf)];\n e[1] = [t, ccw(indf)];\n e[2] = [ni, cw(indn)];\n e[3] = [ni, ccw(indn)];\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni))\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === edge![0] && ed[1] === edge![1]), 1);\n else edgeSet.splice(edgeSet.findIndex(ed => ed[0] === eni[0] && ed[1] === eni[1]), 1);\n }\n\n this.flip(t, indf);\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n if (this.isFlipable(tt, ii)) {\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni)) edgeSet.push(edge!);\n else edgeSet.push(eni);\n }\n }\n }\n }\n\n flip(t: Triangle, i: number) {\n const u = t.neighbours[i]!;\n const j = this.tds.mirrorIndex(t, i);\n const t1 = t.neighbours[cw(i)]!;\n const i1 = this.tds.mirrorIndex(t, cw(i));\n const t2 = t.neighbours[ccw(i)]!;\n const i2 = this.tds.mirrorIndex(t, ccw(i));\n const t3 = u.neighbours[cw(j)]!;\n const i3 = this.tds.mirrorIndex(u, cw(j));\n const t4 = u.neighbours[ccw(j)]!;\n const i4 = this.tds.mirrorIndex(u, ccw(j));\n this.tds.flip(t, i);\n t.constraints[t.indexT(u)] = false;\n u.constraints[u.indexT(t)] = false;\n t1.neighbours[i1]!.constraints[this.tds.mirrorIndex(t1, i1)] = t1.constraints[i1];\n t2.neighbours[i2]!.constraints[this.tds.mirrorIndex(t2, i2)] = t2.constraints[i2];\n t3.neighbours[i3]!.constraints[this.tds.mirrorIndex(t3, i3)] = t3.constraints[i3];\n t4.neighbours[i4]!.constraints[this.tds.mirrorIndex(t4, i4)] = t4.constraints[i4];\n }\n\n isFlipable(t: Triangle, i: number, perturb = true) {\n const ni = t.neighbours[i]!;\n if (t.isInfinite() || ni.isInfinite()) return false;\n if (t.constraints[i]) return false;\n return sideOfOrientedCircle(ni, t.vertices[i]!.point!, perturb) === Sign.ON_POSITIVE_SIDE;\n }\n\n insertb(a: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n let insertInConstrainedEdge = false;\n let v1: Vertex;\n let v2: Vertex;\n if (lt === LocateType.EDGE && loc!.isConstrained(li)) {\n insertInConstrainedEdge = true;\n v1 = loc!.vertices[ccw(li)]!;\n v2 = loc!.vertices[cw(li)]!;\n }\n const va = this.insertc(a, loc, lt, li);\n if (insertInConstrainedEdge) this.updateConstraintsIncident(va, v1!, v2!);\n else if (lt !== LocateType.VERTEX) this.clearConstraintsIncident(va);\n if (this.tds.dimension === 2) this.updateConstraintsOpposite(va);\n return va;\n }\n\n updateConstraintsIncident(va: Vertex, c1: Vertex, c2: Vertex) {\n if (this.tds.dimension === 0) return;\n if (this.tds.dimension === 1) {\n const ec = new EdgeCirculator(va, null);\n do {\n ec.t!.constraints[2] = true;\n } while (ec.next());\n } else {\n const fc = new FaceCirculator(va, null);\n do {\n const indf = fc.t!.indexV(va);\n const cwi = cw(indf);\n const ccwi = ccw(indf);\n if (fc.t!.vertices[cwi] === c1 || fc.t!.vertices[cwi] === c2) {\n fc.t!.constraints[ccwi] = true;\n fc.t!.constraints[cwi] = false;\n } else {\n fc.t!.constraints[ccwi] = false;\n fc.t!.constraints[cwi] = true;\n }\n } while (fc.next());\n }\n }\n\n clearConstraintsIncident(v: Vertex) {\n const ec = new EdgeCirculator(v, null);\n if (ec.valid) {\n do {\n const t = ec.t!;\n const indf = ec.ri;\n t.constraints[indf] = false;\n if (this.tds.dimension === 2) t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)] = false;\n } while (ec.next());\n }\n }\n\n insertc(p: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n if (this.tds.vertices.length === 1) {\n return this.insertFirst(p);\n } else if (this.tds.vertices.length === 2) {\n if (lt === LocateType.VERTEX) return this.tds.finiteVertex;\n else return this.insertSecond(p);\n }\n switch (lt) {\n case LocateType.VERTEX: {\n return loc!.vertices[li]!;\n }\n case LocateType.OUTSIDE_AFFINE_HULL: {\n return this.insertOutsideAffineHull(p);\n }\n case LocateType.OUTSIDE_CONVEX_HULL: {\n return this.insertOutsideConvexHull(p, loc!);\n }\n case LocateType.EDGE: {\n return this.insertInEdge(p, loc!, li);\n }\n case LocateType.FACE: {\n return this.insertInFace(p, loc!);\n }\n }\n throw new Error(\"qwe\");\n return new Vertex();\n }\n\n insertInEdge(p: Point, loc: Triangle, li: number): Vertex {\n const v = this.tds.insertInEdge(loc, li);\n v.point = p;\n return v;\n }\n\n insertInFace(p: Point, loc: Triangle): Vertex {\n const v = this.tds.insertInFace(loc);\n v.point = p;\n return v;\n }\n\n insertFirst(p: Point): Vertex {\n const v = this.tds.insertDimUp();\n v.point = p;\n return v;\n }\n\n insertSecond(p: Point): Vertex {\n const v = this.tds.insertDimUp(this.tds._infinite, true);\n v.point = p;\n return v;\n }\n\n insertOutsideAffineHull(p: Point): Vertex {\n let conform = false;\n if (this.tds.dimension === 1) {\n const t = this.tds.finiteEdge.first!;\n const orient = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n conform = orient === Sign.COUNTERCLOCKWISE;\n }\n const v = this.tds.insertDimUp(this.tds._infinite, conform);\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull(p: Point, t: Triangle): Vertex {\n let v: Vertex;\n if (this.tds.dimension === 1) {\n throw new Error(\"sdfasdasd\");\n } else {\n v = this.insertOutsideConvexHull2(p, t);\n }\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull2(p: Point, t: Triangle): Vertex {\n let li = t.indexV(this.tds._infinite);\n const ccwlist: Triangle[] = [];\n const cwlist: Triangle[] = [];\n let fc = new FaceCirculator(this.tds._infinite, t);\n let done = false;\n while (!done) {\n fc.prev();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) ccwlist.push(fc.t!);\n else done = true;\n }\n fc = new FaceCirculator(this.tds._infinite, t);\n done = false;\n while (!done) {\n fc.next();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) cwlist.push(fc.t!);\n else done = true;\n }\n const v = this.tds.insertInFace(t);\n v.point = p;\n let th;\n while (ccwlist.length > 0) {\n th = ccwlist[0];\n li = ccw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n ccwlist.shift();\n }\n while (cwlist.length > 0) {\n th = cwlist[0];\n li = cw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n cwlist.shift();\n }\n fc = new FaceCirculator(v, null);\n while (!fc.t!.isInfinite()) fc.next();\n this.tds._infinite.triangle = fc.t!;\n return v;\n }\n\n locate(p: Point, start: Triangle | null) {\n let lt = 0;\n let li = 0;\n if (this.tds.dimension < 0) {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 0) {\n if (xyEqual(p, this.tds.finiteVertex.triangle!.vertices[0]!.point!)) {\n lt = LocateType.VERTEX;\n } else {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n }\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 1) {\n return this.marchLocate1D(p);\n }\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)]!;\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)]!;\n }\n return this.marchLocate2D(start, p);\n }\n\n marchLocate1D(p: Point) {\n const ff = this.tds._infinite.triangle!;\n const iv = ff.indexV(this.tds._infinite);\n const t = ff.neighbours[iv]!;\n const pqt = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n if (pqt === Sign.RIGHT_TURN || pqt === Sign.LEFT_TURN) {\n return { loc: new Triangle(), lt: LocateType.OUTSIDE_AFFINE_HULL, li: 4 };\n }\n const i = t.indexT(ff);\n if (collinearBetween(p, t.vertices[1 - i]!.point!, t.vertices[i]!.point!))\n return { loc: ff, lt: LocateType.OUTSIDE_CONVEX_HULL, li: iv };\n\n if (xyEqual(p, t.vertices[1 - i]!.point!)) return { loc: t, lt: LocateType.VERTEX, li: 1 - i };\n throw new Error(\"sdfsdf\");\n }\n\n marchLocate2D(c: Triangle, p: Point) {\n let prev = null;\n let first = true;\n let lt: LocateType | undefined;\n let li: number | undefined;\n while (true) {\n if (c.isInfinite()) {\n return { loc: c, lt: LocateType.OUTSIDE_CONVEX_HULL, li: c.indexV(this.tds._infinite) };\n }\n const leftFirst = 0; // Math.round(Math.random());\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n let o0: Sign;\n let o1: Sign;\n let o2: Sign;\n if (first) {\n prev = c;\n first = false;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (leftFirst) {\n if (c.neighbours[0]! === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1]! === prev) {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1] === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n }\n const sum =\n (o0 === Sign.COLLINEAR ? 1 : 0) + (o1 === Sign.COLLINEAR ? 1 : 0) + (o2 === Sign.COLLINEAR ? 1 : 0);\n switch (sum) {\n case 0: {\n lt = LocateType.FACE;\n li = 4;\n break;\n }\n case 1: {\n lt = LocateType.EDGE;\n li = o0 === Sign.COLLINEAR ? 2 : o1 === Sign.COLLINEAR ? 0 : 1;\n break;\n }\n case 2: {\n lt = LocateType.VERTEX;\n li = o0 !== Sign.COLLINEAR ? 2 : o1 !== Sign.COLLINEAR ? 0 : 1;\n break;\n }\n }\n if (lt === undefined || li === undefined) throw new Error(\"ert\");\n return { loc: c, lt, li };\n }\n }\n\n iLocate(p: Point, start: Triangle | null) {\n if (this.tds.dimension < 2) return start;\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)];\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)];\n }\n let prev = null;\n let c = start!;\n let first = true;\n let nTurns = 2500;\n while (true) {\n if (!nTurns--) return c;\n if (c.isInfinite()) return c;\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n if (first) {\n prev = c;\n first = false;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (c.neighbours[1] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n } else {\n prev = c;\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n }\n }\n break;\n }\n return c;\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy, l2gz } from \"@/game/units\";\n\nclass LayerManager {\n layers: Layer[] = [];\n width = window.innerWidth;\n height = window.innerHeight;\n\n UUIDMap: Map = new Map();\n\n // Refresh interval and redraw setter.\n interval = 30;\n\n constructor() {\n requestAnimationFrame(this.drawLoop);\n }\n\n reset() {\n this.layers = [];\n this.UUIDMap = new Map();\n }\n\n drawLoop = () => {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].draw();\n }\n requestAnimationFrame(this.drawLoop);\n };\n\n setWidth(width: number): void {\n this.width = width;\n for (const layer of this.layers) {\n layer.canvas.width = width;\n layer.width = width;\n }\n }\n\n setHeight(height: number): void {\n this.height = height;\n for (const layer of this.layers) {\n layer.canvas.height = height;\n layer.height = height;\n }\n }\n\n addLayer(layer: Layer): void {\n this.layers.push(layer);\n if (!gameStore.IS_DM && !layer.playerEditable) return;\n if (layer.selectable) gameStore.addLayer(layer.name);\n }\n\n hasLayer(name: string): boolean {\n return this.layers.some(l => l.name === name);\n }\n\n getLayer(name?: string) {\n name = name === undefined ? gameStore.selectedLayer : name;\n for (const layer of this.layers) {\n if (layer.name === name) return layer;\n }\n }\n\n selectLayer(name: string, sync: boolean = true): void {\n let found = false;\n for (const layer of this.layers) {\n if (!layer.selectable) continue;\n if (found && layer.name !== \"fow\") layer.ctx.globalAlpha = 0.3;\n else layer.ctx.globalAlpha = 1.0;\n\n if (name === layer.name) {\n gameStore.selectLayer({ name, sync });\n found = true;\n }\n\n layer.clearSelection();\n layer.invalidate(true);\n }\n }\n\n getGridLayer(): GridLayer | undefined {\n return this.getLayer(\"grid\");\n }\n\n hasSelection() {\n const selection = this.getSelection();\n return selection !== undefined && selection.length > 0;\n }\n\n // THIS INCLUDES POTENTIALLY THE SelectTool.SelectionHelper !!!\n getSelection() {\n const layer = this.getLayer();\n if (layer === undefined) return undefined;\n return layer.selection;\n }\n\n invalidate(): void {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].invalidate(true);\n }\n }\n\n invalidateLight() {\n for (let i = this.layers.length - 1; i >= 0; i--)\n if (this.layers[i].isVisionLayer) this.layers[i].invalidate(true);\n }\n\n dropAsset(event: DragEvent) {\n const layer = this.getLayer();\n if (layer === undefined || event === null || event.dataTransfer === null) return;\n const image = document.createElement(\"img\");\n image.src = event.dataTransfer.getData(\"text/plain\");\n const asset = new Asset(\n image,\n new GlobalPoint(l2gx(event.clientX), l2gy(event.clientY)),\n l2gz(image.width),\n l2gz(image.height),\n );\n asset.src = new URL(image.src).pathname;\n\n if (gameStore.useGrid) {\n const gs = gameStore.gridSize;\n asset.refPoint = new GlobalPoint(\n Math.round(asset.refPoint.x / gs) * gs,\n Math.round(asset.refPoint.y / gs) * gs,\n );\n asset.w = Math.max(Math.round(asset.w / gs) * gs, gs);\n asset.h = Math.max(Math.round(asset.h / gs) * gs, gs);\n }\n\n layer.addShape(asset, true);\n }\n}\n\nexport const layerManager = new LayerManager();\n(window).lm = layerManager;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"\nimport script from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"73816298\",\n null\n \n)\n\ncomponent.options.__file = \"createtoken_modal.vue\"\nexport default component.exports","import { BoundingRect } from \"@/game/shapes/boundingrect\";\n\nexport class BoundingNode {\n bbox: BoundingRect;\n nPrimitives: number;\n children: BoundingNode[] = [];\n constructor(nPrimitives: number, bbox: BoundingRect) {\n this.nPrimitives = nPrimitives;\n this.bbox = bbox;\n }\n}\n\nexport class LeafNode extends BoundingNode {\n firstPrimOffset: number;\n constructor(first: number, n: number, bbox: BoundingRect) {\n super(n, bbox);\n this.firstPrimOffset = first;\n }\n}\n\nexport class InteriorNode extends BoundingNode {\n dimension: number;\n constructor(dimension: number, c1: BoundingNode, c2: BoundingNode) {\n super(0, c1.bbox.union(c2.bbox));\n this.dimension = dimension;\n this.children.push(c1);\n this.children.push(c2);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"","import Tools from \"@/game/ui/tools/tools.vue\";\n\nimport { getRef, uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { ServerAura } from '@/game/comm/types/shapes';\nimport { EventBus } from \"@/game/event-bus\";\nimport { Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\n\nexport function onKeyUp(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n } else {\n if (event.key === \"Delete\" || event.key === \"Del\" || event.key === \"Backspace\") {\n if (layerManager.getLayer === undefined) {\n console.log(\"No active layer selected for delete operation\");\n return;\n }\n const l = layerManager.getLayer()!;\n for (let i = l.selection.length - 1; i >= 0; i--) {\n const sel = l.selection[i];\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) {\n l.selection.splice(i, 1);\n continue;\n }\n l.removeShape(sel, true, false);\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n EventBus.$emit(\"Initiative.Remove\", sel.uuid);\n }\n }\n }\n}\n\nexport function onKeyDown(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n if (event.keyCode === 65 && event.ctrlKey) event.target!.select();\n } else {\n if (event.keyCode >= 37 && event.keyCode <= 40) {\n // todo: this should already be rounded\n const gridSize = Math.round(gameStore.gridSize);\n let offsetX = gridSize * (event.keyCode % 2);\n let offsetY = gridSize * (event.keyCode % 2 ? 0 : 1);\n if (layerManager.hasSelection()) {\n const selection = layerManager.getSelection()!;\n offsetX *= event.keyCode <= 38 ? -1 : 1;\n offsetY *= event.keyCode <= 38 ? -1 : 1;\n let delta = new Vector(offsetX, offsetY);\n if (!event.shiftKey || !gameStore.IS_DM) {\n // First check for collisions. Using the smooth wall slide collision check used on mouse move is overkill here.\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n delta = calculateDelta(delta, sel);\n }\n }\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n sel.refPoint = sel.refPoint.add(delta);\n // todo: Fix again\n // if (sel.refPoint.x % gridSize !== 0 || sel.refPoint.y % gridSize !== 0) sel.snapToGrid();\n socket.emit(\"Shape.Position.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n gameStore.recalculateVision();\n layerManager.getLayer()!.invalidate(false);\n } else {\n // The pan offsets should be in the opposite direction to give the correct feel.\n gameStore.increasePanX(offsetX * (event.keyCode <= 38 ? 1 : -1));\n gameStore.increasePanY(offsetY * (event.keyCode <= 38 ? 1 : -1));\n layerManager.invalidate();\n sendClientOptions();\n }\n } else if (event.keyCode === 68) {\n const layer = layerManager.getLayer();\n if (layer) {\n layer.clearSelection();\n layer.invalidate(true);\n }\n } else if (event.key === \"u\" && event.ctrlKey) {\n event.preventDefault();\n event.stopPropagation();\n gameStore.toggleUI();\n } else if (event.key === \"c\" && event.ctrlKey) {\n const layer = layerManager.getLayer();\n if (!layer) return;\n if (!layer.selection) return;\n const clipboard = [];\n for (const shape of layer.selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === shape.uuid) continue;\n clipboard.push(shape.asDict());\n }\n gameStore.setClipboard(clipboard);\n } else if (event.key === \"v\" && event.ctrlKey) {\n const layer = layerManager.getLayer();\n if (!layer) return;\n if (!gameStore.clipboard) return;\n layer.selection = [];\n for (const clip of gameStore.clipboard) {\n clip.x += 10;\n clip.y += 10;\n clip.uuid = uuidv4();\n const oldTrackers = clip.trackers;\n clip.trackers = [];\n for (const tracker of oldTrackers) {\n const newTracker: Tracker = {\n ...tracker,\n uuid: uuidv4()\n }\n clip.trackers.push(newTracker);\n }\n const oldAuras = clip.auras;\n clip.auras = [];\n for (const aura of oldAuras) {\n const newAura: ServerAura = {\n ...aura,\n uuid: uuidv4()\n }\n clip.auras.push(newAura);\n }\n const shape = createShapeFromDict(clip);\n if (shape === undefined) continue;\n layer.addShape(shape, true);\n layer.selection.push(shape);\n }\n if (layer.selection.length === 1) EventBus.$emit(\"SelectionInfo.Shape.Set\", layer.selection[0]);\n else EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n layer.invalidate(false);\n }\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport ShapeContext from \"@/game/ui/selection/shapecontext.vue\";\nimport CreateTokenModal from \"@/game/ui/tools/createtoken_modal.vue\";\nimport DrawTool from \"@/game/ui/tools/draw.vue\";\nimport FilterTool from \"@/game/ui/tools/filter.vue\";\nimport MapTool from \"@/game/ui/tools/map.vue\";\nimport PanTool from \"@/game/ui/tools/pan\";\nimport SelectTool from \"@/game/ui/tools/select.vue\";\n\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { RulerTool } from \"@/game/ui/tools/ruler\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component({\n components: {\n \"select-tool\": SelectTool,\n \"pan-tool\": PanTool,\n \"draw-tool\": DrawTool,\n \"ruler-tool\": RulerTool,\n \"map-tool\": MapTool,\n \"filter-tool\": FilterTool,\n \"shape-menu\": ShapeContext,\n \"createtoken-dialog\": CreateTokenModal,\n },\n watch: {\n currentTool(newValue, oldValue) {\n this.$emit(\"tools-select-change\", newValue, oldValue);\n },\n },\n})\nexport default class Tools extends Vue {\n $refs!: {\n selectTool: InstanceType;\n };\n\n currentTool = \"Select\";\n tools = [\"Select\", \"Pan\", \"Draw\", \"Ruler\", \"Map\", \"Filter\"];\n dmTools = [\"Map\"];\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get currentToolComponent(): string {\n return `${this.currentTool.toLowerCase()}-tool`;\n }\n\n get visibleTools(): string[] {\n return this.tools.filter(t => (!this.dmTools.includes(t) || this.IS_DM));\n }\n\n mousedown(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mousedown\", event, targetTool);\n }\n mouseup(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mouseup\", event, targetTool);\n }\n mousemove(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if ((event.buttons & 4) !== 0) {\n targetTool = \"Pan\";\n } else if ((event.button & 1) > 1) {\n return;\n }\n\n this.$emit(\"mousemove\", event, targetTool);\n\n // Annotation hover\n let found = false;\n for (const uuid of gameStore.annotations) {\n if (layerManager.UUIDMap.has(uuid) && layerManager.hasLayer(\"draw\")) {\n const shape = layerManager.UUIDMap.get(uuid)!;\n if (shape.contains(l2g(getMouse(event)))) {\n found = true;\n gameManager.annotationManager.setActiveText(shape.annotation);\n }\n }\n }\n if (!found && gameManager.annotationManager.shown) {\n gameManager.annotationManager.setActiveText(\"\");\n }\n }\n mouseleave(event: MouseEvent) {\n // When leaving the window while a mouse is pressed down, act as if it was released\n if ((event.buttons & 1) !== 0) {\n this.$emit(\"mouseup\", event, this.currentTool);\n }\n }\n contextmenu(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n if (event.button !== 2 || (event.target).tagName !== \"CANVAS\") return;\n this.$emit(\"contextmenu\", event, this.currentTool);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class Prompt extends Vue {\n $refs!: {\n answer: HTMLElement;\n };\n\n visible = false;\n question = \"\";\n answer = \"\";\n title = \"\";\n\n resolve = (value: string) => {};\n reject = () => {};\n\n submit() {\n this.resolve(this.answer);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.question = \"\";\n this.answer = \"\";\n this.title = \"\";\n }\n prompt(question: string, title: string): Promise {\n this.question = question;\n this.title = title;\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.answer.focus();\n });\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=style&index=0&id=0bf2b7ba&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=style&index=0&id=0bf2b7ba&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._v(_vm._s(_vm.message))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=template&id=ff095222&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"","import { GlobalPoint, Point, Ray, Vector } from \"@/game/geom\";\nimport { g2lx, g2ly } from \"../units\";\n\nexport class BoundingRect {\n readonly w: number;\n readonly h: number;\n readonly topLeft: GlobalPoint;\n readonly topRight: GlobalPoint;\n readonly botRight: GlobalPoint;\n readonly botLeft: GlobalPoint;\n\n constructor(topleft: GlobalPoint, w: number, h: number) {\n this.w = w;\n this.h = h;\n this.topLeft = topleft;\n this.topRight = new GlobalPoint(topleft.x + w, topleft.y);\n this.botRight = new GlobalPoint(topleft.x + w, topleft.y + h);\n this.botLeft = new GlobalPoint(topleft.x, topleft.y + h);\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.topLeft.x <= point.x &&\n this.topRight.x >= point.x &&\n this.topLeft.y <= point.y &&\n this.botLeft.y >= point.y\n );\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.topLeft.x, this.topLeft.y]];\n return [\n [this.topLeft.x, this.topLeft.y],\n [this.botLeft.x, this.botLeft.y],\n [this.botRight.x, this.botRight.y],\n [this.topRight.x, this.topRight.y],\n ];\n }\n\n offset(vector: Vector): BoundingRect {\n return new BoundingRect(this.topLeft.add(vector), this.w, this.h);\n }\n\n union(other: BoundingRect): BoundingRect {\n const xmin = Math.min(this.topLeft.x, other.topLeft.x);\n const xmax = Math.max(this.topRight.x, other.topRight.x);\n const ymin = Math.min(this.topLeft.y, other.topLeft.y);\n const ymax = Math.max(this.botLeft.y, other.botLeft.y);\n return new BoundingRect(new GlobalPoint(xmin, ymin), xmax - xmin, ymax - ymin);\n }\n\n getDiagCorner(botright: boolean) {\n return botright ? this.botRight : this.topLeft;\n }\n\n intersectsWith(other: BoundingRect): boolean {\n return !(\n other.topLeft.x > this.topRight.x ||\n other.topRight.x < this.topLeft.x ||\n other.topLeft.y > this.botLeft.y ||\n other.botLeft.y < this.topLeft.y\n );\n }\n\n intersectsWithInner(other: BoundingRect): boolean {\n return !(\n other.topLeft.x >= this.topRight.x ||\n other.topRight.x <= this.topLeft.x ||\n other.topLeft.y >= this.botLeft.y ||\n other.botLeft.y <= this.topLeft.y\n );\n }\n\n intersectP(ray: Ray, invDir: Vector, dirIsNeg: boolean[]) {\n let txmin = invDir.x * (this.getDiagCorner(dirIsNeg[0]).x - ray.origin!.x);\n let txmax = invDir.x * (this.getDiagCorner(!dirIsNeg[0]).x - ray.origin!.x);\n const tymin = invDir.y * (this.getDiagCorner(dirIsNeg[1]).y - ray.origin!.y);\n const tymax = invDir.y * (this.getDiagCorner(!dirIsNeg[1]).y - ray.origin!.y);\n if (txmin > tymax || tymin > txmax) return { hit: false, min: txmin, max: txmax };\n if (tymin > txmin) txmin = tymin;\n if (tymax < txmax) txmax = tymax;\n return { hit: txmin < ray.tMax! && txmax > 0, min: txmin, max: txmax };\n }\n\n center(): GlobalPoint {\n return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n const coreVisible = !(\n g2lx(this.topLeft.x) > canvas.width ||\n g2ly(this.topLeft.y) > canvas.height ||\n g2lx(this.topRight.x) < 0 ||\n g2ly(this.botRight.y) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"formcontainer\"}},[(_vm.owned || _vm.joined)?_c('form',[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"Your sessions\")]),_c('div',{staticClass:\"input\"},[_vm._l((_vm.owned),function(room,i){return _c('router-link',{key:'o-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[0]))])}),_vm._l((_vm.joined),function(room,i){return _c('router-link',{key:'j-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[1])+\"/\"+_vm._s(room[0]))])})],2),(_vm.owned.length === 0)?_c('div',{staticClass:\"input\"},[_vm._v(\"No active sessions\")]):_vm._e()])]):_vm._e(),_vm._m(0),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.createRoom($event)}}},[_c('fieldset',[(!_vm.owned && !_vm.joined)?_c('legend',{staticClass:\"legend\"},[_vm._v(\"Create a session\")]):_c('div',{staticClass:\"input\"},[_vm._v(\"Create a new session\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newSessionName),expression:\"newSessionName\"}],attrs:{\"type\":\"text\",\"name\":\"room_name\",\"placeholder\":\"Session Name\"},domProps:{\"value\":(_vm.newSessionName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newSessionName=$event.target.value}}}),_vm._m(1)]),_vm._m(2)])]),_c('div',{attrs:{\"id\":\"account-options\"}},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Account Settings\",\"to\":\"/account\"}},[_c('i',{staticClass:\"fas fa-cog\"})])],1),_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Logout\",\"to\":\"/auth/logout\"}},[_c('i',{staticClass:\"fas fa-sign-out-alt\"})])],1)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h4',[_c('span',[_vm._v(\"OR\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fab fa-d-and-d\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"title\":\"Create\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=template&id=61eb1455&scoped=true&\"","/*\nThis module defines some Point classes.\nA strong focus is made to ensure that at no time a global and a local point are mixed up with each other.\nAt first glance this adds weird looking hacks as ts does not support nominal typing.\n*/\n\nexport function getPointDistance(p1: Point, p2: Point) {\n const a = p1.x - p2.x;\n const b = p1.y - p2.y;\n return Math.sqrt(a * a + b * b);\n}\n\nexport class Point {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n static fromArray(point: number[]) {\n return new Point(point[0], point[1]);\n }\n add(vec: Vector) {\n return new Point(this.x + vec.x, this.y + vec.y);\n }\n subtract(other: Point) {\n return new Vector(this.x - other.x, this.y - other.y);\n }\n clone(): Point {\n return new Point(this.x, this.y);\n }\n get(dimension: 0 | 1) {\n if (dimension === 0) return this.x;\n return this.y;\n }\n asArray(): number[] {\n return [this.x, this.y];\n }\n}\nexport class GlobalPoint extends Point {\n // This is to differentiate with LocalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _GlobalPoint!: string;\n add(vec: Vector): GlobalPoint {\n return super.add(vec);\n }\n subtract(other: GlobalPoint): Vector {\n return super.subtract(other);\n }\n clone(): GlobalPoint {\n return super.clone();\n }\n static fromArray(point: number[]) {\n return new GlobalPoint(point[0], point[1]);\n }\n}\n\nexport class LocalPoint extends Point {\n // This is to differentiate with GlobalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _LocalPoint!: string;\n add(vec: Vector): LocalPoint {\n return super.add(vec);\n }\n subtract(other: LocalPoint): Vector {\n return super.subtract(other);\n }\n clone(): LocalPoint {\n return super.clone();\n }\n}\n\nexport class Vector {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n dot(other: Vector): number {\n return this.x * other.x + this.y * other.y;\n }\n inverse(): Vector {\n return new Vector(this.x === 0 ? 0 : 1 / this.x, this.y === 0 ? 0 : 1 / this.y);\n }\n length(): number {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize(): Vector {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse(): Vector {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number): Vector {\n return new Vector(this.x * scale, this.y * scale);\n }\n angle(): number {\n return (Math.atan2(this.y, this.x) * 180) / Math.PI;\n }\n}\n\nexport class Ray {\n readonly direction: Vector;\n readonly origin: T;\n tMax: number;\n constructor(origin: T, direction: Vector, tMax?: number) {\n this.direction = direction;\n this.origin = origin;\n if (tMax === undefined) tMax = Infinity;\n this.tMax = tMax;\n }\n static fromPoints(p1: T, p2: T): Ray {\n const vec = new Vector(p2.x - p1.x, p2.y - p1.y);\n let maxT;\n if (Math.abs(vec.x) > 0.01) maxT = (p2.x - p1.x) / vec.x;\n else maxT = (p2.y - p1.y) / vec.y;\n return new Ray(p1, vec, maxT);\n }\n get(t: number): T {\n return new Point(this.origin.x + t * this.direction.x, this.origin.y + t * this.direction.y);\n }\n getDistance(t1: number, t2: number) {\n return Math.sqrt(Math.pow(t2 - t1, 2) * (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n getT(t1: number, distance: number) {\n return t1 + Math.sqrt(Math.pow(distance, 2) / (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_vm._l((_vm.folders),function(folder){return _c('li',{key:folder,staticClass:\"folder\",on:{\"click\":function($event){$event.stopPropagation();return _vm.toggle($event)}}},[_vm._v(\"\\n \"+_vm._s(folder)+\"\\n \"),_c('asset-node',{attrs:{\"asset\":_vm.asset[folder]}})],1)}),_vm._l((_vm.files),function(file){return _c('li',{key:file.name,staticClass:\"file draggable token\",attrs:{\"draggable\":\"true\"},on:{\"mouseover\":function($event){_vm.showImage = file.hash},\"mouseout\":function($event){_vm.showImage = null},\"dragstart\":function($event){_vm.dragStart($event, '/static/assets/' + file.hash)}}},[_vm._v(\"\\n \"+_vm._s(file.name)+\"\\n \"),(_vm.showImage == file.hash)?_c('div',{staticClass:\"preview\"},[_c('img',{staticClass:\"asset-preview-image\",attrs:{\"src\":'/static/assets/' + file.hash}})]):_vm._e()])})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=template&id=6d718094&scoped=true&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=style&index=0&id=4697341e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=style&index=0&id=4697341e&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport vueSlider from \"vue-slider-component\";\n\nimport \"@/game/api/events\";\n\nimport { throttle } from \"lodash\";\nimport { mapGetters, mapState } from \"vuex\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\nimport LabelManager from \"@/game/ui/labels.vue\";\nimport MenuBar from \"@/game/ui/menu/menu.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\nimport SelectionInfo from \"@/game/ui/selection/selection_info.vue\";\nimport Tools from \"@/game/ui/tools/tools.vue\";\n\nimport { createConnection, socket } from \"@/game/api/socket\";\nimport { onKeyDown, onKeyUp } from \"@/game/events/keyboard\";\nimport { scrollZoom } from \"@/game/events/mouse\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { LocalPoint } from \"./geom\";\n\n@Component({\n components: {\n \"tool-bar\": Tools,\n \"selection-info\": SelectionInfo,\n \"prompt-dialog\": Prompt,\n \"confirm-dialog\": ConfirmDialog,\n \"menu-bar\": MenuBar,\n \"initiative-dialog\": Initiative,\n \"zoom-slider\": vueSlider,\n \"note-dialog\": NoteDialog,\n \"label-dialog\": LabelManager,\n },\n beforeRouteEnter(to, from, next) {\n createConnection(to);\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class Game extends Vue {\n $refs!: {\n confirm: InstanceType;\n tools: InstanceType;\n };\n\n ready = {\n manager: false,\n tools: false,\n };\n\n get showUI(): boolean {\n return gameStore.showUI;\n }\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get layers(): string[] {\n return gameStore.layers;\n }\n\n get selectedLayer(): string {\n return gameStore.selectedLayer;\n }\n\n get zoomDisplay(): number {\n return gameStore.zoomDisplay;\n }\n\n set zoomDisplay(value: number) {\n gameStore.updateZoom({\n newZoomDisplay: value,\n zoomLocation: l2g(new LocalPoint(window.innerWidth / 2, window.innerHeight / 2)),\n });\n }\n\n mounted() {\n window.addEventListener(\"resize\", this.resizeWindow);\n window.addEventListener(\"keyup\", onKeyUp);\n window.addEventListener(\"keydown\", onKeyDown);\n this.ready.manager = true;\n }\n\n destroyed() {\n window.removeEventListener(\"resize\", this.resizeWindow);\n window.removeEventListener(\"keyup\", onKeyUp);\n window.removeEventListener(\"keydown\", onKeyDown);\n this.ready.manager = false;\n }\n\n // Window events\n\n zoom(event: WheelEvent) {\n throttle(scrollZoom)(event);\n }\n\n resizeWindow() {\n layerManager.setWidth(window.innerWidth);\n layerManager.setHeight(window.innerHeight);\n layerManager.invalidate();\n }\n\n // Mouse events\n\n mousedown(event: MouseEvent) {\n this.$refs.tools.mousedown(event);\n }\n mouseup(event: MouseEvent) {\n this.$refs.tools.mouseup(event);\n }\n mousemove(event: MouseEvent) {\n this.$refs.tools.mousemove(event);\n }\n mouseleave(event: MouseEvent) {\n this.$refs.tools.mouseleave(event);\n }\n contextmenu(event: MouseEvent) {\n this.$refs.tools.contextmenu(event);\n }\n selectLayer(layer: string) {\n layerManager.selectLayer(layer);\n }\n drop(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n if (event.dataTransfer.files.length > 0) {\n this.$refs.confirm\n .open(\"Uploading files should be done through the asset manager.\", \"Ok\", \"\")\n .then(() => {}, () => {});\n } else if (event.dataTransfer.getData(\"text/plain\") === \"\") {\n return;\n } else {\n layerManager.dropAsset(event);\n }\n }\n}\n","import { GlobalPoint, LocalPoint, Ray } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function g2l(obj: GlobalPoint): LocalPoint {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n return new LocalPoint((obj.x + panX) * z, (obj.y + panY) * z);\n}\n\nexport function g2lx(x: number) {\n return g2l(new GlobalPoint(x, 0)).x;\n}\n\nexport function g2ly(y: number) {\n return g2l(new GlobalPoint(0, y)).y;\n}\n\nexport function g2lz(z: number) {\n return z * gameStore.zoomFactor;\n}\n\nexport function getUnitDistance(r: number) {\n return (r / gameStore.unitSize) * gameStore.gridSize;\n}\n\nexport function g2lr(r: number) {\n return g2lz(getUnitDistance(r));\n}\n\nexport function l2g(obj: LocalPoint): GlobalPoint;\nexport function l2g(obj: Ray): Ray;\nexport function l2g(obj: LocalPoint | Ray): GlobalPoint | Ray {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n if (obj instanceof LocalPoint) {\n return new GlobalPoint(obj.x / z - panX, obj.y / z - panY);\n } else {\n return new Ray(l2g(obj.origin), obj.direction.multiply(1 / z), obj.tMax);\n }\n}\n\nexport function l2gx(x: number) {\n return l2g(new LocalPoint(x, 0)).x;\n}\n\nexport function l2gy(y: number) {\n return l2g(new LocalPoint(0, y)).y;\n}\n\nexport function l2gz(z: number) {\n return z / gameStore.zoomFactor;\n}\n\nexport function l2gr(r: number) {\n return l2gz(getUnitDistance(r));\n}\n\n(window).g2lx = g2lx;\n(window).g2ly = g2ly;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport AssetNode from \"@/game/ui/menu/asset_node.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\n\nimport { getRef, uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n \"asset-node\": AssetNode,\n },\n computed: {\n ...mapState(\"game\", [\"invitationCode\", \"IS_DM\", \"locations\", \"assets\", \"notes\"]),\n },\n})\nexport default class MenuBar extends Vue {\n visible = {\n settings: false,\n locations: false,\n };\n\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n set useGrid(value: boolean) {\n gameStore.setUseGrid({ useGrid: value, sync: true });\n }\n get fullFOW(): boolean {\n return gameStore.fullFOW;\n }\n set fullFOW(value: boolean) {\n gameStore.setFullFOW({ fullFOW: value, sync: true });\n }\n get fowOpacity(): number {\n return gameStore.fowOpacity;\n }\n set fowOpacity(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setFOWOpacity({ fowOpacity: value, sync: true });\n }\n get fowLOS(): boolean {\n return gameStore.fowLOS;\n }\n set fowLOS(value: boolean) {\n gameStore.setLineOfSight({ fowLOS: value, sync: true });\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n set unitSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setUnitSize({ unitSize: value, sync: true });\n }\n get gridSize(): number {\n return gameStore.gridSize;\n }\n set gridSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setGridSize({ gridSize: value, sync: true });\n }\n get gridColour(): string {\n return gameStore.gridColour;\n }\n set gridColour(value: string) {\n gameStore.setGridColour({ colour: value, sync: true });\n }\n get fowColour(): string {\n return gameStore.fowColour;\n }\n set fowColour(value: string) {\n gameStore.setFOWColour({ colour: value, sync: true });\n }\n get rulerColour(): string {\n return gameStore.rulerColour;\n }\n set rulerColour(value: string) {\n gameStore.setRulerColour({ colour: value, sync: true });\n }\n get visionRangeMin(): number {\n return gameStore.visionRangeMin;\n }\n set visionRangeMin(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMin({ value, sync: true });\n }\n get visionRangeMax(): number {\n return gameStore.visionRangeMax;\n }\n set visionRangeMax(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMax({ value, sync: true });\n }\n settingsClick(event: { target: HTMLElement }) {\n if (event.target.classList.contains(\"accordion\")) {\n event.target.classList.toggle(\"accordion-active\");\n const next = event.target.nextElementSibling;\n if (next !== null) next.style.display = next.style.display === \"\" ? \"block\" : \"\";\n }\n }\n changeLocation(name: string) {\n socket.emit(\"Location.Change\", name);\n }\n createLocation() {\n getRef(\"prompt\")\n .prompt(`New location name:`, `Create new location`)\n .then(\n (value: string) => {\n socket.emit(\"Location.New\", value);\n },\n () => {},\n );\n }\n createNote() {\n const note = { title: \"New note\", text: \"\", uuid: uuidv4() };\n gameStore.newNote({ note, sync: true });\n this.openNote(note);\n }\n openNote(note: Note) {\n getRef(\"note\").open(note);\n }\n changeVisionMode(event: { target: HTMLSelectElement }) {\n const value = event.target.value.toLowerCase();\n if (value !== \"bvh\" && value !== \"triangle\") return;\n gameStore.setVisionMode({ mode: value, sync: true });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n layerManager.invalidate();\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.IS_DM)?_c('li',{on:{\"click\":_vm.bringPlayers}},[_vm._v(\"Bring players\")]):_vm._e(),_c('li',{on:{\"click\":_vm.createToken}},[_vm._v(\"Create basic token\")]),_c('li',{on:{\"click\":_vm.showInitiative}},[_vm._v(\"Show initiative\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"","import { CDT } from \"./cdt\";\nimport { ccw, cw, orientation, ulp } from \"./triag\";\n\nexport type Point = number[];\n\nexport const INFINITE = -7e310;\n\nlet _INFINITE_VERTEX: Vertex;\n\nexport enum Sign {\n NEGATIVE = -1,\n ZERO = 0,\n POSITIVE = 1,\n\n RIGHT_TURN = -1,\n LEFT_TURN = 1,\n\n SMALLER = -1,\n EQUAL = 0,\n LARGER = 1,\n\n CLOCKWISE = -1,\n COUNTERCLOCKWISE = 1,\n\n COLLINEAR = 0,\n COPLANAR = 0,\n DEGENERATE = 0,\n\n ON_NEGATIVE_SIDE = -1,\n ON_ORIENTED_BOUNDARY = 0,\n ON_POSITIVE_SIDE = 1,\n}\n\nenum LineFaceState {\n UNDEFINED = -1,\n VERTEX_VERTEX = 0,\n VERTEX_EDGE = 1,\n EDGE_VERTEX = 2,\n EDGE_EDGE = 3,\n}\n\nfunction newPoint(): Point {\n return [INFINITE, INFINITE];\n}\n\nexport class Triangle {\n vertices: (Vertex | null)[] = [];\n neighbours: (Triangle | null)[] = [null, null, null];\n constraints = [false, false, false];\n static _counter = 0;\n uid = Triangle._counter++;\n\n constructor(...vertices: (Vertex | null)[]) {\n this.vertices = vertices;\n }\n\n from(t: Triangle): this {\n this.vertices = t.vertices.slice(0, t.vertices.length);\n this.neighbours = t.neighbours.slice(0, t.neighbours.length);\n this.constraints = t.constraints.slice(0, t.constraints.length);\n return this;\n }\n\n get dimension() {\n return this.vertices.length - 1;\n }\n\n addVertex(vertex: Vertex) {\n if (vertex === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(vertex);\n vertex.triangle = this;\n }\n\n isConstrained(index: number): boolean {\n return this.constraints[index];\n }\n\n reorient() {\n // If certain indices do not exist yet thay will append faulty undefined's, thus we slice them\n this.vertices = [this.vertices[1], this.vertices[0], this.vertices[2]].slice(0, this.vertices.length);\n this.neighbours = [this.neighbours[1], this.neighbours[0], this.neighbours[2]];\n this.constraints = [this.constraints[1], this.constraints[0], this.constraints[2]];\n }\n\n indexV(v: Vertex): number {\n return this.vertices.indexOf(v);\n }\n\n indexT(t: Triangle): number {\n return this.neighbours.indexOf(t);\n }\n\n isInfinite(index?: number): boolean {\n if (index === undefined) {\n return this.vertices.includes(_INFINITE_VERTEX);\n } else {\n return this.vertices[ccw(index)]!.infinite || this.vertices[cw(index)]!.infinite;\n }\n }\n\n contains(point: Point) {\n const A =\n -this.vertices[1]!.point![1] * this.vertices[2]!.point![0] +\n this.vertices[0]!.point![1] * (-this.vertices[1]!.point![0] + this.vertices[2]!.point![0]) +\n this.vertices[0]!.point![0] * (this.vertices[1]!.point![1] - this.vertices[2]!.point![1]) +\n this.vertices[1]!.point![0] * this.vertices[2]!.point![1];\n const sign = A < 0 ? -1 : 1;\n const s =\n (this.vertices[0]!.point![1] * this.vertices[2]!.point![0] -\n this.vertices[0]!.point![0] * this.vertices[2]!.point![1] +\n (this.vertices[2]!.point![1] - this.vertices[0]!.point![1]) * point[0] +\n (this.vertices[0]!.point![0] - this.vertices[2]!.point![0]) * point[1]) *\n sign;\n if (s < 0) return false;\n const t =\n (this.vertices[0]!.point![0] * this.vertices[1]!.point![1] -\n this.vertices[0]!.point![1] * this.vertices[1]!.point![0] +\n (this.vertices[0]!.point![1] - this.vertices[1]!.point![1]) * point[0] +\n (this.vertices[1]!.point![0] - this.vertices[0]!.point![0]) * point[1]) *\n sign;\n\n return t > 0 && s + t < A * sign;\n }\n}\n\nexport class Vertex {\n infinite = false;\n private _point: Point | undefined;\n triangle: Triangle | undefined;\n\n constructor(point?: Point) {\n this._point = point;\n }\n\n get point(): Point | undefined {\n return this._point;\n }\n\n set point(point: Point | undefined) {\n this._point = point;\n this.infinite = false;\n }\n}\n\nexport class EdgeCirculator {\n ri: number;\n v: Vertex | null;\n t: Triangle | null;\n _ri: number;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 1) {\n this.ri = 0;\n this.v = null;\n this.t = null;\n } else {\n const i = this.t.indexV(v!);\n if (this.t.dimension === 2) this.ri = ccw(i);\n else this.ri = 2;\n }\n this._ri = this.ri;\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n next(): boolean {\n let i = this.t!.indexV(this.v!);\n if (this.t!.dimension === 1) {\n this.t = this.t!.neighbours[i === 0 ? 1 : 0];\n } else {\n this.t = this.t!.neighbours[ccw(i)];\n i = this.t!.indexV(this.v!);\n this.ri = ccw(i);\n }\n return this.ri !== this._ri || this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class EdgeIterator {\n private i = 0;\n pos: Triangle | null;\n edge: Edge = new Edge();\n tds: TDS;\n _es = 0;\n constructor(tds: TDS) {\n this.tds = tds;\n this.edge.second = 0;\n if (tds.dimension <= 0) {\n this.pos = null;\n return;\n }\n this.pos = tds.triangles[0];\n if (tds.dimension === 1) this.edge.second = 2;\n while (this.pos !== null && !this.associatedEdge()) {\n throw new Error(\"[poi\");\n }\n\n if (tds.dimension === 1) this._es = 2;\n }\n\n get valid(): boolean {\n return (this.pos !== null || this._es !== this.edge.second) && this.pos!.isInfinite(this.edge.second);\n }\n\n next() {\n do {\n this.increment();\n } while (this.pos !== null && !this.associatedEdge());\n }\n\n collect(): Edge {\n this.edge.first = this.pos;\n return this.edge;\n }\n\n associatedEdge(): boolean {\n if (this.tds.dimension === 1) return true;\n return (\n this.tds.triangles.indexOf(this.pos!) < this.tds.triangles.indexOf(this.pos!.neighbours[this.edge.second]!)\n );\n }\n\n increment() {\n if (this.tds.dimension === 1) {\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else if (this.edge.second === 2) {\n this.edge.second = 0;\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else {\n this.edge.second++;\n }\n }\n}\n\nexport class FaceCirculator {\n v: Vertex | null;\n t: Triangle | null;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 2) {\n this.v = null;\n this.t = null;\n }\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n prev() {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[cw(i)];\n }\n\n next(): boolean {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[ccw(i)];\n return this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class LineFaceCirculator {\n private i = 0;\n pos: Triangle | null = null;\n _tr: CDT;\n s: LineFaceState = LineFaceState.UNDEFINED;\n p: Point;\n q: Point;\n\n constructor(v: Vertex, tr: CDT, dir: Point) {\n this._tr = tr;\n this.p = v.point!;\n this.q = dir;\n\n const fc = new FaceCirculator(v, null);\n let ic = fc.t!.indexV(v);\n let vt = fc.t!.vertices[cw(ic)]!;\n while (v === _INFINITE_VERTEX || orientation(this.p, this.q, vt.point!) !== Sign.LEFT_TURN) {\n fc.next();\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n if (!fc.valid) {\n return;\n }\n }\n\n let vr = fc.t!.vertices[ccw(ic)]!;\n let pqr: Sign = Sign.RIGHT_TURN;\n // tslint:disable:no-conditional-assignment\n while (vr !== _INFINITE_VERTEX && (pqr = orientation(this.p, this.q, vr.point!)) === Sign.LEFT_TURN) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n }\n\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n\n if (vr === _INFINITE_VERTEX) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n pqr = orientation(this.p, this.q, vr.point!);\n switch (pqr) {\n case Sign.RIGHT_TURN:\n case Sign.COLLINEAR: {\n fc.next();\n ic = fc.t!.indexV(_INFINITE_VERTEX);\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ic;\n break;\n }\n case Sign.LEFT_TURN: {\n break;\n }\n }\n } else if (pqr === Sign.COLLINEAR) {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(ic);\n } else {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_EDGE;\n this.i = ic;\n }\n }\n\n next() {\n this.increment();\n }\n\n increment() {\n let o: Sign;\n if (this.s === LineFaceState.VERTEX_VERTEX || this.s === LineFaceState.EDGE_VERTEX) {\n do {\n const n = this.pos!.neighbours[cw(this.i)]!;\n this.i = n.indexT(this.pos!);\n this.pos = n;\n if (this.pos!.vertices[this.i] === _INFINITE_VERTEX) {\n o = Sign.COLLINEAR;\n this.i = cw(this.i);\n break;\n }\n o = orientation(this.p, this.q, this.pos!.vertices[this.i]!.point!);\n this.i = cw(this.i);\n } while (o === Sign.LEFT_TURN);\n if (o === Sign.COLLINEAR) {\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(this.i);\n } else {\n this.s = LineFaceState.VERTEX_EDGE;\n }\n } else {\n const n = this.pos!.neighbours[this.i]!;\n const ni = n.indexT(this.pos!);\n this.pos = n;\n o =\n this.pos!.vertices[ni]! === _INFINITE_VERTEX\n ? Sign.COLLINEAR\n : orientation(this.p, this.q, this.pos!.vertices[ni]!.point!);\n switch (o) {\n case Sign.LEFT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = ccw(ni);\n break;\n }\n case Sign.RIGHT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = cw(ni);\n break;\n }\n default: {\n this.s = LineFaceState.EDGE_VERTEX;\n this.i = ni;\n }\n }\n }\n }\n}\n\nclass Edge {\n first: Triangle | null = null;\n second: number = 0;\n}\n\nexport enum LocateType {\n VERTEX,\n EDGE,\n FACE,\n OUTSIDE_CONVEX_HULL,\n OUTSIDE_AFFINE_HULL,\n}\n\nexport class TDS {\n dimension = -1;\n vertices: Vertex[] = [];\n triangles: Triangle[] = [];\n _infinite: Vertex;\n\n constructor() {\n this._infinite = this.createVertex();\n _INFINITE_VERTEX = this._infinite;\n const t = new Triangle();\n t.addVertex(this._infinite);\n this.triangles.push(t);\n }\n\n createVertex(): Vertex {\n const v = this.infiniteVertex;\n if (v === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(v);\n return v;\n }\n\n createTriangle(\n v0: Vertex | null,\n v1: Vertex | null,\n v2: Vertex | null,\n n0: Triangle | null,\n n1: Triangle | null,\n n2: Triangle | null,\n ) {\n const t = new Triangle(v0, v1, v2);\n t.neighbours[0] = n0;\n t.neighbours[1] = n1;\n t.neighbours[2] = n2;\n this.triangles.push(t);\n return t;\n }\n\n deleteTriangle(trig: Triangle) {\n this.triangles = this.triangles.filter(t => t !== trig);\n }\n\n setAdjacency(t0: Triangle, i0: number, t1: Triangle, i1: number) {\n t0.neighbours[i0] = t1;\n t1.neighbours[i1] = t0;\n }\n\n get finiteVertex(): Vertex {\n return this.vertices[1];\n }\n\n get infiniteVertex(): Vertex {\n const v = new Vertex(newPoint());\n v.infinite = true;\n return v;\n }\n\n get finiteEdge(): Edge {\n if (this.dimension < 1) throw new Error(\"aspo\");\n const ei = new EdgeIterator(this);\n while (ei.valid) ei.next();\n return ei.collect();\n }\n\n insertDimUp(w: Vertex = new Vertex(), orient: boolean = true): Vertex {\n const v = this.createVertex();\n this.dimension++;\n let t1: Triangle;\n let t2: Triangle;\n switch (this.dimension) {\n case 0: {\n t1 = this.triangles[0];\n t2 = new Triangle(v);\n this.triangles.push(t2);\n this.setAdjacency(t1, 0, t2, 0);\n v.triangle = t2;\n break;\n }\n case 1:\n case 2: {\n const deleteList: Triangle[] = [];\n const triangles = this.triangles.slice(0, this.triangles.length);\n for (const trig of triangles) {\n const copy = new Triangle().from(trig);\n this.triangles.push(copy);\n trig.vertices[this.dimension] = v;\n copy.vertices[this.dimension] = w;\n this.setAdjacency(trig, this.dimension, copy, this.dimension);\n if (trig.vertices.includes(w)) deleteList.push(copy);\n }\n for (const trig of triangles) {\n const neighbour = trig.neighbours[this.dimension];\n for (let j = 0; j < this.dimension; ++j) {\n neighbour!.neighbours[j] = trig.neighbours[j]!.neighbours[this.dimension];\n }\n }\n\n let lfit = 0;\n if (this.dimension === 1) {\n if (orient) {\n triangles[lfit].reorient();\n lfit++;\n triangles[lfit].neighbours[1]!.reorient();\n } else {\n triangles[lfit].neighbours[1]!.reorient();\n lfit++;\n triangles[lfit].reorient();\n }\n } else {\n for (const trig of triangles) {\n if (orient) trig.neighbours[2]!.reorient();\n else trig.reorient();\n }\n }\n\n for (const trig of deleteList) {\n let j = 1;\n if (trig.vertices[0] === w) j = 0;\n t1 = trig.neighbours[this.dimension]!;\n const i1 = this.mirrorIndex(trig, this.dimension);\n t2 = trig.neighbours[j]!;\n const i2 = this.mirrorIndex(trig, j);\n this.setAdjacency(t1, i1, t2, i2);\n this.deleteTriangle(trig);\n }\n v.triangle = triangles[0];\n break;\n }\n default: {\n throw new Error(\"Dimension unknown\");\n }\n }\n return v;\n }\n\n mirrorIndex(t: Triangle, i: number): number {\n if (t.dimension === 1) {\n const j = t.neighbours[i]!.indexV(t.vertices[i === 0 ? 1 : 0]!);\n return j === 0 ? 1 : 0;\n }\n return ccw(t.neighbours[i]!.indexV(t.vertices[ccw(i)]!));\n }\n\n insertInFace(t: Triangle) {\n const v = this.createVertex();\n const v0 = t.vertices[0]!;\n const v1 = t.vertices[1]!;\n const v2 = t.vertices[2]!;\n const n1 = t.neighbours[1]!;\n const n2 = t.neighbours[2]!;\n const t1 = this.createTriangle(v0, v, v2, t, n1, null);\n const t2 = this.createTriangle(v0, v1, v, t, null, n2);\n this.setAdjacency(t1, 2, t2, 1);\n if (n1 !== null) {\n const i1 = this.mirrorIndex(t, 1);\n n1.neighbours[i1] = t1;\n }\n if (n2 !== null) {\n const i2 = this.mirrorIndex(t, 2);\n n2.neighbours[i2] = t2;\n }\n t.vertices[0] = v;\n t.neighbours[1] = t1;\n t.neighbours[2] = t2;\n if (v0.triangle === t) v0.triangle = t2;\n v.triangle = t;\n return v;\n }\n\n flip(t: Triangle, i: number) {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n const vCW = t.vertices[cw(i)]!;\n const vCCW = t.vertices[ccw(i)]!;\n const tr = t.neighbours[ccw(i)]!;\n const tri = this.mirrorIndex(t, ccw(i));\n const bl = n.neighbours[ccw(ni)]!;\n const bli = this.mirrorIndex(n, ccw(ni));\n\n t.vertices[cw(i)] = n.vertices[ni]!;\n n.vertices[cw(ni)] = t.vertices[i]!;\n\n this.setAdjacency(t, i, bl, bli);\n this.setAdjacency(t, ccw(i), n, ccw(ni));\n this.setAdjacency(n, ni, tr, tri);\n\n if (vCW.triangle! === t) vCW.triangle = n;\n if (vCCW.triangle! === n) vCCW.triangle = t;\n }\n\n insertInEdge(t: Triangle, i: number) {\n let v: Vertex;\n if (this.dimension === 1) {\n v = this.createVertex();\n const ff = t.neighbours[0]!;\n const vv = t.vertices[1]!;\n const g = this.createTriangle(v, vv, null, ff, t, null);\n t.vertices[1] = v;\n t.neighbours[0] = g;\n ff.neighbours[1] = g;\n v.triangle = g;\n vv.triangle = ff;\n } else {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n v = this.insertInFace(t);\n this.flip(n, ni);\n }\n return v;\n }\n}\n\nexport class BoundingBox {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n constructor(p: Point) {\n this.x1 = p[0];\n this.y1 = p[1];\n this.x2 = p[0];\n this.y2 = p[1];\n }\n\n dilate(dist: number) {\n this.x1 -= dist * ulp(this.x1);\n this.y1 -= dist * ulp(this.y1);\n this.x2 += dist * ulp(this.x2);\n this.y2 += dist * ulp(this.y2);\n }\n\n overlaps(other: BoundingBox): boolean {\n if (this.x2 < other.x1 || other.x2 < this.x1) return false;\n if (this.y2 < other.y1 || other.y2 < this.y1) return false;\n return true;\n }\n}\n","import { partition } from \"@/core/utils\";\nimport { GlobalPoint, Ray } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\nimport { BoundingNode, InteriorNode, LeafNode } from \"@/game/visibility/bvh/node\";\n\ninterface BuildInfo {\n index: number;\n bbox: BoundingRect;\n center: BoundingRect;\n}\ninterface LinearBHVNode {\n bbox: BoundingRect;\n nPrimitives: number;\n}\ninterface LinearLeafNode extends LinearBHVNode {\n primitivesOffset: number;\n}\ninterface LinearInternalNode extends LinearBHVNode {\n secondChildOffset: number;\n dimension: number;\n}\n\nexport class BoundingVolume {\n totalNodes = 0;\n buildData: BuildInfo[] = [];\n shapes: string[];\n orderedPrims: string[] = [];\n root: BoundingNode | null;\n nodes: LinearBHVNode[] = [];\n\n offset = 0;\n\n constructor(shapes: string[]) {\n this.shapes = shapes;\n if (this.shapes.length === 0) {\n this.root = null;\n this.nodes = [];\n return;\n }\n for (let i = 0; i < shapes.length; i++) {\n const shape = layerManager.UUIDMap.get(shapes[i])!;\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n }\n this.root = this.recursiveBuild(0, shapes.length);\n this.compact();\n }\n\n draw() {\n const ctx = layerManager.getLayer(\"draw\")!.ctx;\n for (const node of this.nodes) {\n const b = node.bbox;\n ctx.strokeRect(g2lx(b.topLeft.x), g2ly(b.topLeft.y), g2lz(b.w), g2lz(b.h));\n }\n }\n\n recursiveBuild(start: number, end: number): BoundingNode {\n this.totalNodes++;\n let bbox = this.buildData[start].bbox;\n for (let i = start + 1; i < end; i++) bbox = bbox.union(this.buildData[i].bbox);\n const nPrimitives = end - start;\n if (nPrimitives === 1) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n } else {\n let centroidBbox = this.buildData[start].center;\n for (let i = start; i < end; i++) centroidBbox = centroidBbox.union(this.buildData[i].center);\n const dimension = centroidBbox.getMaxExtent();\n if (centroidBbox.botRight.get(dimension) === centroidBbox.topLeft.get(dimension)) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n }\n // Use shitty Middle thingy until an introselect js algo is added\n const pMid = 0.5 * (centroidBbox.topLeft.get(dimension) + centroidBbox.botRight.get(dimension));\n const partitionedData = partition(\n this.buildData.slice(start, end),\n (n: BuildInfo) => n.center.center().get(dimension) < pMid,\n );\n const flattened = ([]).concat.apply([], partitionedData);\n if (partitionedData[0].length === 0 || partitionedData[1].length === 0) console.log(\"EMPTY\");\n this.buildData.splice(start, flattened.length, ...flattened);\n const mid = partitionedData[0].length + start;\n return new InteriorNode(dimension, this.recursiveBuild(start, mid), this.recursiveBuild(mid, end));\n }\n }\n\n intersect(ray: Ray, stopOnFirstHit?: boolean) {\n if (this.nodes.length === 0) return { hit: false, intersect: ray.get(0), tMin: 0, tMax: ray.tMax };\n if (stopOnFirstHit === undefined) stopOnFirstHit = false;\n // Initialize return values\n let hit = false;\n let tMin = 0;\n let tMax = ray.tMax;\n\n // Initialize work variables\n let todoOffset = 0;\n let nodeNum = 0;\n const todo: number[] = [];\n\n // Precalculate intersection vectors\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n\n while (true) {\n const node = this.nodes[nodeNum];\n\n const i = node.bbox.intersectP(ray, invDir, dirIsNegative);\n if (i.hit) {\n if (node.nPrimitives > 0) {\n // TODO: nPrimitives is currently always 1 , this could be generalised\n // for (let i=0; i < node.nPrimitives; i++) {\n // if (this.shapes[(node).primitivesOffset + i])\n // }\n hit = true;\n tMin = ray.tMax = i.min;\n tMax = i.max;\n if (todoOffset === 0 || stopOnFirstHit) break;\n nodeNum = todo[--todoOffset];\n } else {\n if (dirIsNegative[(node).dimension]) {\n todo[todoOffset++] = nodeNum + 1;\n nodeNum = (node).secondChildOffset;\n } else {\n todo[todoOffset++] = (node).secondChildOffset;\n nodeNum++;\n }\n }\n } else {\n if (todoOffset === 0) break;\n nodeNum = todo[--todoOffset];\n }\n }\n return { hit, intersect: ray.get(tMin), tMin, tMax };\n }\n\n private compact() {\n this.offset = 0;\n if (this.root !== null) this.flatten(this.root);\n }\n\n private flatten(node: BoundingNode) {\n const index = this.offset;\n const myOffset = this.offset++;\n if (node.nPrimitives === 0) {\n this.flatten(node.children[0]);\n const secondOffset = this.flatten(node.children[1]);\n this.nodes[index] = {\n bbox: node.bbox,\n dimension: (node).dimension,\n nPrimitives: 0,\n secondChildOffset: secondOffset,\n };\n } else {\n this.nodes[index] = {\n bbox: node.bbox,\n primitivesOffset: (node).firstPrimOffset,\n nPrimitives: node.nPrimitives,\n };\n }\n return myOffset;\n }\n\n private createLeaf(start: number, end: number, nPrimitives: number, bbox: BoundingRect) {\n const size = this.orderedPrims.length;\n for (let i = start; i < end; i++) this.orderedPrims.push(this.shapes[this.buildData[i].index]);\n return new LeafNode(size, nPrimitives, bbox);\n }\n}\n","import Initiative from \"./ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { AnnotationManager } from \"@/game/ui/annotation\";\nimport { g2l } from \"@/game/units\";\n\nexport class GameManager {\n selectedTool: number = 0;\n\n annotationManager = new AnnotationManager();\n\n addShape(shape: ServerShape): void {\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Shape with unknown layer ${shape.layer} could not be added`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n const sh = createShapeFromDict(shape);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${shape.type_} could not be added`);\n return;\n }\n layer.addShape(sh, false);\n layer.invalidate(false);\n }\n\n updateShape(data: { shape: ServerShape; redraw: boolean; move: boolean; temporary: boolean }): void {\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Shape with unknown layer ${data.shape.layer} could not be added`);\n return;\n }\n const sh = createShapeFromDict(data.shape);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${data.shape.type_} could not be added`);\n return;\n }\n const oldShape = layerManager.UUIDMap.get(data.shape.uuid);\n if (oldShape === undefined) {\n console.log(`Shape with unknown id could not be updated`);\n return;\n }\n const redrawInitiative = sh.owners !== oldShape.owners;\n const shape = Object.assign(oldShape, sh);\n shape.checkVisionSources();\n shape.setMovementBlock(shape.movementObstruction);\n shape.setIsToken(shape.isToken);\n if (data.redraw) {\n gameStore.recalculateVision(data.temporary);\n layerManager.getLayer(data.shape.layer)!.invalidate(false);\n if (shape.movementObstruction) gameStore.recalculateMovement(data.temporary);\n }\n if (redrawInitiative) getRef(\"initiative\").$forceUpdate();\n }\n\n setCenterPosition(position: GlobalPoint) {\n const localPos = g2l(position);\n gameStore.increasePanX((window.innerWidth / 2 - localPos.x) / gameStore.zoomFactor);\n gameStore.increasePanY((window.innerHeight / 2 - localPos.y) / gameStore.zoomFactor);\n layerManager.invalidate();\n sendClientOptions();\n }\n}\n\nexport const gameManager = new GameManager();\n(window).gameManager = gameManager;\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=6d718094&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=6d718094&scoped=true&lang=css&\"","\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class LoadComponent extends Vue {\n message = \"Loading...\";\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.shape !== null)?_c('div',[_c('div',{attrs:{\"id\":\"selection-menu\"}},[_c('div',{attrs:{\"id\":\"selection-edit-button\"},on:{\"click\":_vm.openEditDialog}},[_c('i',{staticClass:\"fas fa-edit\"})]),_c('div',{attrs:{\"id\":\"selection-name\"}},[_vm._v(_vm._s(_vm.shape.name))]),_c('div',{attrs:{\"id\":\"selection-trackers\"}},[_vm._l((_vm.shape.trackers),function(tracker){return (tracker.name !== '' || tracker.value !== 0)?[_c('div',{key:'name-' + tracker.uuid},[_vm._v(_vm._s(tracker.name))]),_c('div',{key:'value-' + tracker.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(tracker, false)}}},[(tracker.maxvalue === 0)?[_vm._v(_vm._s(tracker.value))]:[_vm._v(_vm._s(tracker.value)+\" / \"+_vm._s(tracker.maxvalue))]],2)]:_vm._e()})],2),_c('div',{attrs:{\"id\":\"selection-auras\"}},[_vm._l((_vm.shape.auras),function(aura){return (aura.name !== '' || aura.value !== 0)?[_c('div',{key:'name-' + aura.uuid},[_vm._v(_vm._s(aura.name))]),_c('div',{key:'value-' + aura.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(aura, true)}}},[(aura.dim === 0)?[_vm._v(_vm._s(aura.value))]:[_vm._v(_vm._s(aura.value)+\" / \"+_vm._s(aura.dim))]],2)]:_vm._e()})],2)]),_c('edit-dialog',{ref:\"editDialog\",attrs:{\"shape\":_vm.shape}})],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=template&id=674cf937&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.getActiveLayer() !== undefined)?_c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.getLayers().length > 1)?_c('li',[_vm._v(\"Layer\\n \"),_c('ul',_vm._l((_vm.getLayers()),function(layer){return _c('li',{key:layer.name,style:([_vm.getActiveLayer().name === layer.name ? {'background-color':'#82c8a0'}: {}]),on:{\"click\":function($event){_vm.setLayer(layer.name)}}},[_vm._v(_vm._s(layer.name))])}))]):_vm._e(),_c('li',{on:{\"click\":_vm.moveToBack}},[_vm._v(\"Move to back\")]),_c('li',{on:{\"click\":_vm.moveToFront}},[_vm._v(\"Move to front\")]),_c('li',{on:{\"click\":_vm.addInitiative}},[_vm._v(_vm._s(_vm.getInitiativeWord())+\" initiative\")]),_c('li',{on:{\"click\":_vm.openEditDialog}},[_vm._v(\"Show properties\")])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',{attrs:{\"id\":\"accordion-container\"}},_vm._l((_vm.categories),function(category){return _c('accordion',{key:category,attrs:{\"title\":category,\"showArrow\":false,\"items\":_vm.labels[category],\"initialValues\":_vm.initalValues[category]},on:{\"selectionupdate\":_vm.updateSelection}})}))]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=template&id=847e7ec4&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component\nexport default class Dashboard extends Vue {\n owned = [];\n joined = [];\n error = \"\";\n\n newSessionName = \"\";\n\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n axios\n .get(\"/api/rooms\")\n .then((response: AxiosResponse) => {\n next((vm: this) => {\n vm.owned = response.data.owned;\n vm.joined = response.data.joined;\n });\n })\n .catch((err: AxiosError) => {\n next((vm: this) => {\n vm.error = err.message;\n });\n });\n }\n\n createRoom(event: Event) {\n axios\n .post(\"/api/rooms\", {\n name: this.newSessionName,\n })\n .then((response: AxiosResponse) => {\n this.$router.push(`/game/${coreStore.username}/${this.newSessionName}`);\n })\n .catch((err: AxiosError) => {\n this.error = err.message;\n });\n }\n}\n","import { render, staticRenderFns } from \"./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"\nimport script from \"./confirm.vue?vue&type=script&lang=ts&\"\nexport * from \"./confirm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1883e207\",\n null\n \n)\n\ncomponent.options.__file = \"confirm.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=cf33581e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=cf33581e&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.left + 'px',\"top\":_vm.top + 'px'},on:{\"close\":_vm.close}},[_c('li',{on:{\"click\":_vm.rename}},[_vm._v(\"Rename\")]),_c('li',{on:{\"click\":_vm.remove}},[_vm._v(\"Remove\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=template&id=606797b4&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Label manager\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('div',{staticClass:\"grid\"},[_c('div',{staticClass:\"header\"},[_c('abbr',{attrs:{\"title\":\"Category\"}},[_vm._v(\"Cat.\")])]),_c('div',{staticClass:\"header name\"},[_vm._v(\"Name\")]),_c('div',{staticClass:\"header\"},[_c('abbr',{attrs:{\"title\":\"Visible\"}},[_vm._v(\"Vis.\")])]),_c('div',{staticClass:\"header\"},[_c('abbr',{attrs:{\"title\":\"Delete\"}},[_vm._v(\"Del.\")])]),_c('div',{staticClass:\"separator spanrow\",staticStyle:{\"margin\":\"0 0 7px\"}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.search),expression:\"search\"}],ref:\"search\",staticClass:\"spanrow\",attrs:{\"type\":\"text\",\"placeholder\":\"search\"},domProps:{\"value\":(_vm.search)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.search=$event.target.value}}})]),_c('div',{staticClass:\"grid scroll\"},[_vm._l((_vm.categories),function(category){return [_vm._l((_vm.labels[category]),function(label){return [_c('div',{key:'row-'+label.uuid,staticClass:\"row\",on:{\"click\":function($event){_vm.selectLabel(label.uuid)}}},[(label.category)?[_c('div',{key:'cat-'+label.uuid},[_vm._v(_vm._s(label.category))]),_c('div',{key:'name-'+label.uuid,staticClass:\"name\"},[_vm._v(_vm._s(label.name))])]:_vm._e(),(!label.category)?[_c('div',{key:'cat-'+label.uuid}),_c('div',{key:'name-'+label.uuid,staticClass:\"name\"},[_vm._v(_vm._s(label.name))])]:_vm._e(),_c('div',{key:'visible-'+label.uuid,class:{'lower-opacity': !label.visible},style:({textAlign: 'center'}),on:{\"click\":function($event){$event.stopPropagation();_vm.toggleVisibility(label)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{key:'delete-'+label.uuid,on:{\"click\":function($event){$event.stopPropagation();_vm.deleteLabel(label.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})])],2)]})]}),(_vm.labels.length === 0)?[_c('div',{attrs:{\"id\":\"no-labels\"}},[_vm._v(\"No labels exist yet\")])]:_vm._e()],2),_c('div',{staticClass:\"grid\"},[_c('div',{staticClass:\"separator spanrow\"}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.newCategory),expression:\"newCategory\",modifiers:{\"trim\":true}}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.newCategory)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newCategory=$event.target.value.trim()},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.newName),expression:\"newName\",modifiers:{\"trim\":true}}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.newName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newName=$event.target.value.trim()},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('button',{attrs:{\"id\":\"addLabelButton\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.addLabel($event)}}},[_vm._v(\"Add\")])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=template&id=4697341e&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"","import Vue from \"vue\";\nexport const EventBus = new Vue();\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Rect extends BaseRect {\n type = \"rect\";\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, w, h, fillColour, strokeColour, uuid);\n }\n asDict() {\n return super.getBaseDict();\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const z = gameStore.zoomFactor;\n const loc = g2l(this.refPoint);\n ctx.fillRect(loc.x, loc.y, this.w * z, this.h * z);\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = 5;\n ctx.strokeRect(loc.x, loc.y, this.w * z, this.h * z);\n }\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=05b88da7&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=05b88da7&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"","import { Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly } from \"@/game/units\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWPlayersLayer extends Layer {\n isVisionLayer: boolean = true;\n\n draw(): void {\n if (!this.valid) {\n // console.time(\"VI\");\n const ctx = this.ctx;\n\n if (!gameStore.fowLOS || Settings.skipPlayerFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n const originalOperation = ctx.globalCompositeOperation;\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n // For the DM this is done at the end of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (!gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n // Then cut out all the player vision auras\n const maxLength = ctx.canvas.width + ctx.canvas.height;\n\n for (const tokenId of gameStore.ownedtokens) {\n const token = layerManager.UUIDMap.get(tokenId);\n if (token === undefined) continue;\n const center = token.center();\n const lcenter = g2l(center);\n if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 2 / 180) * Math.PI) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = new Ray(center, new Vector(cos, sin));\n const hitResult = gameStore.BV.intersect(lightRay);\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Draw a line from the last non arc location back to the arc\n ctx.lineTo(lcenter.x + maxLength * cos, lcenter.y + maxLength * sin);\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, angle);\n lastArcAngle = -1;\n }\n ctx.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n\n // Finish the final arc.\n if (lastArcAngle !== -1) ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, 2 * Math.PI);\n else ctx.closePath();\n ctx.fill();\n } else {\n if (true) {\n // Add a gradient vision dropoff\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMin),\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMax),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n try {\n const polygon = computeVisibility(token.center(), \"vision\");\n ctx.beginPath();\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n ctx.closePath();\n ctx.fill();\n } catch {}\n }\n }\n\n // For the players this is done at the beginning of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n ctx.globalCompositeOperation = originalOperation;\n // console.timeEnd(\"VI\");\n }\n }\n}\n","import { socket } from \"@/game/api/socket\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly } from \"@/game/units\";\n\nexport class Layer {\n name: string;\n width: number;\n height: number;\n canvas: HTMLCanvasElement;\n ctx: CanvasRenderingContext2D;\n\n selectable: boolean = false;\n playerEditable: boolean = false;\n isVisionLayer: boolean = false;\n\n // When set to false, the layer will be redrawn on the next tick\n valid: boolean = false;\n // The collection of shapes that this layer contains.\n // These are ordered on a depth basis.\n shapes: Shape[] = [];\n\n // Collection of shapes that are currently selected\n selection: Shape[] = [];\n\n // Extra selection highlighting settings\n selectionColor = \"#CC0000\";\n selectionWidth = 2;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n this.canvas = canvas;\n this.name = name;\n this.width = canvas.width;\n this.height = canvas.height;\n this.ctx = canvas.getContext(\"2d\")!;\n }\n\n invalidate(skipLightUpdate: boolean): void {\n this.valid = false;\n if (!skipLightUpdate) {\n layerManager.invalidateLight();\n }\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n if (temporary === undefined) temporary = false;\n shape.layer = this.name;\n this.shapes.push(shape);\n layerManager.UUIDMap.set(shape.uuid, shape);\n shape.checkVisionSources(invalidate);\n shape.setMovementBlock(shape.movementObstruction, invalidate);\n if (shape.ownedBy(gameStore.username) && shape.isToken) gameStore.ownedtokens.push(shape.uuid);\n if (shape.annotation.length) gameStore.annotations.push(shape.uuid);\n if (sync) socket.emit(\"Shape.Add\", { shape: shape.asDict(), temporary });\n if (invalidate) this.invalidate(!sync);\n }\n\n setShapes(shapes: ServerShape[]): void {\n for (const serverShape of shapes) {\n const shape = createShapeFromDict(serverShape);\n if (shape === undefined) {\n console.log(`Shape with unknown type ${serverShape.type_} could not be added`);\n return;\n }\n this.addShape(shape, false, false, false);\n }\n this.clearSelection(); // TODO: Fix keeping selection on those items that are not moved.\n this.invalidate(false);\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (temporary === undefined) temporary = false;\n this.shapes.splice(this.shapes.indexOf(shape), 1);\n\n if (sync) socket.emit(\"Shape.Remove\", { shape: shape.asDict(), temporary });\n const lsI = gameStore.visionSources.findIndex(ls => ls.shape === shape.uuid);\n const lbI = gameStore.visionBlockers.findIndex(ls => ls === shape.uuid);\n\n const mbI = gameStore.movementblockers.findIndex(ls => ls === shape.uuid);\n const anI = gameStore.annotations.findIndex(ls => ls === shape.uuid);\n if (lsI >= 0) gameStore.visionSources.splice(lsI, 1);\n if (lbI >= 0) gameStore.visionBlockers.splice(lbI, 1);\n if (mbI >= 0) gameStore.movementblockers.splice(mbI, 1);\n if (anI >= 0) gameStore.annotations.splice(anI, 1);\n\n const annotationIndex = gameStore.annotations.indexOf(shape.uuid);\n if (annotationIndex >= 0) gameStore.annotations.splice(annotationIndex, 1);\n\n const ownedIndex = gameStore.ownedtokens.indexOf(shape.uuid);\n if (ownedIndex >= 0) gameStore.ownedtokens.splice(ownedIndex, 1);\n\n layerManager.UUIDMap.delete(shape.uuid);\n\n const index = this.selection.indexOf(shape);\n if (index >= 0) this.selection.splice(index, 1);\n if (lbI >= 0) gameStore.recalculateVision();\n if (mbI >= 0) gameStore.recalculateMovement();\n this.invalidate(!sync);\n }\n\n clear(): void {\n this.ctx.clearRect(0, 0, this.width, this.height);\n }\n\n clearSelection(): void {\n this.selection = [];\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n }\n\n draw(doClear?: boolean): void {\n if (!this.valid) {\n const ctx = this.ctx;\n const ogOP = ctx.globalCompositeOperation;\n doClear = doClear === undefined ? true : doClear;\n\n if (doClear) this.clear();\n\n const state = this;\n\n // We iteratre twice over all shapes\n // First to draw the auras and a second time to draw the shapes themselves\n // Otherwise auras from one shape could be overlapping another shape itself.\n\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.drawAuras(ctx);\n });\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (shape.labels.length === 0 && gameStore.filterNoLabel) return;\n if (\n shape.labels.length &&\n gameStore.labelFilters.length &&\n !shape.labels.some(l => gameStore.labelFilters.includes(l.uuid))\n )\n return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.draw(ctx);\n });\n\n if (this.selection != null) {\n ctx.fillStyle = this.selectionColor;\n ctx.strokeStyle = this.selectionColor;\n ctx.lineWidth = this.selectionWidth;\n const z = gameStore.zoomFactor;\n this.selection.forEach(sel => {\n ctx.globalCompositeOperation = sel.globalCompositeOperation;\n const bb = sel.getBoundingBox();\n // TODO: REFACTOR THIS TO Shape.drawSelection(ctx);\n ctx.strokeRect(g2lx(bb.topLeft.x), g2ly(bb.topLeft.y), bb.w * z, bb.h * z);\n\n for (const p of sel.points) {\n ctx.beginPath();\n ctx.arc(g2lx(p[0]), g2ly(p[1]), 3, 0, 2 * Math.PI);\n ctx.fill();\n }\n ctx.beginPath();\n ctx.moveTo(g2lx(sel.points[0][0]), g2ly(sel.points[0][1]));\n for (let i = 1; i <= sel.points.length; i++) {\n const vertex = sel.points[i % sel.points.length];\n ctx.lineTo(g2lx(vertex[0]), g2ly(vertex[1]));\n }\n ctx.stroke();\n });\n }\n ctx.globalCompositeOperation = ogOP;\n this.valid = true;\n }\n }\n\n moveShapeOrder(shape: Shape, destinationIndex: number, sync: boolean): void {\n const oldIdx = this.shapes.indexOf(shape);\n if (oldIdx === destinationIndex) return;\n this.shapes.splice(oldIdx, 1);\n this.shapes.splice(destinationIndex, 0, shape);\n if (sync) socket.emit(\"Shape.Order.Set\", { shape: shape.asDict(), index: destinationIndex });\n this.invalidate(true);\n }\n}\n","import { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport function scrollZoom(e: WheelEvent) {\n if (!e.target || !(e.target).tagName || (e.target).tagName !== \"CANVAS\") return;\n let delta: number;\n delta = Math.sign(e.deltaY) * -1;\n gameStore.updateZoom({ newZoomDisplay: gameStore.zoomDisplay - 0.1 * delta, zoomLocation: l2g(getMouse(e)) });\n}\n","import { render, staticRenderFns } from \"./filter.vue?vue&type=template&id=847e7ec4&scoped=true&\"\nimport script from \"./filter.vue?vue&type=script&lang=ts&\"\nexport * from \"./filter.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./filter.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./filter.vue?vue&type=style&index=1&id=847e7ec4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"847e7ec4\",\n null\n \n)\n\ncomponent.options.__file = \"filter.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"","import { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2lx, g2ly, l2g, l2gx, l2gy } from \"@/game/units\";\n\nexport abstract class BaseRect extends Shape {\n w: number;\n h: number;\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, fillColour, strokeColour, uuid);\n this.w = w;\n this.h = h;\n }\n getBaseDict() {\n return Object.assign(super.getBaseDict(), {\n width: this.w,\n height: this.h,\n });\n }\n getBoundingBox() {\n return new BoundingRect(this.refPoint, this.w, this.h);\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.refPoint.x, this.refPoint.y]];\n // note to self: topright and botleft are swapped because I'm retarded.\n const topright = this.refPoint.add(new Vector(0, this.h));\n const botright = this.refPoint.add(new Vector(this.w, this.h));\n const botleft = this.refPoint.add(new Vector(this.w, 0));\n return [\n [this.refPoint.x, this.refPoint.y],\n [topright.x, topright.y],\n [botright.x, botright.y],\n [botleft.x, botleft.y],\n ];\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.refPoint.x <= point.x &&\n this.refPoint.x + this.w >= point.x &&\n this.refPoint.y <= point.y &&\n this.refPoint.y + this.h >= point.y\n );\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint.add(new Vector(this.w / 2, this.h / 2));\n this.refPoint = new GlobalPoint(centerPoint.x - this.w / 2, centerPoint.y - this.h / 2);\n }\n\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n if (super.visibleInCanvas(canvas)) return true;\n const coreVisible = !(\n g2lx(this.refPoint.x) > canvas.width ||\n g2ly(this.refPoint.y) > canvas.height ||\n g2lx(this.refPoint.x + this.w) < 0 ||\n g2ly(this.refPoint.y + this.h) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n snapToGrid() {\n const gs = gameStore.gridSize;\n const center = this.center();\n const mx = center.x;\n const my = center.y;\n\n let targetX;\n let targetY;\n\n if ((this.w / gs) % 2 === 0) {\n targetX = Math.round(mx / gs) * gs - this.w / 2;\n } else {\n targetX = (Math.round((mx + gs / 2) / gs) - 1 / 2) * gs - this.w / 2;\n }\n if ((this.h / gs) % 2 === 0) {\n targetY = Math.round(my / gs) * gs - this.h / 2;\n } else {\n targetY = (Math.round((my + gs / 2) / gs) - 1 / 2) * gs - this.h / 2;\n }\n\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.refPoint = new GlobalPoint(Math.round(this.refPoint.x / gs) * gs, Math.round(this.refPoint.y / gs) * gs);\n this.w = Math.max(Math.round(this.w / gs) * gs, gs);\n this.h = Math.max(Math.round(this.h / gs) * gs, gs);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n switch (resizePoint) {\n case 0: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = l2g(point);\n break;\n }\n case 1: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint = new GlobalPoint(l2gx(point.x), this.refPoint.y);\n break;\n }\n case 2: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n break;\n }\n case 3: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = new GlobalPoint(this.refPoint.x, l2gy(point.y));\n break;\n }\n }\n\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint = this.refPoint.add(new Vector(this.w, 0));\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint = this.refPoint.add(new Vector(0, this.h));\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=048b3482&\"\nimport script from \"./select.vue?vue&type=script&lang=ts&\"\nexport * from \"./select.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"select.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./main.vue?vue&type=template&id=61eb1455&scoped=true&\"\nimport script from \"./main.vue?vue&type=script&lang=ts&\"\nexport * from \"./main.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"61eb1455\",\n null\n \n)\n\ncomponent.options.__file = \"main.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"AssetManager\"}},[_c('div',{attrs:{\"id\":\"titlebar\"}},[_vm._v(\"Asset Manager\")]),_c('div',{attrs:{\"id\":\"main\"}},[_c('div',{attrs:{\"id\":\"assets\"},on:{\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.currentFolder)}}},[_c('div',{attrs:{\"id\":\"breadcrumbs\"}},[_c('div',[_vm._v(\"/\")]),_vm._l((_vm.path),function(dir){return _c('div',{key:dir},[_vm._v(_vm._s(_vm.idMap.get(dir).name))])})],2),_c('div',{attrs:{\"id\":\"actionbar\"}},[_c('input',{attrs:{\"id\":\"files\",\"type\":\"file\",\"multiple\":\"\",\"hidden\":\"\"},on:{\"change\":function($event){_vm.upload()}}}),_c('div',{attrs:{\"title\":\"Create folder\"},on:{\"click\":_vm.createDirectory}},[_c('i',{staticClass:\"fas fa-plus-square\"})]),_c('div',{attrs:{\"title\":\"Upload files\"},on:{\"click\":_vm.prepareUpload}},[_c('i',{staticClass:\"fas fa-upload\"})])]),_c('div',{attrs:{\"id\":\"explorer\"}},[(_vm.path.length)?_c('div',{staticClass:\"inode folder\",on:{\"dblclick\":function($event){_vm.changeDirectory(-1)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.parentFolder)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(\"..\")])]):_vm._e(),_vm._l((_vm.folders),function(key){return _c('div',{key:key,staticClass:\"inode folder\",class:{'inode-selected': _vm.selected.includes(key)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, key)},\"dblclick\":function($event){_vm.changeDirectory(key)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, key)},\"dragstart\":function($event){_vm.startDrag($event, key)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, key)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(key).name))])])}),_vm._l((_vm.files),function(file){return _c('div',{key:file,staticClass:\"inode file\",class:{'inode-selected': _vm.selected.includes(file)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, file)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, file)},\"dragstart\":function($event){_vm.startDrag($event, file)}}},[_c('img',{attrs:{\"src\":'/static/assets/' + _vm.idMap.get(file).file_hash,\"width\":\"50\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(file).name))])])})],2)]),(_vm.firstSelectedFile)?_c('div',{attrs:{\"id\":\"asset-details\"}},[_c('div',{attrs:{\"id\":\"asset-detail-title\"}},[_vm._v(_vm._s(_vm.firstSelectedFile.name))]),_c('img',{attrs:{\"src\":'/static/assets/' + _vm.firstSelectedFile.file_hash}})]):_vm._e()]),_c('AssetContextMenu',{ref:\"cm\"}),_c('Prompt',{ref:\"prompt\"}),_c('ConfirmDialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=template&id=5b0def98&\"","\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy } from \"@/game/units\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class SelectContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n open(event: MouseEvent) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n }\n bringPlayers() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Players.Bring\", { x: l2gx(this.x), y: l2gy(this.y) });\n this.close();\n }\n createToken() {\n (this.$parent.$parent.$refs.createtokendialog).open(this.x, this.y);\n this.close();\n }\n showInitiative() {\n EventBus.$emit(\"Initiative.Show\");\n this.close();\n }\n}\n","import Axios from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component({})\nexport default class Logout extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/logout\").then(() => {\n coreStore.setAuthenticated(false);\n coreStore.setUsername(\"\");\n next({ path: \"/auth/login\" });\n });\n }\n}\n","import { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { rootStore } from \"@/store\";\n\nexport interface CoreState {\n authenticated: boolean;\n initialized: boolean;\n username: string;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule implements CoreState {\n authenticated = false;\n initialized = false;\n username = \"\";\n\n @Mutation\n setAuthenticated(auth: boolean) {\n this.authenticated = auth;\n }\n\n @Mutation\n setInitialized(init: boolean) {\n this.initialized = init;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n}\n\nexport const coreStore = getModule(CoreStore);\n","import Vue from \"vue\";\n\nimport App from \"@/App.vue\";\nimport { router } from \"@/router\";\nimport { rootStore } from \"@/store\";\n\nVue.config.productionTip = false;\nVue.config.devtools = true;\nVue.config.performance = true;\n\nexport const app = new Vue({\n router,\n store: rootStore,\n render: h => h(App),\n}).$mount(\"#app\");\n\n(window).app = app;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component({\n props: [\"visible\", \"left\", \"top\"],\n})\nexport default class ContextMenu extends Vue {}\n","import Axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\n@Component({ template: \"\" })\nexport default class Initiative extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/invite\", {\n code: to.params.code,\n })\n .then((response: AxiosResponse) => {\n next({ path: response.data.sessionUrl });\n })\n .catch((error: AxiosError) => {\n console.error(\"Invitation code could not be redeemed\");\n next({ path: \"/dashboard\" });\n });\n }\n}\n","import { render, staticRenderFns } from \"./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"\nimport script from \"./prompt.vue?vue&type=script&lang=ts&\"\nexport * from \"./prompt.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0602c2e6\",\n null\n \n)\n\ncomponent.options.__file = \"prompt.vue\"\nexport default component.exports","import { GlobalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nimport { Edge } from \"./cdt\";\nimport { drawPolygon } from \"./draw\";\nimport { PA_CDT } from \"./pa\";\nimport { Point, Sign, Triangle } from \"./tds\";\nimport { ccw, cw, orientation } from \"./triag\";\n\nexport function computeVisibility(q: GlobalPoint, target: \"vision\" | \"movement\", drawt?: boolean): number[][] {\n if (drawt === undefined) drawt = gameStore.drawTEContour;\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT[target].locate(Q, null).loc;\n if (triangle === null) {\n console.error(\"Triangle not found\");\n return [];\n }\n // triangle.fill();\n rawOutput.push(triangle.vertices[1]!.point!);\n if (!triangle.isConstrained(0))\n expandEdge(Q, triangle.vertices[2]!.point!, triangle.vertices[1]!.point!, triangle, 0, rawOutput);\n rawOutput.push(triangle.vertices[2]!.point!);\n if (!triangle.isConstrained(1))\n expandEdge(Q, triangle.vertices[0]!.point!, triangle.vertices[2]!.point!, triangle, 1, rawOutput);\n rawOutput.push(triangle.vertices[0]!.point!);\n if (!triangle.isConstrained(2))\n expandEdge(Q, triangle.vertices[1]!.point!, triangle.vertices[0]!.point!, triangle, 2, rawOutput);\n // console.timeEnd(\"CV\");\n\n if (drawt) drawPolygon(rawOutput, \"red\");\n\n return rawOutput;\n}\n\nfunction expandEdge(\n q: Point,\n left: number[],\n right: number[],\n fh: Triangle,\n index: number,\n rawOutput: number[][],\n): void {\n // fh.edge(index).draw();\n const nfh = fh.neighbours[index]!;\n // nfh.fill(\"rgba(255, 0, 0, 0.25)\");\n const nIndex = nfh.indexT(fh);\n const rIndex = ccw(nIndex);\n const lIndex = cw(nIndex);\n const nvh = nfh.vertices[nIndex]!;\n const rvh = nfh.vertices[lIndex]!;\n const lvh = nfh.vertices[rIndex]!;\n\n const re: Edge = [nfh, rIndex];\n const le: Edge = [nfh, lIndex];\n\n const ro = orientation(q, right, nvh.point!);\n const lo = orientation(q, left, nvh.point!);\n\n // const ctx = layerManager.getLayer(\"draw\")!.ctx;\n // ctx.beginPath();\n // ctx.strokeStyle = \"red\";\n // ctx.lineJoin = \"round\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(left[0]), g2ly(left[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.strokeStyle = \"blue\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(right[0]), g2ly(right[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.closePath();\n // ctx.stroke();\n\n // Right edge is seen if the new vertex is ccw of the right ray\n if (ro === Sign.COUNTERCLOCKWISE) {\n if (re[0].isConstrained(re[1])) {\n // See if current right ray is rvh\n if (right !== rvh.point!) rawOutput.push(raySegIntersection(q, right, nvh.point!, rvh.point!));\n if (lo === Sign.COUNTERCLOCKWISE) rawOutput.push(raySegIntersection(q, left, nvh.point!, rvh.point!));\n } else {\n if (lo === Sign.COUNTERCLOCKWISE) return expandEdge(q, left, right, nfh, rIndex, rawOutput);\n else expandEdge(q, nvh.point!, right, nfh, rIndex, rawOutput);\n }\n }\n\n if (ro !== Sign.CLOCKWISE && lo !== Sign.COUNTERCLOCKWISE) {\n rawOutput.push(nvh.point!);\n }\n\n if (lo === Sign.CLOCKWISE) {\n if (le[0].isConstrained(le[1])) {\n if (ro === Sign.CLOCKWISE) {\n rawOutput.push(raySegIntersection(q, right, nvh.point!, lvh.point!));\n }\n if (left !== lvh.point!) {\n rawOutput.push(raySegIntersection(q, left, nvh.point!, lvh.point!));\n }\n return;\n } else {\n if (ro === Sign.CLOCKWISE) {\n return expandEdge(q, left, right, nfh, lIndex, rawOutput);\n } else {\n return expandEdge(q, left, nvh.point!, nfh, lIndex, rawOutput);\n }\n }\n }\n}\n\nfunction raySegIntersection(q: Point, b: Point, s: Point, t: Point) {\n const denominator = (t[1] - s[1]) * (b[0] - q[0]) - (t[0] - s[0]) * (b[1] - q[1]);\n const ua = ((t[0] - s[0]) * (q[1] - s[1]) - (t[1] - s[1]) * (q[0] - s[0])) / denominator;\n // const ub = ((b[0] - q.x) * (q.y - s[1]) - (b[1] - q.y) * (q.x - s[0])) / denominator;\n const x = q[0] + ua * (b[0] - q[0]);\n const y = q[1] + ua * (b[1] - q[1]);\n\n return [x, y];\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',[_vm._v(\"#X\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.xCount),expression:\"xCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.xCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.xCount=$event.target.value}}}),_c('div',[_vm._v(\"#Y\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.yCount),expression:\"yCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.yCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.yCount=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=template&id=2104f147&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=23de098e&scoped=true&\"\nimport script from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./edit_dialog.vue?vue&type=style&index=0&id=23de098e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23de098e\",\n null\n \n)\n\ncomponent.options.__file = \"edit_dialog.vue\"\nexport default component.exports","export class Settings {\n static angleSteps = 4;\n static drawAngleLines = false;\n static drawFirstLightHit = false;\n static skipPlayerFOW = false;\n static skipLightFOW = false;\n\n static tempFill: string = \"fog\";\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { coreStore } from \"@/core/store\";\n\n@Component\nexport default class Login extends Vue {\n username = \"\";\n password = \"\";\n error = \"\";\n\n login() {\n axios\n .post(\"/api/login\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n register() {\n axios\n .post(\"/api/register\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n focusin(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"0\";\n }\n }\n\n focusout(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"1\";\n }\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(\"Create basic token\")])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('label',{attrs:{\"for\":\"createtokendialog-text\"}},[_vm._v(\"Text\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.text),expression:\"text\"}],attrs:{\"type\":\"text\",\"id\":\"createtokendialog-name\"},domProps:{\"value\":(_vm.text)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.text=$event.target.value}}}),_c('label',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"colours\"},[_c('span',[_vm._v(\"Fill:\")]),_c('color-picker',{attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('span',[_vm._v(\"Border:\")]),_c('color-picker',{attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('canvas',{ref:\"canvas\",attrs:{\"width\":\"100px\",\"height\":\"100px\"}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(\"div\")}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=template&id=1e034b42&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{\"name\":\"modal\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.visible),expression:\"visible\"}],staticClass:\"mask\",class:{'modal-mask': _vm.mask, 'dialog-mask': !_vm.mask},on:{\"click\":_vm.close,\"dragover\":function($event){$event.preventDefault();return _vm.dragOver($event)}}},[_c('div',{ref:\"container\",staticClass:\"modal-container\",on:{\"click\":function($event){$event.stopPropagation();}}},[_vm._t(\"header\",null,{dragStart:_vm.dragStart,dragEnd:_vm.dragEnd}),_vm._t(\"default\")],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"","import Component from \"vue-class-component\";\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Line } from \"@/game/shapes/line\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component\nexport class RulerTool extends Tool {\n name = \"Ruler\";\n active = false;\n startPoint: GlobalPoint | null = null;\n ruler: Line | null = null;\n text: Text | null = null;\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n this.active = true;\n this.startPoint = l2g(getMouse(event));\n this.ruler = new Line(this.startPoint, this.startPoint, 3, gameStore.rulerColour);\n this.text = new Text(this.startPoint.clone(), \"\", \"bold 20px serif\");\n this.ruler.addOwner(gameStore.username);\n this.text.addOwner(gameStore.username);\n layer.addShape(this.ruler, true, true);\n layer.addShape(this.text, true, true);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n const endPoint = l2g(getMouse(event));\n\n this.ruler.endPoint = endPoint;\n socket.emit(\"Shape.Update\", { shape: this.ruler!.asDict(), redraw: true, temporary: true });\n\n const diffsign = Math.sign(endPoint.x - this.startPoint.x) * Math.sign(endPoint.y - this.startPoint.y);\n const xdiff = Math.abs(endPoint.x - this.startPoint.x);\n const ydiff = Math.abs(endPoint.y - this.startPoint.y);\n const label =\n Math.round((Math.sqrt(xdiff ** 2 + ydiff ** 2) * gameStore.unitSize) / gameStore.gridSize) + \" ft\";\n const angle = Math.atan2(diffsign * ydiff, xdiff);\n const xmid = Math.min(this.startPoint.x, endPoint.x) + xdiff / 2;\n const ymid = Math.min(this.startPoint.y, endPoint.y) + ydiff / 2;\n this.text.refPoint = new GlobalPoint(xmid, ymid);\n this.text.text = label;\n this.text.angle = angle;\n socket.emit(\"Shape.Update\", { shape: this.text.asDict(), redraw: true, temporary: true });\n layer.invalidate(true);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n layer.removeShape(this.ruler, true, true);\n layer.removeShape(this.text, true, true);\n layer.invalidate(true);\n this.ruler = this.startPoint = this.text = null;\n }\n}\n","import { render, staticRenderFns } from \"./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"\nimport script from \"./modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"12ed61ba\",\n null\n \n)\n\ncomponent.options.__file = \"modal.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=script&lang=ts&\"","import { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nimport { CDT } from \"./cdt\";\n\nexport let PA_CDT = {\n vision: new CDT(),\n movement: new CDT(),\n};\n\nexport function triangulate(target: \"vision\" | \"movement\", partial: boolean = false) {\n const cdt = new CDT();\n\n let shapes;\n if (target === \"vision\") shapes = gameStore.visionBlockers;\n else shapes = gameStore.movementblockers;\n\n for (const sh of shapes) {\n const shape = layerManager.UUIDMap.get(sh)!;\n if (partial && !shape.visibleInCanvas(layerManager.getLayer()!.canvas)) continue;\n for (let i = 0; i < shape.points.length; i++) {\n cdt.insertConstraint(shape.points[i], shape.points[(i + 1) % shape.points.length]);\n }\n }\n // LEFT WALL\n cdt.insertConstraint([-1e8, -1e8], [-1e8, 1e8]);\n cdt.insertConstraint([-1e8, 1e8], [-1e11, 1e8]);\n cdt.insertConstraint([-1e11, 1e8], [-1e11, -1e8]);\n cdt.insertConstraint([-1e11, -1e8], [-1e8, -1e8]);\n // TOP WALL\n cdt.insertConstraint([-1e8, -1e8], [1e8, -1e8]);\n cdt.insertConstraint([1e8, -1e8], [1e8, -1e11]);\n cdt.insertConstraint([1e8, -1e11], [-1e8, -1e11]);\n cdt.insertConstraint([-1e8, -1e11], [-1e8, -1e8]);\n // RIGHT WALL\n cdt.insertConstraint([1e8, -1e8], [1e8, 1e8]);\n cdt.insertConstraint([1e8, 1e8], [1e11, 1e8]);\n cdt.insertConstraint([1e11, 1e8], [1e11, -1e8]);\n cdt.insertConstraint([1e11, -1e8], [1e8, -1e8]);\n // BOT WALL\n cdt.insertConstraint([-1e8, 1e8], [1e8, 1e8]);\n cdt.insertConstraint([1e8, 1e8], [1e8, 1e11]);\n cdt.insertConstraint([1e8, 1e11], [-1e8, 1e11]);\n cdt.insertConstraint([-1e8, 1e11], [-1e8, 1e8]);\n PA_CDT[target] = cdt;\n (window).CDT = PA_CDT;\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Prop } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n})\nexport default class EditDialog extends Vue {\n @Prop() shape!: Shape;\n\n visible = false;\n\n get owned(): boolean {\n return this.shape.ownedBy();\n }\n\n mounted() {\n EventBus.$on(\"EditDialog.Open\", (shape: Shape) => {\n this.shape = shape;\n this.visible = true;\n });\n EventBus.$on(\"EditDialog.AddLabel\", (label: string) => {\n if (this.visible) {\n this.shape.labels.push(gameStore.labels[label]);\n this.updateShape(true);\n }\n });\n }\n\n beforeDestroy() {\n EventBus.$off(\"EditDialog.Open\");\n EventBus.$off(\"EditDialog.AddLabel\");\n }\n\n updated() {\n this.addEmpty();\n }\n\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.addOwner(\"\");\n if (\n !this.shape.trackers.length ||\n this.shape.trackers[this.shape.trackers.length - 1].name !== \"\" ||\n this.shape.trackers[this.shape.trackers.length - 1].value !== 0\n )\n this.shape.trackers.push({ uuid: uuidv4(), name: \"\", value: 0, maxvalue: 0, visible: false });\n if (\n !this.shape.auras.length ||\n this.shape.auras[this.shape.auras.length - 1].name !== \"\" ||\n this.shape.auras[this.shape.auras.length - 1].value !== 0\n )\n this.shape.auras.push({\n uuid: uuidv4(),\n name: \"\",\n value: 0,\n dim: 0,\n visionSource: false,\n colour: \"rgba(0,0,0,0)\",\n visible: false,\n });\n }\n updateShape(redraw: boolean, temporary = false) {\n if (!this.owned) return;\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary });\n if (redraw) layerManager.invalidate();\n this.addEmpty();\n }\n setToken(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n this.shape.setIsToken(event.target.checked);\n this.updateShape(true);\n }\n setVisionBlocker(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n setMovementBlocker(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n this.shape.setMovementBlock(event.target.checked);\n this.updateShape(false);\n }\n updateAnnotation(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n const hadAnnotation = this.shape.annotation !== \"\";\n this.shape.annotation = event.target.value;\n if (this.shape.annotation !== \"\" && !hadAnnotation) {\n gameStore.annotations.push(this.shape.uuid);\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n } else if (this.shape.annotation === \"\" && hadAnnotation) {\n gameStore.annotations.splice(gameStore.annotations.findIndex(an => an === this.shape.uuid));\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n }\n this.updateShape(false);\n }\n updateOwner(event: { target: HTMLInputElement }, oldValue: string) {\n if (!this.owned) return;\n this.shape.updateOwner(oldValue, event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n if (!this.owned) return;\n this.shape.removeOwner(value);\n this.updateShape(gameStore.fowLOS);\n }\n removeTracker(uuid: string) {\n if (!this.owned) return;\n this.shape.trackers = this.shape.trackers.filter(tr => tr.uuid !== uuid);\n this.updateShape(false);\n }\n removeAura(uuid: string) {\n if (!this.owned) return;\n this.shape.auras = this.shape.auras.filter(au => au.uuid !== uuid);\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n updateAuraVisionSource(aura: Aura) {\n if (!this.owned) return;\n aura.visionSource = !aura.visionSource;\n const i = gameStore.visionSources.findIndex(ls => ls.aura === aura.uuid);\n if (aura.visionSource && i === -1) gameStore.visionSources.push({ shape: this.shape.uuid, aura: aura.uuid });\n else if (!aura.visionSource && i >= 0) gameStore.visionSources.splice(i, 1);\n this.updateShape(true);\n }\n updateAuraColour(aura: Aura, colour: string) {\n if (!this.owned) return;\n const layer = layerManager.getLayer(this.shape.layer);\n if (layer === undefined) return;\n layer.invalidate(!aura.visionSource);\n }\n openLabelManager() {\n EventBus.$emit(\"LabelManager.Open\");\n }\n removeLabel(uuid: string) {\n if(!this.owned) return;\n this.shape.labels = this.shape.labels.filter(l => l.uuid !== uuid);\n this.updateShape(true);\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class ConfirmDialog extends Vue {\n $refs!: {\n confirm: HTMLButtonElement;\n };\n\n visible = false;\n yes = \"Yes\";\n no = \"No\";\n title = \"\";\n\n resolve = (ok: boolean) => {};\n reject = () => {};\n\n confirm() {\n this.resolve(true);\n this.close();\n }\n deny() {\n this.resolve(false);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.title = \"\";\n }\n open(title: string, yes = \"yes\", no = \"no\"): Promise {\n this.yes = yes;\n this.no = no;\n this.title = title;\n\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.confirm.focus();\n });\n\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=af4dc61a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=af4dc61a&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./map.vue?vue&type=template&id=2104f147&\"\nimport script from \"./map.vue?vue&type=script&lang=ts&\"\nexport * from \"./map.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"map.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"accordion\"},[_c('div',{attrs:{\"id\":\"header\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleDisplay($event)}}},[_c('input',{ref:\"overall\",attrs:{\"type\":\"checkbox\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.toggleCategory($event)}}}),_c('strong',[_vm._v(_vm._s(_vm.title))]),(_vm.showArrow)?[_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showArrow && !_vm.active),expression:\"showArrow && !active\"}],staticClass:\"down-Arrow\"},[_vm._v(\"▼\")]),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showArrow && _vm.active),expression:\"showArrow && active\"}],staticClass:\"up-Arrow\"},[_vm._v(\"▲\")])]:_vm._e()],2),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.active),expression:\"active\"}],attrs:{\"id\":\"body\"}},_vm._l((_vm.items),function(item){return _c('div',{key:item[0],staticClass:\"item\",on:{\"click\":function($event){_vm.toggleSelection(item[0])}}},[_c('input',{attrs:{\"type\":\"checkbox\"},domProps:{\"checked\":_vm.selected.includes(item[0])},on:{\"click\":function($event){$event.preventDefault();}}}),_vm._v(\" \"+_vm._s(item[1])+\"\\n \")])}))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=template&id=0bf2b7ba&scoped=true&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=1&id=847e7ec4&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=1&id=847e7ec4&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('button',{ref:\"confirm\",on:{\"click\":_vm.confirm}},[_vm._v(_vm._s(_vm.yes))]),(!!_vm.no)?_c('button',{on:{\"click\":_vm.deny}},[_vm._v(_vm._s(_vm.no))]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"","\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { getComponent, getRef } from \"@/core/utils\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class AssetContextMenu extends Vue {\n visible = false;\n left = 0;\n top = 0;\n open(event: MouseEvent, inode: number) {\n if (!assetStore.selected.includes(inode)) getComponent().select(event, inode);\n\n this.visible = true;\n this.left = event.pageX;\n this.top = event.pageY;\n this.$nextTick(() => {\n this.$children[0].$el.focus();\n });\n }\n close() {\n this.visible = false;\n }\n rename() {\n if (assetStore.selected.length !== 1) return;\n const asset = assetStore.idMap.get(assetStore.selected[0])!;\n\n getRef(\"prompt\")\n .prompt(\"New name:\", `Renaming ${asset.name}`)\n .then(\n (name: string) => {\n socket.emit(\"Asset.Rename\", {\n asset: asset.id,\n name,\n });\n asset.name = name;\n getComponent().$forceUpdate();\n },\n () => {},\n );\n this.close();\n }\n remove() {\n if (assetStore.selected.length === 0) return;\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result) {\n for (const sel of assetStore.selected) {\n socket.emit(\"Asset.Remove\", sel);\n if (assetStore.files.includes(sel))\n assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.clearSelected();\n }\n },\n () => {},\n );\n this.close();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=0&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class LabelManager extends Vue {\n visible = false;\n newCategory = \"\";\n newName = \"\";\n search = \"\";\n\n mounted() {\n EventBus.$on(\"LabelManager.Open\", () => {\n this.visible = true;\n this.newCategory = \"\";\n this.newName = \"\";\n this.$nextTick(() => (this.$refs.search).focus());\n });\n }\n\n beforeDestroy() {\n EventBus.$off(\"LabelManager.Open\");\n }\n\n get labels() {\n const cat: {[category: string]: Label[]} = {};\n for (const uuid of Object.keys(gameStore.labels)) {\n const label = gameStore.labels[uuid];\n if (this.search.length && `${label.category.toLowerCase()}${label.name.toLowerCase()}`.search(this.search.toLowerCase()) < 0) continue;\n if (label.user !== gameStore.username) continue;\n if (!label.category) cat[''].push(label);\n else {\n if (!(label.category in cat)) cat[label.category] = [];\n cat[label.category].push(label);\n cat[label.category].sort((a, b) => a.name.localeCompare(b.name));\n }\n }\n return cat;\n }\n\n get categories() {\n return Object.keys(this.labels).sort();\n }\n\n selectLabel(label: string) {\n EventBus.$emit(\"EditDialog.AddLabel\", label);\n this.visible = false;\n }\n\n toggleVisibility(label: Label) {\n label.visible = !label.visible;\n socket.emit(\"Label.Visibility.Set\", { uuid: label.uuid, visible: label.visible });\n }\n\n addLabel() {\n if (this.newName === \"\") return;\n const label = {\n uuid: uuidv4(),\n category: this.newCategory,\n name: this.newName,\n visible: false,\n user: gameStore.username,\n };\n gameStore.addLabel(label);\n socket.emit(\"Label.Add\", label);\n this.newCategory = \"\";\n this.newName = \"\";\n }\n\n deleteLabel(uuid: string) {\n gameStore.deleteLabel({ uuid, user: gameStore.username });\n socket.emit(\"Label.Delete\", uuid);\n }\n}\n","import { ServerPolygon } from \"../comm/types/shapes\";\nimport { GlobalPoint, LocalPoint } from \"../geom\";\nimport { g2lx, g2ly, g2lz, l2g } from \"../units\";\nimport { getFogColour } from \"../utils\";\nimport { BoundingRect } from \"./boundingrect\";\nimport { Shape } from \"./shape\";\n\nexport class Polygon extends Shape {\n type = \"polygon\";\n _vertices: GlobalPoint[] = [];\n\n constructor(\n startPoint: GlobalPoint,\n vertices: GlobalPoint[] = [],\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, fillColour, strokeColour, uuid);\n this._vertices = vertices;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._vertices.length; i++) this._vertices[i] = this._vertices[i].add(delta);\n }\n\n get vertices() {\n return [this._refPoint, ...this._vertices];\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n vertices: this._vertices.map(p => ({ x: p.x, y: p.y })),\n });\n }\n\n fromDict(data: ServerPolygon) {\n super.fromDict(data);\n this._vertices = data.vertices.map(v => new GlobalPoint(v.x, v.y));\n }\n\n get points() {\n return this.vertices.map(point => [point.x, point.y]);\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else if (this.vertices.length === 2) ctx.strokeStyle = this.fillColour;\n else ctx.strokeStyle = this.strokeColour;\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n ctx.lineWidth = g2lz(2);\n\n ctx.beginPath();\n ctx.moveTo(g2lx(this.vertices[0].x), g2ly(this.vertices[0].y));\n for (let i = 1; i <= this.vertices.length; i++) {\n const vertex = this.vertices[i % this.vertices.length];\n ctx.lineTo(g2lx(vertex.x), g2ly(vertex.y));\n }\n ctx.fill();\n ctx.stroke();\n }\n\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._vertices[resizePoint - 1] = l2g(point);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._vertices) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}]},[_vm._v(\"Mode\")]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}],staticClass:\"selectgroup\"},_vm._l((_vm.modes),function(mode){return _c('div',{key:mode,staticClass:\"option\",class:{'option-selected': _vm.modeSelect === mode},on:{\"click\":function($event){_vm.modeSelect = mode}}},[_vm._v(_vm._s(mode))])})),_c('div',[_vm._v(\"Shape\")]),_c('div',{staticClass:\"selectgroup\"},_vm._l((_vm.shapes),function(shape){return _c('div',{key:shape,staticClass:\"option\",class:{'option-selected': _vm.shapeSelect === shape},on:{\"click\":function($event){_vm.shapeSelect = shape}}},[_c('i',{staticClass:\"fas\",class:'fa-' + shape})])})),_c('div',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"selectgroup\"},[_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}]},[_vm._v(\"Brush size\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.brushSize),expression:\"brushSize\"},{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}],staticStyle:{\"max-width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.brushSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.brushSize=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=template&id=639cd890&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"outer\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}},[_c('div',{staticClass:\"current-color\",style:(_vm.transparent ? 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)' : 'background-color:' + _vm.color),on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],staticClass:\"mask\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.closePicker($event)}}}),_c('chrome-picker',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],ref:\"chromePicker\",style:({position: 'fixed', left:_vm.left + 'px', top:_vm.top + 'px', 'z-index': 9999}),attrs:{\"value\":_vm.color,\"tabindex\":\"-1\"},on:{\"input\":_vm.updateColor}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=template&id=d32461a4&scoped=true&\"","import { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=5b0def98&\"\nimport script from \"./manager.vue?vue&type=script&lang=ts&\"\nexport * from \"./manager.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./manager.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"manager.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./tool.vue?vue&type=template&id=1e034b42&\"\nimport script from \"./tool.vue?vue&type=script&lang=ts&\"\nexport * from \"./tool.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tool.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"tool.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_vm._v(\"\\n \"+_vm._s(_vm.question)+\"\\n \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.answer),expression:\"answer\"}],ref:\"answer\",attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.answer)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.submit($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.answer=$event.target.value}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport draggable from \"vuedraggable\";\nVue.component(\"draggable\", draggable);\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { InitiativeData, InitiativeEffect } from \"@/game/comm/types/general\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n draggable,\n },\n})\nexport default class Initiative extends Vue {\n visible = false;\n data: InitiativeData[] = [];\n currentActor: string | null = null;\n roundCounter = 0;\n\n mounted() {\n EventBus.$on(\"Initiative.Clear\", this.clear);\n EventBus.$on(\"Initiative.Remove\", (data: string) => this.removeInitiative(data));\n EventBus.$on(\"Initiative.Show\", () => (this.visible = true));\n\n socket.on(\"Initiative.Set\", (data: InitiativeData[]) => {\n this.data = data;\n });\n socket.on(\"Initiative.Turn.Set\", (data: string) => this.setTurn(data));\n socket.on(\"Initiative.Turn.Update\", (data: string) => this.updateTurn(data, false));\n socket.on(\"Initiative.Round.Update\", (data: number) => this.setRound(data, false));\n socket.on(\"Initiative.Effect.New\", (data: { actor: string; effect: InitiativeEffect }) => {\n const actor = this.getActor(data.actor);\n if (actor === undefined) return;\n this.createEffect(actor, data.effect, false);\n });\n socket.on(\"Initiative.Effect.Update\", (data: { actor: string; effect: InitiativeEffect }) =>\n this.updateEffect(data.actor, data.effect, false),\n );\n }\n\n beforeDestroy() {\n EventBus.$off(\"Initiative.Clear\");\n EventBus.$off(\"Initiative.Remove\");\n EventBus.$off(\"Initiative.Show\");\n }\n\n // Utilities\n clear() {\n this.data = [];\n this.currentActor = null;\n }\n getActor(actorId: string) {\n return this.data.find(a => a.uuid === actorId);\n }\n contains(uuid: string) {\n return this.data.some(d => d.uuid === uuid);\n }\n owns(actor: InitiativeData): boolean {\n if (gameStore.IS_DM) return true;\n const shape = layerManager.UUIDMap.get(actor.uuid);\n // Shapes that are unknown to this client are hidden from this client but owned by other clients\n if (shape === undefined) return false;\n return shape.owners.includes(gameStore.username);\n }\n getDefaultEffect() {\n return { uuid: uuidv4(), name: \"New Effect\", turns: 10 };\n }\n fakeSetData(dataTransfer: DataTransfer) {\n dataTransfer.setData(\"Hack\", \"\");\n }\n syncInitiative(data: InitiativeData | { uuid: string }) {\n socket.emit(\"Initiative.Update\", data);\n }\n // Events\n addInitiative(data: InitiativeData) {\n const d = this.data.findIndex(a => a.uuid === data.uuid);\n if (d >= 0) return;\n if (data.initiative === undefined) data.initiative = 0;\n this.syncInitiative(data);\n }\n removeInitiative(uuid: string) {\n const d = this.data.findIndex(a => a.uuid === uuid);\n if (d < 0 || this.data[d].group) return;\n this.syncInitiative({ uuid });\n // Remove highlight\n const shape = layerManager.UUIDMap.get(uuid);\n if (shape === undefined) return;\n if (shape.showHighlight) {\n shape.showHighlight = false;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n }\n updateOrder() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Initiative.Set\", this.data.map(d => d.uuid));\n }\n updateTurn(actorId: string | null, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.currentActor = actorId;\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n if (actor.effects) {\n for (let e = actor.effects.length - 1; e >= 0; e--) {\n if (actor.effects[e].turns <= 0) actor.effects.splice(e, 1);\n else actor.effects[e].turns--;\n }\n }\n if (sync) socket.emit(\"Initiative.Turn.Update\", actorId);\n }\n setRound(round: number, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.roundCounter = round;\n if (sync) socket.emit(\"Initiative.Round.Update\", round);\n }\n setTurn(actorId: string | null) {\n this.currentActor = actorId;\n }\n nextTurn() {\n if (!gameStore.IS_DM) return;\n const order = this.data;\n const next = order[(order.findIndex(a => a.uuid === this.currentActor) + 1) % order.length];\n if (this.data[0].uuid === next.uuid) this.setRound(this.roundCounter + 1, true);\n this.updateTurn(next.uuid, true);\n }\n toggleHighlight(actor: InitiativeData, show: boolean) {\n const shape = layerManager.UUIDMap.get(actor.uuid);\n if (shape === undefined) return;\n shape.showHighlight = show;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n toggleOption(actor: InitiativeData, option: \"visible\" | \"group\") {\n if (!this.owns(actor)) return;\n actor[option] = !actor[option];\n this.syncInitiative(actor);\n }\n createEffect(actor: InitiativeData, effect: InitiativeEffect, sync: boolean) {\n if (!this.owns(actor)) return;\n actor.effects.push(effect);\n if (sync) socket.emit(\"Initiative.Effect.New\", { actor: actor.uuid, effect });\n }\n syncEffect(actor: InitiativeData, effect: InitiativeEffect) {\n if (!this.owns(actor)) return;\n socket.emit(\"Initiative.Effect.Update\", { actor: actor.uuid, effect });\n }\n updateEffect(actorId: string, effect: InitiativeEffect, sync: boolean) {\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n const effectIndex = actor.effects.findIndex(e => e.uuid === effect.uuid);\n if (effectIndex === undefined) return;\n actor.effects[effectIndex] = effect;\n if (sync) this.syncEffect(actor, effect);\n else this.$forceUpdate();\n }\n}\n","import { render, staticRenderFns } from \"./selection_info.vue?vue&type=template&id=674cf937&scoped=true&\"\nimport script from \"./selection_info.vue?vue&type=script&lang=ts&\"\nexport * from \"./selection_info.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selection_info.vue?vue&type=style&index=0&id=674cf937&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"674cf937\",\n null\n \n)\n\ncomponent.options.__file = \"selection_info.vue\"\nexport default component.exports","import Vue from 'vue';\n\nimport { Action, getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { g2l, l2g } from \"@/game/units\";\nimport { zoomValue } from \"@/game/utils\";\nimport { BoundingVolume } from \"@/game/visibility/bvh/bvh\";\nimport { triangulate } from \"@/game/visibility/te/pa\";\nimport { rootStore } from \"@/store\";\n\nexport interface GameState {\n boardInitialized: boolean;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"game\", namespaced: true })\nclass GameStore extends VuexModule implements GameState {\n // This is a limited view of selectable layers that is used to generate the layer selection UI and ability to switch layers\n // See the layerManager for proper layer management tools\n layers: string[] = [];\n selectedLayerIndex = -1;\n boardInitialized = false;\n\n locations: string[] = [];\n\n assets: AssetList = {};\n\n notes: Note[] = [];\n\n IS_DM = false;\n gridSize = 50;\n username = \"\";\n roomName = \"\";\n roomCreator = \"\";\n invitationCode = \"\";\n\n gridColour = \"rgba(0, 0, 0, 1)\";\n fowColour = \"rgba(0, 0, 0, 1)\";\n rulerColour = \"rgba(255, 0, 0, 1)\";\n panX = 0;\n panY = 0;\n\n zoomDisplay = 0.5;\n // zoomFactor = 1;\n\n unitSize = 5;\n useGrid = true;\n fullFOW = false;\n fowOpacity = 0.3;\n fowLOS = false;\n locationName = \"\";\n\n visionSources: { shape: string; aura: string }[] = [];\n visionBlockers: string[] = [];\n annotations: string[] = [];\n movementblockers: string[] = [];\n ownedtokens: string[] = [];\n\n BV = Object.freeze(new BoundingVolume([]));\n\n visionMode: \"bvh\" | \"triangle\" = \"bvh\";\n drawTEContour = false;\n visionRangeMin = 1640;\n visionRangeMax = 3281;\n\n clipboard: ServerShape[] = [];\n\n // Maps are not yet supported in Vue untill 3.X, so for now we're using a plain old object\n labels: {[uuid: string]: Label} = {};\n\n filterNoLabel = false;\n labelFilters: string[] = [];\n\n showUI = true;\n\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n get zoomFactor() {\n return zoomValue(this.zoomDisplay);\n }\n\n @Mutation\n setZoomDisplay(zoom: number) {\n if (zoom === this.zoomDisplay) return;\n if (zoom < 0) zoom = 0;\n if (zoom > 1) zoom = 1;\n this.zoomDisplay = zoom;\n layerManager.invalidate();\n }\n\n @Mutation\n setVisionMode(data: { mode: \"bvh\" | \"triangle\"; sync: boolean }) {\n this.visionMode = data.mode;\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_mode: data.mode });\n }\n\n @Mutation\n setBoardInitialized(boardInitialized: boolean) {\n this.boardInitialized = boardInitialized;\n }\n\n @Mutation\n toggleUnlabeledFilter() {\n this.filterNoLabel = !this.filterNoLabel;\n }\n\n @Mutation\n addLabel(label: Label) {\n Vue.set(this.labels, label.uuid, label);\n }\n\n @Mutation\n setLabelFilters(filters: string[]) {\n this.labelFilters = filters;\n }\n\n @Mutation\n setLabelVisibility(data: { user: string; uuid: string; visible: boolean }) {\n if (!(data.uuid in this.labels)) return;\n this.labels[data.uuid].visible = data.visible;\n }\n\n @Mutation\n deleteLabel(data: { uuid: string; user: string }) {\n if (!(data.uuid in this.labels)) return;\n const label = this.labels[data.uuid];\n const updatedLayers: Set = new Set();\n for (const shape of layerManager.UUIDMap.values()) {\n const i = shape.labels.indexOf(label);\n if (i >= 0) {\n shape.labels.splice(i, 1);\n updatedLayers.add(shape.layer);\n }\n }\n for (const layer of updatedLayers)\n layerManager.getLayer(layer)!.invalidate(false);\n Vue.delete(this.labels, data.uuid);\n }\n\n @Mutation\n setDM(isDM: boolean) {\n this.IS_DM = isDM;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n\n @Mutation\n setRoomName(name: string) {\n this.roomName = name;\n }\n\n @Mutation\n setRoomCreator(name: string) {\n this.roomCreator = name;\n }\n\n @Mutation\n setInvitationCode(code: string) {\n this.invitationCode = code;\n }\n\n @Mutation\n addLayer(name: string) {\n this.layers.push(name);\n if (this.selectedLayerIndex === -1) this.selectedLayerIndex = this.layers.indexOf(name);\n }\n\n @Mutation\n selectLayer(data: { name: string; sync: boolean }) {\n const index = this.layers.indexOf(data.name);\n if (index >= 0) this.selectedLayerIndex = index;\n if (data.sync) socket.emit(\"Client.ActiveLayer.Set\", data.name);\n }\n\n @Mutation\n newNote(data: { note: Note; sync: boolean }) {\n this.notes.push(data.note);\n if (data.sync) socket.emit(\"Note.New\", data.note);\n }\n\n @Mutation\n setAssets(assets: AssetList) {\n this.assets = assets;\n }\n\n @Mutation\n setLocations(locations: string[]) {\n this.locations = locations;\n }\n\n @Mutation\n resetLayerInfo() {\n this.layers = [];\n this.selectedLayerIndex = -1;\n }\n\n @Mutation\n recalculateVision(partial = false) {\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(\"vision\", partial);\n else this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n }\n }\n\n @Mutation\n recalculateMovement(partial = false) {\n if (this.boardInitialized && this.visionMode === \"triangle\") triangulate(\"movement\", partial);\n }\n\n @Mutation\n updateZoom(data: { newZoomDisplay: number; zoomLocation: GlobalPoint }) {\n if (data.newZoomDisplay === this.zoomDisplay) return;\n if (data.newZoomDisplay < 0) data.newZoomDisplay = 0;\n if (data.newZoomDisplay > 1) data.newZoomDisplay = 1;\n const oldLoc = g2l(data.zoomLocation);\n this.zoomDisplay = data.newZoomDisplay;\n const newLoc = l2g(oldLoc);\n // Change the pan settings to keep the zoomLocation in the same exact location before and after the zoom.\n const diff = newLoc.subtract(data.zoomLocation);\n this.panX += diff.x;\n this.panY += diff.y;\n layerManager.invalidate();\n sendClientOptions();\n }\n\n @Mutation\n setGridColour(data: { colour: string; sync: boolean }) {\n this.gridColour = data.colour;\n layerManager.getGridLayer()!.drawGrid();\n if (data.sync) socket.emit(\"Client.Options.Set\", { gridColour: data.colour });\n }\n\n @Mutation\n setFOWColour(data: { colour: string; sync: boolean }) {\n this.fowColour = data.colour;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Client.Options.Set\", { fowColour: data.colour });\n }\n\n @Mutation\n setRulerColour(data: { colour: string; sync: boolean }) {\n this.rulerColour = data.colour;\n if (data.sync) socket.emit(\"Client.Options.Set\", { rulerColour: data.colour });\n }\n\n @Mutation\n setPanX(x: number) {\n this.panX = x;\n }\n\n @Mutation\n setPanY(y: number) {\n this.panY = y;\n }\n\n @Mutation\n increasePanX(increase: number) {\n this.panX += increase;\n }\n\n @Mutation\n increasePanY(increase: number) {\n this.panY += increase;\n }\n\n @Mutation\n setUnitSize(data: { unitSize: number; sync: boolean }) {\n if (this.unitSize !== data.unitSize && data.unitSize > 0 && data.unitSize < Infinity) {\n this.unitSize = data.unitSize;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { unit_size: data.unitSize });\n }\n }\n\n @Mutation\n setUseGrid(data: { useGrid: boolean; sync: boolean }) {\n if (this.useGrid !== data.useGrid) {\n this.useGrid = data.useGrid;\n const gridLayer = layerManager.getGridLayer()!;\n if (data.useGrid) gridLayer.canvas.style.display = \"block\";\n else gridLayer.canvas.style.display = \"none\";\n if (data.sync) socket.emit(\"Location.Options.Set\", { use_grid: data.useGrid });\n }\n }\n\n @Mutation\n setGridSize(data: { gridSize: number; sync: boolean }): void {\n if (this.gridSize !== data.gridSize && data.gridSize > 0) {\n this.gridSize = data.gridSize;\n const gridLayer = layerManager.getGridLayer();\n if (gridLayer !== undefined) gridLayer.drawGrid();\n if (data.sync) socket.emit(\"Gridsize.Set\", data.gridSize);\n }\n }\n\n @Mutation\n setVisionRangeMin(data: { value: number; sync: boolean }): void {\n this.visionRangeMin = data.value;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_min_range: data.value });\n }\n\n @Mutation\n setVisionRangeMax(data: { value: number; sync: boolean }): void {\n this.visionRangeMax = Math.max(data.value, this.visionRangeMin);\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_max_range: this.visionRangeMax });\n }\n\n @Mutation\n setFullFOW(data: { fullFOW: boolean; sync: boolean }) {\n if (this.fullFOW !== data.fullFOW) {\n this.fullFOW = data.fullFOW;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { full_fow: data.fullFOW });\n }\n }\n\n @Mutation\n setFOWOpacity(data: { fowOpacity: number; sync: boolean }) {\n this.fowOpacity = data.fowOpacity;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_opacity: data.fowOpacity });\n }\n\n @Mutation\n setLineOfSight(data: { fowLOS: boolean; sync: boolean }) {\n if (this.fowLOS !== data.fowLOS) {\n this.fowLOS = data.fowLOS;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_los: data.fowLOS });\n }\n }\n\n @Mutation\n setLocationName(name: string) {\n this.locationName = name;\n }\n\n @Mutation\n updateNote(data: { note: Note; sync: boolean }) {\n const actualNote = this.notes.find(n => n.uuid === data.note.uuid);\n if (actualNote === undefined) return;\n actualNote.title = data.note.title;\n actualNote.text = data.note.text;\n if (data.sync) socket.emit(\"Note.Update\", actualNote);\n }\n\n @Mutation\n removeNote(data: { note: Note; sync: boolean }) {\n this.notes = this.notes.filter(n => n.uuid !== data.note.uuid);\n if (data.sync) socket.emit(\"Note.Remove\", data.note.uuid);\n }\n\n @Mutation\n toggleUI() {\n this.showUI = !this.showUI;\n }\n\n @Mutation\n setClipboard(clipboard: ServerShape[]) {\n this.clipboard = clipboard;\n }\n\n @Action\n clear() {\n (this.context.state).visionSources = [];\n (this.context.state).visionBlockers = [];\n (this.context.state).ownedtokens = [];\n (this.context.state).annotations = [];\n (this.context.state).movementblockers = [];\n (this.context.state).notes = [];\n this.context.commit(\"recalculateVision\");\n this.context.commit(\"recalculateMovement\");\n }\n}\n\nexport const gameStore = getModule(GameStore);\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=d32461a4&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=d32461a4&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"","import { ServerAura } from \"@/game/comm/types/shapes\";\n\nexport const aurasFromServer = (auras: ServerAura[]): Aura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n visionSource: aura.vision_source,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n\nexport const aurasToServer = (auras: Aura[]): ServerAura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n vision_source: aura.visionSource,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{attrs:{\"id\":\"toolselect\"}},[_c('ul',_vm._l((_vm.visibleTools),function(tool){return _c('li',{key:tool,ref:tool + '-selector',refInFor:true,class:{'tool-selected': _vm.currentTool === tool},on:{\"mousedown\":function($event){_vm.currentTool = tool}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(tool))])])}))]),_c('div',[[_c('select-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Select'),expression:\"currentTool === 'Select'\"}],ref:\"selectTool\"}),_c('pan-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Pan'),expression:\"currentTool === 'Pan'\"}]}),_c('keep-alive',[_c('draw-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Draw'),expression:\"currentTool === 'Draw'\"}]})],1),_c('ruler-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Ruler'),expression:\"currentTool === 'Ruler'\"}]}),_c('map-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Map'),expression:\"currentTool === 'Map'\"}]}),_c('filter-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Filter'),expression:\"currentTool === 'Filter'\"}]}),_c('shape-menu',{ref:\"shapecontext\"}),_c('createtoken-dialog',{ref:\"createtokendialog\"})]],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=template&id=cf33581e&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"\nimport script from \"./note.vue?vue&type=script&lang=ts&\"\nexport * from \"./note.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7a3669fd\",\n null\n \n)\n\ncomponent.options.__file = \"note.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./initiative.vue?vue&type=template&id=af4dc61a&scoped=true&\"\nimport script from \"./initiative.vue?vue&type=script&lang=ts&\"\nexport * from \"./initiative.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./initiative.vue?vue&type=style&index=0&id=af4dc61a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"af4dc61a\",\n null\n \n)\n\ncomponent.options.__file = \"initiative.vue\"\nexport default component.exports","import { ServerLayer } from \"@/game/comm/types/general\";\nimport { FOWLayer } from \"@/game/layers/fow\";\nimport { FOWPlayersLayer } from \"@/game/layers/fowplayers\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nexport function createLayer(layerInfo: ServerLayer) {\n // Create canvas element\n const canvas = document.createElement(\"canvas\");\n canvas.style.zIndex = layerManager.layers.length.toString();\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n\n // Create the Layer instance\n let layer: Layer;\n if (layerInfo.type_ === \"grid\") layer = new GridLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow\") layer = new FOWLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow-players\") layer = new FOWPlayersLayer(canvas, layerInfo.name);\n else layer = new Layer(canvas, layerInfo.name);\n layer.selectable = layerInfo.selectable;\n layer.playerEditable = layerInfo.player_editable;\n layerManager.addLayer(layer);\n\n // Add the element to the DOM\n const layers = document.getElementById(\"layers\");\n if (layers === null) {\n console.warn(\"Layers div is missing, this will prevent the main game board from loading!\");\n return;\n }\n if (layerInfo.name !== \"fow-players\") layers.appendChild(canvas);\n\n if (layerInfo.type_ === \"grid\" && layerInfo.size) gameStore.setGridSize({ gridSize: layerInfo.size, sync: false });\n // Load layer shapes\n layer.setShapes(layerInfo.shapes);\n}\n","import { render, staticRenderFns } from \"./labels.vue?vue&type=template&id=4697341e&scoped=true&\"\nimport script from \"./labels.vue?vue&type=script&lang=ts&\"\nexport * from \"./labels.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./labels.vue?vue&type=style&index=0&id=4697341e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4697341e\",\n null\n \n)\n\ncomponent.options.__file = \"labels.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{on:{\"focusin\":_vm.focusin,\"focusout\":_vm.focusout,\"submit\":function($event){$event.preventDefault();return _vm.login($event)}}},[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"PlanarAlly\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.username),expression:\"username\"}],attrs:{\"type\":\"text\",\"name\":\"username\",\"placeholder\":\"Username\",\"autocomplete\":\"username\",\"required\":\"\"},domProps:{\"value\":(_vm.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.username=$event.target.value}}}),_vm._m(0)]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"type\":\"password\",\"name\":\"password\",\"placeholder\":\"Password\",\"autocomplete\":\"current-password\",\"required\":\"\"},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.password=$event.target.value}}}),_vm._m(1)]),_c('div',{staticStyle:{\"display\":\"flex\"}},[_c('button',{staticStyle:{\"visibility\":\"hidden\",\"display\":\"none\"},attrs:{\"type\":\"submit\",\"name\":\"login\"}}),_c('button',{staticClass:\"submit\",attrs:{\"type\":\"button\",\"name\":\"register\",\"title\":\"Register\"},on:{\"click\":_vm.register}},[_c('i',{staticClass:\"fas fa-plus\"})]),_vm._m(2)])]),(_vm.error)?_c('div',{staticClass:\"feedback\"},[_c('p',{staticClass:\"error\"},[_c('strong',[_vm._v(\"Error:\")]),_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \")])]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-user-circle\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-lock\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"name\":\"login\",\"title\":\"Login\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport EditDialog from \"@/game/ui/selection/edit_dialog.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\n\n@Component({\n components: {\n \"edit-dialog\": EditDialog,\n },\n})\nexport default class SelectionInfo extends Vue {\n shape: Shape | null = null;\n\n mounted() {\n EventBus.$on(\"SelectionInfo.Shape.Set\", (shape: Shape | null) => {\n this.shape = shape;\n });\n }\n\n beforeDestroy() {\n EventBus.$off(\"SelectionInfo.Shape.Set\");\n }\n\n openEditDialog() {\n (this.$refs.editDialog).visible = true;\n }\n changeValue(object: Tracker | Aura, redraw: boolean) {\n if (this.shape === null) return;\n getRef(\"prompt\")\n .prompt(`New ${object.name} value:`, `Updating ${object.name}`)\n .then(\n (value: string) => {\n if (this.shape === null) return;\n const ogValue = object.value;\n if (value[0] === \"+\" || value[0] === \"-\") object.value += parseInt(value, 10);\n else object.value = parseInt(value, 10);\n if (isNaN(object.value)) object.value = ogValue;\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\n if (redraw) layerManager.invalidate();\n },\n () => {},\n );\n }\n}\n","import { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { BoardInfo, Note, ServerClient, ServerLocation } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createLayer } from \"@/game/layers/utils\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { router } from \"@/router\";\nimport { zoomDisplay } from \"../utils\";\n\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"connect_error\", (error: any) => {\n console.error(\"Could not connect to game session.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"error\", (error: any) => {\n console.error(\"Game session does not exist.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n router.push(destination);\n});\nsocket.on(\"Room.Info.Set\", (data: { name: string; creator: string; invitationCode: string }) => {\n gameStore.setRoomName(data.name);\n gameStore.setRoomCreator(data.creator);\n gameStore.setInvitationCode(data.invitationCode);\n});\nsocket.on(\"Username.Set\", (username: string) => {\n gameStore.setUsername(username);\n gameStore.setDM(username === window.location.pathname.split(\"/\")[2]);\n});\nsocket.on(\"Client.Options.Set\", (options: ServerClient) => {\n gameStore.setGridColour({ colour: options.grid_colour, sync: false });\n gameStore.setFOWColour({ colour: options.fow_colour, sync: false });\n gameStore.setRulerColour({ colour: options.ruler_colour, sync: false });\n gameStore.setPanX(options.pan_x);\n gameStore.setPanY(options.pan_y);\n gameStore.setZoomDisplay(zoomDisplay(options.zoom_factor));\n // gameStore.setZoomDisplay(0.5);\n if (options.active_layer) layerManager.selectLayer(options.active_layer, false);\n if (layerManager.getGridLayer() !== undefined) layerManager.getGridLayer()!.invalidate();\n});\nsocket.on(\"Location.Set\", (data: Partial) => {\n if (data.name !== undefined) gameStore.setLocationName(data.name);\n if (data.unit_size !== undefined) gameStore.setUnitSize({ unitSize: data.unit_size, sync: false });\n if (data.use_grid !== undefined) gameStore.setUseGrid({ useGrid: data.use_grid, sync: false });\n if (data.full_fow !== undefined) gameStore.setFullFOW({ fullFOW: data.full_fow, sync: false });\n if (data.fow_opacity !== undefined) gameStore.setFOWOpacity({ fowOpacity: data.fow_opacity, sync: false });\n if (data.fow_los !== undefined) gameStore.setLineOfSight({ fowLOS: data.fow_los, sync: false });\n if (data.vision_min_range !== undefined) gameStore.setVisionRangeMin({ value: data.vision_min_range, sync: false });\n if (data.vision_max_range !== undefined) gameStore.setVisionRangeMax({ value: data.vision_max_range, sync: false });\n if (data.vision_mode !== undefined) {\n gameStore.setVisionMode({ mode: data.vision_mode, sync: false });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n }\n});\nsocket.on(\"Position.Set\", (data: { x: number; y: number }) => {\n gameManager.setCenterPosition(new GlobalPoint(data.x, data.y));\n});\nsocket.on(\"Notes.Set\", (notes: Note[]) => {\n for (const note of notes) gameStore.newNote({ note, sync: false });\n});\nsocket.on(\"Asset.List.Set\", (assets: AssetList) => {\n gameStore.setAssets(assets);\n});\nsocket.on(\"Board.Set\", (locationInfo: BoardInfo) => {\n gameStore.clear();\n gameStore.setLocations(locationInfo.locations);\n document.getElementById(\"layers\")!.innerHTML = \"\";\n gameStore.resetLayerInfo();\n layerManager.reset();\n for (const layer of locationInfo.layers) createLayer(layer);\n // Force the correct opacity render on other layers.\n layerManager.selectLayer(layerManager.getLayer()!.name, false);\n EventBus.$emit(\"Initiative.Clear\");\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n gameStore.setBoardInitialized(true);\n});\nsocket.on(\"Gridsize.Set\", (gridSize: number) => {\n gameStore.setGridSize({ gridSize, sync: false });\n});\nsocket.on(\"Shape.Add\", (shape: ServerShape) => {\n gameManager.addShape(shape);\n});\nsocket.on(\"Shape.Remove\", (shape: ServerShape) => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(`Attempted to remove an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n layer.removeShape(layerManager.UUIDMap.get(shape.uuid)!, false);\n layer.invalidate(false);\n});\nsocket.on(\"Shape.Order.Set\", (data: { shape: ServerShape; index: number }) => {\n if (!layerManager.UUIDMap.has(data.shape.uuid)) {\n console.log(`Attempted to move the shape order of an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${data.shape.layer}`);\n return;\n }\n const shape = layerManager.UUIDMap.get(data.shape.uuid)!;\n const layer = layerManager.getLayer(shape.layer)!;\n layer.moveShapeOrder(shape, data.index, false);\n});\nsocket.on(\"Shape.Layer.Change\", (data: { uuid: string; layer: string }) => {\n const shape = layerManager.UUIDMap.get(data.uuid);\n if (shape === undefined) return;\n shape.moveLayer(data.layer, false);\n});\nsocket.on(\"Shape.Update\", (data: { shape: ServerShape; redraw: boolean; move: boolean, temporary: boolean }) => {\n gameManager.updateShape(data);\n});\nsocket.on(\"Temp.Clear\", (shapes: ServerShape[]) => {\n shapes.forEach(shape => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(\"Attempted to remove an unknown temporary shape\");\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const realShape = layerManager.UUIDMap.get(shape.uuid)!;\n layerManager.getLayer(shape.layer)!.removeShape(realShape, false);\n });\n});\nsocket.on(\"Labels.Set\", (labels: Label[]) => {\n for (const label of labels) gameStore.addLabel(label);\n});\nsocket.on(\"Label.Visibility.Set\", (data: { user: string; uuid: string; visible: boolean }) => {\n gameStore.setLabelVisibility(data);\n});\nsocket.on(\"Label.Add\", (data: Label) => {\n gameStore.addLabel(data);\n});\nsocket.on(\"Label.Delete\", (data: { user: string; uuid: string }) => {\n gameStore.deleteLabel(data);\n});\nsocket.on(\"Labels.Filter.Add\", (uuid: string) => {\n gameStore.labelFilters.push(uuid);\n layerManager.invalidate();\n})\nsocket.on(\"Labels.Filter.Remove\", (uuid: string) => {\n const idx = gameStore.labelFilters.indexOf(uuid);\n if (idx >= 0) {\n gameStore.labelFilters.splice(idx, 1);\n layerManager.invalidate();\n }\n})\nsocket.on(\"Labels.Filters.Set\", (filters: string[]) => {\n gameStore.setLabelFilters(filters);\n})\n"],"sourceRoot":""} \ No newline at end of file diff --git a/server/static/js/app-legacy.f228bc3b.js b/server/static/js/app-legacy.f228bc3b.js deleted file mode 100644 index bb7dcea16..000000000 --- a/server/static/js/app-legacy.f228bc3b.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var n,r,a=t[0],l=t[1],c=t[2],d=0,h=[];de.fillText(t.text,t.x,t.y)),e.restore()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){}getMaxHeight(e){const t=this.getLines(e),i=30;return i*t.length}getMaxWidth(e){const t=this.getLines(e),i=t.map(t=>e.measureText(t.text).width);return Math.max(...i)}getLines(e){const t=this.text.split("\n"),i=[],n=e.canvas.width,s=30,o=0;let r=0;for(const a of t){let t="";const l=a.split(" ");for(const a of l){const l=t+a+" ",c=e.measureText(l),u=c.width;u>n?(e.fillText(t,o,r),i.push({text:t,x:o,y:r}),t=a+" ",r+=s):t=l}i.push({text:t,x:o,y:r}),r+=s}return i}}t.Text=r},"033f":function(e,t,i){"use strict";i.r(t);var n=i("a1f4"),s=i("a68b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("7997");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"759e5a8a",null);a.options.__file="shapecontext.vue",t["default"]=a.exports},"034f":function(e,t,i){"use strict";var n=i("64a9"),s=i.n(n);s.a},"0584":function(e,t,i){"use strict";var n=i("de21"),s=i.n(n);s.a},"0634":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("66cb")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("c345a"),l=i("60a3");let c=class extends o.default{constructor(){super(...arguments),this.display=!1,this.left=0,this.top=0,this.transparent=!1}mounted(){this.transparent=0===this.$refs.chromePicker.val.rgba.a,this.setPosition()}open(){this.display||(this.setPosition(),this.display=!0,this.$nextTick(()=>this.$children[0].$el.focus()))}updateColor(e){this.transparent=0===e.rgba.a;const t=s.default(e.rgba).toRgbString();this.$emit("update:color",t),this.$emit("input",t)}closePicker(){this.display=!1,this.$emit("change",this.color)}setPosition(){const e=this.$el.getBoundingClientRect();e.right+224>window.innerWidth?this.left=e.left-224:this.left=e.right,e.bottom+242>window.innerHeight?this.top=e.top-242:this.top=e.bottom}};n.__decorate([l.Prop(String)],c.prototype,"color",void 0),c=n.__decorate([r.default({components:{"chrome-picker":a.Chrome}})],c),t.default=c},"07f5":function(e,t,i){"use strict";i.r(t);var n=i("dbba"),s=i("d588");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("561b"),i("a21d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"6d744362",null);a.options.__file="game.vue",t["default"]=a.exports},"0a75":function(e,t,i){},"0ad6":function(e,t,i){},"0bc6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("8055"));function o(e){t.socket.io.opts.query=`user=${e.params.creator}&room=${e.params.room}`,t.socket.connect()}t.socket=s.default(location.protocol+"//"+location.host+"/planarally",{autoConnect:!1}),t.createConnection=o},"0cf7":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("4aec")),a=n.__importDefault(i("a535")),l=n.__importDefault(i("cec2")),c=i("5338"),u=i("2d5b"),d=i("4a5b");let h=class extends s.default{constructor(){super(...arguments),this.path=[],this.draggingSelection=!1}get folders(){return u.assetStore.folders}get files(){return u.assetStore.files}get selected(){return u.assetStore.selected}get idMap(){return u.assetStore.idMap}get currentFolder(){return this.path.length?this.path[this.path.length-1]:u.assetStore.root}get parentFolder(){let e=this.path[this.path.length-2];return void 0===e&&(e=u.assetStore.root),e}get firstSelectedFile(){for(const e of u.assetStore.selected)if(u.assetStore.idMap.get(e).file_hash)return u.assetStore.idMap.get(e);return null}changeDirectory(e){e<0?this.path.pop():this.path.push(e),u.assetStore.clearSelected(),c.socket.emit("Folder.Get",this.currentFolder)}createDirectory(){const e=window.prompt("New folder name");null!==e&&c.socket.emit("Folder.Create",{name:e,parent:this.currentFolder})}moveInode(e,t){u.assetStore.files.includes(e)?u.assetStore.files.splice(u.assetStore.files.indexOf(e),1):u.assetStore.folders.splice(u.assetStore.folders.indexOf(e),1),u.assetStore.idMap.delete(e),c.socket.emit("Inode.Move",{inode:e,target:t})}select(e,t){if(e.shiftKey&&u.assetStore.selected.length>0){const e=[...u.assetStore.files,...u.assetStore.folders],i=e.indexOf(u.assetStore.selected[u.assetStore.selected.length-1]),n=e.indexOf(t);for(let t=i;t!==n;i0&&this.upload(e.dataTransfer.files,t);this.draggingSelection=!1}prepareUpload(){document.getElementById("files").click()}upload(e,t){const i=document.getElementById("files").files;if(void 0===e){if(!i)return;e=i}void 0===t&&(t=this.currentFolder);const n=1e5;for(const s of e){const e=d.uuidv4(),i=Math.ceil(s.size/n);for(let o=0;o{c.socket.emit("Asset.Upload",{name:s.name,directory:t,data:r.result,slice:o,totalSlices:i,uuid:e})})}}}};h=n.__decorate([o.default({components:{Prompt:l.default,ConfirmDialog:a.default,AssetContextMenu:r.default},beforeRouteEnter(e,t,i){c.socket.connect(),i()},beforeRouteLeave(e,t,i){c.socket.disconnect(),i()}})],h),t.default=h},"0ddd":function(e,t,i){"use strict";i.r(t);var n=i("8577"),s=i("4bc3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("befe");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"62c91cd3",null);a.options.__file="asset_node.vue",t["default"]=a.exports},1:function(e,t){},"104d":function(e,t,i){"use strict";var n=i("5722"),s=i.n(n);s.a},1077:function(e,t,i){"use strict";i.r(t);var n=i("f994"),s=i("1eee");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("3cd3");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"bc30fc14",null);a.options.__file="login.vue",t["default"]=a.exports},1216:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("6f92"),s=i("92b1"),o=i("98ef"),r=i("4aee");function a(e,t){const i=n.layerManager.getLayer("draw");if(void 0===i)return;const o=i.ctx;o.lineJoin="round",o.lineJoin="round",o.beginPath(),o.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,o.moveTo(s.g2lx(e[0][0]),s.g2ly(e[0][1]));for(const n of e)o.lineTo(s.g2lx(n[0]),s.g2ly(n[1]));o.closePath(),o.stroke()}function l(e,t){const i=n.layerManager.getLayer("draw");if(void 0===i)return;const s=i.ctx;s.lineJoin="round",s.lineJoin="round",s.beginPath(),s.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,s.moveTo(e[0][0],e[0][1]);for(const n of e)s.lineTo(n[0],n[1]);s.closePath(),s.stroke()}function c(e,t){return t?e:s.g2lx(e)}function u(e,t){return t?e:s.g2ly(e)}t.drawPolygon=a,t.drawPolygonL=l;let d=0,h=0;function f(e,t,i,n,s){e.beginPath(),e.strokeStyle=n?"rgba(255, 0, 0, 0.30)":"rgba(0, 0, 0, 0.30)",e.moveTo(c(t[0],s),u(t[1],s)),e.lineTo(c(i[0],s),u(i[1],s)),e.closePath(),e.stroke()}function p(e,t=!0,i=!0,s=0){d=0,h=0;let a=0;const l=n.layerManager.getLayer("draw");if(void 0===l)return;const p=l.ctx;i&&p.clearRect(0,0,2e3,1e3),p.lineJoin="round",p.lineJoin="round";const g=new o.EdgeIterator(e);while(g.valid)g.next(),g.collect();g.collect();do{const e=g.edge.first.vertices[r.ccw(g.edge.second)].point,t=g.edge.first.vertices[r.cw(g.edge.second)].point;if(s>0){if(e[0]===-1/0||t[0]===-1/0){g.next();continue}h++,g.edge.first.constraints[g.edge.second]?(d++,2===s&&console.log(`Edge: (*) ${e} > ${t}`)):2===s&&console.log(`Edge: ${e} > ${t}`)}do{g.next(),g.collect()}while(g.valid)}while(null!==g.pos);for(const n of e.triangles){if(n.isInfinite())continue;a++;const e=[];p.fillStyle="red",void 0!==n.vertices[0]&&(e.push(n.vertices[0].point),p.beginPath(),p.arc(c(n.vertices[0].point[0],t),u(n.vertices[0].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==n.vertices[1]&&(e.push(n.vertices[1].point),p.arc(c(n.vertices[1].point[0],t),u(n.vertices[1].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==n.vertices[2]&&(e.push(n.vertices[2].point),p.arc(c(n.vertices[2].point[0],t),u(n.vertices[2].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),2===s&&console.log("[T] ",...e,n.constraints),p.moveTo(c(n.vertices[0].point[0],t),u(n.vertices[0].point[1],t)),void 0!==n.vertices[0]&&void 0!==n.vertices[1]&&f(p,n.vertices[0].point,n.vertices[1].point,n.constraints[2],t),void 0!==n.vertices[1]&&void 0!==n.vertices[2]&&f(p,n.vertices[1].point,n.vertices[2].point,n.constraints[0],t),void 0!==n.vertices[2]&&void 0!==n.vertices[0]&&f(p,n.vertices[2].point,n.vertices[0].point,n.constraints[1],t)}s>0&&(console.log(`Edges: ${d}/${h}`),console.log(`Faces: ${a}`))}window.DP=a,window.DPL=l,window.DPT=p},"12d3":function(e,t,i){"use strict";var n=i("a260"),s=i.n(n);s.a},1327:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importStar(i("66cb")),o=i("4a5b"),r=i("4709"),a=i("f10f"),l=i("92b1");class c extends r.Circle{constructor(e,t,i,n,s,o,r){super(e,t,s,o,r),this.type="circulartoken",this.text=i,this.font=n}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r,text:this.text,font:this.font})}fromDict(e){super.fromDict(e),this.r=e.radius,this.text=e.text,this.font=e.font}draw(e){super.draw(e),e.font=this.font,e.save();const t=l.g2l(this.center());e.textAlign="center",e.textBaseline="middle";const i=o.calcFontScale(e,this.text,l.g2lz(this.r),l.g2lz(this.r)),n=0;e.transform(i,n,-n,i,t.x,t.y),e.fillStyle=s.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}getInitiativeRepr(){return{uuid:this.uuid,visible:!a.gameStore.IS_DM,group:!1,source:""===this.name||"Unknown shape"===this.name?this.text:this.name,has_img:!1,effects:[],index:1/0}}}t.CircularToken=c},1625:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6f92"),o=i("b2ed"),r=i("0180"),a=i("f10f"),l=i("92b1");class c{constructor(){this.shown=!1;const e=new n.GlobalPoint(0,0);this.annotationText=new r.Text(e,"","bold 20px serif",0,"rgba(230, 230, 230, 1)"),this.annotationRect=new o.Rect(e,0,0,"rgba(0, 0, 0, 0.6)")}setActiveText(e){if(void 0===this.layer){if(!s.layerManager.hasLayer("draw"))return void console.warn("There is no draw layer to draw annotations on!");this.layer=s.layerManager.getLayer("draw"),this.layer.addShape(this.annotationRect,!1),this.layer.addShape(this.annotationText,!1)}this.shown=""!==e,this.annotationText.refPoint=l.l2g(new n.LocalPoint(this.layer.canvas.width/2,50)),this.annotationText.text=e;const t=this.shown?this.annotationText.getMaxWidth(this.layer.ctx)+10:0,i=this.shown?this.annotationText.getMaxHeight(this.layer.ctx)+10:0;this.annotationRect.refPoint=l.l2g(new n.LocalPoint(this.layer.canvas.width/2-t/2,30)),this.annotationRect.w=t/a.gameStore.zoomFactor,this.annotationRect.h=i/a.gameStore.zoomFactor,this.layer.invalidate(!0)}}t.AnnotationManager=c},"165c":function(e,t,i){"use strict";var n=i("aaee"),s=i.n(n);s.a},"19f9":function(e,t,i){"use strict";i.r(t);var n=i("45bf"),s=i("8cd4");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("c242");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"aaf3f05e",null);a.options.__file="menu.vue",t["default"]=a.exports},"1c76":function(e,t,i){"use strict";i.r(t);var n=i("2c88"),s=i("300e");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("7f1e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="contextmenu.vue",t["default"]=a.exports},"1dd6":function(e,t,i){"use strict";i.r(t);var n=i("5ae5"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"1eee":function(e,t,i){"use strict";i.r(t);var n=i("d30b"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"1f71":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("SelectContext",{ref:"selectcontext"})},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"206a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6f92"),o=i("6c30"),r=i("4709"),a=i("1327"),l=i("5e7c"),c=i("574e"),u=i("b2ed"),d=i("0180"),h=i("e4ea");function f(e,t){if(void 0===t&&(t=!1),!t&&s.layerManager.UUIDMap.has(e.uuid))return s.layerManager.UUIDMap.get(e.uuid);let i;const f=new n.GlobalPoint(e.x,e.y);if("rect"===e.type_){const t=e;i=new u.Rect(f,t.width,t.height,t.fill_colour,t.stroke_colour,t.uuid)}else if("circle"===e.type_){const t=e;i=new r.Circle(f,t.radius,t.fill_colour,t.stroke_colour,t.uuid)}else if("circulartoken"===e.type_){const t=e;i=new a.CircularToken(f,t.radius,t.text,t.font,t.fill_colour,t.stroke_colour,t.uuid)}else if("line"===e.type_){const t=e;i=new l.Line(f,new n.GlobalPoint(t.x2,t.y2),t.line_width,t.stroke_colour,t.uuid)}else if("multiline"===e.type_){const t=e;i=new c.MultiLine(f,t.points.map(e=>new n.GlobalPoint(e.x,e.y)),t.line_width,t.stroke_colour,t.uuid)}else if("polygon"===e.type_){const t=e;i=new h.Polygon(f,t.vertices.map(e=>new n.GlobalPoint(e.x,e.y)),t.fill_colour,t.stroke_colour,t.uuid)}else if("text"===e.type_){const t=e;i=new d.Text(f,t.text,t.font,t.angle,t.fill_colour,t.stroke_colour,t.uuid)}else{if("assetrect"!==e.type_)return;{const t=e,n=new Image(t.width,t.height);t.src.startsWith("http")?n.src=new URL(t.src).pathname:n.src=t.src,i=new o.Asset(n,f,t.width,t.height,t.uuid),n.onload=(()=>{s.layerManager.getLayer(e.layer).invalidate(!1)})}}return i.fromDict(e),i}t.createShapeFromDict=f},"223d":function(e,t,i){"use strict";var n=i("e756"),s=i.n(n);s.a},2469:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("66cb")),o=i("4a5b"),r=i("0bc6"),a=i("f312"),l=i("8f0a"),c=i("6f92"),u=i("f10f"),d=i("92b1");class h{constructor(e,t,i,n){this.fillColour="#000",this.strokeColour="rgba(0,0,0,0)",this.name="Unknown shape",this.trackers=[],this.auras=[],this._owners=[],this.visionObstruction=!1,this.movementObstruction=!1,this.isToken=!1,this.showHighlight=!1,this.annotation="",this.globalCompositeOperation="source-over",this.options=new Map,this._refPoint=e,this.uuid=n||o.uuidv4(),void 0!==t&&(this.fillColour=t),void 0!==i&&(this.strokeColour=i)}get refPoint(){return this._refPoint}set refPoint(e){this._refPoint=e}visibleInCanvas(e){return!1}getPointIndex(e,t=0){for(const[i,n]of this.points.entries())if(Math.abs(e.x-n[0])<=t&&Math.abs(e.y-n[1])<=t)return i;return-1}getPointOrientation(e){const t=l.GlobalPoint.fromArray(this.points[(this.points.length+e-1)%this.points.length]),i=l.GlobalPoint.fromArray(this.points[e]),n=l.GlobalPoint.fromArray(this.points[(e+1)%this.points.length]),s=n.subtract(t),o=t.add(s.multiply(.5));return i.subtract(o).normalize()}invalidate(e){const t=c.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(e=!0){const t=this,i=u.gameStore.visionBlockers.indexOf(this.uuid);let n=!1;this.visionObstruction&&-1===i?(u.gameStore.visionBlockers.push(this.uuid),n=!0):!this.visionObstruction&&i>=0&&(u.gameStore.visionBlockers.splice(i,1),n=!0),n&&e&&u.gameStore.recalculateVision(),this.auras.forEach(e=>{const i=u.gameStore.visionSources,n=i.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===n?i.push({shape:t.uuid,aura:e.uuid}):!e.visionSource&&n>=0&&i.splice(n,1)});for(let s=u.gameStore.visionSources.length-1;s>=0;s--){const e=u.gameStore.visionSources[s];e.shape===t.uuid&&(t.auras.some(t=>t.uuid===e.aura&&t.visionSource)||u.gameStore.visionSources.splice(s,1))}}setMovementBlock(e,t=!0){this.movementObstruction=e||!1;const i=u.gameStore.movementblockers.indexOf(this.uuid);let n=!1;this.movementObstruction&&-1===i?(u.gameStore.movementblockers.push(this.uuid),n=!0):!this.movementObstruction&&i>=0&&(u.gameStore.movementblockers.splice(i,1),n=!0),n&&t&&u.gameStore.recalculateMovement()}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=u.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?u.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&u.gameStore.ownedtokens.splice(e,1)}}getBaseDict(){return{type_:this.type,uuid:this.uuid,x:this.refPoint.x,y:this.refPoint.y,layer:this.layer,draw_operator:this.globalCompositeOperation,movement_obstruction:this.movementObstruction,vision_obstruction:this.visionObstruction,auras:a.aurasToServer(this.auras),trackers:this.trackers,owners:this._owners,fill_colour:this.fillColour,stroke_colour:this.strokeColour,name:this.name,annotation:this.annotation,is_token:this.isToken,options:JSON.stringify([...this.options])}}fromDict(e){this.layer=e.layer,this.globalCompositeOperation=e.draw_operator,this.movementObstruction=e.movement_obstruction,this.visionObstruction=e.vision_obstruction,this.auras=a.aurasFromServer(e.auras),this.trackers=e.trackers,this._owners=e.owners,this.isToken=e.is_token,e.annotation&&(this.annotation=e.annotation),e.name&&(this.name=e.name),e.options&&(this.options=new Map(JSON.parse(e.options)))}draw(e){if(void 0!==this.globalCompositeOperation?e.globalCompositeOperation=this.globalCompositeOperation:e.globalCompositeOperation="source-over",this.showHighlight){const t=this.getBoundingBox();e.strokeStyle="red",e.strokeRect(d.g2lx(t.topLeft.x)-5,d.g2ly(t.topLeft.y)-5,d.g2lz(t.w)+10,d.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const n=d.g2l(this.center()),o=d.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(n.x,n.y,d.g2lr(i.value),n.x,n.y,d.g2lr(i.value+i.dim)),o=s.default(i.colour);e.fillStyle=t,t.addColorStop(0,i.colour),t.addColorStop(1,o.setAlpha(0).toRgbString())}if(i.visionSource&&void 0!==i.lastPath)try{e.fill(i.lastPath)}catch(t){e.arc(n.x,n.y,o,0,2*Math.PI),e.fill(),console.warn(t)}else e.arc(n.x,n.y,o,0,2*Math.PI),e.fill()}}getInitiativeRepr(){return{uuid:this.uuid,visible:!u.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=c.layerManager.getLayer(this.layer),n=c.layerManager.getLayer(e);void 0!==i&&void 0!==n&&(this.layer=e,i.shapes.splice(i.shapes.indexOf(this),1),n.shapes.push(this),i.invalidate(!0),n.invalidate(!1),t&&r.socket.emit("Shape.Layer.Change",{uuid:this.uuid,layer:e}))}get owners(){return Object.freeze(this._owners.slice())}ownedBy(e){return void 0===e&&(e=u.gameStore.username),u.gameStore.IS_DM||this._owners.includes(e)}addOwner(e){this._owners.includes(e)||this._owners.push(e)}updateOwner(e,t){const i=this._owners.findIndex(t=>t===e);i>=0?this._owners.splice(i,1,t):this.addOwner(t)}removeOwner(e){const t=this._owners.findIndex(t=>t===e);this._owners.splice(t,1)}}t.Shape=h},"255e":function(e,t,i){"use strict";i.r(t);var n=i("851c"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},2686:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!==e.note?i("modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("span",{on:{click:function(t){e.$refs.title.select()}}},[i("i",{staticClass:"fas fa-pencil-alt",staticStyle:{"font-size":"15px"}})]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.note.title,expression:"note.title"}],ref:"title",domProps:{value:e.note.title},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"title",t.target.value)}}}),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.note.text,expression:"note.text"}],ref:"textarea",style:{height:e.calcHeight()},domProps:{value:e.note.text},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"text",t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.removeNote}},[i("i",{staticClass:"far fa-trash-alt"}),e._v(" Remove\n ")])])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"26a5":function(e,t,i){"use strict";var n=i("f2d0"),s=i.n(n);s.a},2756:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("65d9")),o=n.__importDefault(i("496c")),r=n.__importDefault(i("ea6a")),a=i("4a5b"),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("b2ed"),h=i("f10f"),f=i("2838"),p=i("92b1"),g=i("5a5c");var v;(function(e){e[e["Noop"]=0]="Noop",e[e["Resize"]=1]="Resize",e[e["Drag"]=2]="Drag",e[e["GroupSelect"]=3]="GroupSelect"})(v=t.SelectOperations||(t.SelectOperations={}));const m=new c.GlobalPoint(-1e3,-1e3);let y=class extends r.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizePoint=0,this.deltaChanged=!1,this.dragRay=new c.Ray(new c.LocalPoint(0,0),new c.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new d.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(h.gameStore.username)||this.selectionHelper.addOwner(h.gameStore.username);const i=g.getMouse(e),n=p.l2g(i);let s,o=!1;s=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let r=s.length-1;r>=0;r--){const e=s[r];if(e.ownedBy()){if(this.resizePoint=e.getPointIndex(n,p.l2gz(3)),this.resizePoint>=0){t.selection=[e],a.getRef("selectionInfo").shape=e,this.mode=v.Resize,t.invalidate(!0),o=!0;break}if(e.contains(n)){const n=e;-1===t.selection.indexOf(n)&&(t.selection=[n],a.getRef("selectionInfo").shape=n),this.mode=v.Drag;const s=p.g2l(n.refPoint);this.dragRay=new c.Ray(s,i.subtract(s)),t.invalidate(!0),o=!0;break}}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)a.getRef("selectionInfo").shape=e;this.selectionStartPoint=n,this.selectionHelper.refPoint=this.selectionStartPoint,this.selectionHelper.w=0,this.selectionHelper.h=0,t.selection=[this.selectionHelper],t.invalidate(!0)}this.active=!0}onMouseMove(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=g.getMouse(e),n=p.l2g(i);if(this.deltaChanged=!1,this.mode===v.GroupSelect){const e=n;this.selectionHelper.w=Math.abs(e.x-this.selectionStartPoint.x),this.selectionHelper.h=Math.abs(e.y-this.selectionStartPoint.y),this.selectionHelper.refPoint=new c.GlobalPoint(Math.min(this.selectionStartPoint.x,e.x),Math.min(this.selectionStartPoint.y,e.y)),t.invalidate(!0)}else if(t.selection.length){const s=p.g2l(t.selection[t.selection.length-1].refPoint),o=s.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/h.gameStore.zoomFactor);const a=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!h.gameStore.IS_DM))for(const e of t.selection)e.uuid!==this.selectionHelper.uuid&&(r=f.calculateDelta(r,e),r!==a&&(this.deltaChanged=!0));for(const e of t.selection)e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0}));t.invalidate(!1)}else if(this.mode===v.Resize)for(const e of t.selection)e.resize(this.resizePoint,i),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1),this.updateCursor(t,n);else this.updateCursor(t,n)}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer();this.mode===v.GroupSelect?(t.clearSelection(),t.shapes.forEach(e=>{if(e===this.selectionHelper)return;const i=e.getBoundingBox();e.ownedBy()&&this.selectionHelper.refPoint.x<=i.topRight.x&&this.selectionHelper.refPoint.x+this.selectionHelper.w>=i.topLeft.x&&this.selectionHelper.refPoint.y<=i.botLeft.y&&this.selectionHelper.refPoint.y+this.selectionHelper.h>=i.topLeft.y&&t.selection.push(e)}),t.selection.length>0&&t.selection.push(this.selectionHelper),t.invalidate(!0)):t.selection.length&&t.selection.forEach(i=>{if(this.mode===v.Drag){if(this.dragRay.origin.x===p.g2lx(i.refPoint.x)&&this.dragRay.origin.y===p.g2ly(i.refPoint.y))return;!h.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(h.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1))}),this.mode=v.Noop,this.active=!1}onContextMenu(e){if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer(),i=g.getMouse(e),n=p.l2g(i);for(const s of t.selection)if(s.contains(n)&&s!==this.selectionHelper)return t.selection=[s],a.getRef("selectionInfo").shape=s,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,s);this.$refs.selectcontext.open(e)}updateCursor(e,t){for(const i of e.selection){const e=i.getPointIndex(t,p.l2gz(3));if(e<0)document.body.style.cursor="default";else{let t=i.getPointOrientation(e).angle();t<0&&(t+=360);const n=22.5;(t>=315+n||t=135+n&&t<225-n)&&(document.body.style.cursor="ew-resize"),(t>=45+n&&t<135-n||t>=225+n&&t<315-n)&&(document.body.style.cursor="ns-resize"),(t>=n&&t<90-n||t>=180+n&&t<270-n)&&(document.body.style.cursor="nwse-resize"),(t>=90+n&&t<180-n||t>=270+n&&t<360-n)&&(document.body.style.cursor="nesw-resize")}}}};y=n.__decorate([s.default({components:{SelectContext:o.default}})],y),t.default=y},2838:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6f92"),o=i("f10f"),r=i("d6be"),a=i("98ef"),l=i("4aee");function c(e,t,i){if(0===e.x&&0===e.y)return e;if("bvh"===o.gameStore.visionMode){void 0===i&&(i=[]);const r=t.getBoundingBox(),a=r.offset(e);let l=!1;for(const t of o.gameStore.movementblockers){if(i.includes(t))continue;const o=s.layerManager.UUIDMap.get(t),c=o.getBoundingBox();let u=c.intersectsWithInner(a);if(!u){const t=n.Ray.fromPoints(r.topLeft.add(e.normalize()),a.topLeft),i=t.direction.inverse(),s=[i.x<0,i.y<0];u=c.intersectP(t,i,s).hit}if(u){const s=c.center(),o=r.center(),a=o.subtract(s),u=new n.Vector(1,0),d=new n.Vector(0,1);let h=a.dot(u),f=a.dot(d);h>c.w/2&&(h=c.w/2),h<-c.w/2&&(h=-c.w/2),f>c.h/2&&(f=c.h/2),f<-c.h/2&&(f=-c.h/2);const p=s.add(u.multiply(h)).add(d.multiply(f));p.x===r.topLeft.x||p.x===r.topRight.x?e=new n.Vector(0,e.y):p.y===r.topLeft.y||p.y===r.botLeft.y?e=new n.Vector(e.x,0):p.xr.topRight.x?e=new n.Vector(p.x-r.topRight.x,e.y):p.yr.botLeft.y&&(e=new n.Vector(e.x,p.y-r.botLeft.y)),l=!0,i.push(t);break}}return l&&(e=c(e,t,i)),e}{const i=r.PA_CDT.movement.locate(t.center().asArray(),null).loc;for(const n of t.points){const t=r.PA_CDT.movement.locate(n,i),s=t.loc;null!==s&&(e=u(n,s,e))}return e}}function u(e,t,i,s=[]){const o=new n.GlobalPoint(e[0],e[1]),r=o.add(i).asArray();if(t.contains(r))return i;s.push(t);for(let c=0;c<3;c++){if(s.includes(t.neighbours[c]))continue;const d=t.vertices[l.cw(c)].point,h=t.vertices[l.ccw(c)].point,f=l.intersection(e,r,d,h);if(null===f)continue;if(!t.isConstrained(c))return u(e,t.neighbours[c],i,s);if(f[0]===o.x&&f[1]===o.y){l.orientation;const t=l.orientation(e,r,h);if(t===a.Sign.LEFT_TURN)continue;if(t===a.Sign.ZERO)continue}let p=new n.GlobalPoint(f[0],f[1]).subtract(o).multiply(.8);p.length()<1&&(p=new n.Vector(0,0)),p.length()!["__files"].includes(e)).sort(a.alphSort)}get files(){return this.asset.__files?this.asset.__files.concat().sort((e,t)=>e.name.toLowerCase()>t.name.toLowerCase()?1:-1):[]}toggle(e){for(let t=0;tthis.$children[0].$el.focus())}close(){this.visible=!1,this.shape=null}getLayers(){return c.layerManager.layers.filter(e=>e.selectable&&(u.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return c.layerManager.getLayer()}getInitiativeWord(){return null===this.shape?"":a.getRef("initiative").contains(this.shape.uuid)?"Show":"Add"}setLayer(e){null!==this.shape&&(this.shape.moveLayer(e,!0),this.close())}moveToBack(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,0,!0),this.close()}moveToFront(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,e.shapes.length-1,!0),this.close()}addInitiative(){if(null===this.shape)return;const e=a.getRef("initiative");e.contains(this.shape.uuid)||e.addInitiative(this.shape.getInitiativeRepr()),e.visible=!0,this.close()}openEditDialog(){l.EventBus.$emit("EditDialog.Open",this.shape),this.close()}};d=n.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},3427:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!==e.shape?i("div",[i("div",{attrs:{id:"selection-menu"}},[i("div",{attrs:{id:"selection-edit-button"},on:{click:e.openEditDialog}},[i("i",{staticClass:"fas fa-edit"})]),i("div",{attrs:{id:"selection-name"}},[e._v(e._s(e.shape.name))]),i("div",{attrs:{id:"selection-trackers"}},[e._l(e.shape.trackers,function(t){return""!==t.name||0!==t.value?[i("div",{key:"name-"+t.uuid},[e._v(e._s(t.name))]),i("div",{key:"value-"+t.uuid,staticClass:"selection-tracker-value",on:{click:function(i){e.changeValue(t,!1)}}},[0===t.maxvalue?[e._v(e._s(t.value))]:[e._v(e._s(t.value)+" / "+e._s(t.maxvalue))]],2)]:e._e()})],2),i("div",{attrs:{id:"selection-auras"}},[e._l(e.shape.auras,function(t){return""!==t.name||0!==t.value?[i("div",{key:"name-"+t.uuid},[e._v(e._s(t.name))]),i("div",{key:"value-"+t.uuid,staticClass:"selection-tracker-value",on:{click:function(i){e.changeValue(t,!0)}}},[0===t.dim?[e._v(e._s(t.value))]:[e._v(e._s(t.value)+" / "+e._s(t.dim))]],2)]:e._e()})],2)]),i("edit-dialog",{ref:"editDialog",attrs:{shape:e.shape}})],1):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},3481:function(e,t,i){"use strict";i.r(t);var n=i("47e6"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"38c9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("bab4"),s=i("f10f");class o extends n.Layer{invalidate(){this.valid=!1}draw(e){this.valid||this.drawGrid()}drawGrid(){const e=this.ctx;this.clear(),e.beginPath();const t=s.gameStore.gridSize;for(let i=0;it.uuid===e.uuid);this.preFogShapes.splice(t,1)}super.removeShape(e,t,i)}draw(){if(!this.valid){const e=this.ctx;if(r.Settings.skipLightFOW)return e.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);const t=e.globalCompositeOperation;e.clearRect(0,0,this.canvas.width,this.canvas.height),e.fillStyle="rgba(0, 0, 0, 1)";const i=o.layerManager.getLayer("draw").ctx;(r.Settings.drawAngleLines||r.Settings.drawFirstLightHit)&&i.clearRect(0,0,i.canvas.width,i.canvas.height),l.gameStore.fullFOW&&o.layerManager.hasLayer("tokens")&&o.layerManager.getLayer("tokens").shapes.forEach(t=>{if(!t.ownedBy()||!t.isToken)return;const i=t.getBoundingBox(),n=c.g2l(t.center()),s=.8*c.g2lz(i.w);e.beginPath(),e.arc(n.x,n.y,s,0,2*Math.PI);const o=e.createRadialGradient(n.x,n.y,s/2,n.x,n.y,s);o.addColorStop(0,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=o,e.fill()}),this.vCtx.clearRect(0,0,window.innerWidth,window.innerHeight);for(const s of l.gameStore.visionSources){const t=o.layerManager.UUIDMap.get(s.shape);if(void 0===t)continue;const u=t.auras.find(e=>e.uuid===s.aura);if(void 0===u)continue;const h=c.getUnitDistance(u.value+u.dim),f=t.center(),p=c.g2l(f),g=new a.Circle(f,h);if(g.visibleInCanvas(e.canvas))if("bvh"===l.gameStore.visionMode){let t=-1;const s=new Path2D;let o;s.moveTo(p.x,p.y);for(let a=0;a<2*Math.PI;a+=r.Settings.angleSteps/180*Math.PI){const d=new n.GlobalPoint(f.x+h*Math.cos(a),f.y+h*Math.sin(a));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(f.x),c.g2ly(f.y)),i.lineTo(c.g2lx(d.x),c.g2ly(d.y)),i.stroke());const g=n.Ray.fromPoints(f,d),v=l.gameStore.BV.intersect(g);if(0===a&&(o=v.hit?v.intersect:d),v.hit)-1!==t&&(s.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,a),t=-1),s.lineTo(c.g2lx(v.intersect.x),c.g2ly(v.intersect.y));else if(-1===t){t=a;const i=c.g2l(d);e.lineTo(i.x,i.y)}}if(-1===t?s.lineTo(c.g2lx(o.x),c.g2ly(o.y)):s.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));t.addColorStop(0,"rgba(0, 0, 0, 1)"),t.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=t}else e.fillStyle="rgba(0, 0, 0, 1)";e.fill(s)}u.lastPath=s}else{this.vCtx.globalCompositeOperation="source-over",this.vCtx.fillStyle="rgba(0, 0, 0, 1)";const t=d.computeVisibility(f,"vision");this.vCtx.beginPath(),this.vCtx.moveTo(c.g2lx(t[0][0]),c.g2ly(t[0][1]));for(const e of t)this.vCtx.lineTo(c.g2lx(e[0]),c.g2ly(e[1]));if(this.vCtx.closePath(),this.vCtx.fill(),u.dim>0){const e=this.vCtx.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),this.vCtx.fillStyle=e}else this.vCtx.fillStyle="rgba(0, 0, 0, 1)";this.vCtx.globalCompositeOperation="source-in",this.vCtx.beginPath(),this.vCtx.arc(p.x,p.y,c.g2lr(u.value+u.dim),0,2*Math.PI),this.vCtx.fill(),e.drawImage(this.virtualCanvas,0,0)}}l.gameStore.fowLOS&&(e.globalCompositeOperation="source-in",e.drawImage(o.layerManager.getLayer("fow-players").canvas,0,0));for(const n of this.preFogShapes){if(!n.visibleInCanvas(this.canvas))continue;const t=n.globalCompositeOperation;l.gameStore.fullFOW||("source-over"===n.globalCompositeOperation?n.globalCompositeOperation="destination-out":"destination-out"===n.globalCompositeOperation&&(n.globalCompositeOperation="source-over")),n.draw(e),n.globalCompositeOperation=t}l.gameStore.fullFOW&&(e.globalCompositeOperation="source-out",e.fillStyle=u.getFogColour(),e.fillRect(0,0,e.canvas.width,e.canvas.height)),super.draw(!1),e.globalCompositeOperation=t}}}t.FOWLayer=h},4486:function(e,t,i){"use strict";i.r(t);var n=i("a097"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"45bf":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"menuContainer"}},[i("div",{ref:"rm",style:{left:e.visible.settings?"200px":"0",top:e.visible.locations?"100px":"0"},attrs:{id:"radialmenu"}},[i("div",{staticClass:"rm-wrapper"},[i("div",{staticClass:"rm-toggler"},[i("ul",{staticClass:"rm-list",class:{"rm-list-dm":e.IS_DM}},[e.IS_DM?i("li",{staticClass:"rm-item",attrs:{id:"rm-locations"},on:{click:function(t){e.visible.locations=!e.visible.locations}}},[e._m(0)]):e._e(),i("li",{staticClass:"rm-item",attrs:{id:"rm-settings"},on:{click:function(t){e.visible.settings=!e.visible.settings}}},[e._m(1)])])]),e._m(2)])]),i("transition",{attrs:{name:"settings"},on:{enter:function(t){e.$refs.rm.style.transition="left 500ms"}}},[e.visible.settings?i("div",{ref:"settings",attrs:{id:"menu"},on:{click:e.settingsClick}},[i("div",{staticStyle:{width:"200px",height:"90%","overflow-y":"auto","overflow-x":"hidden"}},[e.IS_DM?[i("button",{staticClass:"accordion"},[e._v("Assets")]),i("div",{staticClass:"accordion-panel"},[i("a",{staticClass:"actionButton",attrs:{href:"/assets",target:"blank",title:"Open asset manager"}},[i("i",{staticClass:"fas fa-external-link-alt"})]),i("div",{staticClass:"directory",attrs:{id:"menu-tokens"}},[i("asset-node",{attrs:{asset:e.assets}}),e.assets?e._e():i("div",[e._v("No assets")])],1)]),i("button",{staticClass:"accordion"},[e._v("Notes")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel",attrs:{id:"menu-notes"}},[i("a",{staticClass:"actionButton",on:{click:e.createNote}},[i("i",{staticClass:"far fa-plus-square"})]),e._l(e.notes,function(t){return i("div",{key:t.uuid,staticStyle:{cursor:"pointer"},on:{click:function(i){e.openNote(t)}}},[e._v(e._s(t.title||"[?]"))])}),e.notes.length?e._e():i("div",[e._v("No notes")])],2)]),i("button",{staticClass:"accordion"},[e._v("DM Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"useGridInput"}},[e._v("Use grid:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.useGrid,expression:"useGrid"}],attrs:{id:"useGridInput",type:"checkbox",checked:"checked"},domProps:{checked:Array.isArray(e.useGrid)?e._i(e.useGrid,null)>-1:e.useGrid},on:{change:function(t){var i=e.useGrid,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&(e.useGrid=i.concat([o])):r>-1&&(e.useGrid=i.slice(0,r).concat(i.slice(r+1)))}else e.useGrid=s}}}),i("label",{attrs:{for:"useFOWInput"}},[e._v("Fill entire canvas with FOW:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fullFOW,expression:"fullFOW"}],attrs:{id:"useFOWInput",type:"checkbox"},domProps:{checked:Array.isArray(e.fullFOW)?e._i(e.fullFOW,null)>-1:e.fullFOW},on:{change:function(t){var i=e.fullFOW,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&(e.fullFOW=i.concat([o])):r>-1&&(e.fullFOW=i.slice(0,r).concat(i.slice(r+1)))}else e.fullFOW=s}}}),i("label",{attrs:{for:"fowOpacity"}},[e._v("FOW opacity:")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.fowOpacity,expression:"fowOpacity",modifiers:{number:!0}}],attrs:{id:"fowOpacity",type:"number",min:"0",max:"1",step:"0.1"},domProps:{value:e.fowOpacity},on:{input:function(t){t.target.composing||(e.fowOpacity=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"fowLOS"}},[e._v("Only show lights in LoS:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fowLOS,expression:"fowLOS"}],attrs:{id:"fowLOS",type:"checkbox"},domProps:{checked:Array.isArray(e.fowLOS)?e._i(e.fowLOS,null)>-1:e.fowLOS},on:{change:function(t){var i=e.fowLOS,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&(e.fowLOS=i.concat([o])):r>-1&&(e.fowLOS=i.slice(0,r).concat(i.slice(r+1)))}else e.fowLOS=s}}}),i("label",{attrs:{for:"unitSizeInput"}},[e._v("Unit Size (in ft.):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.unitSize,expression:"unitSize",modifiers:{number:!0}}],attrs:{id:"unitSizeInput",type:"number"},domProps:{value:e.unitSize},on:{input:function(t){t.target.composing||(e.unitSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"gridSizeInput"}},[e._v("Grid Size (in pixels):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridSize,expression:"gridSize",modifiers:{number:!0}}],attrs:{id:"gridSizeInput",type:"number",min:"0"},domProps:{value:e.gridSize},on:{input:function(t){t.target.composing||(e.gridSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",{domProps:{selected:"bvh"===e.$store.state.game.visionMode}},[e._v("BVH")]),i("option",{domProps:{selected:"triangle"===e.$store.state.game.visionMode}},[e._v("Triangle")])]),i("label",{attrs:{for:"vmininp"}},[e._v("Minimal full vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMin,expression:"visionRangeMin",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmininp",type:"number",min:"0"},domProps:{value:e.visionRangeMin},on:{change:function(t){e.visionRangeMin=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"vmaxinp"}},[e._v("Maximal vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMax,expression:"visionRangeMax",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmaxinp",type:"number",min:"0"},domProps:{value:e.visionRangeMax},on:{change:function(t){e.visionRangeMax=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"invitation"}},[e._v("Invitation Code:")]),i("input",{attrs:{id:"invitation",type:"text",readonly:"readonly"},domProps:{value:e.invitationCode}})])])]:e._e(),i("button",{staticClass:"accordion"},[e._v("Client Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"gridColour"}},[e._v("Grid Colour:")]),i("color-picker",{attrs:{id:"gridColour",color:e.gridColour},on:{"update:color":function(t){e.gridColour=t}}}),i("label",{attrs:{for:"fowColour"}},[e._v("FOW Colour:")]),i("color-picker",{attrs:{id:"fowColour",color:e.fowColour},on:{"update:color":function(t){e.fowColour=t}}}),i("label",{attrs:{for:"rulerColour"}},[e._v("Ruler Colour:")]),i("color-picker",{attrs:{id:"rulerColour",color:e.rulerColour},on:{"update:color":function(t){e.rulerColour=t}}})],1)])],2),i("router-link",{staticClass:"accordion",staticStyle:{"text-decoration":"none",display:"inline-block",position:"absolute",bottom:"0"},attrs:{to:"/dashboard"}},[e._v("Exit")])],1):e._e()]),i("transition",{attrs:{name:"locations"},on:{enter:function(t){e.$refs.rm.style.transition="top 500ms"}}},[e.IS_DM&&e.visible.locations?i("div",{attrs:{id:"locations-menu"}},[i("div",[e._l(e.locations,function(t){return i("div",{key:t,on:{click:function(i){e.changeLocation(t)}}},[e._v(e._s(t))])}),i("div",{on:{click:e.createLocation}},[i("i",{staticClass:"fas fa-plus"})])],2)]):e._e()]),i("img",{attrs:{id:"dragImage"}})],1)},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"far fa-compass"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"fas fa-cog"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"rm-topper"},[i("i",{staticClass:"icon-share-alt"})])}];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},4709:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1"),c=i("5a5c");class u extends o.Shape{constructor(e,t,i,n,s){super(e,i,n,s),this.type="circle",this.r=t||1}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r})}fromDict(e){super.fromDict(e),this.r=e.radius}getBoundingBox(){return new s.BoundingRect(new n.GlobalPoint(this.refPoint.x-this.r,this.refPoint.y-this.r),2*this.r,2*this.r)}get points(){return this.getBoundingBox().points}draw(e){super.draw(e),e.beginPath(),"fog"===this.fillColour?e.fillStyle=c.getFogColour():e.fillStyle=this.fillColour;const t=l.g2l(this.refPoint);e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.beginPath(),e.lineWidth=l.g2lz(5),e.strokeStyle=this.strokeColour,e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.stroke())}contains(e){return Math.pow(e.x-this.refPoint.x,2)+Math.pow(e.y-this.refPoint.y,2){const t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t){return e.toLowerCase()t(e)?i[1].push(e):i[0].push(e)),i}function u(e,t,i,n){const s=.2*Number(e.font.split("px")[0]),o=e.measureText(t).width;return Math.min(i/o,n/s)}function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,e=>{return"%"+e.charCodeAt(0).toString(16)})}t.uuidv4=s,t.capitalize=o,t.alphSort=r,t.getHTMLFont=a,t.getHTMLTextWidth=l,t.partition=c,t.calcFontScale=u,t.fixedEncodeURIComponent=d;class h{constructor(){this.keys=[],this.values=[]}get length(){return this.keys.length}get(e){return this.values[this.keys.indexOf(e)]}getIndexValue(e){return this.values[e]}getIndexKey(e){return this.keys[e]}set(e,t){this.keys.push(e),this.values.push(t)}has(e){return this.indexOf(e)>=0}indexOf(e){return this.keys.indexOf(e)}remove(e){const t=this.indexOf(e);this.keys.splice(t,1),this.values.splice(t,1)}}function f(){return n.app.$children[0].$refs.activeComponent}function p(e){const t=n.app.$children[0].$refs.activeComponent;return t.$refs[e]}t.OrderedMap=h,t.getComponent=f,t.getRef=p},"4aec":function(e,t,i){"use strict";i.r(t);var n=i("a755"),s=i("f51a");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="contextMenu.vue",t["default"]=a.exports},"4aee":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("98ef");function s(e){return(e+2)%3}function o(e){return(e+1)%3}function r(e,t){const i=new n.EdgeCirculator(e,null);if(i.valid)do{const s=3-i.t.indexV(e)-i.ri,o=i.t.vertices[s];if(!o.infinite){if(o===t)return{includes:!0,vi:t,fr:i.t,i:i.ri};{const s=c(e.point,t.point,o.point);if(s===n.Sign.COLLINEAR&&a(e.point,o.point,t.point))return{includes:!0,vi:o,fr:i.t,i:i.ri}}}}while(i.next());return{includes:!1}}function a(e,t,i){let s,o;return l(0,e,i)===n.Sign.EQUAL?(s=l(1,e,t),o=l(1,t,i)):(s=l(0,e,t),o=l(0,t,i)),s===n.Sign.SMALLER&&o===n.Sign.SMALLER||s===n.Sign.LARGER&&o===n.Sign.LARGER}function l(e,t,i){return t[e]i[e]?n.Sign.LARGER:n.Sign.EQUAL}function c(e,t,i){const s=e[0],o=e[1],r=t[0],a=t[1],l=i[0],c=i[1],d=r-s,h=a-o,f=l-s,p=c-o,g=u(d,h,f,p);let v=Math.abs(d),m=Math.abs(h);const y=Math.abs(f),b=Math.abs(p);if(vm&&([v,m]=[m,v]),v<2e-162&&0===v)return n.Sign.ZERO;if(m<1e153){const e=Number.EPSILON*v*m;if(g>e)return n.Sign.POSITIVE;if(g<-e)return n.Sign.NEGATIVE}return n.Sign.ZERO}function u(e,t,i,n){return e*n-t*i}function d(e,t,i){return u(t[0]-e[0],t[1]-e[1],i[0]-e[0],i[1]-e[1])<0}function h(e,t,i){if(!e.isInfinite())return f(e.vertices[0].point,e.vertices[1].point,e.vertices[2].point,t,i);throw new Error("SSS")}function f(e,t,i,s,o){const r=m(e,t,i,s);if(r!==n.Sign.ON_ORIENTED_BOUNDARY||!o)return r;const a=[e,t,i,s];a.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);for(const l of a.reverse()){if(l===s)return n.Sign.ON_NEGATIVE_SIDE;let o=c(e,t,s);if(l===i&&o!==n.Sign.COLLINEAR)return o;if(o=c(e,s,i),l===t&&o!==n.Sign.COLLINEAR)return o;if(o=c(s,t,i),l===e&&o!==n.Sign.COLLINEAR)return o}return n.Sign.ON_NEGATIVE_SIDE}function p(e,t){return e[0]===t[0]&&e[1]===t[1]}function g(e,t){return e[0]y&&([m,y]=[y,m]),m<1e-73&&0===m)return n.Sign.ON_ORIENTED_BOUNDARY;if(y<1e76){const e=Number.EPSILON*m*y*(y*y);if(v>e)return n.Sign.ON_POSITIVE_SIDE;if(v<-e)return n.Sign.ON_NEGATIVE_SIDE}return n.Sign.ZERO}function y(e,t,i,s){switch(c(e,t,i)){case n.Sign.LEFT_TURN:return c(i,s,t)!==n.Sign.RIGHT_TURN;case n.Sign.RIGHT_TURN:return c(i,s,t)!==n.Sign.LEFT_TURN;case n.Sign.COLLINEAR:return!0}}function b(e,t,i,s){switch(c(e,t,i)){case n.Sign.LEFT_TURN:return c(e,t,s)!==n.Sign.LEFT_TURN;case n.Sign.RIGHT_TURN:return c(e,t,s)!==n.Sign.RIGHT_TURN;case n.Sign.COLLINEAR:return!0}}function _(e,t,i,n){const s=x(e,t,i,n);switch(s.intersectionType){case S.POINT:return s.point;case S.NO_INTERSECTION:return null}throw new Error("sdfgighowen")}var S;function w(e,t){if(e[0]===t[0])return[1,0,-e[0]];if(e[1]===t[1])return[0,1,-e[1]];const i=t[0]-e[0],n=t[1]-e[1];return[-n,i,-i*e[1]+n*e[0]]}function x(e,t,i,n){if(!C(e,t,i,n))return{intersectionType:S.NO_INTERSECTION,point:null};const s=w(e,t),o=w(i,n),r=M(s,o);switch(r.intersectionType){case S.POINT:return r}throw new Error("gzseuihgpib")}function M(e,t){const i=e[0]*t[1]-t[0]*e[1],n=e[1]*t[2]-t[1]*e[2],s=t[0]*e[2]-e[0]*t[2];return{intersectionType:S.POINT,point:[n/i,s/i]}}function C(e,t,i,s){if(g(e,t)){if(g(i,s)){if(g(t,i)||g(s,e))return!1}else if(g(t,s)||g(i,e))return!1}else if(g(i,s)){if(g(e,i)||g(s,t))return!1}else if(g(e,s)||g(i,t))return!1;if(g(e,t))if(g(i,s))switch(v(e,i)){case n.Sign.SMALLER:switch(v(t,i)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(t,s)){case n.Sign.SMALLER:return y(e,t,i,s);case n.Sign.EQUAL:return!0;default:return b(e,t,i,s)}}case n.Sign.EQUAL:return!0;default:switch(v(s,e)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(s,t)){case n.Sign.SMALLER:return y(i,s,e,t);case n.Sign.EQUAL:return!0;default:return b(i,s,e,t)}}}else switch(v(e,s)){case n.Sign.SMALLER:switch(v(t,s)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(t,i)){case n.Sign.SMALLER:return y(e,t,s,i);case n.Sign.EQUAL:return!0;default:return b(e,t,s,i)}}case n.Sign.EQUAL:return!0;default:switch(v(i,e)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(i,t)){case n.Sign.SMALLER:return y(s,i,e,t);case n.Sign.EQUAL:return!0;default:return b(s,i,e,t)}}}else if(g(i,s))switch(v(t,i)){case n.Sign.SMALLER:switch(v(e,i)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(e,s)){case n.Sign.SMALLER:return y(t,e,i,s);case n.Sign.EQUAL:return!0;default:return b(t,e,i,s)}}case n.Sign.EQUAL:return!0;default:switch(v(s,t)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(s,e)){case n.Sign.SMALLER:return y(i,s,t,e);case n.Sign.EQUAL:return!0;default:return b(i,s,t,e)}}}else switch(v(t,s)){case n.Sign.SMALLER:switch(v(e,s)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(e,i)){case n.Sign.SMALLER:return y(t,e,s,i);case n.Sign.EQUAL:return!0;default:return b(t,e,s,i)}}case n.Sign.EQUAL:return!0;default:switch(v(i,t)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(i,e)){case n.Sign.SMALLER:return y(s,i,t,e);case n.Sign.EQUAL:return!0;default:return b(s,i,t,e)}}}}function L(e){if(e!==e)return e;if(e===-1/0)return-Number.MAX_VALUE;if(e===1/0)return 1/0;if(e===+Number.MAX_VALUE)return 1/0;let t=e*(e<0?1-Number.EPSILON/2:1+Number.EPSILON);t===e&&(t=Number.MIN_VALUE*Number.EPSILON>0?e+Number.MIN_VALUE*Number.EPSILON:e+Number.MIN_VALUE),t===1/0&&(t=+Number.MAX_VALUE);const i=e+(t-e)/2;ewindow.innerWidth-100&&(t=window.innerWidth-100),i<0&&(i=0),i>window.innerHeight-100&&(i=window.innerHeight-100),this.$refs.container.style.left=t+"px",this.$refs.container.style.top=i+"px",this.$refs.container.style.display="block"}dragOver(e){this.dragging&&(this.$refs.container.style.display="none")}};n.__decorate([r.Prop(Boolean)],a.prototype,"visible",void 0),n.__decorate([r.Prop({type:Boolean,default:!0})],a.prototype,"mask",void 0),a=n.__decorate([o.default],a),t.default=a},5338:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("8055")),o=i("2d5b");t.socket=s.default(location.protocol+"//"+location.host+"/pa_assetmgmt",{autoConnect:!1}),t.socket.on("connect",()=>{console.log("Connected")}),t.socket.on("disconnect",()=>{console.log("Disconnected")}),t.socket.on("redirect",e=>{console.log("redirecting"),window.location.href=e}),t.socket.on("Folder.Root.Set",e=>{o.assetStore.setRoot(e)}),t.socket.on("Folder.Set",e=>{if(o.assetStore.clear(),e.children)for(const t of e.children)o.assetStore.idMap.set(t.id,t),t.file_hash?o.assetStore.files.push(t.id):o.assetStore.folders.push(t.id)}),t.socket.on("Folder.Create",e=>{o.assetStore.folders.push(e.id),o.assetStore.idMap.set(e.id,e)}),t.socket.on("Asset.Upload.Finish",e=>{o.assetStore.idMap.set(e.id,e),o.assetStore.files.push(e.id)})},"550a":function(e,t,i){"use strict";var n=i("f8a4"),s=i.n(n);s.a},"561b":function(e,t,i){"use strict";var n=i("a450"),s=i.n(n);s.a},5722:function(e,t,i){},"574e":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("92b1"),a=i("5a5c");class l extends o.Shape{constructor(e,t,i,n,s){super(e,"rgba(0, 0, 0, 0)",n||"#000",s),this.type="multiline",this._points=[],this._points=t||[],this.lineWidth=i||3}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._points=e.points.map(e=>new n.GlobalPoint(e.x,e.y))}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,o=this.refPoint.y;for(const n of this._points)n.xt&&(t=n.x),n.yo&&(o=n.y);return new s.BoundingRect(new n.GlobalPoint(e,i),t-e,o-i)}draw(e){super.draw(e),e.beginPath(),e.lineCap="round",e.lineJoin="round",e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y));for(const t of this._points)e.lineTo(r.g2lx(t.x),r.g2ly(t.y));"fog"===this.strokeColour?e.strokeStyle=a.getFogColour():e.strokeStyle=this.strokeColour,e.lineWidth=r.g2lz(this.lineWidth),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=r.l2g(t):this._points[e-1]=r.l2g(t)}}t.MultiLine=l},"58c7":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"outer",on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}},[i("div",{staticClass:"current-color",style:e.transparent?"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)":"background-color:"+e.color,on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}}),i("div",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],staticClass:"mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.closePicker(t)}}}),i("chrome-picker",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],ref:"chromePicker",style:{position:"fixed",left:e.left+"px",top:e.top+"px","z-index":9999},attrs:{value:e.color,tabindex:"-1"},on:{input:e.updateColor}})],1)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"59d8":function(e,t,i){"use strict";i.r(t);var n=i("e5ca"),s=i("6f8d");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("a7b3");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"639cd890",null);a.options.__file="draw.vue",t["default"]=a.exports},"5a5c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("66cb")),o=i("8f0a"),r=i("f10f");function a(e){return new o.LocalPoint(e.pageX,e.pageY)}function l(e=!1){const t=s.default(r.gameStore.fowColour);return r.gameStore.IS_DM?t.setAlpha(e?1:r.gameStore.fowOpacity):t.setAlpha(1),t.toRgbString()}t.getMouse=a,t.getFogColour=l},"5a81":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importStar(i("66cb")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("2f62"),l=n.__importDefault(i("3b36")),c=n.__importDefault(i("d65f")),u=i("4a5b"),d=i("8f0a"),h=i("6f92"),f=i("1327"),p=i("f10f"),g=i("92b1"),v=i("60a3");let m=class extends o.default{constructor(){super(...arguments),this.x=0,this.y=0,this.visible=!1,this.text="X",this.fillColour="rgba(255, 255, 255, 1)",this.borderColour="rgba(0, 0, 0, 1)"}mounted(){this.updatePreview()}onTextChange(e,t){this.updatePreview()}onFillChange(e,t){this.updatePreview()}onBorderChange(e,t){this.updatePreview()}open(e,t){this.visible=!0,this.x=e,this.y=t}submit(){const e=h.layerManager.getLayer();if(void 0===e)return;const t=new f.CircularToken(g.l2g(new d.LocalPoint(this.x,this.y)),g.getUnitDistance(p.gameStore.unitSize/2),this.text,"10px serif",this.fillColour,this.borderColour);t.addOwner(p.gameStore.username),e.addShape(t,!0),e.invalidate(!1),this.visible=!1}updatePreview(){const e=this.$refs.canvas.getContext("2d");e.clearRect(0,0,e.canvas.width,e.canvas.height),e.beginPath();const t={x:e.canvas.width/2,y:e.canvas.height/2},i=.9*Math.min(t.x,t.y);e.fillStyle=this.fillColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.borderColour&&(e.beginPath(),e.lineWidth=5,e.strokeStyle=this.borderColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.stroke()),e.save(),e.textAlign="center",e.textBaseline="middle";const n=u.calcFontScale(e,this.text,i,i),o=0;e.transform(n,o,-o,n,t.x,t.y),e.fillStyle=s.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}};n.__decorate([v.Watch("text")],m.prototype,"onTextChange",null),n.__decorate([v.Watch("fillColour")],m.prototype,"onFillChange",null),n.__decorate([v.Watch("borderColour")],m.prototype,"onBorderChange",null),m=n.__decorate([r.default({components:{Modal:c.default,"color-picker":l.default},computed:Object.assign({},a.mapState("game",["unitSize"]))})],m),t.default=m},"5ae5":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d65f")),a=i("4a5b"),l=i("f10f");let c=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.note=null}open(e){this.visible=!0,this.note=e}calcHeight(){if(this.$refs.textarea){const e=this.$refs.textarea;return e.style.height="auto",e.style.height=e.scrollHeight+"px",e.scrollHeight+"px"}return"100px"}updateNote(){this.note&&l.gameStore.updateNote({note:this.note,sync:!0})}removeNote(){a.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{e&&this.note&&(l.gameStore.removeNote({note:this.note,sync:!0}),this.visible=!1)},()=>{})}};c=n.__decorate([o.default({components:{Modal:r.default}})],c),t.default=c},"5b4c":function(e,t,i){"use strict";var n=i("c6fe"),s=i.n(n);s.a},"5b69":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("65d9")),o=i("60a3"),r=n.__importDefault(i("3b36")),a=n.__importDefault(i("ea6a")),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("4709"),h=i("5e7c"),f=i("574e"),p=i("e4ea"),g=i("b2ed"),v=i("f10f"),m=i("92b1"),y=i("5a5c");let b=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.ruler=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","draw-polygon","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=m.getUnitDistance(v.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:m.getUnitDistance(this.unitSize)/8}get IS_DM(){return v.gameStore.IS_DM}get unitSize(){return v.gameStore.unitSize}get useGrid(){return v.gameStore.useGrid}onFillChange(){this.brushHelper&&(this.brushHelper.fillColour=this.fillColour)}onModeUpdate(e,t){this.onModeChange(e,t)}setupBrush(){null!==this.brushHelper&&("reveal"===this.modeSelect||"hide"===this.modeSelect?(this.brushHelper.options.set("preFogShape",!0),this.brushHelper.options.set("skipDraw",!0),this.brushHelper.fillColour="rgba(0, 0, 0, 1)","reveal"===this.modeSelect?this.brushHelper.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.brushHelper.globalCompositeOperation="destination-out")):(this.brushHelper.options.delete("preFogShape"),this.brushHelper.options.delete("skipDraw"),this.brushHelper.globalCompositeOperation="source-over",this.brushHelper.fillColour=this.fillColour))}onModeChange(e,t){if(null===this.brushHelper)return;const i=u.layerManager.getLayer("fow"),n=u.layerManager.getLayer();void 0!==i&&void 0!==n&&(this.setupBrush(),"normal"!==e&&"normal"===t?(n.removeShape(this.brushHelper,!1),i.addShape(this.brushHelper,!1)):"normal"===e&&"normal"!==t&&(n.addShape(this.brushHelper,!1),i.removeShape(this.brushHelper,!1)))}getLayer(){return"normal"===this.modeSelect?u.layerManager.getLayer():u.layerManager.getLayer("fow")}onMouseDown(e){const t=this.getLayer();if(void 0!==t){if(this.active)null!==this.shape&&this.shape instanceof p.Polygon&&this.shape._vertices.push(m.l2g(y.getMouse(e)));else{switch(this.startPoint=m.l2g(y.getMouse(e)),this.active=!0,this.shapeSelect){case"square":this.shape=new g.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);break;case"circle":this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);break;case"paint-brush":this.shape=new f.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour;break;case"draw-polygon":this.shape=new p.Polygon(this.startPoint.clone(),[],this.fillColour,this.borderColour);break;default:return}"normal"!==this.modeSelect&&(this.shape.options.set("preFogShape",!0),this.shape.options.set("skipDraw",!0),this.shape.fillColour="rgba(0, 0, 0, 1)"),"reveal"===this.modeSelect?this.shape.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.shape.globalCompositeOperation="destination-out"),this.shape.addOwner(v.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),t.addShape(this.shape,!0,!1,!1),this.pushBrushBack()}if(null!==this.shape&&this.shape instanceof p.Polygon){const i=m.l2g(y.getMouse(e));null===this.ruler?(this.ruler=new h.Line(i,i,3,"black"),t.addShape(this.ruler,!1)):(this.ruler.refPoint=i,this.ruler.endPoint=i),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0),t.invalidate(!1),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0})}}else console.log("No active layer!")}onMouseMove(e){const t=m.l2g(y.getMouse(e)),i=this.getLayer();if(void 0!==i){if(null!==this.brushHelper&&(this.brushHelper.r=this.helperSize,this.brushHelper.refPoint=t,this.active||i.invalidate(!1)),this.active&&null!==this.startPoint&&null!==this.shape){switch(this.shapeSelect){case"square":this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint=new c.GlobalPoint(Math.min(this.startPoint.x,t.x),Math.min(this.startPoint.y,t.y));break;case"circle":this.shape.r=t.subtract(this.startPoint).length();break;case"paint-brush":this.shape._points.push(t);break;case"draw-polygon":this.ruler.endPoint=t;break}this.shape instanceof p.Polygon||(l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0)),i.invalidate(!1)}}else console.log("No active layer!")}onMouseUp(e){!this.active||null===this.shape||this.shape instanceof p.Polygon||(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.finaliseShape())}onContextMenu(e){if(!this.active||null===this.shape||!(this.shape instanceof p.Polygon))return;const t=this.getLayer();void 0!==t?(t.removeShape(this.ruler,!1),this.ruler=null,this.finaliseShape()):console.log("No active layer!")}finaliseShape(){null!==this.shape&&(this.shape.visionObstruction&&v.gameStore.recalculateVision(),this.shape.movementObstruction&&v.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!1}),this.active=!1)}onSelect(){const e=this.getLayer();void 0!==e&&(this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1))}onDeselect(){const e=this.getLayer();null!==this.brushHelper&&void 0!==e&&e.removeShape(this.brushHelper,!1),this.active&&void 0!==e&&null!==this.shape&&(e.removeShape(this.shape,!0,!1),this.shape=null,this.active=!1,e.invalidate(!1))}pushBrushBack(){const e=this.getLayer();void 0!==e?(null!==this.brushHelper&&e.removeShape(this.brushHelper,!1),this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1)):console.log("No active layer!")}};n.__decorate([o.Watch("fillColour")],b.prototype,"onFillChange",null),n.__decorate([o.Watch("modeSelect")],b.prototype,"onModeUpdate",null),b=n.__decorate([s.default({components:{"color-picker":r.default}})],b),t.default=b},"5e7c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("92b1");class a extends o.Shape{constructor(e,t,i,n,s){super(e,"rgba(0, 0, 0, 0)",n||"#000",s),this.type="line",this.endPoint=t,this.lineWidth=void 0===i?1:i}asDict(){return Object.assign(this.getBaseDict(),{x2:this.endPoint.x,y2:this.endPoint.y,line_width:this.lineWidth})}get points(){return[[this.refPoint.x,this.refPoint.y],[this.endPoint.x,this.endPoint.y]]}getBoundingBox(){return new s.BoundingRect(new n.GlobalPoint(Math.min(this.refPoint.x,this.endPoint.x),Math.min(this.refPoint.y,this.endPoint.y)),Math.abs(this.refPoint.x-this.endPoint.x),Math.abs(this.refPoint.y-this.endPoint.y))}draw(e){super.draw(e),e.strokeStyle=this.strokeColour,e.beginPath(),e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y)),e.lineTo(r.g2lx(this.endPoint.x),r.g2ly(this.endPoint.y)),e.lineWidth=this.lineWidth,e.stroke()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this.refPoint=r.l2g(t):this.endPoint=r.l2g(t)}}t.Line=a},"5f86":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("8c4f"));o.default.use(r.default);const a=n.__importDefault(i("e914")),l=n.__importDefault(i("1077")),c=n.__importDefault(i("cad7")),u=n.__importDefault(i("47f7")),d=n.__importDefault(i("c6b4")),h=n.__importDefault(i("07f5")),f=n.__importDefault(i("ce87")),p=i("cc67");t.router=new r.default({mode:"history",base:"/",routes:[{path:"/",redirect:"/dashboard"},{path:"/_load",name:"load",component:u.default},{path:"/assets",component:a.default,meta:{auth:!0}},{path:"/auth",component:{template:""},children:[{path:"login",component:l.default},{path:"logout",component:c.default}]},{path:"/invite/:code",component:f.default,meta:{auth:!0}},{path:"/dashboard",component:d.default,meta:{auth:!0}},{path:"/game/:creator/:room",component:h.default,meta:{auth:!0}}]}),t.router.beforeEach((e,i,n)=>{p.coreStore.initialized||"/_load"===e.path?e.matched.some(e=>e.meta.auth)&&!p.coreStore.authenticated?n({path:"/auth/login",query:{redirect:e.path}}):n():(n({path:"/_load"}),s.default.get("/api/auth").then(i=>{i.data.auth&&(p.coreStore.setAuthenticated(!0),p.coreStore.setUsername(i.data.username)),p.coreStore.setInitialized(!0),t.router.push(e.path)}).catch(()=>{console.error("Authentication check could not be fulfilled.")}))})},"5fa9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9"));let r=class extends s.default{constructor(){super(...arguments),this.name="",this.selected=!1,this.active=!1}get detailRight(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2;return`${window.innerWidth-Math.min(window.innerWidth-25,t+75)}px`}get detailArrow(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2,i=Math.min(window.innerWidth-25,t+75);return`${i-t-14}px`}created(){this.$parent.$on("mousedown",(e,t)=>{t===this.name&&this.onMouseDown(e)}),this.$parent.$on("mouseup",(e,t)=>{t===this.name&&this.onMouseUp(e)}),this.$parent.$on("mousemove",(e,t)=>{t===this.name&&this.onMouseMove(e)}),this.$parent.$on("contextmenu",(e,t)=>{t===this.name&&this.onContextMenu(e)}),this.$parent.$on("tools-select-change",(e,t)=>{t===this.name?(this.selected=!1,this.onDeselect()):e===this.name&&(this.selected=!0,this.onSelect())})}onSelect(){}onDeselect(){}onMouseDown(e){}onMouseUp(e){}onMouseMove(e){}onContextMenu(e){}};r=n.__decorate([o.default],r),t.default=r},6100:function(e,t,i){"use strict";i.r(t);var n=i("8a30"),s=i("e94f");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("550a");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"1fee50f5",null);a.options.__file="tools.vue",t["default"]=a.exports},6465:function(e,t,i){"use strict";i.r(t);var n=i("5fa9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"64a9":function(e,t,i){},6542:function(e,t,i){},"6c30":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("c266"),s=i("f10f"),o=i("92b1");class r extends n.BaseRect{constructor(e,t,i,n,s){super(t,i,n,void 0,void 0,s),this.type="assetrect",this.src="",this.img=e}asDict(){return Object.assign(this.getBaseDict(),{src:this.src})}fromDict(e){super.fromDict(e),this.src=e.src}draw(e){super.draw(e);try{e.drawImage(this.img,o.g2lx(this.refPoint.x),o.g2ly(this.refPoint.y),o.g2lz(this.w),o.g2lz(this.h))}catch(t){console.warn(`Shape ${this.uuid} could not load the image ${this.src}`)}}getInitiativeRepr(){return{uuid:this.uuid,visible:!s.gameStore.IS_DM,group:!1,source:this.src,has_img:!0,effects:[],index:1/0}}}t.Asset=r},"6e4a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("98ef"),s=i("4aee");class o{constructor(){this.tds=new n.TDS}insertConstraint(e,t){const i=this.insert(e),n=this.insert(t);i!==n&&this.insertConstraintV(i,n)}insertConstraintV(e,t){const i=[[e,t]];while(i.length>0){const e=i.pop(),t=s.edgeInfo(e[0],e[1]);if(t.includes){this.markConstraint(t.fr,t.i),t.vi!==e[1]&&i.push([t.vi,e[1]]);continue}const n=this.findIntersectedFaces(e[0],e[1]);n.found?n.vi!==e[0]&&n.vi!==e[1]?(i.push([e[0],n.vi]),i.push([n.vi,e[1]])):i.push(e):(this.triangulateHole(n.intersectedFaces,n.listAB,n.listBA),n.vi!==e[1]&&i.push([n.vi,e[1]]))}}triangulateHole(e,t,i){const n=[];this.triangulateHole2(e,t,i,n),this.propagatingFlipE(n)}triangulateHole2(e,t,i,n){if(t.length>0){this.triangulateHalfHole(t,n),this.triangulateHalfHole(i,n);const s=t[0][0],o=i[0][0];s.neighbours[2]=o,o.neighbours[2]=s,s.constraints[2]=!0,o.constraints[2]=!0;while(e.length>0)this.tds.deleteTriangle(e.shift())}}triangulateHalfHole(e,t){let i,o,r=0;const a=()=>e[r],l=()=>e[i],c=a()[0].vertices[s.ccw(a()[1])];let u,d,h,f,p,g;i=r,++i;do{d=a()[0],p=a()[1],null!==d.neighbours[p]&&(u=d.neighbours[p],f=s.cw(u.indexV(d.vertices[s.cw(p)])),d=u.neighbours[f],p=this.tds.mirrorIndex(u,f)),h=l()[0],g=l()[1],null!==h.neighbours[g]&&(u=h.neighbours[g],f=s.cw(u.indexV(h.vertices[s.cw(g)])),h=u.neighbours[f],g=this.tds.mirrorIndex(u,f));const v=d.vertices[s.ccw(p)],m=d.vertices[s.cw(p)],y=h.vertices[s.cw(g)],b=s.orientation(v.point,m.point,y.point);switch(b){case n.Sign.RIGHT_TURN:{const n=this.tds.createTriangle(v,y,m,null,null,null);t.push([n,2]),n.neighbours[1]=d,n.neighbours[0]=h,d.neighbours[p]=n,h.neighbours[g]=n,d.isConstrained(p)&&(n.constraints[1]=!0),h.isConstrained(g)&&(n.constraints[0]=!0),v.triangle=n,m.triangle=n,y.triangle=n,o=r+1,e.splice(r,0,[n,2]),e.splice(Math.max(o,i),1),e.splice(Math.min(o,i),1),i=r,v!==c?--r:++i;break}case n.Sign.LEFT_TURN:case n.Sign.COLLINEAR:++r,++i;break}}while(i0){t=r[0][0],a=r[0][1],l=t.neighbours[a],c=this.tds.mirrorIndex(t,a),u=[t,a],r.splice(r.findIndex(e=>e[0]===u[0]&&e[1]===u[1]),1),d[0]=[t,s.cw(a)],d[1]=[t,s.ccw(a)],d[2]=[l,s.cw(c)],d[3]=[l,s.ccw(c)];for(const e of d){const t=e[0],i=e[1];n=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,n)?r.splice(r.findIndex(t=>t[0]===e[0]&&t[1]===e[1]),1):r.splice(r.findIndex(e=>e[0]===n[0]&&e[1]===n[1]),1)}this.flip(t,a);for(const e of d){const t=e[0],i=e[1];this.isFlipable(t,i)&&(n=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,n)?r.push(e):r.push(n))}}}flip(e,t){const i=e.neighbours[t],n=this.tds.mirrorIndex(e,t),o=e.neighbours[s.cw(t)],r=this.tds.mirrorIndex(e,s.cw(t)),a=e.neighbours[s.ccw(t)],l=this.tds.mirrorIndex(e,s.ccw(t)),c=i.neighbours[s.cw(n)],u=this.tds.mirrorIndex(i,s.cw(n)),d=i.neighbours[s.ccw(n)],h=this.tds.mirrorIndex(i,s.ccw(n));this.tds.flip(e,t),e.constraints[e.indexT(i)]=!1,i.constraints[i.indexT(e)]=!1,o.neighbours[r].constraints[this.tds.mirrorIndex(o,r)]=o.constraints[r],a.neighbours[l].constraints[this.tds.mirrorIndex(a,l)]=a.constraints[l],c.neighbours[u].constraints[this.tds.mirrorIndex(c,u)]=c.constraints[u],d.neighbours[h].constraints[this.tds.mirrorIndex(d,h)]=d.constraints[h]}isFlipable(e,t,i=!0){const o=e.neighbours[t];return!e.isInfinite()&&!o.isInfinite()&&(!e.constraints[t]&&s.sideOfOrientedCircle(o,e.vertices[t].point,i)===n.Sign.ON_POSITIVE_SIDE)}insertb(e,t,i,o){let r,a,l=!1;i===n.LocateType.EDGE&&t.isConstrained(o)&&(l=!0,r=t.vertices[s.ccw(o)],a=t.vertices[s.cw(o)]);const c=this.insertc(e,t,i,o);return l?this.updateConstraintsIncident(c,r,a):i!==n.LocateType.VERTEX&&this.clearConstraintsIncident(c),2===this.tds.dimension&&this.updateConstraintsOpposite(c),c}updateConstraintsIncident(e,t,i){if(0!==this.tds.dimension)if(1===this.tds.dimension){const t=new n.EdgeCirculator(e,null);do{t.t.constraints[2]=!0}while(t.next())}else{const o=new n.FaceCirculator(e,null);do{const n=o.t.indexV(e),r=s.cw(n),a=s.ccw(n);o.t.vertices[r]===t||o.t.vertices[r]===i?(o.t.constraints[a]=!0,o.t.constraints[r]=!1):(o.t.constraints[a]=!1,o.t.constraints[r]=!0)}while(o.next())}}clearConstraintsIncident(e){const t=new n.EdgeCirculator(e,null);if(t.valid)do{const e=t.t,i=t.ri;e.constraints[i]=!1,2===this.tds.dimension&&(e.neighbours[i].constraints[this.tds.mirrorIndex(e,i)]=!1)}while(t.next())}insertc(e,t,i,s){if(1===this.tds.vertices.length)return this.insertFirst(e);if(2===this.tds.vertices.length)return i===n.LocateType.VERTEX?this.tds.finiteVertex:this.insertSecond(e);switch(i){case n.LocateType.VERTEX:return t.vertices[s];case n.LocateType.OUTSIDE_AFFINE_HULL:return this.insertOutsideAffineHull(e);case n.LocateType.OUTSIDE_CONVEX_HULL:return this.insertOutsideConvexHull(e,t);case n.LocateType.EDGE:return this.insertInEdge(e,t,s);case n.LocateType.FACE:return this.insertInFace(e,t)}throw new Error("qwe")}insertInEdge(e,t,i){const n=this.tds.insertInEdge(t,i);return n.point=e,n}insertInFace(e,t){const i=this.tds.insertInFace(t);return i.point=e,i}insertFirst(e){const t=this.tds.insertDimUp();return t.point=e,t}insertSecond(e){const t=this.tds.insertDimUp(this.tds._infinite,!0);return t.point=e,t}insertOutsideAffineHull(e){let t=!1;if(1===this.tds.dimension){const i=this.tds.finiteEdge.first,o=s.orientation(i.vertices[0].point,i.vertices[1].point,e);t=o===n.Sign.COUNTERCLOCKWISE}const i=this.tds.insertDimUp(this.tds._infinite,t);return i.point=e,i}insertOutsideConvexHull(e,t){let i;if(1===this.tds.dimension)throw new Error("sdfasdasd");return i=this.insertOutsideConvexHull2(e,t),i.point=e,i}insertOutsideConvexHull2(e,t){let i=t.indexV(this.tds._infinite);const o=[],r=[];let a=new n.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.prev(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[s.ccw(i)].point,r=a.t.vertices[s.cw(i)].point;s.orientation(e,t,r)===n.Sign.LEFT_TURN?o.push(a.t):l=!0}a=new n.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.next(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[s.ccw(i)].point,o=a.t.vertices[s.cw(i)].point;s.orientation(e,t,o)===n.Sign.LEFT_TURN?r.push(a.t):l=!0}const c=this.tds.insertInFace(t);let u;c.point=e;while(o.length>0)u=o[0],i=s.ccw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),o.shift();while(r.length>0)u=r[0],i=s.cw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),r.shift();a=new n.FaceCirculator(c,null);while(!a.t.isInfinite())a.next();return this.tds._infinite.triangle=a.t,c}locate(e,t){let i=0,o=0;if(this.tds.dimension<0)return i=n.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(0===this.tds.dimension)return i=s.xyEqual(e,this.tds.finiteVertex.triangle.vertices[0].point)?n.LocateType.VERTEX:n.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(1===this.tds.dimension)return this.marchLocate1D(e);if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);return this.marchLocate2D(t,e)}marchLocate1D(e){const t=this.tds._infinite.triangle,i=t.indexV(this.tds._infinite),o=t.neighbours[i],r=s.orientation(o.vertices[0].point,o.vertices[1].point,e);if(r===n.Sign.RIGHT_TURN||r===n.Sign.LEFT_TURN)return{loc:new n.Triangle,lt:n.LocateType.OUTSIDE_AFFINE_HULL,li:4};const a=o.indexT(t);if(s.collinearBetween(e,o.vertices[1-a].point,o.vertices[a].point))return{loc:t,lt:n.LocateType.OUTSIDE_CONVEX_HULL,li:i};if(s.xyEqual(e,o.vertices[1-a].point))return{loc:o,lt:n.LocateType.VERTEX,li:1-a};throw new Error("sdfsdf")}marchLocate2D(e,t){let i,o,r=null,a=!0;while(1){if(e.isInfinite())return{loc:e,lt:n.LocateType.OUTSIDE_CONVEX_HULL,li:e.indexV(this.tds._infinite)};const l=0,c=e.vertices[0].point,u=e.vertices[1].point,d=e.vertices[2].point;let h,f,p;if(a){if(r=e,a=!1,h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}}else if(l)if(e.neighbours[0]===r){if(r=e,h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}if(p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}f=n.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}if(h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}p=n.Sign.POSITIVE}else{if(r=e,p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}if(f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}h=n.Sign.POSITIVE}else if(e.neighbours[0]===r){if(r=e,p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}if(h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}f=n.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}p=n.Sign.POSITIVE}else{if(r=e,f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}h=n.Sign.POSITIVE}const g=(h===n.Sign.COLLINEAR?1:0)+(f===n.Sign.COLLINEAR?1:0)+(p===n.Sign.COLLINEAR?1:0);switch(g){case 0:i=n.LocateType.FACE,o=4;break;case 1:i=n.LocateType.EDGE,o=h===n.Sign.COLLINEAR?2:f===n.Sign.COLLINEAR?0:1;break;case 2:i=n.LocateType.VERTEX,o=h!==n.Sign.COLLINEAR?2:f!==n.Sign.COLLINEAR?0:1;break}if(void 0===i||void 0===o)throw new Error("ert");return{loc:e,lt:i,li:o}}}iLocate(e,t){if(this.tds.dimension<2)return t;if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);let i=null,n=t,o=!0,r=2500;while(1){if(!r--)return n;if(n.isInfinite())return n;const t=n.vertices[0].point,a=n.vertices[1].point,l=n.vertices[2].point;if(o){if(i=n,o=!1,s.hasInexactNegativeOrientation(t,a,e)){n=n.neighbours[2];continue}if(s.hasInexactNegativeOrientation(a,l,e)){n=n.neighbours[0];continue}if(s.hasInexactNegativeOrientation(l,t,e)){n=n.neighbours[1];continue}}else if(n.neighbours[0]===i){if(i=n,s.hasInexactNegativeOrientation(t,a,e)){n=n.neighbours[2];continue}if(s.hasInexactNegativeOrientation(l,t,e)){n=n.neighbours[1];continue}}else if(n.neighbours[1]===i){if(i=n,s.hasInexactNegativeOrientation(t,a,e)){n=n.neighbours[2];continue}if(s.hasInexactNegativeOrientation(a,l,e)){n=n.neighbours[0];continue}}else{if(i=n,s.hasInexactNegativeOrientation(l,t,e)){n=n.neighbours[1];continue}if(s.hasInexactNegativeOrientation(a,l,e)){n=n.neighbours[0];continue}}break}return n}}t.CDT=o},"6f8d":function(e,t,i){"use strict";i.r(t);var n=i("5b69"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"6f92":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6c30"),o=i("f10f"),r=i("92b1");class a{constructor(){this.layers=[],this.width=window.innerWidth,this.height=window.innerHeight,this.UUIDMap=new Map,this.interval=30,this.drawLoop=(()=>{for(let e=this.layers.length-1;e>=0;e--)this.layers[e].draw();requestAnimationFrame(this.drawLoop)}),requestAnimationFrame(this.drawLoop)}reset(){this.layers=[],this.UUIDMap=new Map}setWidth(e){this.width=e;for(const t of this.layers)t.canvas.width=e,t.width=e}setHeight(e){this.height=e;for(const t of this.layers)t.canvas.height=e,t.height=e}addLayer(e){this.layers.push(e),(o.gameStore.IS_DM||e.playerEditable)&&e.selectable&&o.gameStore.addLayer(e.name)}hasLayer(e){return this.layers.some(t=>t.name===e)}getLayer(e){e=void 0===e?o.gameStore.selectedLayer:e;for(const t of this.layers)if(t.name===e)return t}selectLayer(e,t=!0){let i=!1;for(const n of this.layers)n.selectable&&(i&&"fow"!==n.name?n.ctx.globalAlpha=.3:n.ctx.globalAlpha=1,e===n.name&&(o.gameStore.selectLayer({name:e,sync:t}),i=!0),n.clearSelection(),n.invalidate(!0))}getGridLayer(){return this.getLayer("grid")}hasSelection(){const e=this.getSelection();return void 0!==e&&e.length>0}getSelection(){const e=this.getLayer();if(void 0!==e)return e.selection}invalidate(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].invalidate(!0)}invalidateLight(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].isVisionLayer&&this.layers[e].invalidate(!0)}dropAsset(e){const t=this.getLayer();if(void 0===t||null===e||null===e.dataTransfer)return;const i=document.createElement("img");i.src=e.dataTransfer.getData("text/plain");const a=new s.Asset(i,new n.GlobalPoint(r.l2gx(e.clientX),r.l2gy(e.clientY)),r.l2gz(i.width),r.l2gz(i.height));if(a.src=new URL(i.src).pathname,o.gameStore.useGrid){const e=o.gameStore.gridSize;a.refPoint=new n.GlobalPoint(Math.round(a.refPoint.x/e)*e,Math.round(a.refPoint.y/e)*e),a.w=Math.max(Math.round(a.w/e)*e,e),a.h=Math.max(Math.round(a.h/e)*e,e)}t.addShape(a,!0)}}t.layerManager=new a,window.lm=t.layerManager},7018:function(e,t,i){"use strict";i.r(t);var n=i("ebb9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},7019:function(e,t,i){},7420:function(e,t,i){"use strict";i.r(t);var n=i("d320"),s=i("778b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("c969");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"73816298",null);a.options.__file="createtoken_modal.vue",t["default"]=a.exports},"76b3":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this.children=[],this.nPrimitives=e,this.bbox=t}}t.BoundingNode=n;class s extends n{constructor(e,t,i){super(t,i),this.firstPrimOffset=e}}t.LeafNode=s;class o extends n{constructor(e,t,i){super(0,t.bbox.union(i.bbox)),this.dimension=e,this.children.push(t),this.children.push(i)}}t.InteriorNode=o},"778b":function(e,t,i){"use strict";i.r(t);var n=i("5a81"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"77a6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("4a5b"),s=i("0bc6"),o=i("2b48"),r=i("af17"),a=i("8f0a"),l=i("6f92"),c=i("f10f"),u=i("2838");function d(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement);else if("Delete"===e.key||"Del"===e.key||"Backspace"===e.key){if(void 0===l.layerManager.getLayer)return void console.log("No active layer selected for delete operation");const e=l.layerManager.getLayer();for(let t=e.selection.length-1;t>=0;t--){const i=e.selection[t];n.getRef("tools").$refs.selectTool.selectionHelper.uuid!==i.uuid?(e.removeShape(i,!0,!1),r.EventBus.$emit("SelectionInfo.Shape.Set",null),r.EventBus.$emit("Initiative.Remove",i.uuid)):e.selection.splice(t,1)}}}function h(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)65===e.keyCode&&e.ctrlKey&&e.target.select();else if(e.keyCode>=37&&e.keyCode<=40){const t=Math.round(c.gameStore.gridSize);let i=t*(e.keyCode%2),r=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const t=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,r*=e.keyCode<=38?-1:1;let o=new a.Vector(i,r);if(!e.shiftKey||!c.gameStore.IS_DM)for(const e of t)n.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(o=u.calculateDelta(o,e));for(const e of t)n.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(e.refPoint=e.refPoint.add(o),s.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1}));c.gameStore.recalculateVision(),l.layerManager.getLayer().invalidate(!1)}else c.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),c.gameStore.increasePanY(r*(e.keyCode<=38?1:-1)),l.layerManager.invalidate(),o.sendClientOptions()}else if(68===e.keyCode){const e=l.layerManager.getLayer();e&&(e.clearSelection(),e.invalidate(!0))}}t.onKeyUp=d,t.onKeyDown=h},"78c7":function(e,t,i){"use strict";var n=i("9227"),s=i.n(n);s.a},7997:function(e,t,i){"use strict";var n=i("39a7"),s=i.n(n);s.a},"7aaa":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("033f")),r=n.__importDefault(i("7420")),a=n.__importDefault(i("59d8")),l=n.__importDefault(i("dec1")),c=n.__importDefault(i("4899")),u=n.__importDefault(i("c277")),d=i("6f92"),h=i("9cb7"),f=i("f10f"),p=i("d5df"),g=i("92b1"),v=i("5a5c"),m=n.__importDefault(i("65d9"));let y=class extends s.default{constructor(){super(...arguments),this.currentTool="Select",this.tools=["Select","Pan","Draw","Ruler","Map"],this.dmTools=["Map"]}get IS_DM(){return f.gameStore.IS_DM}get currentToolComponent(){return`${this.currentTool.toLowerCase()}-tool`}mousedown(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mousedown",e,t)}mouseup(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mouseup",e,t)}mousemove(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(0!==(4&e.buttons))t="Pan";else if((1&e.button)>1)return;this.$emit("mousemove",e,t);let i=!1;for(const n of f.gameStore.annotations)if(d.layerManager.UUIDMap.has(n)&&d.layerManager.hasLayer("draw")){const t=d.layerManager.UUIDMap.get(n);t.contains(g.l2g(v.getMouse(e)))&&(i=!0,h.gameManager.annotationManager.setActiveText(t.annotation))}!i&&h.gameManager.annotationManager.shown&&h.gameManager.annotationManager.setActiveText("")}mouseleave(e){0!==(1&e.buttons)&&this.$emit("mouseup",e,this.currentTool)}contextmenu(e){"CANVAS"===e.target.tagName&&2===e.button&&"CANVAS"===e.target.tagName&&this.$emit("contextmenu",e,this.currentTool)}};y=n.__decorate([m.default({components:{"select-tool":u.default,"pan-tool":c.default,"draw-tool":a.default,"ruler-tool":p.RulerTool,"map-tool":l.default,"shape-menu":o.default,"createtoken-dialog":r.default},watch:{currentTool(e,t){this.$emit("tools-select-change",e,t)}}})],y),t.default=y},"7ba5":function(e,t,i){"use strict";i.r(t);var n=i("fbdd"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"7e15":function(e,t,i){"use strict";i.r(t);var n=i("52a8"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"7f1e":function(e,t,i){"use strict";var n=i("fe11"),s=i.n(n);s.a},"831f":function(e,t,i){"use strict";var n=i("8d53"),s=i.n(n);s.a},"851c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d65f"));let a=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.question="",this.answer="",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}submit(){this.resolve(this.answer),this.close()}close(){this.reject(),this.visible=!1,this.question="",this.answer="",this.title=""}prompt(e,t){return this.question=e,this.title=t,this.visible=!0,this.$nextTick(()=>{this.$refs.answer.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=n.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},8577:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ul",[e._l(e.folders,function(t){return i("li",{key:t,staticClass:"folder",on:{click:function(t){return t.stopPropagation(),e.toggle(t)}}},[e._v("\n "+e._s(t)+"\n "),i("asset-node",{attrs:{asset:e.asset[t]}})],1)}),e._l(e.files,function(t){return i("li",{key:t.name,staticClass:"file draggable token",attrs:{draggable:"true"},on:{mouseover:function(i){e.showImage=t.hash},mouseout:function(t){e.showImage=null},dragstart:function(i){e.dragStart(i,"/static/assets/"+t.hash)}}},[e._v("\n "+e._s(t.name)+"\n "),e.showImage==t.hash?i("div",{staticClass:"preview"},[i("img",{staticClass:"asset-preview-image",attrs:{src:"/static/assets/"+t.hash}})]):e._e()])})],2)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"88af":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e._v(e._s(e.message))])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"8a30":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{attrs:{id:"toolselect"}},[i("ul",e._l(e.tools,function(t){return!e.dmTools.includes(t)||e.IS_DM?i("li",{key:t,ref:t+"-selector",refInFor:!0,class:{"tool-selected":e.currentTool===t},on:{click:function(i){e.currentTool=t}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])]):e._e()}))]),i("div",[[i("select-tool",{directives:[{name:"show",rawName:"v-show",value:"Select"===e.currentTool,expression:"currentTool === 'Select'"}],ref:"selectTool"}),i("pan-tool",{directives:[{name:"show",rawName:"v-show",value:"Pan"===e.currentTool,expression:"currentTool === 'Pan'"}]}),i("keep-alive",[i("draw-tool",{directives:[{name:"show",rawName:"v-show",value:"Draw"===e.currentTool,expression:"currentTool === 'Draw'"}]})],1),i("ruler-tool",{directives:[{name:"show",rawName:"v-show",value:"Ruler"===e.currentTool,expression:"currentTool === 'Ruler'"}]}),i("map-tool",{directives:[{name:"show",rawName:"v-show",value:"Map"===e.currentTool,expression:"currentTool === 'Map'"}]}),i("shape-menu",{ref:"shapecontext"}),i("createtoken-dialog",{ref:"createtokendialog"})]],2)])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"8cd4":function(e,t,i){"use strict";i.r(t);var n=i("9587"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"8d53":function(e,t,i){},"8db6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("92b1");class o{constructor(e,t,i){this.w=t,this.h=i,this.topLeft=e,this.topRight=new n.GlobalPoint(e.x+t,e.y),this.botRight=new n.GlobalPoint(e.x+t,e.y+i),this.botLeft=new n.GlobalPoint(e.x,e.y+i)}contains(e){return this.topLeft.x<=e.x&&this.topRight.x>=e.x&&this.topLeft.y<=e.y&&this.botLeft.y>=e.y}get points(){return 0===this.w||0===this.h?[[this.topLeft.x,this.topLeft.y]]:[[this.topLeft.x,this.topLeft.y],[this.botLeft.x,this.botLeft.y],[this.botRight.x,this.botRight.y],[this.topRight.x,this.topRight.y]]}offset(e){return new o(this.topLeft.add(e),this.w,this.h)}union(e){const t=Math.min(this.topLeft.x,e.topLeft.x),i=Math.max(this.topRight.x,e.topRight.x),s=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new o(new n.GlobalPoint(t,s),i-t,r-s)}getDiagCorner(e){return e?this.botRight:this.topLeft}intersectsWith(e){return!(e.topLeft.x>this.topRight.x||e.topRight.xthis.botLeft.y||e.botLeft.y=this.topRight.x||e.topRight.x<=this.topLeft.x||e.topLeft.y>=this.botLeft.y||e.botLeft.y<=this.topLeft.y)}intersectP(e,t,i){let n=t.x*(this.getDiagCorner(i[0]).x-e.origin.x),s=t.x*(this.getDiagCorner(!i[0]).x-e.origin.x);const o=t.y*(this.getDiagCorner(i[1]).y-e.origin.y),r=t.y*(this.getDiagCorner(!i[1]).y-e.origin.y);return n>r||o>s?{hit:!1,min:n,max:s}:(o>n&&(n=o),r0,min:n,max:s})}center(){return this.topLeft.add(new n.Vector(this.w/2,this.h/2))}getMaxExtent(){return this.w>this.h?0:1}visibleInCanvas(e){const t=!(s.g2lx(this.topLeft.x)>e.width||s.g2ly(this.topLeft.y)>e.height||s.g2lx(this.topRight.x)<0||s.g2ly(this.botRight.y)<0);return!!t}}t.BoundingRect=o},"8e60":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"formcontainer"}},[e.owned||e.joined?i("form",[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("Your sessions")]),i("div",{staticClass:"input"},[e._l(e.owned,function(t,n){return i("router-link",{key:"o-"+n,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[0]))])}),e._l(e.joined,function(t,n){return i("router-link",{key:"j-"+n,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[1])+"/"+e._s(t[0]))])})],2),0===e.owned.length?i("div",{staticClass:"input"},[e._v("No active sessions")]):e._e()])]):e._e(),e._m(0),i("form",{on:{submit:function(t){return t.preventDefault(),e.createRoom(t)}}},[i("fieldset",[e.owned||e.joined?i("div",{staticClass:"input"},[e._v("Create a new session")]):i("legend",{staticClass:"legend"},[e._v("Create a session")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newSessionName,expression:"newSessionName"}],attrs:{type:"text",name:"room_name",placeholder:"Session Name"},domProps:{value:e.newSessionName},on:{input:function(t){t.target.composing||(e.newSessionName=t.target.value)}}}),e._m(1)]),e._m(2)])]),i("div",{attrs:{id:"account-options"}},[i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Account Settings",to:"/account"}},[i("i",{staticClass:"fas fa-cog"})])],1),i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Logout",to:"/auth/logout"}},[i("i",{staticClass:"fas fa-sign-out-alt"})])],1)])])},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("h4",[i("span",[e._v("OR")])])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fab fa-d-and-d"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",title:"Create"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"8f0a":function(e,t,i){"use strict";function n(e,t){const i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getPointDistance=n;class s{constructor(e,t){this.x=e,this.y=t}static fromArray(e){return new s(e[0],e[1])}add(e){return new s(this.x+e.x,this.y+e.y)}subtract(e){return new a(this.x-e.x,this.y-e.y)}clone(){return new s(this.x,this.y)}get(e){return 0===e?this.x:this.y}asArray(){return[this.x,this.y]}}t.Point=s;class o extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}static fromArray(e){return new o(e[0],e[1])}}t.GlobalPoint=o;class r extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}t.LocalPoint=r;class a{constructor(e,t){this.x=e,this.y=t}dot(e){return this.x*e.x+this.y*e.y}inverse(){return new a(0===this.x?0:1/this.x,0===this.y?0:1/this.y)}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}normalize(){const e=this.length();return new a(this.x/e,this.y/e)}reverse(){return new a(-this.x,-this.y)}multiply(e){return new a(this.x*e,this.y*e)}angle(){return 180*Math.atan2(this.y,this.x)/Math.PI}}t.Vector=a;class l{constructor(e,t,i){this.direction=t,this.origin=e,void 0===i&&(i=1/0),this.tMax=i}static fromPoints(e,t){const i=new a(t.x-e.x,t.y-e.y);let n;return n=Math.abs(i.x)>.01?(t.x-e.x)/i.x:(t.y-e.y)/i.y,new l(e,i,n)}get(e){return new s(this.origin.x+e*this.direction.x,this.origin.y+e*this.direction.y)}getDistance(e,t){return Math.sqrt(Math.pow(t-e,2)*(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}getT(e,t){return e+Math.sqrt(Math.pow(t,2)/(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}}t.Ray=l},"91df":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("6f79"));i("fe80");const a=i("2ef0"),l=n.__importDefault(i("a535")),c=n.__importDefault(i("cec2")),u=n.__importDefault(i("f5fe")),d=n.__importDefault(i("19f9")),h=n.__importDefault(i("f551")),f=n.__importDefault(i("f086")),p=n.__importDefault(i("6100")),g=i("0bc6"),v=i("77a6"),m=i("bb17"),y=i("6f92"),b=i("f10f"),_=i("92b1"),S=i("8f0a");let w=class extends s.default{constructor(){super(...arguments),this.ready={manager:!1,tools:!1}}get IS_DM(){return b.gameStore.IS_DM}get layers(){return b.gameStore.layers}get selectedLayer(){return b.gameStore.selectedLayer}get zoomFactor(){return b.gameStore.zoomFactor}set zoomFactor(e){b.gameStore.updateZoom({newZoomValue:e,zoomLocation:_.l2g(new S.LocalPoint(window.innerWidth/2,window.innerHeight/2))})}mounted(){window.addEventListener("resize",()=>{y.layerManager.setWidth(window.innerWidth),y.layerManager.setHeight(window.innerHeight),y.layerManager.invalidate()}),window.addEventListener("wheel",a.throttle(m.scrollZoom)),window.addEventListener("keyup",v.onKeyUp),window.addEventListener("keydown",v.onKeyDown),window.addEventListener("selectstart",e=>{return e.preventDefault(),!1}),this.ready.manager=!0}mousedown(e){this.$refs.tools.mousedown(e)}mouseup(e){this.$refs.tools.mouseup(e)}mousemove(e){this.$refs.tools.mousemove(e)}mouseleave(e){this.$refs.tools.mouseleave(e)}contextmenu(e){this.$refs.tools.contextmenu(e)}selectLayer(e){y.layerManager.selectLayer(e)}drop(e){if(null!==e&&null!==e.dataTransfer)if(e.dataTransfer.files.length>0)this.$refs.confirm.open("Uploading files should be done through the asset manager.","Ok","").then(()=>{},()=>{});else{if(""===e.dataTransfer.getData("text/plain"))return;y.layerManager.dropAsset(e)}}};w=n.__decorate([o.default({components:{"tool-bar":p.default,"selection-info":f.default,"prompt-dialog":c.default,"confirm-dialog":l.default,"menu-bar":d.default,"initiative-dialog":u.default,"zoom-slider":r.default,"note-dialog":h.default},beforeRouteEnter(e,t,i){g.createConnection(e),i()},beforeRouteLeave(e,t,i){g.socket.disconnect(),i()}})],w),t.default=w},9227:function(e,t,i){},"92b1":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("f10f");function o(e){const t=s.gameStore.zoomFactor,i=s.gameStore.panX,o=s.gameStore.panY;return new n.LocalPoint((e.x+i)*t,(e.y+o)*t)}function r(e){return o(new n.GlobalPoint(e,0)).x}function a(e){return o(new n.GlobalPoint(0,e)).y}function l(e){return e*s.gameStore.zoomFactor}function c(e){return e/s.gameStore.unitSize*s.gameStore.gridSize}function u(e){return l(c(e))}function d(e){const t=s.gameStore.zoomFactor,i=s.gameStore.panX,o=s.gameStore.panY;return e instanceof n.LocalPoint?new n.GlobalPoint(e.x/t-i,e.y/t-o):new n.Ray(d(e.origin),e.direction.multiply(1/t),e.tMax)}function h(e){return d(new n.LocalPoint(e,0)).x}function f(e){return d(new n.LocalPoint(0,e)).y}function p(e){return e/s.gameStore.zoomFactor}function g(e){return p(c(e))}t.g2l=o,t.g2lx=r,t.g2ly=a,t.g2lz=l,t.getUnitDistance=c,t.g2lr=u,t.l2g=d,t.l2gx=h,t.l2gy=f,t.l2gz=p,t.l2gr=g,window.g2lx=r,window.g2ly=a},9587:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=i("2f62"),a=n.__importDefault(i("3b36")),l=n.__importDefault(i("0ddd")),c=i("4a5b"),u=i("0bc6"),d=i("6f92"),h=i("f10f");let f=class extends s.default{constructor(){super(...arguments),this.visible={settings:!1,locations:!1}}get useGrid(){return h.gameStore.useGrid}set useGrid(e){h.gameStore.setUseGrid({useGrid:e,sync:!0})}get fullFOW(){return h.gameStore.fullFOW}set fullFOW(e){h.gameStore.setFullFOW({fullFOW:e,sync:!0})}get fowOpacity(){return h.gameStore.fowOpacity}set fowOpacity(e){"number"===typeof e&&h.gameStore.setFOWOpacity({fowOpacity:e,sync:!0})}get fowLOS(){return h.gameStore.fowLOS}set fowLOS(e){h.gameStore.setLineOfSight({fowLOS:e,sync:!0})}get unitSize(){return h.gameStore.unitSize}set unitSize(e){"number"===typeof e&&h.gameStore.setUnitSize({unitSize:e,sync:!0})}get gridSize(){return h.gameStore.gridSize}set gridSize(e){"number"===typeof e&&h.gameStore.setGridSize({gridSize:e,sync:!0})}get gridColour(){return h.gameStore.gridColour}set gridColour(e){h.gameStore.setGridColour({colour:e,sync:!0})}get fowColour(){return h.gameStore.fowColour}set fowColour(e){h.gameStore.setFOWColour({colour:e,sync:!0})}get rulerColour(){return h.gameStore.rulerColour}set rulerColour(e){h.gameStore.setRulerColour({colour:e,sync:!0})}get visionRangeMin(){return h.gameStore.visionRangeMin}set visionRangeMin(e){"number"===typeof e&&h.gameStore.setVisionRangeMin({value:e,sync:!0})}get visionRangeMax(){return h.gameStore.visionRangeMax}set visionRangeMax(e){"number"===typeof e&&h.gameStore.setVisionRangeMax({value:e,sync:!0})}settingsClick(e){if(e.target.classList.contains("accordion")){e.target.classList.toggle("accordion-active");const t=e.target.nextElementSibling;null!==t&&(t.style.display=""===t.style.display?"block":"")}}changeLocation(e){u.socket.emit("Location.Change",e)}createLocation(){c.getRef("prompt").prompt("New location name:","Create new location").then(e=>{u.socket.emit("Location.New",e)},()=>{})}createNote(){const e={title:"New note",text:"",uuid:c.uuidv4()};h.gameStore.newNote({note:e,sync:!0}),this.openNote(e)}openNote(e){c.getRef("note").open(e)}changeVisionMode(e){const t=e.target.value.toLowerCase();"bvh"!==t&&"triangle"!==t||(h.gameStore.setVisionMode({mode:t,sync:!0}),h.gameStore.recalculateVision(),h.gameStore.recalculateMovement(),d.layerManager.invalidate())}};f=n.__decorate([o.default({components:{"color-picker":a.default,"asset-node":l.default},computed:Object.assign({},r.mapState("game",["invitationCode","IS_DM","locations","assets","notes"]))})],f),t.default=f},"979e":function(e,t,i){"use strict";i.r(t);var n=i("0634"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},9845:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.IS_DM?i("li",{on:{click:e.bringPlayers}},[e._v("Bring players")]):e._e(),i("li",{on:{click:e.createToken}},[e._v("Create basic token")]),i("li",{on:{click:e.showInitiative}},[e._v("Show initiative")])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"98ef":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("4aee");let s;var o,r;function a(){return[t.INFINITE,t.INFINITE]}t.INFINITE=-Infinity,function(e){e[e["NEGATIVE"]=-1]="NEGATIVE",e[e["ZERO"]=0]="ZERO",e[e["POSITIVE"]=1]="POSITIVE",e[e["RIGHT_TURN"]=-1]="RIGHT_TURN",e[e["LEFT_TURN"]=1]="LEFT_TURN",e[e["SMALLER"]=-1]="SMALLER",e[e["EQUAL"]=0]="EQUAL",e[e["LARGER"]=1]="LARGER",e[e["CLOCKWISE"]=-1]="CLOCKWISE",e[e["COUNTERCLOCKWISE"]=1]="COUNTERCLOCKWISE",e[e["COLLINEAR"]=0]="COLLINEAR",e[e["COPLANAR"]=0]="COPLANAR",e[e["DEGENERATE"]=0]="DEGENERATE",e[e["ON_NEGATIVE_SIDE"]=-1]="ON_NEGATIVE_SIDE",e[e["ON_ORIENTED_BOUNDARY"]=0]="ON_ORIENTED_BOUNDARY",e[e["ON_POSITIVE_SIDE"]=1]="ON_POSITIVE_SIDE"}(o=t.Sign||(t.Sign={})),function(e){e[e["UNDEFINED"]=-1]="UNDEFINED",e[e["VERTEX_VERTEX"]=0]="VERTEX_VERTEX",e[e["VERTEX_EDGE"]=1]="VERTEX_EDGE",e[e["EDGE_VERTEX"]=2]="EDGE_VERTEX",e[e["EDGE_EDGE"]=3]="EDGE_EDGE"}(r||(r={}));class l{constructor(...e){this.vertices=[],this.neighbours=[null,null,null],this.constraints=[!1,!1,!1],this.uid=l._counter++,this.vertices=e}from(e){return this.vertices=e.vertices.slice(0,e.vertices.length),this.neighbours=e.neighbours.slice(0,e.neighbours.length),this.constraints=e.constraints.slice(0,e.constraints.length),this}get dimension(){return this.vertices.length-1}addVertex(e){void 0===e&&console.log("UNDEFINED HIERE"),this.vertices.push(e),e.triangle=this}isConstrained(e){return this.constraints[e]}reorient(){this.vertices=[this.vertices[1],this.vertices[0],this.vertices[2]].slice(0,this.vertices.length),this.neighbours=[this.neighbours[1],this.neighbours[0],this.neighbours[2]],this.constraints=[this.constraints[1],this.constraints[0],this.constraints[2]]}indexV(e){return this.vertices.indexOf(e)}indexT(e){return this.neighbours.indexOf(e)}isInfinite(e){return void 0===e?this.vertices.includes(s):this.vertices[n.ccw(e)].infinite||this.vertices[n.cw(e)].infinite}contains(e){const t=-this.vertices[1].point[1]*this.vertices[2].point[0]+this.vertices[0].point[1]*(-this.vertices[1].point[0]+this.vertices[2].point[0])+this.vertices[0].point[0]*(this.vertices[1].point[1]-this.vertices[2].point[1])+this.vertices[1].point[0]*this.vertices[2].point[1],i=t<0?-1:1,n=(this.vertices[0].point[1]*this.vertices[2].point[0]-this.vertices[0].point[0]*this.vertices[2].point[1]+(this.vertices[2].point[1]-this.vertices[0].point[1])*e[0]+(this.vertices[0].point[0]-this.vertices[2].point[0])*e[1])*i;if(n<0)return!1;const s=(this.vertices[0].point[0]*this.vertices[1].point[1]-this.vertices[0].point[1]*this.vertices[1].point[0]+(this.vertices[0].point[1]-this.vertices[1].point[1])*e[0]+(this.vertices[1].point[0]-this.vertices[0].point[0])*e[1])*i;return s>0&&n+st!==e)}setAdjacency(e,t,i,n){e.neighbours[t]=i,i.neighbours[n]=e}get finiteVertex(){return this.vertices[1]}get infiniteVertex(){const e=new c(a());return e.infinite=!0,e}get finiteEdge(){if(this.dimension<1)throw new Error("aspo");const e=new d(this);while(e.valid)e.next();return e.collect()}insertDimUp(e=new c,t=!0){const i=this.createVertex();let n,s;switch(this.dimension++,this.dimension){case 0:n=this.triangles[0],s=new l(i),this.triangles.push(s),this.setAdjacency(n,0,s,0),i.triangle=s;break;case 1:case 2:{const o=[],r=this.triangles.slice(0,this.triangles.length);for(const t of r){const n=(new l).from(t);this.triangles.push(n),t.vertices[this.dimension]=i,n.vertices[this.dimension]=e,this.setAdjacency(t,this.dimension,n,this.dimension),t.vertices.includes(e)&&o.push(n)}for(const e of r){const t=e.neighbours[this.dimension];for(let i=0;ie.center.center().get(r)0){if(i=!0,n=e.tMax=d.min,s=d.max,0===o||t)break;r=a[--o]}else c[u.dimension]?(a[o++]=r+1,r=u.secondChildOffset):(a[o++]=u.secondChildOffset,r++);else{if(0===o)break;r=a[--o]}}return{hit:i,intersect:e.get(n),tMin:n,tMax:s}}compact(){this.offset=0,null!==this.root&&this.flatten(this.root)}flatten(e){const t=this.offset,i=this.offset++;if(0===e.nPrimitives){this.flatten(e.children[0]);const i=this.flatten(e.children[1]);this.nodes[t]={bbox:e.bbox,dimension:e.dimension,nPrimitives:0,secondChildOffset:i}}else this.nodes[t]={bbox:e.bbox,primitivesOffset:e.firstPrimOffset,nPrimitives:e.nPrimitives};return i}createLeaf(e,t,i,n){const s=this.orderedPrims.length;for(let o=e;o1?i("li",[e._v("Layer\n "),i("ul",e._l(e.getLayers(),function(t){return i("li",{key:t.name,style:[e.getActiveLayer().name===t.name?{"background-color":"#82c8a0"}:{}],on:{click:function(i){e.setLayer(t.name)}}},[e._v(e._s(t.name))])}))]):e._e(),i("li",{on:{click:e.moveToBack}},[e._v("Move to back")]),i("li",{on:{click:e.moveToFront}},[e._v("Move to front")]),i("li",{on:{click:e.addInitiative}},[e._v(e._s(e.getInitiativeWord())+" initiative")]),i("li",{on:{click:e.openEditDialog}},[e._v("Show properties")])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},a21d:function(e,t,i){"use strict";var n=i("7019"),s=i.n(n);s.a},a260:function(e,t,i){},a450:function(e,t,i){},a474:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{constructor(){super(...arguments),this.owned=[],this.joined=[],this.error="",this.newSessionName=""}beforeRouteEnter(e,t,i){s.default.get("/api/rooms").then(e=>{i(t=>{t.owned=e.data.owned,t.joined=e.data.joined})}).catch(e=>{i(t=>{t.error=e.message})})}createRoom(e){s.default.post("/api/rooms",{name:this.newSessionName}).then(e=>{this.$router.push(`/game/${a.coreStore.username}/${this.newSessionName}`)}).catch(e=>{this.error=e.message})}};l=n.__decorate([r.default],l),t.default=l},a535:function(e,t,i){"use strict";i.r(t);var n=i("e06e"),s=i("f30c");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("223d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"1883e207",null);a.options.__file="confirm.vue",t["default"]=a.exports},a68b:function(e,t,i){"use strict";i.r(t);var n=i("308b"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},a755:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.left+"px",top:e.top+"px"},on:{close:e.close}},[i("li",{on:{click:e.rename}},[e._v("Rename")]),i("li",{on:{click:e.remove}},[e._v("Remove")])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},a7b3:function(e,t,i){"use strict";var n=i("6542"),s=i.n(n);s.a},aa69:function(e,t,i){"use strict";i.r(t);var n=i("0cf7"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},aaee:function(e,t,i){},abef:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Edit asset")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("label",{attrs:{for:"shapeselectiondialog-name"}},[e._v("Name")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.name,expression:"shape.name"}],staticStyle:{"grid-column":"numerator / end"},attrs:{type:"text",id:"shapeselectiondialog-name"},domProps:{value:e.shape.name},on:{change:function(t){e.updateShape(!1)},input:function(t){t.target.composing||e.$set(e.shape,"name",t.target.value)}}}),i("label",{attrs:{for:"shapeselectiondialog-istoken"}},[e._v("Is a token")]),i("input",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{type:"checkbox",id:"shapeselectiondialog-istoken"},domProps:{checked:e.shape.isToken},on:{click:e.setToken}}),i("label",{attrs:{for:"shapeselectiondialog-visionblocker"}},[e._v("Blocks vision/light")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.visionObstruction,expression:"shape.visionObstruction"}],staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{type:"checkbox",id:"shapeselectiondialog-visionblocker"},domProps:{checked:Array.isArray(e.shape.visionObstruction)?e._i(e.shape.visionObstruction,null)>-1:e.shape.visionObstruction},on:{change:[function(t){var i=e.shape.visionObstruction,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&e.$set(e.shape,"visionObstruction",i.concat([o])):r>-1&&e.$set(e.shape,"visionObstruction",i.slice(0,r).concat(i.slice(r+1)))}else e.$set(e.shape,"visionObstruction",s)},e.setVisionBlocker]}}),i("label",{attrs:{for:"shapeselectiondialog-moveblocker"}},[e._v("Blocks movement")]),i("input",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{type:"checkbox",id:"shapeselectiondialog-moveblocker"},domProps:{checked:e.shape.movementObstruction},on:{click:e.setMovementBlocker}}),i("label",{attrs:{for:"shapeselectiondialog-strokecolour"}},[e._v("Border colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{color:e.shape.strokeColour},on:{"update:color":function(t){e.$set(e.shape,"strokeColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("label",{attrs:{for:"shapeselectiondialog-fillcolour"}},[e._v("Fill colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{color:e.shape.fillColour},on:{"update:color":function(t){e.$set(e.shape,"fillColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("div",{staticClass:"spanrow header"},[e._v("Access")]),e._l(e.shape.owners,function(t){return[i("input",{key:t,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name"},domProps:{value:t},on:{change:function(i){e.updateOwner(i,t)}}}),""!==t?i("div",{key:"remove-"+t,staticStyle:{"grid-column-start":"remove"},on:{click:function(i){e.removeOwner(t)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Trackers")]),e._l(e.shape.trackers,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"tracker.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name"},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"tracker.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value"},domProps:{value:t.value},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.maxvalue,expression:"tracker.maxvalue",modifiers:{number:!0}}],key:"maxvalue-"+t.uuid,attrs:{type:"text",title:"Current value"},domProps:{value:t.maxvalue},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"maxvalue",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"sspan-"+t.uuid}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3},on:{click:function(i){t.visible=!t.visible,e.updateShape(!1)}}},[i("i",{staticClass:"fas fa-eye"})]),i("span",{key:"tspan-"+t.uuid}),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,on:{click:function(i){e.removeTracker(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Auras")]),e._l(e.shape.auras,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"aura.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name"},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"aura.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value"},domProps:{value:t.value},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.dim,expression:"aura.dim",modifiers:{number:!0}}],key:"dimvalue-"+t.uuid,attrs:{type:"text",title:"Dim value"},domProps:{value:t.dim},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"dim",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("color-picker",{key:"colour-"+t.uuid,attrs:{color:t.colour},on:{"update:color":function(i){e.$set(t,"colour",i)},input:function(i){e.updateAuraColour(t,i)},change:function(t){e.updateShape(!0)}}}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3},on:{click:function(i){t.visible=!t.visible,e.updateShape(!0)}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{key:"visionsource-"+t.uuid,style:{opacity:t.visionSource?1:.3},on:{click:function(i){e.updateAuraVisionSource(t)}}},[i("i",{staticClass:"fas fa-lightbulb"})]),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,on:{click:function(i){e.removeAura(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Annotation")]),i("textarea",{staticClass:"spanrow",domProps:{value:e.shape.annotation},on:{change:e.updateAnnotation}})],2)])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},af17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026"));t.EventBus=new s.default},b0ac:function(e,t,i){"use strict";i.r(t);var n=i("a474"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},b0c0:function(e,t,i){},b2ed:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("c266"),s=i("f10f"),o=i("92b1"),r=i("5a5c");class a extends n.BaseRect{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.type="rect"}asDict(){return super.getBaseDict()}draw(e){super.draw(e),"fog"===this.fillColour?e.fillStyle=r.getFogColour():e.fillStyle=this.fillColour;const t=s.gameStore.zoomFactor,i=o.g2l(this.refPoint);e.fillRect(i.x,i.y,this.w*t,this.h*t),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.strokeStyle=this.strokeColour,e.lineWidth=5,e.strokeRect(i.x,i.y,this.w*t,this.h*t))}}t.Rect=a},b809:function(e,t,i){"use strict";i.r(t);var n=i("ca56"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},b906:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("bab4"),o=i("6f92"),r=i("d1ec"),a=i("f10f"),l=i("92b1"),c=i("cee3");class u extends s.Layer{constructor(){super(...arguments),this.isVisionLayer=!0}draw(){if(!this.valid){const t=this.ctx;if(!a.gameStore.fowLOS||r.Settings.skipPlayerFOW)return t.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);t.clearRect(0,0,this.canvas.width,this.canvas.height);const i=o.layerManager.getLayer("draw").ctx;i.clearRect(0,0,window.innerWidth,window.innerHeight);const s=t.globalCompositeOperation;t.fillStyle="rgba(0, 0, 0, 1)",a.gameStore.IS_DM||super.draw(!a.gameStore.fullFOW);const u=t.canvas.width+t.canvas.height;for(const d of a.gameStore.ownedtokens){const i=o.layerManager.UUIDMap.get(d);if(void 0===i)continue;const s=i.center(),h=l.g2l(s);if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const o=Math.cos(i),r=Math.sin(i),c=new n.Ray(s,new n.Vector(o,r)),d=a.gameStore.BV.intersect(c);d.hit?(-1!==e&&(t.arc(h.x,h.y,u,e,i),e=-1),t.lineTo(l.g2lx(d.intersect.x),l.g2ly(d.intersect.y))):-1===e&&(t.lineTo(h.x+u*o,h.y+u*r),e=i)}-1!==e?t.arc(h.x,h.y,u,e,2*Math.PI):t.closePath(),t.fill()}else{{const e=t.createRadialGradient(h.x,h.y,l.g2lr(a.gameStore.visionRangeMin),h.x,h.y,l.g2lr(a.gameStore.visionRangeMax));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=e}try{const n=c.computeVisibility(i.center(),"vision");t.beginPath(),t.moveTo(l.g2lx(n[0][0]),l.g2ly(n[0][1]));for(const e of n)t.lineTo(l.g2lx(e[0]),l.g2ly(e[1]));t.closePath(),t.fill()}catch(e){}}}a.gameStore.IS_DM&&super.draw(!a.gameStore.fullFOW),t.globalCompositeOperation=s}}}t.FOWPlayersLayer=u},bab4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("af17"),o=i("6f92"),r=i("206a"),a=i("f10f"),l=i("92b1");class c{constructor(e,t){this.selectable=!1,this.playerEditable=!1,this.isVisionLayer=!1,this.valid=!1,this.shapes=[],this.selection=[],this.selectionColor="#CC0000",this.selectionWidth=2,this.canvas=e,this.name=t,this.width=e.width,this.height=e.height,this.ctx=e.getContext("2d")}invalidate(e){this.valid=!1,e||o.layerManager.invalidateLight()}addShape(e,t,i,s=!0){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(s),e.setMovementBlock(e.movementObstruction,s),e.ownedBy(a.gameStore.username)&&e.isToken&&a.gameStore.ownedtokens.push(e.uuid),e.annotation.length&&a.gameStore.annotations.push(e.uuid),t&&n.socket.emit("Shape.Add",{shape:e.asDict(),temporary:i}),s&&this.invalidate(!t)}setShapes(e){for(const t of e){const e=r.createShapeFromDict(t);if(void 0===e)return void console.log(`Shape with unknown type ${t.type_} could not be added`);this.addShape(e,!1,!1,!1)}this.clearSelection(),this.invalidate(!1)}removeShape(e,t,i){void 0===i&&(i=!1),this.shapes.splice(this.shapes.indexOf(e),1),t&&n.socket.emit("Shape.Remove",{shape:e,temporary:i});const s=a.gameStore.visionSources.findIndex(t=>t.shape===e.uuid),r=a.gameStore.visionBlockers.findIndex(t=>t===e.uuid),l=a.gameStore.movementblockers.findIndex(t=>t===e.uuid),c=a.gameStore.annotations.findIndex(t=>t===e.uuid);s>=0&&a.gameStore.visionSources.splice(s,1),r>=0&&a.gameStore.visionBlockers.splice(r,1),l>=0&&a.gameStore.movementblockers.splice(l,1),c>=0&&a.gameStore.annotations.splice(c,1);const u=a.gameStore.annotations.indexOf(e.uuid);u>=0&&a.gameStore.annotations.splice(u,1);const d=a.gameStore.ownedtokens.indexOf(e.uuid);d>=0&&a.gameStore.ownedtokens.splice(d,1),o.layerManager.UUIDMap.delete(e.uuid);const h=this.selection.indexOf(e);h>=0&&this.selection.splice(h,1),r>=0&&a.gameStore.recalculateVision(),l>=0&&a.gameStore.recalculateMovement(),this.invalidate(!t)}clear(){this.ctx.clearRect(0,0,this.width,this.height)}clearSelection(){this.selection=[],s.EventBus.$emit("SelectionInfo.Shape.Set",null)}draw(e){if(!this.valid){const t=this.ctx,i=t.globalCompositeOperation;e=void 0===e||e,e&&this.clear();const n=this;if(this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(n.canvas)&&("fow"===n.name&&e.visionObstruction&&o.layerManager.getLayer().name!==n.name||e.drawAuras(t))}),this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(n.canvas)&&("fow"===n.name&&e.visionObstruction&&o.layerManager.getLayer().name!==n.name||e.draw(t))}),null!=this.selection){t.fillStyle=this.selectionColor,t.strokeStyle=this.selectionColor,t.lineWidth=this.selectionWidth;const e=a.gameStore.zoomFactor;this.selection.forEach(i=>{t.globalCompositeOperation=i.globalCompositeOperation;const n=i.getBoundingBox();t.strokeRect(l.g2lx(n.topLeft.x),l.g2ly(n.topLeft.y),n.w*e,n.h*e);for(const e of i.points)t.beginPath(),t.arc(l.g2lx(e[0]),l.g2ly(e[1]),3,0,2*Math.PI),t.fill();t.beginPath(),t.moveTo(l.g2lx(i.points[0][0]),l.g2ly(i.points[0][1]));for(let e=1;e<=i.points.length;e++){const n=i.points[e%i.points.length];t.lineTo(l.g2lx(n[0]),l.g2ly(n[1]))}t.stroke()})}t.globalCompositeOperation=i,this.valid=!0}}moveShapeOrder(e,t,i){const s=this.shapes.indexOf(e);s!==t&&(this.shapes.splice(s,1),this.shapes.splice(t,0,e),i&&n.socket.emit("Shape.Order.Set",{shape:e.asDict(),index:t}),this.invalidate(!0))}}t.Layer=c},bb17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("f10f"),s=i("92b1"),o=i("5a5c");function r(e){if(!e.target||!e.target.tagName||"CANVAS"!==e.target.tagName)return;let t;t=-1*Math.sign(e.deltaY),n.gameStore.updateZoom({newZoomValue:n.gameStore.zoomFactor+.1*t,zoomLocation:s.l2g(o.getMouse(e))})}t.scrollZoom=r},befe:function(e,t,i){"use strict";var n=i("e0ac"),s=i.n(n);s.a},bf44:function(e,t,i){},c242:function(e,t,i){"use strict";var n=i("bf44"),s=i.n(n);s.a},c266:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1");class c extends o.Shape{constructor(e,t,i,n,s,o){super(e,n,s,o),this.w=t,this.h=i}getBaseDict(){return Object.assign(super.getBaseDict(),{width:this.w,height:this.h})}getBoundingBox(){return new s.BoundingRect(this.refPoint,this.w,this.h)}get points(){if(0===this.w||0===this.h)return[[this.refPoint.x,this.refPoint.y]];const e=this.refPoint.add(new n.Vector(0,this.h)),t=this.refPoint.add(new n.Vector(this.w,this.h)),i=this.refPoint.add(new n.Vector(this.w,0));return[[this.refPoint.x,this.refPoint.y],[e.x,e.y],[t.x,t.y],[i.x,i.y]]}contains(e){return this.refPoint.x<=e.x&&this.refPoint.x+this.w>=e.x&&this.refPoint.y<=e.y&&this.refPoint.y+this.h>=e.y}center(e){if(void 0===e)return this.refPoint.add(new n.Vector(this.w/2,this.h/2));this.refPoint=new n.GlobalPoint(e.x-this.w/2,e.y-this.h/2)}visibleInCanvas(e){if(super.visibleInCanvas(e))return!0;const t=!(l.g2lx(this.refPoint.x)>e.width||l.g2ly(this.refPoint.y)>e.height||l.g2lx(this.refPoint.x+this.w)<0||l.g2ly(this.refPoint.y+this.h)<0);return!!t}snapToGrid(){const e=r.gameStore.gridSize,t=this.center(),i=t.x,s=t.y;let o,l;o=this.w/e%2===0?Math.round(i/e)*e-this.w/2:(Math.round((i+e/2)/e)-.5)*e-this.w/2,l=this.h/e%2===0?Math.round(s/e)*e-this.h/2:(Math.round((s+e/2)/e)-.5)*e-this.h/2;const c=a.calculateDelta(new n.Vector(o-this.refPoint.x,l-this.refPoint.y),this);this.refPoint=this.refPoint.add(c),this.invalidate(!1)}resizeToGrid(){const e=r.gameStore.gridSize;this.refPoint=new n.GlobalPoint(Math.round(this.refPoint.x/e)*e,Math.round(this.refPoint.y/e)*e),this.w=Math.max(Math.round(this.w/e)*e,e),this.h=Math.max(Math.round(this.h/e)*e,e),this.invalidate(!1)}resize(e,t){const i=r.gameStore.zoomFactor;switch(e){case 0:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=l.l2g(t);break;case 1:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint=new n.GlobalPoint(l.l2gx(t.x),this.refPoint.y);break;case 2:this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y);break;case 3:this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=new n.GlobalPoint(this.refPoint.x,l.l2gy(t.y));break}this.w/=i,this.h/=i,this.w<0&&(this.refPoint=this.refPoint.add(new n.Vector(this.w,0)),this.w=Math.abs(this.w)),this.h<0&&(this.refPoint=this.refPoint.add(new n.Vector(0,this.h)),this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var n=i("1f71"),s=i("e27a");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="select.vue",t["default"]=a.exports},c6b4:function(e,t,i){"use strict";i.r(t);var n=i("8e60"),s=i("b0ac");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("d767");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"61eb1455",null);a.options.__file="main.vue",t["default"]=a.exports},c6fe:function(e,t,i){},c969:function(e,t,i){"use strict";var n=i("3a20"),s=i.n(n);s.a},c9a2:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"AssetManager"}},[i("div",{attrs:{id:"titlebar"}},[e._v("Asset Manager")]),i("div",{attrs:{id:"main"}},[i("div",{attrs:{id:"assets"},on:{dragover:function(t){return t.preventDefault(),e.moveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.currentFolder)}}},[i("div",{attrs:{id:"breadcrumbs"}},[i("div",[e._v("/")]),e._l(e.path,function(t){return i("div",{key:t},[e._v(e._s(e.idMap.get(t).name))])})],2),i("div",{attrs:{id:"actionbar"}},[i("input",{attrs:{id:"files",type:"file",multiple:"",hidden:""},on:{change:function(t){e.upload()}}}),i("div",{attrs:{title:"Create folder"},on:{click:e.createDirectory}},[i("i",{staticClass:"fas fa-plus-square"})]),i("div",{attrs:{title:"Upload files"},on:{click:e.prepareUpload}},[i("i",{staticClass:"fas fa-upload"})])]),i("div",{attrs:{id:"explorer"}},[e.path.length?i("div",{staticClass:"inode folder",on:{dblclick:function(t){e.changeDirectory(-1)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.parentFolder)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v("..")])]):e._e(),e._l(e.folders,function(t){return i("div",{key:t,staticClass:"inode folder",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},dblclick:function(i){e.changeDirectory(t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(i){i.preventDefault(),i.stopPropagation(),e.stopDrag(i,t)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])}),e._l(e.files,function(t){return i("div",{key:t,staticClass:"inode file",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)}}},[i("img",{attrs:{src:"/static/assets/"+e.idMap.get(t).file_hash,width:"50"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])})],2)]),e.firstSelectedFile?i("div",{attrs:{id:"asset-details"}},[i("div",{attrs:{id:"asset-detail-title"}},[e._v(e._s(e.firstSelectedFile.name))]),i("img",{attrs:{src:"/static/assets/"+e.firstSelectedFile.file_hash}})]):e._e()]),i("AssetContextMenu",{ref:"cm"}),i("Prompt",{ref:"prompt"}),i("ConfirmDialog",{ref:"confirm"})],1)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},ca56:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("1c76")),a=i("0bc6"),l=i("af17"),c=i("f10f"),u=i("92b1");let d=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.x=0,this.y=0}get IS_DM(){return c.gameStore.IS_DM}open(e){this.visible=!0,this.x=e.pageX,this.y=e.pageY,this.$nextTick(()=>this.$children[0].$el.focus())}close(){this.visible=!1}bringPlayers(){c.gameStore.IS_DM&&(a.socket.emit("Players.Bring",{x:u.l2gx(this.x),y:u.l2gy(this.y)}),this.close())}createToken(){this.$parent.$parent.$refs.createtokendialog.open(this.x,this.y),this.close()}showInitiative(){l.EventBus.$emit("Initiative.Show"),this.close()}};d=n.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},cad7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{beforeRouteEnter(e,t,i){s.default.post("/api/logout").then(()=>{a.coreStore.setAuthenticated(!1),a.coreStore.setUsername(""),i({path:"/auth/login"})})}};l=n.__decorate([r.default({})],l),t.default=l},cc67:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=i("6fc5"),o=i("3a0b");let r=class extends s.VuexModule{constructor(){super(...arguments),this.authenticated=!1,this.initialized=!1,this.username=""}setAuthenticated(e){this.authenticated=e}setInitialized(e){this.initialized=e}setUsername(e){this.username=e}};n.__decorate([s.Mutation],r.prototype,"setAuthenticated",null),n.__decorate([s.Mutation],r.prototype,"setInitialized",null),n.__decorate([s.Mutation],r.prototype,"setUsername",null),r=n.__decorate([s.Module({dynamic:!0,store:o.rootStore,name:"core"})],r),t.coreStore=s.getModule(r)},cd49:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("3dfd")),r=i("5f86"),a=i("3a0b");s.default.config.productionTip=!1,s.default.config.devtools=!0,s.default.config.performance=!0,t.app=new s.default({router:r.router,store:a.rootStore,render:e=>e(o.default)}).$mount("#app"),window.app=t.app},cde6:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9"));let r=class extends s.default{};r=n.__decorate([o.default({props:["visible","left","top"]})],r),t.default=r},ce87:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9"));let a=class extends o.default{beforeRouteEnter(e,t,i){s.default.post("/api/invite",{code:e.params.code}).then(e=>{i({path:e.data.sessionUrl})}).catch(e=>{console.error("Invitation code could not be redeemed"),i({path:"/dashboard"})})}};a=n.__decorate([r.default({template:""})],a),t.default=a},cec2:function(e,t,i){"use strict";i.r(t);var n=i("eb57"),s=i("255e");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("0584");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"0602c2e6",null);a.options.__file="prompt.vue",t["default"]=a.exports},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("f10f"),s=i("1216"),o=i("d6be"),r=i("98ef"),a=i("4aee");function l(e,t,i){void 0===i&&(i=n.gameStore.drawTEContour);const r=[e.x,e.y],a=[],l=o.PA_CDT[t].locate(r,null).loc;return null===l?(console.error("Triangle not found"),[]):(a.push(l.vertices[1].point),l.isConstrained(0)||c(r,l.vertices[2].point,l.vertices[1].point,l,0,a),a.push(l.vertices[2].point),l.isConstrained(1)||c(r,l.vertices[0].point,l.vertices[2].point,l,1,a),a.push(l.vertices[0].point),l.isConstrained(2)||c(r,l.vertices[1].point,l.vertices[0].point,l,2,a),i&&s.drawPolygon(a,"red"),a)}function c(e,t,i,n,s,o){const l=n.neighbours[s],d=l.indexT(n),h=a.ccw(d),f=a.cw(d),p=l.vertices[d],g=l.vertices[f],v=l.vertices[h],m=[l,h],y=[l,f],b=a.orientation(e,i,p.point),_=a.orientation(e,t,p.point);if(b===r.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&o.push(u(e,i,p.point,g.point)),_===r.Sign.COUNTERCLOCKWISE&&o.push(u(e,t,p.point,g.point));else{if(_===r.Sign.COUNTERCLOCKWISE)return c(e,t,i,l,h,o);c(e,p.point,i,l,h,o)}if(b!==r.Sign.CLOCKWISE&&_!==r.Sign.COUNTERCLOCKWISE&&o.push(p.point),_===r.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===r.Sign.CLOCKWISE&&o.push(u(e,i,p.point,v.point)),void(t!==v.point&&o.push(u(e,t,p.point,v.point)))):b===r.Sign.CLOCKWISE?c(e,t,i,l,f,o):c(e,t,p.point,l,f,o)}function u(e,t,i,n){const s=(n[1]-i[1])*(t[0]-e[0])-(n[0]-i[0])*(t[1]-e[1]),o=((n[0]-i[0])*(e[1]-i[1])-(n[1]-i[1])*(e[0]-i[0]))/s,r=e[0]+o*(t[0]-e[0]),a=e[1]+o*(t[1]-e[1]);return[r,a]}t.computeVisibility=l},cf8f:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",[e._v("#X")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.xCount,expression:"xCount"}],attrs:{type:"text"},domProps:{value:e.xCount},on:{input:function(t){t.target.composing||(e.xCount=t.target.value)}}}),i("div",[e._v("#Y")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.yCount,expression:"yCount"}],attrs:{type:"text"},domProps:{value:e.yCount},on:{input:function(t){t.target.composing||(e.yCount=t.target.value)}}})]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d065:function(e,t,i){"use strict";i.r(t);var n=i("abef"),s=i("f8b3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("506b");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7c80ae3a",null);a.options.__file="edit_dialog.vue",t["default"]=a.exports},d1ec:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{}n.angleSteps=4,n.drawAngleLines=!1,n.drawFirstLightHit=!1,n.skipPlayerFOW=!1,n.skipLightFOW=!1,n.tempFill="fog",t.Settings=n},d30b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("cc67");let l=class extends o.default{constructor(){super(...arguments),this.username="",this.password="",this.error=""}login(){s.default.post("/api/login",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}register(){s.default.post("/api/register",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}focusin(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="0"}}focusout(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="1"}}};l=n.__decorate([r.default],l),t.default=l},d320:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v("Create basic token")])}}])},[i("div",{staticClass:"modal-body"},[i("label",{attrs:{for:"createtokendialog-text"}},[e._v("Text")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.text,expression:"text"}],attrs:{type:"text",id:"createtokendialog-name"},domProps:{value:e.text},on:{input:function(t){t.target.composing||(e.text=t.target.value)}}}),i("label",[e._v("Colours")]),i("div",{staticClass:"colours"},[i("span",[e._v("Fill:")]),i("color-picker",{attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("span",[e._v("Border:")]),i("color-picker",{attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("canvas",{ref:"canvas",attrs:{width:"100px",height:"100px"}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d323:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div")},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d445:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:"modal"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"mask",class:{"modal-mask":e.mask,"dialog-mask":!e.mask},on:{click:e.close,dragover:function(t){return t.preventDefault(),e.dragOver(t)}}},[i("div",{ref:"container",staticClass:"modal-container",on:{click:function(e){e.stopPropagation()}}},[e._t("header",null,{dragStart:e.dragStart,dragEnd:e.dragEnd}),e._t("default")],2)])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d588:function(e,t,i){"use strict";i.r(t);var n=i("91df"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},d5df:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("65d9")),o=n.__importDefault(i("ea6a")),r=i("0bc6"),a=i("8f0a"),l=i("6f92"),c=i("5e7c"),u=i("0180"),d=i("f10f"),h=i("92b1"),f=i("5a5c");let p=class extends o.default{constructor(){super(...arguments),this.name="Ruler",this.active=!1,this.startPoint=null,this.ruler=null,this.text=null}onMouseDown(e){const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=h.l2g(f.getMouse(e)),this.ruler=new c.Line(this.startPoint,this.startPoint,3,d.gameStore.rulerColour),this.text=new u.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.addOwner(d.gameStore.username),this.text.addOwner(d.gameStore.username),t.addShape(this.ruler,!0,!0),t.addShape(this.text,!0,!0)):console.log("No draw layer!")}onMouseMove(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=h.l2g(f.getMouse(e));this.ruler.endPoint=i,r.socket.emit("Shape.Update",{shape:this.ruler.asDict(),redraw:!0,temporary:!0});const n=Math.sign(i.x-this.startPoint.x)*Math.sign(i.y-this.startPoint.y),s=Math.abs(i.x-this.startPoint.x),o=Math.abs(i.y-this.startPoint.y),c=Math.round(Math.sqrt(Math.pow(s,2)+Math.pow(o,2))*d.gameStore.unitSize/d.gameStore.gridSize)+" ft",u=Math.atan2(n*o,s),p=Math.min(this.startPoint.x,i.x)+s/2,g=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint=new a.GlobalPoint(p,g),this.text.text=c,this.text.angle=u,r.socket.emit("Shape.Update",{shape:this.text.asDict(),redraw:!0,temporary:!0}),t.invalidate(!0)}onMouseUp(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!1,t.removeShape(this.ruler,!0,!0),t.removeShape(this.text,!0,!0),t.invalidate(!0),this.ruler=this.startPoint=this.text=null):console.log("No active layer!")}};p=n.__decorate([s.default],p),t.RulerTool=p},d65f:function(e,t,i){"use strict";i.r(t);var n=i("d445"),s=i("7e15");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("26a5");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"12ed61ba",null);a.options.__file="modal.vue",t["default"]=a.exports},d6be:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("6f92"),s=i("f10f"),o=i("6e4a");function r(e,i=!1){const r=new o.CDT;let a;a="vision"===e?s.gameStore.visionBlockers:s.gameStore.movementblockers;for(const t of a){const e=n.layerManager.UUIDMap.get(t);if(!i||e.visibleInCanvas(n.layerManager.getLayer().canvas))for(let t=0;t{this.shape=e,this.visible=!0})}beforeDestroy(){d.EventBus.$off()}updated(){this.addEmpty()}addEmpty(){""!==this.shape.owners[this.shape.owners.length-1]&&this.shape.addOwner(""),this.shape.trackers.length&&""===this.shape.trackers[this.shape.trackers.length-1].name&&0===this.shape.trackers[this.shape.trackers.length-1].value||this.shape.trackers.push({uuid:c.uuidv4(),name:"",value:0,maxvalue:0,visible:!1}),this.shape.auras.length&&""===this.shape.auras[this.shape.auras.length-1].name&&0===this.shape.auras[this.shape.auras.length-1].value||this.shape.auras.push({uuid:c.uuidv4(),name:"",value:0,dim:0,visionSource:!1,colour:"rgba(0,0,0,0)",visible:!1})}updateShape(e,t=!1){u.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:e,temporary:t}),e&&h.layerManager.invalidate(),this.addEmpty()}setToken(e){this.shape.setIsToken(e.target.checked),this.updateShape(!0)}setVisionBlocker(e){this.shape.checkVisionSources(),this.updateShape(!0)}setMovementBlocker(e){this.shape.setMovementBlock(e.target.checked),this.updateShape(!1)}updateAnnotation(e){const t=""!==this.shape.annotation;this.shape.annotation=e.target.value,""===this.shape.annotation||t?""===this.shape.annotation&&t&&(f.gameStore.annotations.splice(f.gameStore.annotations.findIndex(e=>e===this.shape.uuid)),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)):(f.gameStore.annotations.push(this.shape.uuid),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){this.shape.updateOwner(t,e.target.value),this.updateShape(f.gameStore.fowLOS)}removeOwner(e){this.shape.removeOwner(e),this.updateShape(f.gameStore.fowLOS)}removeTracker(e){this.shape.trackers=this.shape.trackers.filter(t=>t.uuid!==e),this.updateShape(!1)}removeAura(e){this.shape.auras=this.shape.auras.filter(t=>t.uuid!==e),this.shape.checkVisionSources(),this.updateShape(!0)}updateAuraVisionSource(e){e.visionSource=!e.visionSource;const t=f.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?f.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&f.gameStore.visionSources.splice(t,1),h.layerManager.invalidateLight(),this.updateShape(!0)}updateAuraColour(e,t){const i=h.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}};n.__decorate([r.Prop()],p.prototype,"shape",void 0),p=n.__decorate([o.default({components:{Modal:l.default,"color-picker":a.default}})],p),t.default=p},dbba:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"main"},on:{mouseleave:e.mouseleave}},[i("menu-bar"),i("div",{attrs:{id:"board"}},[e.ready.manager?[i("tool-bar",{ref:"tools"})]:e._e(),i("div",{attrs:{id:"layers"},on:{mousedown:e.mousedown,mouseup:e.mouseup,mousemove:e.mousemove,contextmenu:function(t){return t.preventDefault(),t.stopPropagation(),e.contextmenu(t)},dragover:function(e){e.preventDefault()},drop:e.drop}}),e.layers.length>1?i("div",{attrs:{id:"layerselect"}},[i("ul",e._l(e.layers,function(t){return i("li",{key:t.name,class:{"layer-selected":t===e.selectedLayer},on:{click:function(i){e.selectLayer(t)}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])])}))]):e._e()],2),i("selection-info",{ref:"selectionInfo"}),i("initiative-dialog",{ref:"initiative",attrs:{id:"initiativedialog"}}),i("note-dialog",{ref:"note"}),i("zoom-slider",{attrs:{id:"zoomer",height:6,width:200,min:.01,max:5,interval:.1,"dot-width":8,"dot-height":20,"tooltip-dir":"bottom",tooltip:"hover",formatter:e.zoomFactor.toFixed(1),"slider-style":{"border-radius":"15%"},"bg-style":{"background-color":"#fff","box-shadow":"0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)"},"process-style":{"background-color":"#fff"}},model:{value:e.zoomFactor,callback:function(t){e.zoomFactor=t},expression:"zoomFactor"}}),i("prompt-dialog",{ref:"prompt"}),i("confirm-dialog",{ref:"confirm"})],1)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},dc37:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d65f"));let a=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.yes="Yes",this.no="No",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}confirm(){this.resolve(!0),this.close()}deny(){this.resolve(!1),this.close()}close(){this.reject(),this.visible=!1,this.title=""}open(e,t="yes",i="no"){return this.yes=t,this.no=i,this.title=e,this.visible=!0,this.$nextTick(()=>{this.$refs.confirm.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=n.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},de21:function(e,t,i){},dec1:function(e,t,i){"use strict";i.r(t);var n=i("cf8f"),s=i("3481");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="map.vue",t["default"]=a.exports},e06e:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[i("button",{ref:"confirm",on:{click:e.confirm}},[e._v(e._s(e.yes))]),e.no?i("button",{on:{click:e.deny}},[e._v(e._s(e.no))]):e._e()])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},e0ac:function(e,t,i){},e0e9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("1c76")),a=i("5338"),l=i("2d5b"),c=i("4a5b");let u=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.left=0,this.top=0}open(e,t){l.assetStore.selected.includes(t)||c.getComponent().select(e,t),this.visible=!0,this.left=e.pageX,this.top=e.pageY,this.$nextTick(()=>{this.$children[0].$el.focus()})}close(){this.visible=!1}rename(){if(1!==l.assetStore.selected.length)return;const e=l.assetStore.idMap.get(l.assetStore.selected[0]);c.getRef("prompt").prompt("New name:",`Renaming ${e.name}`).then(t=>{a.socket.emit("Asset.Rename",{asset:e.id,name:t}),e.name=t,c.getComponent().$forceUpdate()},()=>{}),this.close()}remove(){0!==l.assetStore.selected.length&&(c.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{if(e){for(const e of l.assetStore.selected)a.socket.emit("Asset.Remove",e),l.assetStore.files.includes(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.clearSelected()}},()=>{}),this.close())}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e27a:function(e,t,i){"use strict";i.r(t);var n=i("2756"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},e4ea:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("92b1"),o=i("5a5c"),r=i("8db6"),a=i("2469");class l extends a.Shape{constructor(e,t=[],i,n,s){super(e,i,n,s),this.type="polygon",this._vertices=[],this._vertices=t}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._vertices=e.vertices.map(e=>new n.GlobalPoint(e.x,e.y))}get points(){return this.vertices.map(e=>[e.x,e.y])}draw(e){super.draw(e),e.lineCap="round",e.lineJoin="round","fog"===this.strokeColour?e.strokeStyle=o.getFogColour():2===this.vertices.length?e.strokeStyle=this.fillColour:e.strokeStyle=this.strokeColour,"fog"===this.fillColour?e.fillStyle=o.getFogColour():e.fillStyle=this.fillColour,e.lineWidth=s.g2lz(2),e.beginPath(),e.moveTo(s.g2lx(this.vertices[0].x),s.g2ly(this.vertices[0].y));for(let t=1;t<=this.vertices.length;t++){const i=this.vertices[t%this.vertices.length];e.lineTo(s.g2lx(i.x),s.g2ly(i.y))}e.fill(),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=s.l2g(t):this._vertices[e-1]=s.l2g(t)}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,s=this.refPoint.y;for(const n of this._vertices)n.xt&&(t=n.x),n.ys&&(s=n.y);return new r.BoundingRect(new n.GlobalPoint(e,i),t-e,s-i)}}t.Polygon=l},e5ca:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}]},[e._v("Mode")]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}],staticClass:"selectgroup"},e._l(e.modes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.modeSelect===t},on:{click:function(i){e.modeSelect=t}}},[e._v(e._s(t))])})),i("div",[e._v("Shape")]),i("div",{staticClass:"selectgroup"},e._l(e.shapes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.shapeSelect===t},on:{click:function(i){e.shapeSelect=t}}},[i("i",{staticClass:"fas",class:"fa-"+t})])})),i("div",[e._v("Colours")]),i("div",{staticClass:"selectgroup"},[i("color-picker",{staticClass:"option",attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("color-picker",{staticClass:"option",attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("div",{directives:[{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}]},[e._v("Brush size")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.brushSize,expression:"brushSize"},{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}],staticStyle:{"max-width":"100px"},attrs:{type:"text"},domProps:{value:e.brushSize},on:{input:function(t){t.target.composing||(e.brushSize=t.target.value)}}})]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},e756:function(e,t,i){},e914:function(e,t,i){"use strict";i.r(t);var n=i("c9a2"),s=i("aa69");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("78c7");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="manager.vue",t["default"]=a.exports},e94f:function(e,t,i){"use strict";i.r(t);var n=i("7aaa"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},ea6a:function(e,t,i){"use strict";i.r(t);var n=i("d323"),s=i("6465");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("12d3");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="tool.vue",t["default"]=a.exports},eb57:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[e._v("\n "+e._s(e.question)+"\n "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.answer,expression:"answer"}],ref:"answer",attrs:{type:"text"},domProps:{value:e.answer},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.submit(t):null},input:function(t){t.target.composing||(e.answer=t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},ebb9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("1516"));s.default.component("draggable",r.default);const a=n.__importDefault(i("d65f")),l=i("4a5b"),c=i("0bc6"),u=i("af17"),d=i("6f92"),h=i("f10f");let f=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.data=[],this.currentActor=null,this.roundCounter=0}mounted(){u.EventBus.$on("Initiative.Clear",this.clear),u.EventBus.$on("Initiative.Remove",e=>this.removeInitiative(e)),u.EventBus.$on("Initiative.Show",()=>this.visible=!0),c.socket.on("Initiative.Set",e=>{this.data=e}),c.socket.on("Initiative.Turn.Update",e=>this.setTurn(e,!1)),c.socket.on("Initiative.Round.Update",e=>this.setRound(e,!1)),c.socket.on("Initiative.Effect.New",e=>{const t=this.getActor(e.actor);void 0!==t&&this.createEffect(t,e.effect,!1)}),c.socket.on("Initiative.Effect.Update",e=>this.updateEffect(e.actor,e.effect,!1))}beforeDestroy(){u.EventBus.$off()}clear(){this.data=[],this.currentActor=null}getActor(e){return this.data.find(t=>t.uuid===e)}contains(e){return this.data.some(t=>t.uuid===e)}owns(e){if(h.gameStore.IS_DM)return!0;const t=d.layerManager.UUIDMap.get(e.uuid);return void 0!==t&&t.owners.includes(h.gameStore.username)}getDefaultEffect(){return{uuid:l.uuidv4(),name:"New Effect",turns:10}}fakeSetData(e){e.setData("Hack","")}syncInitiative(e){c.socket.emit("Initiative.Update",e)}addInitiative(e){const t=this.data.findIndex(t=>t.uuid===e.uuid);t>=0||(void 0===e.initiative&&(e.initiative=0),this.syncInitiative(e))}removeInitiative(e){const t=this.data.findIndex(t=>t.uuid===e);if(t<0||this.data[t].group)return;this.syncInitiative({uuid:e});const i=d.layerManager.UUIDMap.get(e);void 0!==i&&i.showHighlight&&(i.showHighlight=!1,d.layerManager.getLayer(i.layer).invalidate(!0))}updateOrder(){h.gameStore.IS_DM&&c.socket.emit("Initiative.Set",this.data.map(e=>e.uuid))}setTurn(e,t){if(!h.gameStore.IS_DM&&t)return;this.currentActor=e;const i=this.data.find(t=>t.uuid===e);if(void 0!==i){if(i.effects)for(let e=i.effects.length-1;e>=0;e--)i.effects[e].turns<=0?i.effects.splice(e,1):i.effects[e].turns--;t&&c.socket.emit("Initiative.Turn.Update",e)}}setRound(e,t){!h.gameStore.IS_DM&&t||(this.roundCounter=e,t&&c.socket.emit("Initiative.Round.Update",e))}nextTurn(){if(!h.gameStore.IS_DM)return;const e=this.data,t=e[(e.findIndex(e=>e.uuid===this.currentActor)+1)%e.length];this.data[0].uuid===t.uuid&&this.setRound(this.roundCounter+1,!0),this.setTurn(t.uuid,!0)}toggleHighlight(e,t){const i=d.layerManager.UUIDMap.get(e.uuid);void 0!==i&&(i.showHighlight=t,d.layerManager.getLayer(i.layer).invalidate(!0))}toggleOption(e,t){this.owns(e)&&(e[t]=!e[t],this.syncInitiative(e))}createEffect(e,t,i){this.owns(e)&&(e.effects.push(t),i&&c.socket.emit("Initiative.Effect.New",{actor:e.uuid,effect:t}))}syncEffect(e,t){this.owns(e)&&c.socket.emit("Initiative.Effect.Update",{actor:e.uuid,effect:t})}updateEffect(e,t,i){const n=this.data.find(t=>t.uuid===e);if(void 0===n)return;const s=n.effects.findIndex(e=>e.uuid===t.uuid);void 0!==s&&(n.effects[s]=t,i?this.syncEffect(n,t):this.$forceUpdate())}};f=n.__decorate([o.default({components:{Modal:a.default,draggable:r.default}})],f),t.default=f},ee96:function(e,t,i){},f086:function(e,t,i){"use strict";i.r(t);var n=i("3427"),s=i("7ba5");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("831f");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"32cec914",null);a.options.__file="selection_info.vue",t["default"]=a.exports},f10f:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=i("6fc5"),o=i("0bc6"),r=i("2b48"),a=i("6f92"),l=i("92b1"),c=i("99e3"),u=i("3a0b"),d=i("d6be");let h=class extends s.VuexModule{constructor(){super(...arguments),this.layers=[],this.selectedLayerIndex=-1,this.boardInitialized=!1,this.locations=[],this.assets={},this.notes=[],this.IS_DM=!1,this.gridSize=50,this.username="",this.roomName="",this.roomCreator="",this.invitationCode="",this.gridColour="rgba(0, 0, 0, 1)",this.fowColour="rgba(0, 0, 0, 1)",this.rulerColour="rgba(255, 0, 0, 1)",this.panX=0,this.panY=0,this.zoomFactor=1,this.unitSize=5,this.useGrid=!0,this.fullFOW=!1,this.fowOpacity=.3,this.fowLOS=!1,this.locationName="",this.visionSources=[],this.visionBlockers=[],this.annotations=[],this.movementblockers=[],this.ownedtokens=[],this.BV=Object.freeze(new c.BoundingVolume([])),this.visionMode="bvh",this.drawTEContour=!1,this.visionRangeMin=1640,this.visionRangeMax=3281}get selectedLayer(){return this.layers[this.selectedLayerIndex]}setVisionMode(e){this.visionMode=e.mode,e.sync&&o.socket.emit("Location.Options.Set",{vision_mode:e.mode})}setBoardInitialized(e){this.boardInitialized=e}setDM(e){this.IS_DM=e}setUsername(e){this.username=e}setRoomName(e){this.roomName=e}setRoomCreator(e){this.roomCreator=e}setInvitationCode(e){this.invitationCode=e}addLayer(e){this.layers.push(e),-1===this.selectedLayerIndex&&(this.selectedLayerIndex=this.layers.indexOf(e))}selectLayer(e){const t=this.layers.indexOf(e.name);t>=0&&(this.selectedLayerIndex=t),e.sync&&o.socket.emit("Client.ActiveLayer.Set",e.name)}newNote(e){this.notes.push(e.note),e.sync&&o.socket.emit("Note.New",e.note)}setAssets(e){this.assets=e}setLocations(e){this.locations=e}resetLayerInfo(){this.layers=[],this.selectedLayerIndex=-1}recalculateVision(e=!1){this.boardInitialized&&("triangle"===this.visionMode?d.triangulate("vision",e):this.BV=Object.freeze(new c.BoundingVolume(this.visionBlockers)))}recalculateMovement(e=!1){this.boardInitialized&&"triangle"===this.visionMode&&d.triangulate("movement",e)}updateZoom(e){if(e.newZoomValue===this.zoomFactor)return;e.newZoomValue<.1&&(e.newZoomValue=.01),e.newZoomValue>5&&(e.newZoomValue=5);const t=l.g2l(e.zoomLocation);this.zoomFactor=e.newZoomValue;const i=l.l2g(t),n=i.subtract(e.zoomLocation);this.panX+=n.x,this.panY+=n.y,a.layerManager.invalidate(),r.sendClientOptions()}setGridColour(e){this.gridColour=e.colour,a.layerManager.getGridLayer().drawGrid(),e.sync&&o.socket.emit("Client.Options.Set",{gridColour:e.colour})}setFOWColour(e){this.fowColour=e.colour,a.layerManager.invalidate(),e.sync&&o.socket.emit("Client.Options.Set",{fowColour:e.colour})}setRulerColour(e){this.rulerColour=e.colour,e.sync&&o.socket.emit("Client.Options.Set",{rulerColour:e.colour})}setPanX(e){this.panX=e}setPanY(e){this.panY=e}setZoomFactor(e){this.zoomFactor=e}increasePanX(e){this.panX+=e}increasePanY(e){this.panY+=e}setUnitSize(e){this.unitSize!==e.unitSize&&e.unitSize>0&&e.unitSize<1/0&&(this.unitSize=e.unitSize,a.layerManager.invalidate(),e.sync&&o.socket.emit("Location.Options.Set",{unit_size:e.unitSize}))}setUseGrid(e){if(this.useGrid!==e.useGrid){this.useGrid=e.useGrid;const t=a.layerManager.getGridLayer();e.useGrid?t.canvas.style.display="block":t.canvas.style.display="none",e.sync&&o.socket.emit("Location.Options.Set",{use_grid:e.useGrid})}}setGridSize(e){if(this.gridSize!==e.gridSize&&e.gridSize>0){this.gridSize=e.gridSize;const t=a.layerManager.getGridLayer();void 0!==t&&t.drawGrid(),e.sync&&o.socket.emit("Gridsize.Set",e.gridSize)}}setVisionRangeMin(e){this.visionRangeMin=e.value,a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{vision_min_range:e.value})}setVisionRangeMax(e){this.visionRangeMax=Math.max(e.value,this.visionRangeMin),a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{vision_max_range:this.visionRangeMax})}setFullFOW(e){this.fullFOW!==e.fullFOW&&(this.fullFOW=e.fullFOW,a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{full_fow:e.fullFOW}))}setFOWOpacity(e){this.fowOpacity=e.fowOpacity,a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{fow_opacity:e.fowOpacity})}setLineOfSight(e){this.fowLOS!==e.fowLOS&&(this.fowLOS=e.fowLOS,a.layerManager.invalidate(),e.sync&&o.socket.emit("Location.Options.Set",{fow_los:e.fowLOS}))}setLocationName(e){this.locationName=e}updateNote(e){const t=this.notes.find(t=>t.uuid===e.note.uuid);void 0!==t&&(t.title=e.note.title,t.text=e.note.text,e.sync&&o.socket.emit("Note.Update",t))}removeNote(e){this.notes=this.notes.filter(t=>t.uuid!==e.note.uuid),e.sync&&o.socket.emit("Note.Remove",e.note.uuid)}clear(){this.context.state.visionSources=[],this.context.state.visionBlockers=[],this.context.state.ownedtokens=[],this.context.state.annotations=[],this.context.state.movementblockers=[],this.context.state.notes=[],this.context.commit("recalculateVision"),this.context.commit("recalculateMovement")}};n.__decorate([s.Mutation],h.prototype,"setVisionMode",null),n.__decorate([s.Mutation],h.prototype,"setBoardInitialized",null),n.__decorate([s.Mutation],h.prototype,"setDM",null),n.__decorate([s.Mutation],h.prototype,"setUsername",null),n.__decorate([s.Mutation],h.prototype,"setRoomName",null),n.__decorate([s.Mutation],h.prototype,"setRoomCreator",null),n.__decorate([s.Mutation],h.prototype,"setInvitationCode",null),n.__decorate([s.Mutation],h.prototype,"addLayer",null),n.__decorate([s.Mutation],h.prototype,"selectLayer",null),n.__decorate([s.Mutation],h.prototype,"newNote",null),n.__decorate([s.Mutation],h.prototype,"setAssets",null),n.__decorate([s.Mutation],h.prototype,"setLocations",null),n.__decorate([s.Mutation],h.prototype,"resetLayerInfo",null),n.__decorate([s.Mutation],h.prototype,"recalculateVision",null),n.__decorate([s.Mutation],h.prototype,"recalculateMovement",null),n.__decorate([s.Mutation],h.prototype,"updateZoom",null),n.__decorate([s.Mutation],h.prototype,"setGridColour",null),n.__decorate([s.Mutation],h.prototype,"setFOWColour",null),n.__decorate([s.Mutation],h.prototype,"setRulerColour",null),n.__decorate([s.Mutation],h.prototype,"setPanX",null),n.__decorate([s.Mutation],h.prototype,"setPanY",null),n.__decorate([s.Mutation],h.prototype,"setZoomFactor",null),n.__decorate([s.Mutation],h.prototype,"increasePanX",null),n.__decorate([s.Mutation],h.prototype,"increasePanY",null),n.__decorate([s.Mutation],h.prototype,"setUnitSize",null),n.__decorate([s.Mutation],h.prototype,"setUseGrid",null),n.__decorate([s.Mutation],h.prototype,"setGridSize",null),n.__decorate([s.Mutation],h.prototype,"setVisionRangeMin",null),n.__decorate([s.Mutation],h.prototype,"setVisionRangeMax",null),n.__decorate([s.Mutation],h.prototype,"setFullFOW",null),n.__decorate([s.Mutation],h.prototype,"setFOWOpacity",null),n.__decorate([s.Mutation],h.prototype,"setLineOfSight",null),n.__decorate([s.Mutation],h.prototype,"setLocationName",null),n.__decorate([s.Mutation],h.prototype,"updateNote",null),n.__decorate([s.Mutation],h.prototype,"removeNote",null),n.__decorate([s.Action],h.prototype,"clear",null),h=n.__decorate([s.Module({dynamic:!0,store:u.rootStore,name:"game",namespaced:!0})],h),t.gameStore=s.getModule(h)},f2d0:function(e,t,i){},f30c:function(e,t,i){"use strict";i.r(t);var n=i("dc37"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},f312:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aurasFromServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,visionSource:i.vision_source,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t}),t.aurasToServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,vision_source:i.visionSource,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t})},f51a:function(e,t,i){"use strict";i.r(t);var n=i("e0e9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},f551:function(e,t,i){"use strict";i.r(t);var n=i("2686"),s=i("1dd6");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("28b6");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7a3669fd",null);a.options.__file="note.vue",t["default"]=a.exports},f5fe:function(e,t,i){"use strict";i.r(t);var n=i("9d42"),s=i("7018");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("5b4c");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"ccaf03d6",null);a.options.__file="initiative.vue",t["default"]=a.exports},f692:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("4185"),s=i("b906"),o=i("38c9"),r=i("bab4"),a=i("6f92"),l=i("f10f");function c(e){const t=document.createElement("canvas");let i;t.style.zIndex=a.layerManager.layers.length.toString(),t.width=window.innerWidth,t.height=window.innerHeight,i="grid"===e.type_?new o.GridLayer(t,e.name):"fow"===e.type_?new n.FOWLayer(t,e.name):"fow-players"===e.type_?new s.FOWPlayersLayer(t,e.name):new r.Layer(t,e.name),i.selectable=e.selectable,i.playerEditable=e.player_editable,a.layerManager.addLayer(i);const c=document.getElementById("layers");null!==c?("fow-players"!==e.name&&c.appendChild(t),"grid"===e.type_&&e.size&&l.gameStore.setGridSize({gridSize:e.size,sync:!1}),i.setShapes(e.shapes)):console.warn("Layers div is missing, this will prevent the main game board from loading!")}t.createLayer=c},f8a4:function(e,t,i){},f8b3:function(e,t,i){"use strict";i.r(t);var n=i("d8ee"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},f994:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("form",{on:{focusin:e.focusin,focusout:e.focusout,submit:function(t){return t.preventDefault(),e.login(t)}}},[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("PlanarAlly")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],attrs:{type:"text",name:"username",placeholder:"Username",autocomplete:"username",required:""},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}}),e._m(0)]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",name:"password",placeholder:"Password",autocomplete:"current-password",required:""},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._m(1)]),i("div",{staticStyle:{display:"flex"}},[i("button",{staticStyle:{visibility:"hidden",display:"none"},attrs:{type:"submit",name:"login"}}),i("button",{staticClass:"submit",attrs:{type:"button",name:"register",title:"Register"},on:{click:e.register}},[i("i",{staticClass:"fas fa-plus"})]),e._m(2)])]),e.error?i("div",{staticClass:"feedback"},[i("p",{staticClass:"error"},[i("strong",[e._v("Error:")]),e._v("\n "+e._s(e.error)+"\n ")])]):e._e()])},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-user-circle"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-lock"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",name:"login",title:"Login"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},fbdd:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d065")),a=i("4a5b"),l=i("0bc6"),c=i("af17"),u=i("6f92");let d=class extends s.default{constructor(){super(...arguments),this.shape=null}mounted(){c.EventBus.$on("SelectionInfo.Shape.Set",e=>{this.shape=e})}beforeDestroy(){c.EventBus.$off()}openEditDialog(){this.$refs.editDialog.visible=!0}changeValue(e,t){null!==this.shape&&a.getRef("prompt").prompt(`New ${e.name} value:`,`Updating ${e.name}`).then(i=>{if(null===this.shape)return;const n=e.value;"+"===i[0]||"-"===i[0]?e.value+=parseInt(i,10):e.value=parseInt(i,10),isNaN(e.value)&&(e.value=n),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:t,temporary:!1}),t&&u.layerManager.invalidate()},()=>{})}};d=n.__decorate([o.default({components:{"edit-dialog":r.default}})],d),t.default=d},fe11:function(e,t,i){},fe80:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("af17"),o=i("8f0a"),r=i("6f92"),a=i("f692"),l=i("9cb7"),c=i("f10f"),u=i("5f86");n.socket.on("connect",()=>{console.log("Connected")}),n.socket.on("disconnect",()=>{console.log("Disconnected")}),n.socket.on("connect_error",e=>{console.error("Could not connect to game session."),u.router.push("/dashboard")}),n.socket.on("error",e=>{console.error("Game session does not exist."),u.router.push("/dashboard")}),n.socket.on("redirect",e=>{console.log("redirecting"),u.router.push(e)}),n.socket.on("Room.Info.Set",e=>{c.gameStore.setRoomName(e.name),c.gameStore.setRoomCreator(e.creator),c.gameStore.setInvitationCode(e.invitationCode)}),n.socket.on("Username.Set",e=>{c.gameStore.setUsername(e),c.gameStore.setDM(e===window.location.pathname.split("/")[2])}),n.socket.on("Client.Options.Set",e=>{c.gameStore.setGridColour({colour:e.grid_colour,sync:!1}),c.gameStore.setFOWColour({colour:e.fow_colour,sync:!1}),c.gameStore.setRulerColour({colour:e.ruler_colour,sync:!1}),c.gameStore.setPanX(e.pan_x),c.gameStore.setPanY(e.pan_y),c.gameStore.setZoomFactor(e.zoom_factor),e.active_layer&&r.layerManager.selectLayer(e.active_layer,!1),void 0!==r.layerManager.getGridLayer()&&r.layerManager.getGridLayer().invalidate()}),n.socket.on("Location.Set",e=>{void 0!==e.name&&c.gameStore.setLocationName(e.name),void 0!==e.unit_size&&c.gameStore.setUnitSize({unitSize:e.unit_size,sync:!1}),void 0!==e.use_grid&&c.gameStore.setUseGrid({useGrid:e.use_grid,sync:!1}),void 0!==e.full_fow&&c.gameStore.setFullFOW({fullFOW:e.full_fow,sync:!1}),void 0!==e.fow_opacity&&c.gameStore.setFOWOpacity({fowOpacity:e.fow_opacity,sync:!1}),void 0!==e.fow_los&&c.gameStore.setLineOfSight({fowLOS:e.fow_los,sync:!1}),void 0!==e.vision_min_range&&c.gameStore.setVisionRangeMin({value:e.vision_min_range,sync:!1}),void 0!==e.vision_max_range&&c.gameStore.setVisionRangeMax({value:e.vision_max_range,sync:!1}),void 0!==e.vision_mode&&(c.gameStore.setVisionMode({mode:e.vision_mode,sync:!1}),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement())}),n.socket.on("Position.Set",e=>{l.gameManager.setCenterPosition(new o.GlobalPoint(e.x,e.y))}),n.socket.on("Notes.Set",e=>{for(const t of e)c.gameStore.newNote({note:t,sync:!1})}),n.socket.on("Asset.List.Set",e=>{c.gameStore.setAssets(e)}),n.socket.on("Board.Set",e=>{c.gameStore.clear(),c.gameStore.setLocations(e.locations),document.getElementById("layers").innerHTML="",c.gameStore.resetLayerInfo(),r.layerManager.reset();for(const t of e.layers)a.createLayer(t);r.layerManager.selectLayer(r.layerManager.getLayer().name,!1),s.EventBus.$emit("Initiative.Clear"),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement(),c.gameStore.setBoardInitialized(!0)}),n.socket.on("Gridsize.Set",e=>{c.gameStore.setGridSize({gridSize:e,sync:!1})}),n.socket.on("Shape.Add",e=>{l.gameManager.addShape(e)}),n.socket.on("Shape.Remove",e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.getLayer(e.layer);t.removeShape(r.layerManager.UUIDMap.get(e.uuid),!1),t.invalidate(!1)}),n.socket.on("Shape.Order.Set",e=>{if(!r.layerManager.UUIDMap.has(e.shape.uuid))return void console.log("Attempted to move the shape order of an unknown shape");if(!r.layerManager.hasLayer(e.shape.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.shape.layer}`);const t=r.layerManager.UUIDMap.get(e.shape.uuid),i=r.layerManager.getLayer(t.layer);i.moveShapeOrder(t,e.index,!1)}),n.socket.on("Shape.Layer.Change",e=>{const t=r.layerManager.UUIDMap.get(e.uuid);void 0!==t&&t.moveLayer(e.layer,!1)}),n.socket.on("Shape.Update",e=>{l.gameManager.updateShape(e)}),n.socket.on("Temp.Clear",e=>{e.forEach(e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown temporary shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.UUIDMap.get(e.uuid);r.layerManager.getLayer(e.layer).removeShape(t,!1)})})}}); -//# sourceMappingURL=app-legacy.f228bc3b.js.map \ No newline at end of file diff --git a/server/static/js/app-legacy.f228bc3b.js.map b/server/static/js/app-legacy.f228bc3b.js.map deleted file mode 100644 index da78439e0..000000000 --- a/server/static/js/app-legacy.f228bc3b.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/game/shapes/text.ts","webpack:///./src/game/ui/selection/shapecontext.vue","webpack:///./src/App.vue?5b85","webpack:///./src/core/components/modals/prompt.vue?d33d","webpack:///./src/core/components/colorpicker.vue?4d88","webpack:///./src/game/game.vue","webpack:///./src/game/api/socket.ts","webpack:///./src/assetManager/manager.vue?5633","webpack:///./src/game/ui/menu/asset_node.vue","webpack:///./src/game/ui/tools/selectcontext.vue?02dc","webpack:///./src/auth/login.vue","webpack:///./src/game/visibility/te/draw.ts","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/game/ui/annotation.ts","webpack:///./src/core/components/colorpicker.vue?8070","webpack:///./src/game/ui/menu/menu.vue","webpack:///./src/core/components/contextmenu.vue","webpack:///./src/game/ui/note.vue?49b7","webpack:///./src/auth/login.vue?c159","webpack:///./src/game/ui/tools/select.vue?9b60","webpack:///./src/game/ui/tools/select.vue?1885","webpack:///./src/game/shapes/utils.ts","webpack:///./src/core/components/modals/confirm.vue?e6fb","webpack:///./src/game/shapes/shape.ts","webpack:///./src/core/components/modals/prompt.vue?d457","webpack:///./src/game/ui/note.vue?a34d","webpack:///./src/game/ui/note.vue?23aa","webpack:///./src/core/components/modals/modal.vue?33b9","webpack:///./src/game/ui/tools/select.vue?49f9","webpack:///./src/game/ui/tools/utils.ts","webpack:///./src/game/ui/note.vue?a508","webpack:///./src/game/api/utils.ts","webpack:///./src/game/ui/menu/asset_node.vue?f519","webpack:///./src/core/components/contextmenu.vue?f03a","webpack:///./src/core/components/contextmenu.vue?7efa","webpack:///./src/assetManager/store.ts","webpack:///./src/core/components/contextmenu.vue?50e1","webpack:///./src/game/ui/selection/shapecontext.vue?1cf6","webpack:///./src/game/ui/selection/selection_info.vue?321c","webpack:///./src/game/ui/selection/selection_info.vue?8aba","webpack:///./src/game/ui/tools/map.vue?284a","webpack:///./src/game/layers/grid.ts","webpack:///./src/store.ts","webpack:///./src/core/components/colorpicker.vue","webpack:///./src/auth/login.vue?3521","webpack:///./src/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","webpack:///./src/game/ui/menu/menu.vue?002b","webpack:///./src/game/ui/menu/menu.vue?9e9a","webpack:///./src/game/shapes/circle.ts","webpack:///./src/game/ui/tools/map.vue?a3ab","webpack:///./src/core/components/load.vue","webpack:///./src/game/ui/tools/pan.ts","webpack:///./src/game/ui/tools/selectcontext.vue","webpack:///./src/core/utils.ts","webpack:///./src/assetManager/contextMenu.vue","webpack:///./src/game/visibility/te/triag.ts","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/edit_dialog.vue?530c","webpack:///./src/core/components/modals/modal.vue?44ae","webpack:///./src/assetManager/socket.ts","webpack:///./src/game/ui/tools/tools.vue?c96e","webpack:///./src/game/game.vue?5550","webpack:///./src/game/shapes/multiline.ts","webpack:///./src/core/components/colorpicker.vue?eaab","webpack:///./src/core/components/colorpicker.vue?8615","webpack:///./src/game/ui/tools/draw.vue","webpack:///./src/game/utils.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?d0df","webpack:///./src/game/ui/note.vue?f9bd","webpack:///./src/game/ui/initiative.vue?f4e1","webpack:///./src/game/ui/tools/draw.vue?b96d","webpack:///./src/game/shapes/line.ts","webpack:///./src/router.ts","webpack:///./src/game/ui/tools/tool.vue?d136","webpack:///./src/game/ui/tools/tools.vue","webpack:///./src/game/ui/tools/tool.vue?8ce3","webpack:///./src/game/shapes/asset.ts","webpack:///./src/game/visibility/te/cdt.ts","webpack:///./src/game/ui/tools/draw.vue?1261","webpack:///./src/game/layers/manager.ts","webpack:///./src/game/ui/initiative.vue?c7e1","webpack:///./src/game/ui/tools/createtoken_modal.vue","webpack:///./src/game/visibility/bvh/node.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?f918","webpack:///./src/game/events/keyboard.ts","webpack:///./src/assetManager/manager.vue?433f","webpack:///./src/game/ui/selection/shapecontext.vue?17f5","webpack:///./src/game/ui/tools/tools.vue?25b2","webpack:///./src/game/ui/selection/selection_info.vue?2310","webpack:///./src/core/components/modals/modal.vue?09d2","webpack:///./src/core/components/contextmenu.vue?a0a2","webpack:///./src/game/ui/selection/selection_info.vue?b9a9","webpack:///./src/core/components/modals/prompt.vue?4e1b","webpack:///./src/game/ui/menu/asset_node.vue?4088","webpack:///./src/game/ui/menu/asset_node.vue?fc27","webpack:///./src/core/components/load.vue?4ab2","webpack:///./src/core/components/load.vue?0f87","webpack:///./src/game/ui/tools/tools.vue?d74c","webpack:///./src/game/ui/tools/tools.vue?35df","webpack:///./src/game/ui/menu/menu.vue?8b23","webpack:///./src/game/shapes/boundingrect.ts","webpack:///./src/dashboard/main.vue?5e14","webpack:///./src/dashboard/main.vue?94d1","webpack:///./src/game/geom.ts","webpack:///./src/game/game.vue?5592","webpack:///./src/game/units.ts","webpack:///./src/game/ui/menu/menu.vue?ae57","webpack:///./src/core/components/colorpicker.vue?1682","webpack:///./src/game/ui/tools/selectcontext.vue?0020","webpack:///./src/game/ui/tools/selectcontext.vue?758c","webpack:///./src/game/visibility/te/tds.ts","webpack:///./src/game/visibility/bvh/bvh.ts","webpack:///./src/game/manager.ts","webpack:///./src/game/ui/initiative.vue?e806","webpack:///./src/game/ui/initiative.vue?ca6b","webpack:///./src/core/components/load.vue?8cd0","webpack:///./src/game/ui/selection/shapecontext.vue?4b66","webpack:///./src/game/ui/selection/shapecontext.vue?0558","webpack:///./src/game/game.vue?9a3e","webpack:///./src/dashboard/main.vue?3f72","webpack:///./src/core/components/modals/confirm.vue","webpack:///./src/game/ui/selection/shapecontext.vue?aac0","webpack:///./src/assetManager/contextMenu.vue?c131","webpack:///./src/assetManager/contextMenu.vue?a185","webpack:///./src/game/ui/tools/draw.vue?60f4","webpack:///./src/assetManager/manager.vue?a11e","webpack:///./src/game/ui/selection/edit_dialog.vue?6a1d","webpack:///./src/game/ui/selection/edit_dialog.vue?d983","webpack:///./src/game/event-bus.ts","webpack:///./src/dashboard/main.vue?d5a9","webpack:///./src/game/shapes/rect.ts","webpack:///./src/game/ui/tools/selectcontext.vue?6f66","webpack:///./src/game/layers/fowplayers.ts","webpack:///./src/game/layers/layer.ts","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/menu/asset_node.vue?be10","webpack:///./src/game/ui/menu/menu.vue?904d","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","webpack:///./src/game/ui/tools/createtoken_modal.vue?6f0b","webpack:///./src/assetManager/manager.vue?765a","webpack:///./src/assetManager/manager.vue?a045","webpack:///./src/game/ui/tools/selectcontext.vue?d61f","webpack:///./src/auth/logout.ts","webpack:///./src/core/store.ts","webpack:///./src/main.ts","webpack:///./src/core/components/contextmenu.vue?f402","webpack:///./src/invitation/invitation.ts","webpack:///./src/core/components/modals/prompt.vue","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/game/ui/tools/map.vue?f96f","webpack:///./src/game/ui/tools/map.vue?7f60","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","webpack:///./src/game/ui/tools/createtoken_modal.vue?e7b2","webpack:///./src/game/ui/tools/createtoken_modal.vue?5fcc","webpack:///./src/game/ui/tools/tool.vue?6323","webpack:///./src/game/ui/tools/tool.vue?f5ba","webpack:///./src/core/components/modals/modal.vue?1854","webpack:///./src/core/components/modals/modal.vue?e329","webpack:///./src/game/game.vue?d01c","webpack:///./src/game/ui/tools/ruler.ts","webpack:///./src/core/components/modals/modal.vue","webpack:///./src/game/visibility/te/pa.ts","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/game/ui/selection/edit_dialog.vue?9a84","webpack:///./src/game/game.vue?5ab9","webpack:///./src/game/game.vue?07bd","webpack:///./src/core/components/modals/confirm.vue?f9ee","webpack:///./src/game/ui/tools/map.vue","webpack:///./src/core/components/modals/confirm.vue?e141","webpack:///./src/core/components/modals/confirm.vue?be48","webpack:///./src/assetManager/contextMenu.vue?1b1b","webpack:///./src/game/ui/tools/select.vue?b7fd","webpack:///./src/game/shapes/polygon.ts","webpack:///./src/game/ui/tools/draw.vue?1866","webpack:///./src/game/ui/tools/draw.vue?03b4","webpack:///./src/assetManager/manager.vue","webpack:///./src/game/ui/tools/tools.vue?fa4a","webpack:///./src/game/ui/tools/tool.vue","webpack:///./src/core/components/modals/prompt.vue?0a11","webpack:///./src/core/components/modals/prompt.vue?36e2","webpack:///./src/game/ui/initiative.vue?36c8","webpack:///./src/game/ui/selection/selection_info.vue","webpack:///./src/game/store.ts","webpack:///./src/core/components/modals/confirm.vue?a22f","webpack:///./src/game/comm/conversion/aura.ts","webpack:///./src/assetManager/contextMenu.vue?1e9a","webpack:///./src/game/ui/note.vue","webpack:///./src/game/ui/initiative.vue","webpack:///./src/game/layers/utils.ts","webpack:///./src/game/ui/selection/edit_dialog.vue?3800","webpack:///./src/auth/login.vue?e4a1","webpack:///./src/auth/login.vue?8f9e","webpack:///./src/game/ui/selection/selection_info.vue?5d62","webpack:///./src/game/api/events.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","app","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","boundingrect_1","shape_1","units_1","Text","Shape","[object Object]","position","text","font","angle","fillColour","strokeColour","uuid","super","this","type","assign","getBaseDict","points","refPoint","x","y","BoundingRect","ctx","draw","fillStyle","save","dest","g2l","translate","rotate","textAlign","getLines","map","line","fillText","restore","point","centerPoint","canvas","getBoundingBox","visibleInCanvas","resizePoint","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","__webpack_exports__","_shapecontext_vue_vue_type_template_id_759e5a8a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","__WEBPACK_IMPORT_KEY__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__","component","options","__file","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor2_1","tslib_1","__importDefault","vue_1","vue_class_component_1","vue_color_1","vue_property_decorator_1","ColorPicker","default","display","left","top","transparent","$refs","chromePicker","val","rgba","a","setPosition","$nextTick","$children","$el","focus","newColor","toRgbString","$emit","color","rect","getBoundingClientRect","right","innerWidth","bottom","innerHeight","__decorate","Prop","String","components","chrome-picker","Chrome","_game_vue_vue_type_template_id_6d744362_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_4__","socket_io_client_1","createConnection","route","socket","io","opts","query","params","creator","room","connect","location","protocol","host","autoConnect","contextMenu_vue_1","confirm_vue_1","prompt_vue_1","socket_1","store_1","utils_1","AssetManager","path","draggingSelection","folders","assetStore","files","selected","idMap","currentFolder","root","parentFolder","parent","undefined","firstSelectedFile","sel","file_hash","nextFolder","pop","clearSelected","emit","prompt","inode","target","includes","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","classList","contains","add","remove","moveInode","upload","document","getElementById","click","fls","CHUNK_SIZE","uuidv4","slices","ceil","size","fr","FileReader","readAsArrayBuffer","min","onload","e","directory","totalSlices","Prompt","ConfirmDialog","AssetContextMenu","to","from","next","disconnect","_asset_node_vue_vue_type_template_id_62c91cd3_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_login_vue_vue_type_template_id_bc30fc14_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","manager_1","tds_1","triag_1","drawPolygon","polygon","colour","dl","layerManager","getLayer","lineJoin","beginPath","strokeStyle","random","moveTo","g2lx","g2ly","lineTo","closePath","stroke","drawPolygonL","xx","local","yy","I","J","drl","constrained","drawPolygonT","tds","clear","logs","T","clearRect","ei","EdgeIterator","valid","collect","fromP","edge","first","vertices","ccw","second","toP","cw","Infinity","constraints","console","log","pos","triangles","isInfinite","po","arc","PI","fill","DP","DPL","DPT","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor","__importStar","circle_1","CircularToken","Circle","center","radius","fromDict","textBaseline","xs","calcFontScale","g2lz","ys","transform","mostReadable","toHexString","visible","gameStore","IS_DM","group","source","has_img","effects","index","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","height","getMaxHeight","w","zoomFactor","h","invalidate","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_b4f2c0b0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_b4f2c0b0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_menu_vue_vue_type_template_id_aaf3f05e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_contextmenu_vue_vue_type_template_id_256dde9c___WEBPACK_IMPORTED_MODULE_0__","_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","render","_vm","_h","$createElement","_c","_self","ref","staticRenderFns","asset_1","circulartoken_1","line_1","multiline_1","polygon_1","createShapeFromDict","shape","dummy","UUIDMap","has","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","Polygon","v","asset","img","Image","src","startsWith","URL","pathname","Asset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","aura_1","trackers","auras","_owners","visionObstruction","movementObstruction","isToken","showHighlight","annotation","globalCompositeOperation","Map","_refPoint","delta","idx","entries","abs","prev","fromArray","vec","subtract","mid","multiply","normalize","skipLightUpdate","recalculate","self","obstructionIndex","visionBlockers","update","recalculateVision","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","recalculateMovement","ownedBy","ownedtokens","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","owners","is_token","JSON","stringify","aurasFromServer","parse","bbox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","freeze","username","owner","oldValue","newValue","ownerIndex","addOwner","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","note","attrs","mask","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","title","select","staticStyle","font-size","directives","rawName","expression","domProps","change","updateNote","input","composing","$set","style","calcHeight","removeNote","_v","_e","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","selectcontext_vue_1","tool_vue_1","utils_2","utils_3","SelectOperations","SelectTool","showContextMenu","active","Noop","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","getPointIndex","l2gz","getRef","Resize","Drag","localRefPoint","GroupSelect","endPoint","og","direction","ogDelta","calculateDelta","asDict","redraw","temporary","resize","updateCursor","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","open","selectcontext","getPointOrientation","SelectContext","pa_1","done","visionMode","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","blockerBBox","found","intersectsWithInner","ray","fromPoints","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","centerTriangle","PA_CDT","movement","locate","asArray","lt","triangle","checkTriangle","skip","endpoint","neighbours","_cw","_ccw","ix","intersection","isConstrained","orientation","Sign","LEFT_TURN","ZERO","newDelta","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","sendClientOptions","locationOptions","panX","panY","AssetNode","showImage","keys","filter","el","sort","alphSort","__files","b","toLowerCase","children","imageSource","querySelector","setDragImage","tabindex","blur","_t","vuex_module_decorators_1","AssetStore","VuexModule","Mutation","Module","dynamic","store","rootStore","namespaced","getModule","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","contextmenu_vue_1","event_bus_1","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","EventBus","ContextMenu","id","openEditDialog","_s","_l","tracker","changeValue","maxvalue","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","layer_1","GridLayer","Layer","doClear","drawGrid","gs","gridSize","gridColour","lineWidth","vuex_1","use","Store","_colorpicker_vue_vue_type_template_id_b4f2c0b0_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","script","componentNormalizer","settings_1","te_1","FOWLayer","isVisionLayer","preFogShapes","virtualCanvas","createElement","vCtx","getContext","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","bb","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","computeVisibility","drawImage","fowLOS","preShape","ogComposite","getFogColour","fillRect","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","settings","locations","class","rm-list-dm","_m","enter","rm","transition","settingsClick","overflow-y","overflow-x","href","assets","createNote","openNote","notes","for","checked","Array","isArray","_i","$$a","$$el","$$c","$$v","$$i","modifiers","number","step","fowOpacity","_n","$forceUpdate","unitSize","changeVisionMode","$store","state","game","lazy","visionRangeMin","visionRangeMax","readonly","invitationCode","update:color","fowColour","rulerColour","text-decoration","changeLocation","createLocation","pow","targetX","targetY","round","diff","sqrt","baserect_1","MapTool","xCount","yCount","startPoint","clone","BaseRect","_load_vue_vue_type_template_id_ff095222___WEBPACK_IMPORTED_MODULE_0__","_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__","PanTool","panStart","distance","increasePanX","increasePanY","_selectcontext_vue_vue_type_template_id_44a31e42_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","main_1","replace","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","appendChild","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_606797b4___WEBPACK_IMPORTED_MODULE_0__","_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","edgeInfo","va","vb","ec","EdgeCirculator","indv","indexV","ri","infinite","vi","orient","COLLINEAR","collinearBetween","q","cPQ","cQR","compare","EQUAL","SMALLER","LARGER","px","py","qx","qy","rx","ry","pqx","pqy","prx","pry","det","determinant","maxX","maxY","aprX","aprY","eps","EPSILON","POSITIVE","NEGATIVE","a00","a01","a10","a11","hasInexactNegativeOrientation","sideOfOrientedCircle","perturb","sideOfOrientedCircleP","Error","p0","p1","p2","os","getOrientedSide","ON_ORIENTED_BOUNDARY","reverse","ON_NEGATIVE_SIDE","xyEqual","xySmaller","xyCompare","qpx","qpy","rpx","rpy","tpx","tpy","tqx","tqy","rqx","rqy","maxx","maxy","arpx","arpy","atqx","atqy","atpx","atpy","arqx","arqy","ON_POSITIVE_SIDE","segSegDoIntersectCrossing","p3","p4","RIGHT_TURN","segSegDoIntersectContained","pa","pb","pc","pd","getIntersectionType","intersectionType","IntersectionType","POINT","NO_INTERSECTION","getLine","doIntersect","l1","l2","info","getIntersectionTypeLine","la","lb","denom","nom1","nom2","A1","A2","B1","B2","nextUp","MAX_VALUE","MIN_VALUE","ulp","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_7c80ae3a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_7c80ae3a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","Boolean","destination","setRoot","folder","child","set","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_1fee50f5_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_1fee50f5_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_points","minx","miny","lineCap","currentTarget","closePicker","z-index","updateColor","_draw_vue_vue_type_template_id_639cd890_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","opposite","colorpicker_vue_1","modal_vue_1","CreateTokenModal","borderColour","updatePreview","Watch","color-picker","computed","mapState","NoteDialog","textarea","scrollHeight","then","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_ccaf03d6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_ccaf03d6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","DrawTool","brushHelper","ruler","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","_vertices","pushBrushBack","lastPoint","finaliseShape","axios_1","vue_router_1","manager_vue_1","login_vue_1","logout_1","load_vue_1","main_vue_1","game_vue_1","invitation_1","router","base","routes","redirect","meta","auth","template","beforeEach","coreStore","initialized","matched","record","authenticated","response","setAuthenticated","setUsername","setInitialized","catch","error","Tool","detailRight","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","onDeselect","onSelect","_tools_vue_vue_type_template_id_1fee50f5_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","topleft","CDT","TDS","insert","insertConstraintV","stack","markConstraint","intersectionInfo","findIntersectedFaces","triangulateHole","intersectedFaces","listAB","listBA","edges","triangulateHole2","propagatingFlipE","triangulateHalfHole","fl","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","BoundingBox","dilate","overlaps","removeConstrainedEdge","dimension","indf","locateInfo","iLocate","insertb","li","flipAround","propagatingFlip","depth","isFlipable","maxDepth","ni","flip","e1","e2","uid","eni","eI","edgeSet","lessEdge","indn","ed","tt","ii","u","t1","t2","t3","i3","t4","i4","insertInConstrainedEdge","LocateType","EDGE","insertc","updateConstraintsIncident","VERTEX","clearConstraintsIncident","updateConstraintsOpposite","c1","c2","fc","FaceCirculator","cwi","ccwi","insertFirst","finiteVertex","insertSecond","OUTSIDE_AFFINE_HULL","insertOutsideAffineHull","OUTSIDE_CONVEX_HULL","insertOutsideConvexHull","insertInEdge","FACE","insertInFace","insertDimUp","_infinite","conform","finiteEdge","COUNTERCLOCKWISE","insertOutsideConvexHull2","ccwlist","cwlist","th","marchLocate1D","marchLocate2D","ff","iv","pqt","Triangle","leftFirst","o0","o1","o2","sum","nTurns","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","LayerManager","interval","drawLoop","requestAnimationFrame","addLayer","selectedLayer","globalAlpha","selectLayer","getSelection","image","getData","l2gx","l2gy","lm","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_createtoken_modal_vue_vue_type_template_id_73816298_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","BoundingNode","nPrimitives","LeafNode","firstPrimOffset","InteriorNode","union","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","onKeyDown","keyCode","hasSelection","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","shapecontext_vue_1","createtoken_modal_vue_1","draw_vue_1","map_vue_1","pan_1","select_vue_1","manager_2","ruler_1","Tools","currentTool","tools","dmTools","currentToolComponent","tagName","targetTool","button","buttons","annotations","gameManager","annotationManager","setActiveText","select-tool","pan-tool","draw-tool","ruler-tool","RulerTool","map-tool","shape-menu","createtoken-dialog","watch","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_32cec914_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_32cec914_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","question","answer","resolve","reject","Promise","stopPropagation","toggle","mouseover","hash","mouseout","message","refInFor","tool-selected","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","botRight","vector","other","xmin","xmax","ymin","ymax","botright","dirIsNeg","txmin","getDiagCorner","txmax","tymin","tymax","tMax","coreVisible","owned","joined","submit","preventDefault","createRoom","placeholder","newSessionName","tag","getPointDistance","Point","scale","atan2","maxT","vue_slider_component_1","lodash_1","initiative_vue_1","menu_vue_1","note_vue_1","selection_info_vue_1","tools_vue_1","keyboard_1","mouse_1","Game","ready","manager","updateZoom","newZoomValue","zoomLocation","addEventListener","setWidth","setHeight","throttle","scrollZoom","mousedown","mouseup","mousemove","mouseleave","contextmenu","confirm","dropAsset","tool-bar","selection-info","prompt-dialog","confirm-dialog","menu-bar","initiative-dialog","zoom-slider","note-dialog","obj","z","l2gr","asset_node_vue_1","MenuBar","setUseGrid","setFullFOW","setFOWOpacity","setLineOfSight","setUnitSize","setGridSize","setGridColour","setFOWColour","setRulerColour","setVisionRangeMin","setVisionRangeMax","nextElementSibling","newNote","setVisionMode","asset-node","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","bringPlayers","createToken","showInitiative","_INFINITE_VERTEX","LineFaceState","newPoint","INFINITE","_counter","vertex","A","sign","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","dir","UNDEFINED","_tr","ic","vt","vr","pqr","VERTEX_VERTEX","VERTEX_EDGE","EDGE_VERTEX","EDGE_EDGE","createVertex","addVertex","infiniteVertex","n0","trig","t0","i0","setAdjacency","deleteList","copy","neighbour","lfit","reorient","vCW","vCCW","tri","bl","bli","vv","g","x1","y1","dist","node_1","BoundingVolume","totalNodes","buildData","orderedPrims","nodes","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","localPos","fakeSetData","disabled","updateOrder","model","callback","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","notAllowed","owns","syncInitiative","opacity","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","setTurn","nextTurn","LoadComponent","getLayers","background-color","setLayer","moveToBack","moveToFront","getInitiativeWord","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_6d744362_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_6d744362_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","registerHooks","Dashboard","vm","err","post","$router","_confirm_vue_vue_type_template_id_1883e207_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","rename","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","grid-column","updateShape","grid-column-start","setToken","setVisionBlocker","setMovementBlocker","updateOwner","removeOwner","removeTracker","updateAuraColour","updateAuraVisionSource","removeAura","updateAnnotation","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","FOWPlayersLayer","skipPlayerFOW","drctx","maxLength","tokenId","_a","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","destinationIndex","oldIdx","deltaY","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_62c91cd3_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_62c91cd3_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","topright","botleft","mx","my","_select_vue_vue_type_template_id_cad11dd2___WEBPACK_IMPORTED_MODULE_0__","_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_main_vue_vue_type_template_id_61eb1455_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","dragover","moveDrag","drop","stopDrag","multiple","hidden","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","inode-selected","cm","startDrag","createtokendialog","Logout","CoreStore","init","App_vue_1","router_1","config","productionTip","devtools","performance","$mount","props","Initiative","code","sessionUrl","_prompt_vue_vue_type_template_id_0602c2e6_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","draw_1","drawt","drawTEContour","Q","rawOutput","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","--detailRight","--detailArrow","_edit_dialog_vue_vue_type_template_id_7c80ae3a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","tempFill","Login","password","$route","statusText","span","modal-mask","dialog-mask","dragOver","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","diffsign","xdiff","ydiff","label","xmid","ymid","_modal_vue_vue_type_template_id_12ed61ba_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","cdt_1","triangulate","partial","cdt","insertConstraint","vision","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","EditDialog","$off","addEmpty","hadAnnotation","an","layer-selected","dot-width","dot-height","tooltip-dir","tooltip","formatter","toFixed","slider-style","border-radius","bg-style","box-shadow","process-style","yes","no","ok","_map_vue_vue_type_template_id_2104f147___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","deny","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","option-selected","max-width","_manager_vue_vue_type_template_id_5b0def98___WEBPACK_IMPORTED_MODULE_0__","_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_tool_vue_vue_type_template_id_1e034b42___WEBPACK_IMPORTED_MODULE_0__","_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","keyup","_k","vuedraggable_1","getActor","actorId","order","show","option","effectIndex","syncEffect","_selection_info_vue_vue_type_template_id_32cec914_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","bvh_1","GameStore","selectedLayerIndex","boardInitialized","roomName","roomCreator","locationName","vision_mode","isDM","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","vision_min_range","vision_max_range","full_fow","fow_opacity","fow_los","actualNote","context","commit","Action","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","vision_source","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_note_vue_vue_type_template_id_7a3669fd_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_initiative_vue_vue_type_template_id_ccaf03d6_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","fow_1","fowplayers_1","grid_1","createLayer","layerInfo","zIndex","player_editable","setShapes","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","focusin","focusout","login","autocomplete","required","visibility","register","edit_dialog_vue_1","SelectionInfo","editDialog","ogValue","isNaN","edit-dialog","setRoomName","setRoomCreator","setInvitationCode","setDM","grid_colour","fow_colour","ruler_colour","setPanX","pan_x","setPanY","pan_y","setZoomFactor","zoom_factor","active_layer","setLocationName","setCenterPosition","setAssets","locationInfo","setLocations","innerHTML","resetLayerInfo","reset","setBoardInitialized","realShape"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,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EAAKgZ,MAAMtU,MAErC,YADAiP,QAAQC,IAAI,yDAGhB,IAAKhD,EAAAO,aAAayF,SAAS5W,EAAKgZ,MAAMrC,OAElC,YADAhD,QAAQC,uDAAuD5T,EAAKgZ,MAAMrC,SAG9E,MAAMqC,EAAQpI,EAAAO,aAAa+H,QAAQxW,IAAI1C,EAAKgZ,MAAMtU,MAC5CiS,EAAQ/F,EAAAO,aAAaC,SAAS4H,EAAMrC,OAC1CA,EAAMqU,eAAehS,EAAOhZ,EAAKgW,OAAO,KAE5C/J,EAAAf,OAAO4U,GAAG,qBAAuB9f,IAC7B,MAAMgZ,EAAQpI,EAAAO,aAAa+H,QAAQxW,IAAI1C,EAAK0E,WAC9BsI,IAAVgM,GACJA,EAAM8R,UAAU9qB,EAAK2W,OAAO,KAEhC1K,EAAAf,OAAO4U,GAAG,eAAiB9f,IACvBsvC,EAAAY,YAAYoQ,YAAYtgD,KAE5BiM,EAAAf,OAAO4U,GAAG,aAAeb,IACrBA,EAAOvC,QAAQ1D,IACX,IAAKpI,EAAAO,aAAa+H,QAAQC,IAAIH,EAAMtU,MAEhC,YADAiP,QAAQC,IAAI,kDAGhB,IAAKhD,EAAAO,aAAayF,SAASoC,EAAMrC,OAE7B,YADAhD,QAAQC,uDAAuDoF,EAAMrC,SAGzE,MAAMg6C,EAAY//C,EAAAO,aAAa+H,QAAQxW,IAAIsW,EAAMtU,MACjDkM,EAAAO,aAAaC,SAAS4H,EAAMrC,OAAQ+W,YAAYijC,GAAW","file":"static/js/app-legacy.f228bc3b.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2l } from \"@/game/units\";\n\nexport class Text extends Shape {\n type = \"text\";\n text: string;\n font: string;\n angle: number;\n constructor(\n position: GlobalPoint,\n text: string,\n font: string,\n angle?: number,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(position, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n this.angle = angle || 0;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n text: this.text,\n font: this.font,\n angle: this.angle,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(this.refPoint, 5, 5); // TODO: fix this bounding box\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.fillStyle = this.fillColour;\n ctx.save();\n const dest = g2l(this.refPoint);\n ctx.translate(dest.x, dest.y);\n ctx.rotate(this.angle);\n ctx.textAlign = \"center\";\n this.getLines(ctx).map(line => ctx.fillText(line.text, line.x, line.y));\n ctx.restore();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {}\n\n getMaxHeight(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const lineHeight = 30;\n return lineHeight * lines.length;\n }\n\n getMaxWidth(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const widths = lines.map(line => ctx.measureText(line.text).width);\n return Math.max(...widths);\n }\n\n private getLines(ctx: CanvasRenderingContext2D) {\n const lines = this.text.split(\"\\n\");\n const allLines: { text: string; x: number; y: number }[] = [];\n const maxWidth = ctx.canvas.width;\n const lineHeight = 30;\n const x = 0; // this.refPoint.x;\n let y = 0; // this.refPoint.y;\n\n for (const line of lines) {\n let targetLine = \"\";\n const words = line.split(\" \");\n for (const word of words) {\n const testLine = targetLine + word + \" \";\n const metrics = ctx.measureText(testLine);\n const testWidth = metrics.width;\n if (testWidth > maxWidth) {\n ctx.fillText(targetLine, x, y);\n allLines.push({ text: targetLine, x, y });\n targetLine = word + \" \";\n y += lineHeight;\n } else {\n targetLine = testLine;\n }\n }\n allLines.push({ text: targetLine, x, y });\n y += lineHeight;\n }\n return allLines;\n }\n}\n","import { render, staticRenderFns } from \"./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"\nimport script from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"759e5a8a\",\n null\n \n)\n\ncomponent.options.__file = \"shapecontext.vue\"\nexport default component.exports","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Chrome } from \"vue-color\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component({\n components: {\n \"chrome-picker\": Chrome,\n },\n})\nexport default class ColorPicker extends Vue {\n @Prop(String) color!: string;\n\n display = false;\n left = 0;\n top = 0;\n transparent = false;\n\n mounted() {\n this.transparent = (this.$refs.chromePicker).val.rgba.a === 0;\n this.setPosition();\n }\n\n open() {\n if (this.display) return; // click on the picker itself\n this.setPosition();\n this.display = true;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n updateColor(value: { rgba: { r: number; g: number; b: number; a: number } }) {\n this.transparent = value.rgba.a === 0;\n const newColor = tinycolor(value.rgba).toRgbString();\n this.$emit(\"update:color\", newColor);\n this.$emit(\"input\", newColor);\n }\n closePicker() {\n this.display = false;\n this.$emit(\"change\", this.color);\n }\n setPosition() {\n const rect = this.$el.getBoundingClientRect();\n // 224 is the width of the picker, 242 the height\n if (rect.right + 224 > window.innerWidth) this.left = rect.left - 224;\n else this.left = rect.right;\n if (rect.bottom + 242 > window.innerHeight) this.top = rect.top - 242;\n else this.top = rect.bottom;\n }\n}\n","import { render, staticRenderFns } from \"./game.vue?vue&type=template&id=6d744362&scoped=true&\"\nimport script from \"./game.vue?vue&type=script&lang=ts&\"\nexport * from \"./game.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./game.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./game.vue?vue&type=style&index=1&id=6d744362&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6d744362\",\n null\n \n)\n\ncomponent.options.__file = \"game.vue\"\nexport default component.exports","import io from \"socket.io-client\";\nimport { Route } from \"vue-router\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/planarally\", { autoConnect: false });\n\nexport function createConnection(route: Route) {\n socket.io.opts.query = `user=${route.params.creator}&room=${route.params.room}`;\n socket.connect();\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport AssetContextMenu from \"@/assetManager/contextMenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { Asset } from \"@/core/comm/types\";\nimport { uuidv4 } from \"@/core/utils\";\n\n@Component({\n components: {\n Prompt,\n ConfirmDialog,\n AssetContextMenu,\n },\n beforeRouteEnter(to, from, next) {\n socket.connect();\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class AssetManager extends Vue {\n path: number[] = [];\n draggingSelection = false;\n\n get folders(): number[] {\n return assetStore.folders;\n }\n\n get files(): number[] {\n return assetStore.files;\n }\n\n get selected(): number[] {\n return assetStore.selected;\n }\n\n get idMap() {\n return assetStore.idMap;\n }\n\n get currentFolder(): number {\n if (this.path.length) return this.path[this.path.length - 1];\n return assetStore.root;\n }\n get parentFolder(): number {\n let parent = this.path[this.path.length - 2];\n if (parent === undefined) parent = assetStore.root;\n return parent;\n }\n get firstSelectedFile(): Asset | null {\n for (const sel of assetStore.selected) {\n if (assetStore.idMap.get(sel)!.file_hash) {\n return assetStore.idMap.get(sel)!;\n }\n }\n return null;\n }\n changeDirectory(nextFolder: number) {\n if (nextFolder < 0) this.path.pop();\n else this.path.push(nextFolder);\n assetStore.clearSelected();\n socket.emit(\"Folder.Get\", this.currentFolder);\n }\n createDirectory() {\n const name = window.prompt(\"New folder name\");\n if (name !== null) {\n socket.emit(\"Folder.Create\", { name, parent: this.currentFolder });\n }\n }\n moveInode(inode: number, target: number) {\n if (assetStore.files.includes(inode)) assetStore.files.splice(assetStore.files.indexOf(inode), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(inode), 1);\n assetStore.idMap.delete(inode);\n socket.emit(\"Inode.Move\", { inode, target });\n }\n select(event: MouseEvent, inode: number) {\n if (event.shiftKey && assetStore.selected.length > 0) {\n const inodes = [...assetStore.files, ...assetStore.folders];\n const start = inodes.indexOf(assetStore.selected[assetStore.selected.length - 1]);\n const end = inodes.indexOf(inode);\n for (let i = start; i !== end; start < end ? i++ : i--) {\n if (i === start) continue;\n assetStore.selected.push(inodes[i]);\n }\n assetStore.selected.push(inodes[end]);\n } else {\n if (!event.ctrlKey) {\n assetStore.clearSelected();\n }\n assetStore.selected.push(inode);\n }\n }\n startDrag(event: DragEvent, file: number) {\n if (event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"ittyHack\");\n event.dataTransfer.dropEffect = \"move\";\n if (!assetStore.selected.includes(file)) assetStore.selected.push(file);\n this.draggingSelection = true;\n }\n moveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.add(\"inode-selected\");\n }\n leaveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.remove(\"inode-selected\");\n }\n stopDrag(event: DragEvent, target: number) {\n (event.target).classList.remove(\"inode-selected\");\n if (this.draggingSelection) {\n if (\n (target === assetStore.root || assetStore.folders.includes(target)) &&\n !assetStore.selected.includes(target)\n ) {\n for (const inode of assetStore.selected) {\n this.moveInode(inode, target);\n }\n }\n assetStore.clearSelected();\n } else if (event.dataTransfer && event.dataTransfer.files.length > 0) {\n this.upload(event.dataTransfer.files, target);\n }\n this.draggingSelection = false;\n }\n prepareUpload() {\n document.getElementById(\"files\")!.click();\n }\n upload(fls?: FileList, target?: number) {\n const files = (document.getElementById(\"files\")!).files;\n if (fls === undefined) {\n if (files) fls = files;\n else return;\n }\n if (target === undefined) target = this.currentFolder;\n const CHUNK_SIZE = 100000;\n for (const file of fls) {\n const uuid = uuidv4();\n const slices = Math.ceil(file.size / CHUNK_SIZE);\n for (let slice = 0; slice < slices; slice++) {\n const fr = new FileReader();\n fr.readAsArrayBuffer(\n file.slice(\n slice * CHUNK_SIZE,\n slice * CHUNK_SIZE + Math.min(CHUNK_SIZE, file.size - slice * CHUNK_SIZE),\n ),\n );\n fr.onload = e => {\n socket.emit(\"Asset.Upload\", {\n name: file.name,\n directory: target,\n data: fr.result,\n slice,\n totalSlices: slices,\n uuid,\n });\n };\n }\n }\n }\n}\n","import { render, staticRenderFns } from \"./asset_node.vue?vue&type=template&id=62c91cd3&scoped=true&\"\nimport script from \"./asset_node.vue?vue&type=script&lang=ts&\"\nexport * from \"./asset_node.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./asset_node.vue?vue&type=style&index=0&id=62c91cd3&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"62c91cd3\",\n null\n \n)\n\ncomponent.options.__file = \"asset_node.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"\nimport script from \"./login.vue?vue&type=script&lang=ts&\"\nexport * from \"./login.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"bc30fc14\",\n null\n \n)\n\ncomponent.options.__file = \"login.vue\"\nexport default component.exports","import { layerManager } from \"@/game/layers/manager\";\nimport { g2lx, g2ly } from \"@/game/units\";\nimport { EdgeIterator, TDS } from \"./tds\";\nimport { ccw, cw } from \"./triag\";\n\nexport function drawPolygon(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) {\n ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nexport function drawPolygonL(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(polygon[0][0], polygon[0][1]);\n for (const point of polygon) {\n ctx.lineTo(point[0], point[1]);\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction x(xx: number, local: boolean) {\n if (local) return xx;\n else return g2lx(xx);\n}\n\nfunction y(yy: number, local: boolean) {\n if (local) return yy;\n else return g2ly(yy);\n}\n\nlet I = 0;\nlet J = 0;\n\nfunction drl(ctx: CanvasRenderingContext2D, from: number[], to: number[], constrained: boolean, local: boolean) {\n // J++;\n // if (constrained) {\n // I++;\n // console.log(\"*\", from, to);\n // } else {\n // console.log(\" \", from, to);\n // }\n ctx.beginPath();\n ctx.strokeStyle = constrained ? \"rgba(255, 0, 0, 0.30)\" : \"rgba(0, 0, 0, 0.30)\";\n ctx.moveTo(x(from[0], local), y(from[1], local));\n ctx.lineTo(x(to[0], local), y(to[1], local));\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction drawPolygonT(tds: TDS, local = true, clear = true, logs: 0 | 1 | 2 = 0) {\n I = 0;\n J = 0;\n let T = 0;\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n if (clear) ctx.clearRect(0, 0, 2000, 1000);\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n const ei = new EdgeIterator(tds);\n while (ei.valid) {\n ei.next();\n ei.collect();\n }\n ei.collect();\n do {\n const fromP = ei.edge.first!.vertices[ccw(ei.edge.second)]!.point!;\n const toP = ei.edge.first!.vertices[cw(ei.edge.second)]!.point!;\n if (logs > 0) {\n if (fromP[0] === -Infinity || toP[0] === -Infinity) {\n ei.next();\n continue;\n }\n J++;\n if (ei.edge.first!.constraints[ei.edge.second]) {\n I++;\n if (logs === 2) console.log(`Edge: (*) ${fromP} > ${toP}`);\n } else if (logs === 2) console.log(`Edge: ${fromP} > ${toP}`);\n }\n do {\n ei.next();\n ei.collect();\n } while (ei.valid);\n } while (ei.pos !== null);\n for (const t of tds.triangles) {\n if (t.isInfinite()) continue;\n T++;\n const po = [];\n ctx.fillStyle = \"red\";\n if (t.vertices[0] !== undefined) {\n po.push(t.vertices[0]!.point);\n ctx.beginPath();\n ctx.arc(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[1] !== undefined) {\n po.push(t.vertices[1]!.point);\n ctx.arc(x(t.vertices[1]!.point![0], local), y(t.vertices[1]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[2] !== undefined) {\n po.push(t.vertices[2]!.point);\n ctx.arc(x(t.vertices[2]!.point![0], local), y(t.vertices[2]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (logs === 2) console.log(\"[T] \", ...po, t.constraints);\n\n ctx.moveTo(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local));\n if (t.vertices[0] !== undefined && t.vertices[1] !== undefined)\n drl(ctx, t.vertices[0]!.point!, t.vertices[1]!.point!, t.constraints[2], local);\n if (t.vertices[1] !== undefined && t.vertices[2] !== undefined)\n drl(ctx, t.vertices[1]!.point!, t.vertices[2]!.point!, t.constraints[0], local);\n if (t.vertices[2] !== undefined && t.vertices[0] !== undefined)\n drl(ctx, t.vertices[2]!.point!, t.vertices[0]!.point!, t.constraints[1], local);\n }\n if (logs > 0) {\n console.log(`Edges: ${I}/${J}`);\n console.log(`Faces: ${T}`);\n }\n}\n\n(window).DP = drawPolygon;\n(window).DPL = drawPolygonL;\n(window).DPT = drawPolygonT;\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"","import * as tinycolor from \"tinycolor2\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerCircularToken } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lz } from \"@/game/units\";\n\nexport class CircularToken extends Circle {\n type = \"circulartoken\";\n text: string;\n font: string;\n constructor(\n center: GlobalPoint,\n r: number,\n text: string,\n font: string,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(center, r, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n }\n asDict(): ServerCircularToken {\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n text: this.text,\n font: this.font,\n });\n }\n fromDict(data: ServerCircularToken) {\n super.fromDict(data);\n this.r = data.radius;\n this.text = data.text;\n this.font = data.font;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.save();\n const dest = g2l(this.center());\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, g2lz(this.r), g2lz(this.r));\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name === \"\" || this.name === \"Unknown shape\" ? this.text : this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\n\nexport class AnnotationManager {\n annotationText: Text;\n annotationRect: Rect;\n layer: Layer | undefined;\n shown: boolean = false;\n\n constructor() {\n const origin = new GlobalPoint(0, 0);\n this.annotationText = new Text(origin, \"\", \"bold 20px serif\", 0, \"rgba(230, 230, 230, 1)\");\n this.annotationRect = new Rect(origin, 0, 0, \"rgba(0, 0, 0, 0.6)\");\n }\n\n setActiveText(text: string) {\n if (this.layer === undefined) {\n if (layerManager.hasLayer(\"draw\")) {\n this.layer = layerManager.getLayer(\"draw\")!;\n this.layer.addShape(this.annotationRect, false);\n this.layer.addShape(this.annotationText, false);\n } else {\n console.warn(\"There is no draw layer to draw annotations on!\");\n return;\n }\n }\n this.shown = text !== \"\";\n this.annotationText.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2, 50));\n this.annotationText.text = text;\n const width = this.shown ? this.annotationText.getMaxWidth(this.layer.ctx) + 10 : 0;\n const height = this.shown ? this.annotationText.getMaxHeight(this.layer.ctx) + 10 : 0;\n this.annotationRect.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2 - width / 2, 30));\n this.annotationRect.w = width / gameStore.zoomFactor;\n this.annotationRect.h = height / gameStore.zoomFactor;\n this.layer.invalidate(true);\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=b4f2c0b0&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=b4f2c0b0&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"\nimport script from \"./menu.vue?vue&type=script&lang=ts&\"\nexport * from \"./menu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"aaf3f05e\",\n null\n \n)\n\ncomponent.options.__file = \"menu.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./contextmenu.vue?vue&type=template&id=256dde9c&\"\nimport script from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./contextmenu.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextmenu.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SelectContext',{ref:\"selectcontext\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=template&id=cad11dd2&\"","import {\n ServerAsset,\n ServerCircle,\n ServerCircularToken,\n ServerLine,\n ServerMultiLine,\n ServerPolygon,\n ServerRect,\n ServerShape,\n ServerText,\n} from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { Text } from \"@/game/shapes/text\";\nimport { Polygon } from \"./polygon\";\n\nexport function createShapeFromDict(shape: ServerShape, dummy?: boolean) {\n // TODO: is this dummy stuff actually needed, do we ever want to return the local shape?\n if (dummy === undefined) dummy = false;\n if (!dummy && layerManager.UUIDMap.has(shape.uuid)) return layerManager.UUIDMap.get(shape.uuid);\n\n let sh: Shape;\n\n // A fromJSON and toJSON on Shape would be cleaner but ts does not allow for static abstracts so yeah.\n\n // Shape Type specifics\n\n const refPoint = new GlobalPoint(shape.x, shape.y);\n if (shape.type_ === \"rect\") {\n const rect = shape;\n sh = new Rect(refPoint, rect.width, rect.height, rect.fill_colour, rect.stroke_colour, rect.uuid);\n } else if (shape.type_ === \"circle\") {\n const circ = shape;\n sh = new Circle(refPoint, circ.radius, circ.fill_colour, circ.stroke_colour, circ.uuid);\n } else if (shape.type_ === \"circulartoken\") {\n const token = shape;\n sh = new CircularToken(\n refPoint,\n token.radius,\n token.text,\n token.font,\n token.fill_colour,\n token.stroke_colour,\n token.uuid,\n );\n } else if (shape.type_ === \"line\") {\n const line = shape;\n sh = new Line(refPoint, new GlobalPoint(line.x2, line.y2), line.line_width, line.stroke_colour, line.uuid);\n } else if (shape.type_ === \"multiline\") {\n const multiline = shape;\n sh = new MultiLine(\n refPoint,\n multiline.points.map(p => new GlobalPoint(p.x, p.y)),\n multiline.line_width,\n multiline.stroke_colour,\n multiline.uuid,\n );\n } else if (shape.type_ === \"polygon\") {\n const polygon = shape;\n sh = new Polygon(\n refPoint,\n polygon.vertices.map(v => new GlobalPoint(v.x, v.y)),\n polygon.fill_colour,\n polygon.stroke_colour,\n polygon.uuid,\n );\n } else if (shape.type_ === \"text\") {\n const text = shape;\n sh = new Text(refPoint, text.text, text.font, text.angle, text.fill_colour, text.stroke_colour, text.uuid);\n } else if (shape.type_ === \"assetrect\") {\n const asset = shape;\n const img = new Image(asset.width, asset.height);\n if (asset.src.startsWith(\"http\")) img.src = new URL(asset.src).pathname;\n else img.src = asset.src;\n sh = new Asset(img, refPoint, asset.width, asset.height, asset.uuid);\n img.onload = () => {\n layerManager.getLayer(shape.layer)!.invalidate(false);\n };\n } else {\n return undefined;\n }\n sh.fromDict(shape);\n return sh;\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"","import tinycolor from \"tinycolor2\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { aurasFromServer, aurasToServer } from \"@/game/comm/conversion/aura\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport abstract class Shape {\n // Used to create class instance from server shape data\n abstract readonly type: string;\n // The unique ID of this shape\n readonly uuid: string;\n // The layer the shape is currently on\n layer!: string;\n\n // A reference point regarding that specific shape's structure\n protected _refPoint: GlobalPoint;\n\n // Fill colour of the shape\n fillColour: string = \"#000\";\n strokeColour: string = \"rgba(0,0,0,0)\";\n // The optional name associated with the shape\n name = \"Unknown shape\";\n\n // Associated trackers/auras/owners\n trackers: Tracker[] = [];\n auras: Aura[] = [];\n protected _owners: string[] = [];\n\n // Block light sources\n visionObstruction = false;\n // Prevent shapes from overlapping with this shape\n movementObstruction = false;\n // Does this shape represent a playable token\n isToken = false;\n // Show a highlight box\n showHighlight = false;\n\n // Mouseover annotation\n annotation: string = \"\";\n\n // Draw modus to use\n globalCompositeOperation: string = \"source-over\";\n\n // Additional options for specialized uses\n options: Map = new Map();\n\n constructor(refPoint: GlobalPoint, fillColour?: string, strokeColour?: string, uuid?: string) {\n this._refPoint = refPoint;\n this.uuid = uuid || uuidv4();\n if (fillColour !== undefined) this.fillColour = fillColour;\n if (strokeColour !== undefined) this.strokeColour = strokeColour;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n this._refPoint = point;\n }\n\n abstract getBoundingBox(): BoundingRect;\n\n // If inWorldCoord is\n abstract contains(point: GlobalPoint): boolean;\n\n abstract center(): GlobalPoint;\n abstract center(centerPoint: GlobalPoint): void;\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n // for (const aura of this.auras) {\n // if (aura.value > 0) {\n // const auraCircle = new Circle(this.center(), aura.value);\n // if (auraCircle.visibleInCanvas(canvas)) return true;\n // }\n // }\n return false;\n }\n\n // Code to snap a shape to the grid\n // This is shape dependent as the shape refPoints are shape specific in\n abstract snapToGrid(): void;\n abstract resizeToGrid(): void;\n abstract resize(resizePoint: number, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n getPointIndex(p: GlobalPoint, delta = 0): number {\n for (const [idx, point] of this.points.entries()) {\n if (Math.abs(p.x - point[0]) <= delta && Math.abs(p.y - point[1]) <= delta) return idx;\n }\n return -1;\n }\n\n getPointOrientation(i: number): Vector {\n const prev = GlobalPoint.fromArray(this.points[(this.points.length + i - 1) % this.points.length]);\n const point = GlobalPoint.fromArray(this.points[i]);\n const next = GlobalPoint.fromArray(this.points[(i + 1) % this.points.length]);\n const vec = next.subtract(prev);\n const mid = prev.add(vec.multiply(0.5));\n return point.subtract(mid).normalize();\n }\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources(recalculate = true) {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let update = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n update = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateVision();\n\n // Check if the visionsource auras are in the gameManager\n this.auras.forEach(au => {\n const ls = gameStore.visionSources;\n const i = ls.findIndex(o => o.aura === au.uuid);\n if (au.visionSource && i === -1) {\n ls.push({ shape: self.uuid, aura: au.uuid });\n } else if (!au.visionSource && i >= 0) {\n ls.splice(i, 1);\n }\n });\n // Check if anything in the gameManager referencing this shape is in fact still a visionsource\n for (let i = gameStore.visionSources.length - 1; i >= 0; i--) {\n const ls = gameStore.visionSources[i];\n if (ls.shape === self.uuid) {\n if (!self.auras.some(a => a.uuid === ls.aura && a.visionSource)) gameStore.visionSources.splice(i, 1);\n }\n }\n }\n\n setMovementBlock(blocksMovement: boolean, recalculate = true) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n let update = false;\n if (this.movementObstruction && obstructionIndex === -1) {\n gameStore.movementblockers.push(this.uuid);\n update = true;\n } else if (!this.movementObstruction && obstructionIndex >= 0) {\n gameStore.movementblockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateMovement();\n }\n\n setIsToken(isToken: boolean) {\n this.isToken = isToken;\n if (this.ownedBy()) {\n const i = gameStore.ownedtokens.indexOf(this.uuid);\n if (this.isToken && i === -1) gameStore.ownedtokens.push(this.uuid);\n else if (!this.isToken && i >= 0) gameStore.ownedtokens.splice(i, 1);\n }\n }\n\n abstract asDict(): ServerShape;\n getBaseDict(): ServerShape {\n return {\n type_: this.type,\n uuid: this.uuid,\n x: this.refPoint.x,\n y: this.refPoint.y,\n layer: this.layer,\n draw_operator: this.globalCompositeOperation,\n movement_obstruction: this.movementObstruction,\n vision_obstruction: this.visionObstruction,\n auras: aurasToServer(this.auras),\n trackers: this.trackers,\n owners: this._owners,\n fill_colour: this.fillColour,\n stroke_colour: this.strokeColour,\n name: this.name,\n annotation: this.annotation,\n is_token: this.isToken,\n options: JSON.stringify([...this.options]),\n };\n }\n fromDict(data: ServerShape) {\n this.layer = data.layer;\n this.globalCompositeOperation = data.draw_operator;\n this.movementObstruction = data.movement_obstruction;\n this.visionObstruction = data.vision_obstruction;\n this.auras = aurasFromServer(data.auras);\n this.trackers = data.trackers;\n this._owners = data.owners;\n this.isToken = data.is_token;\n if (data.annotation) this.annotation = data.annotation;\n if (data.name) this.name = data.name;\n if (data.options) this.options = new Map(JSON.parse(data.options));\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n if (this.globalCompositeOperation !== undefined) ctx.globalCompositeOperation = this.globalCompositeOperation;\n else ctx.globalCompositeOperation = \"source-over\";\n if (this.showHighlight) {\n const bbox = this.getBoundingBox();\n ctx.strokeStyle = \"red\";\n ctx.strokeRect(g2lx(bbox.topLeft.x) - 5, g2ly(bbox.topLeft.y) - 5, g2lz(bbox.w) + 10, g2lz(bbox.h) + 10);\n }\n }\n\n drawAuras(ctx: CanvasRenderingContext2D) {\n for (const aura of this.auras) {\n if (aura.value === 0 && aura.dim === 0) return;\n ctx.beginPath();\n\n const loc = g2l(this.center());\n const innerRange = g2lr(aura.value + aura.dim);\n\n if (aura.dim === 0) ctx.fillStyle = aura.colour;\n else {\n const gradient = ctx.createRadialGradient(\n loc.x,\n loc.y,\n g2lr(aura.value),\n loc.x,\n loc.y,\n g2lr(aura.value + aura.dim),\n );\n const tc = tinycolor(aura.colour);\n ctx.fillStyle = gradient;\n gradient.addColorStop(0, aura.colour);\n gradient.addColorStop(1, tc.setAlpha(0).toRgbString());\n }\n if (!aura.visionSource || aura.lastPath === undefined) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n } else {\n try {\n ctx.fill(aura.lastPath);\n } catch (e) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n console.warn(e);\n }\n }\n }\n }\n\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n\n moveLayer(layer: string, sync: boolean) {\n const oldLayer = layerManager.getLayer(this.layer);\n const newLayer = layerManager.getLayer(layer);\n if (oldLayer === undefined || newLayer === undefined) return;\n this.layer = layer;\n // Update layer shapes\n oldLayer.shapes.splice(oldLayer.shapes.indexOf(this), 1);\n newLayer.shapes.push(this);\n // Revalidate layers (light should at most be redone once)\n oldLayer.invalidate(true);\n newLayer.invalidate(false);\n // Sync!\n if (sync) socket.emit(\"Shape.Layer.Change\", { uuid: this.uuid, layer });\n }\n\n get owners() {\n return Object.freeze(this._owners.slice());\n }\n\n ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this._owners.includes(username);\n }\n\n addOwner(owner: string) {\n if (!this._owners.includes(owner)) this._owners.push(owner);\n }\n\n updateOwner(oldValue: string, newValue: string) {\n const ownerIndex = this._owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this._owners.splice(ownerIndex, 1, newValue);\n else this.addOwner(newValue);\n }\n\n removeOwner(owner: string) {\n const ownerIndex = this._owners.findIndex(o => o === owner);\n this._owners.splice(ownerIndex, 1);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.note !== null)?_c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('span',{on:{\"click\":function($event){_vm.$refs.title.select()}}},[_c('i',{staticClass:\"fas fa-pencil-alt\",staticStyle:{\"font-size\":\"15px\"}})]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.title),expression:\"note.title\"}],ref:\"title\",domProps:{\"value\":(_vm.note.title)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"title\", $event.target.value)}}}),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.text),expression:\"note.text\"}],ref:\"textarea\",style:({'height': _vm.calcHeight()}),domProps:{\"value\":(_vm.note.text)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"text\", $event.target.value)}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.removeNote}},[_c('i',{staticClass:\"far fa-trash-alt\"}),_vm._v(\" Remove\\n \")])])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"","\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport SelectContext from \"@/game/ui/tools/selectcontext.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\nimport SelectionInfo from \"../selection/selection_info.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint, LocalPoint, Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, l2g, l2gz } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport enum SelectOperations {\n Noop,\n Resize,\n Drag,\n GroupSelect,\n}\n\nconst start = new GlobalPoint(-1000, -1000);\n\n@Component({\n components: {\n SelectContext,\n },\n})\nexport default class SelectTool extends Tool {\n name = \"Select\";\n showContextMenu = false;\n active = false;\n\n mode = SelectOperations.Noop;\n resizePoint = 0;\n deltaChanged = false;\n // Because we never drag from the asset's (0, 0) coord and want a smoother drag experience\n // we keep track of the actual offset within the asset.\n dragRay = new Ray(new LocalPoint(0, 0), new Vector(0, 0));\n selectionStartPoint = start;\n selectionHelper = new Rect(start, 0, 0);\n created() {\n this.selectionHelper.globalCompositeOperation = \"source-over\";\n }\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (!this.selectionHelper.owners.includes(gameStore.username)) {\n this.selectionHelper.addOwner(gameStore.username);\n }\n\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n let hit = false;\n // The selectionStack allows for lower positioned objects that are selected to have precedence during overlap.\n let selectionStack;\n if (!layer.selection.length) selectionStack = layer.shapes;\n else selectionStack = layer.shapes.concat(layer.selection);\n for (let i = selectionStack.length - 1; i >= 0; i--) {\n const shape = selectionStack[i];\n\n if (!shape.ownedBy()) continue;\n\n this.resizePoint = shape.getPointIndex(globalMouse, l2gz(3));\n\n // Resize case, a corner is selected\n if (this.resizePoint >= 0) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n layer.invalidate(true);\n hit = true;\n break;\n\n // Drag case, a shape is selected\n } else if (shape.contains(globalMouse)) {\n const selection = shape;\n if (layer.selection.indexOf(selection) === -1) {\n layer.selection = [selection];\n getRef(\"selectionInfo\").shape = selection;\n }\n this.mode = SelectOperations.Drag;\n const localRefPoint = g2l(selection.refPoint);\n this.dragRay = new Ray(localRefPoint, mouse.subtract(localRefPoint));\n layer.invalidate(true);\n hit = true;\n break;\n }\n }\n\n // GroupSelect case, draw a selection box to select multiple shapes\n if (!hit) {\n this.mode = SelectOperations.GroupSelect;\n for (const selection of layer.selection) getRef(\"selectionInfo\").shape = selection;\n\n this.selectionStartPoint = globalMouse;\n\n this.selectionHelper.refPoint = this.selectionStartPoint;\n this.selectionHelper.w = 0;\n this.selectionHelper.h = 0;\n\n layer.selection = [this.selectionHelper];\n layer.invalidate(true);\n }\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n // if (!this.active) return; we require mousemove for the resize cursor\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n this.deltaChanged = false;\n\n if (this.mode === SelectOperations.GroupSelect) {\n // Currently draw on active layer\n const endPoint = globalMouse;\n\n this.selectionHelper.w = Math.abs(endPoint.x - this.selectionStartPoint.x);\n this.selectionHelper.h = Math.abs(endPoint.y - this.selectionStartPoint.y);\n this.selectionHelper.refPoint = new GlobalPoint(\n Math.min(this.selectionStartPoint.x, endPoint.x),\n Math.min(this.selectionStartPoint.y, endPoint.y),\n );\n layer.invalidate(true);\n } else if (layer.selection.length) {\n const og = g2l(layer.selection[layer.selection.length - 1].refPoint);\n const origin = og.add(this.dragRay.direction);\n let delta = mouse.subtract(origin).multiply(1 / gameStore.zoomFactor);\n const ogDelta = delta;\n if (this.mode === SelectOperations.Drag) {\n // If we are on the tokens layer do a movement block check.\n if (layer.name === \"tokens\" && !(event.shiftKey && gameStore.IS_DM)) {\n for (const sel of layer.selection) {\n if (sel.uuid === this.selectionHelper.uuid) continue; // the selection helper should not be treated as a real shape.\n delta = calculateDelta(delta, sel);\n if (delta !== ogDelta) this.deltaChanged = true;\n }\n }\n // Actually apply the delta on all shapes\n for (const sel of layer.selection) {\n sel.refPoint = sel.refPoint.add(delta);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n }\n layer.invalidate(false);\n } else if (this.mode === SelectOperations.Resize) {\n for (const sel of layer.selection) {\n sel.resize(this.resizePoint, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n this.updateCursor(layer, globalMouse);\n }\n } else {\n this.updateCursor(layer, globalMouse);\n }\n } else {\n document.body.style.cursor = \"default\";\n }\n }\n onMouseUp(e: MouseEvent): void {\n if (!this.active) return;\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n\n if (this.mode === SelectOperations.GroupSelect) {\n layer.clearSelection();\n layer.shapes.forEach(shape => {\n if (shape === this.selectionHelper) return;\n const bbox = shape.getBoundingBox();\n if (!shape.ownedBy()) return;\n if (\n this.selectionHelper!.refPoint.x <= bbox.topRight.x &&\n this.selectionHelper!.refPoint.x + this.selectionHelper!.w >= bbox.topLeft.x &&\n this.selectionHelper!.refPoint.y <= bbox.botLeft.y &&\n this.selectionHelper!.refPoint.y + this.selectionHelper!.h >= bbox.topLeft.y\n ) {\n layer.selection.push(shape);\n }\n });\n\n // Push the selection helper as the last element of the selection\n // This makes sure that it will be the first one to be hit in the hit detection onMouseDown\n if (layer.selection.length > 0) layer.selection.push(this.selectionHelper);\n\n layer.invalidate(true);\n } else if (layer.selection.length) {\n layer.selection.forEach(sel => {\n if (this.mode === SelectOperations.Drag) {\n if (\n this.dragRay.origin!.x === g2lx(sel.refPoint.x) &&\n this.dragRay.origin!.y === g2ly(sel.refPoint.y)\n )\n return;\n\n if (gameStore.useGrid && !e.altKey && !this.deltaChanged) {\n sel.snapToGrid();\n }\n\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n if (this.mode === SelectOperations.Resize) {\n if (gameStore.useGrid && !e.altKey) {\n sel.resizeToGrid();\n }\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n });\n }\n this.mode = SelectOperations.Noop;\n this.active = false;\n }\n onContextMenu(event: MouseEvent) {\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n for (const shape of layer.selection) {\n if (shape.contains(globalMouse) && shape !== this.selectionHelper) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n layer.invalidate(true);\n (this.$parent.$refs.shapecontext).open(event, shape);\n return;\n }\n }\n (this.$refs.selectcontext).open(event);\n }\n updateCursor(layer: Layer, globalMouse: GlobalPoint) {\n for (const sel of layer.selection) {\n const resizePoint = sel.getPointIndex(globalMouse, l2gz(3));\n if (resizePoint < 0) document.body.style.cursor = \"default\";\n else {\n let angle = sel.getPointOrientation(resizePoint).angle();\n if (angle < 0) angle += 360;\n const d = 45 / 2;\n if (angle >= 315 + d || angle < d || (angle >= 135 + d && angle < 225 - d))\n document.body.style.cursor = \"ew-resize\";\n if ((angle >= 45 + d && angle < 135 - d) || (angle >= 225 + d && angle < 315 - d))\n document.body.style.cursor = \"ns-resize\";\n if ((angle >= d && angle < 90 - d) || (angle >= 180 + d && angle < 270 - d))\n document.body.style.cursor = \"nwse-resize\";\n if ((angle >= 90 + d && angle < 180 - d) || (angle >= 270 + d && angle < 360 - d))\n document.body.style.cursor = \"nesw-resize\";\n }\n }\n }\n}\n","import { GlobalPoint, Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { PA_CDT } from \"@/game/visibility/te/pa\";\nimport { Point, Sign, Triangle } from \"@/game/visibility/te/tds\";\nimport { ccw, cw, intersection, orientation } from \"@/game/visibility/te/triag\";\n\n// First go through each shape in the selection and see if the delta has to be truncated due to movement blockers\n\n// This is definitely super convoluted and inefficient but I was tired and really wanted the smooth wall sliding collision stuff to work\n// And it does now, so hey ¯\\_(ツ)_/¯\nexport function calculateDelta(delta: Vector, sel: Shape, done?: string[]) {\n if (delta.x === 0 && delta.y === 0) return delta;\n if (gameStore.visionMode === \"bvh\") {\n if (done === undefined) done = [];\n const ogSelBBox = sel.getBoundingBox();\n const newSelBBox = ogSelBBox.offset(delta);\n let refine = false;\n for (const movementBlocker of gameStore.movementblockers) {\n if (done.includes(movementBlocker)) continue;\n const blocker = layerManager.UUIDMap.get(movementBlocker)!;\n const blockerBBox = blocker.getBoundingBox();\n let found = blockerBBox.intersectsWithInner(newSelBBox);\n if (!found) {\n // This is an edge case, precalculating the rays is not worth in this case.\n const ray = Ray.fromPoints(ogSelBBox.topLeft.add(delta.normalize()), newSelBBox.topLeft);\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n found = blockerBBox.intersectP(ray, invDir, dirIsNegative).hit;\n }\n // Check if the bounding box of our destination would intersect with the bounding box of the movementblocker\n if (found) {\n const bCenter = blockerBBox.center();\n const sCenter = ogSelBBox.center();\n\n const d = sCenter.subtract(bCenter);\n const ux = new Vector(1, 0);\n const uy = new Vector(0, 1);\n let dx = d.dot(ux);\n let dy = d.dot(uy);\n if (dx > blockerBBox.w / 2) dx = blockerBBox.w / 2;\n if (dx < -blockerBBox.w / 2) dx = -blockerBBox.w / 2;\n if (dy > blockerBBox.h / 2) dy = blockerBBox.h / 2;\n if (dy < -blockerBBox.h / 2) dy = -blockerBBox.h / 2;\n\n // Closest point / intersection point between the two bboxes. Not the delta intersect!\n const p = bCenter.add(ux.multiply(dx)).add(uy.multiply(dy));\n\n if (p.x === ogSelBBox.topLeft.x || p.x === ogSelBBox.topRight.x) delta = new Vector(0, delta.y);\n else if (p.y === ogSelBBox.topLeft.y || p.y === ogSelBBox.botLeft.y) delta = new Vector(delta.x, 0);\n else {\n if (p.x < ogSelBBox.topLeft.x) delta = new Vector(p.x - ogSelBBox.topLeft.x, delta.y);\n else if (p.x > ogSelBBox.topRight.x) delta = new Vector(p.x - ogSelBBox.topRight.x, delta.y);\n else if (p.y < ogSelBBox.topLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.topLeft.y);\n else if (p.y > ogSelBBox.botLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.botLeft.y);\n }\n refine = true;\n done.push(movementBlocker);\n break;\n }\n }\n if (refine) delta = calculateDelta(delta, sel, done);\n return delta;\n } else {\n const centerTriangle = PA_CDT.movement.locate(sel.center().asArray(), null).loc;\n for (const point of sel.points) {\n const lt = PA_CDT.movement.locate(point, centerTriangle);\n const triangle = lt.loc;\n if (triangle === null) continue;\n delta = checkTriangle(point, triangle, delta);\n }\n return delta;\n }\n}\n\nfunction checkTriangle(point: Point, triangle: Triangle, delta: Vector, skip: Triangle[] = []): Vector {\n const p = new GlobalPoint(point[0], point[1]);\n const endpoint = p.add(delta).asArray();\n if (triangle.contains(endpoint)) return delta;\n skip.push(triangle);\n\n for (let i = 0; i < 3; i++) {\n if (skip.includes(triangle.neighbours[i]!)) continue;\n\n const _cw = triangle.vertices[cw(i)]!.point!;\n const _ccw = triangle.vertices[ccw(i)]!.point!;\n const ix = intersection(point, endpoint, _cw, _ccw);\n\n if (ix === null) continue;\n\n if (!triangle.isConstrained(i)) return checkTriangle(point, triangle.neighbours[i]!, delta, skip);\n\n if (ix[0] === p.x && ix[1] === p.y) {\n const OR = orientation;\n const o = orientation(point, endpoint, _ccw);\n // Remember: canvas y axis is inverted\n if (o === Sign.LEFT_TURN) continue;\n if (o === Sign.ZERO) continue;\n }\n let newDelta = new GlobalPoint(ix[0], ix[1]).subtract(p).multiply(0.8);\n if (newDelta.length() < 1) newDelta = new Vector(0, 0);\n if (newDelta.length() < delta.length()) delta = newDelta;\n }\n return delta;\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"","import { socket } from \"@/game/api/socket\";\nimport { gameStore } from \"@/game/store\";\n\nexport function sendClientOptions() {\n socket.emit(\"Client.Options.Set\", {\n locationOptions: {\n panX: gameStore.panX,\n panY: gameStore.panY,\n zoomFactor: gameStore.zoomFactor,\n },\n });\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\nimport { AssetFile, AssetList } from \"@/core/comm/types\";\nimport { alphSort } from \"@/core/utils\";\n\n@Component({\n name: \"asset-node\",\n})\nexport default class AssetNode extends Vue {\n @Prop() asset!: AssetList;\n\n showImage = null;\n get folders(): string[] {\n return Object.keys(this.asset)\n .filter(el => ![\"__files\"].includes(el))\n .sort(alphSort);\n }\n\n get files(): AssetFile[] {\n if (this.asset.__files)\n return (this.asset.__files)\n .concat()\n .sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1));\n return [];\n }\n\n toggle(event: { target: HTMLElement }) {\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < event.target.children.length; i++) {\n const el = event.target.children[i];\n el.style.display = el.style.display === \"\" ? \"block\" : \"\";\n }\n }\n\n dragStart(event: DragEvent, imageSource: string) {\n if (event === null || event.dataTransfer === null) return;\n const img = (event.target).querySelector(\".preview\")!;\n event.dataTransfer.setDragImage(img, 0, 0);\n event.dataTransfer.setData(\"text/plain\", imageSource);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:\"ContextMenu\",style:({left:_vm.left, top:_vm.top}),attrs:{\"tabindex\":\"-1\"},on:{\"blur\":function($event){_vm.$emit('close')}}},[_c('ul',[_vm._t(\"default\")],2)]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=template&id=256dde9c&\"","// import Vuex from \"vuex\";\nimport { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { rootStore } from \"@/store\";\n\nexport interface AssetState {\n root: number;\n files: number[];\n folders: number[];\n idMap: Map;\n selected: number[];\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"assets\", namespaced: true })\nclass AssetStore extends VuexModule {\n root = -1;\n files: number[] = [];\n folders: number[] = [];\n idMap: Map = new Map();\n selected: number[] = [];\n\n @Mutation\n clear() {\n this.folders = [];\n this.files = [];\n }\n\n @Mutation\n clearSelected() {\n console.log(\"Cleared\");\n this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n}\n\nexport const assetStore = getModule(AssetStore);\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class ShapeContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n shape: Shape | null = null;\n get activeLayer(): string {\n const layer = layerManager.getLayer();\n return layer === undefined ? \"\" : layer.name;\n }\n open(event: MouseEvent, shape: Shape) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.shape = shape;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n this.shape = null;\n }\n getLayers() {\n return layerManager.layers.filter(l => l.selectable && (gameStore.IS_DM || l.playerEditable));\n }\n getActiveLayer() {\n return layerManager.getLayer();\n }\n getInitiativeWord() {\n if (this.shape === null) return \"\";\n return getRef(\"initiative\").contains(this.shape.uuid) ? \"Show\" : \"Add\";\n }\n setLayer(newLayer: string) {\n if (this.shape === null) return;\n this.shape.moveLayer(newLayer, true);\n this.close();\n }\n moveToBack() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, 0, true);\n this.close();\n }\n moveToFront() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, layer.shapes.length - 1, true);\n this.close();\n }\n addInitiative() {\n if (this.shape === null) return;\n const initiative = getRef(\"initiative\");\n if (!initiative.contains(this.shape.uuid)) initiative.addInitiative(this.shape.getInitiativeRepr());\n initiative.visible = true;\n this.close();\n }\n openEditDialog() {\n EventBus.$emit(\"EditDialog.Open\", this.shape);\n this.close();\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.shape !== null)?_c('div',[_c('div',{attrs:{\"id\":\"selection-menu\"}},[_c('div',{attrs:{\"id\":\"selection-edit-button\"},on:{\"click\":_vm.openEditDialog}},[_c('i',{staticClass:\"fas fa-edit\"})]),_c('div',{attrs:{\"id\":\"selection-name\"}},[_vm._v(_vm._s(_vm.shape.name))]),_c('div',{attrs:{\"id\":\"selection-trackers\"}},[_vm._l((_vm.shape.trackers),function(tracker){return (tracker.name !== '' || tracker.value !== 0)?[_c('div',{key:'name-' + tracker.uuid},[_vm._v(_vm._s(tracker.name))]),_c('div',{key:'value-' + tracker.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(tracker, false)}}},[(tracker.maxvalue === 0)?[_vm._v(_vm._s(tracker.value))]:[_vm._v(_vm._s(tracker.value)+\" / \"+_vm._s(tracker.maxvalue))]],2)]:_vm._e()})],2),_c('div',{attrs:{\"id\":\"selection-auras\"}},[_vm._l((_vm.shape.auras),function(aura){return (aura.name !== '' || aura.value !== 0)?[_c('div',{key:'name-' + aura.uuid},[_vm._v(_vm._s(aura.name))]),_c('div',{key:'value-' + aura.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(aura, true)}}},[(aura.dim === 0)?[_vm._v(_vm._s(aura.value))]:[_vm._v(_vm._s(aura.value)+\" / \"+_vm._s(aura.dim))]],2)]:_vm._e()})],2)]),_c('edit-dialog',{ref:\"editDialog\",attrs:{\"shape\":_vm.shape}})],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=template&id=32cec914&scoped=true&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"","import { Layer } from \"@/game/layers/layer\";\nimport { gameStore } from \"@/game/store\";\n\nexport class GridLayer extends Layer {\n invalidate(): void {\n this.valid = false;\n }\n draw(doClear?: boolean): void {\n if (!this.valid) {\n this.drawGrid();\n }\n }\n drawGrid(): void {\n const ctx = this.ctx;\n this.clear();\n ctx.beginPath();\n\n const gs = gameStore.gridSize;\n\n for (let i = 0; i < this.width; i += gs * gameStore.zoomFactor) {\n ctx.moveTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, 0);\n ctx.lineTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, this.height);\n ctx.moveTo(0, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n ctx.lineTo(this.width, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n }\n\n ctx.strokeStyle = gameStore.gridColour;\n ctx.lineWidth = 1;\n ctx.stroke();\n this.valid = true;\n }\n}\n","import Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nimport { AssetState } from \"@/assetManager/store\";\nimport { CoreState } from \"@/core/store\";\nimport { GameState } from \"@/game/store\";\n\nVue.use(Vuex);\n\nexport interface RootState {\n assets: AssetState;\n core: CoreState;\n game: GameState;\n}\n\nexport const rootStore = new Vuex.Store({});\n","import { render, staticRenderFns } from \"./colorpicker.vue?vue&type=template&id=b4f2c0b0&scoped=true&\"\nimport script from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nexport * from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./colorpicker.vue?vue&type=style&index=0&id=b4f2c0b0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b4f2c0b0\",\n null\n \n)\n\ncomponent.options.__file = \"colorpicker.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view',{ref:\"activeComponent\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=196415f0&\"\nvar script = {}\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"App.vue\"\nexport default component.exports","import { GlobalPoint, Ray } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, getUnitDistance } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n virtualCanvas: HTMLCanvasElement;\n vCtx: CanvasRenderingContext2D;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n super(canvas, name);\n this.virtualCanvas = document.createElement(\"canvas\");\n this.virtualCanvas.width = window.innerWidth;\n this.virtualCanvas.height = window.innerHeight;\n this.vCtx = this.virtualCanvas.getContext(\"2d\")!;\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n super.addShape(shape, sync, temporary, invalidate);\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n this.preFogShapes.push(shape);\n }\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n const idx = this.preFogShapes.findIndex(s => s.uuid === shape.uuid);\n this.preFogShapes.splice(idx, 1);\n }\n super.removeShape(shape, sync, temporary);\n }\n\n draw(): void {\n if (!this.valid) {\n const ctx = this.ctx;\n\n if (Settings.skipLightFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n const originalOperation = ctx.globalCompositeOperation;\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n const dctx = layerManager.getLayer(\"draw\")!.ctx;\n if (Settings.drawAngleLines || Settings.drawFirstLightHit) {\n dctx.clearRect(0, 0, dctx.canvas.width, dctx.canvas.height);\n }\n\n // At all times provide a minimal vision range to prevent losing your tokens in fog.\n if (gameStore.fullFOW && layerManager.hasLayer(\"tokens\")) {\n layerManager.getLayer(\"tokens\")!.shapes.forEach(sh => {\n if (!sh.ownedBy() || !sh.isToken) return;\n const bb = sh.getBoundingBox();\n const lcenter = g2l(sh.center());\n const alm = 0.8 * g2lz(bb.w);\n ctx.beginPath();\n ctx.arc(lcenter.x, lcenter.y, alm, 0, 2 * Math.PI);\n const gradient = ctx.createRadialGradient(lcenter.x, lcenter.y, alm / 2, lcenter.x, lcenter.y, alm);\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n ctx.fill();\n });\n }\n\n this.vCtx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n\n // First cut out all the light sources\n for (const light of gameStore.visionSources) {\n const shape = layerManager.UUIDMap.get(light.shape);\n if (shape === undefined) continue;\n const aura = shape.auras.find(a => a.uuid === light.aura);\n if (aura === undefined) continue;\n\n const auraLength = getUnitDistance(aura.value + aura.dim);\n const center = shape.center();\n const lcenter = g2l(center);\n\n const auraCircle = new Circle(center, auraLength);\n if (!auraCircle.visibleInCanvas(ctx.canvas)) continue;\n\n if (gameStore.visionMode === \"bvh\") {\n let lastArcAngle = -1;\n\n const path = new Path2D();\n path.moveTo(lcenter.x, lcenter.y);\n let firstPoint: GlobalPoint;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 180) * Math.PI) {\n const anglePoint = new GlobalPoint(\n center.x + auraLength * Math.cos(angle),\n center.y + auraLength * Math.sin(angle),\n );\n if (Settings.drawAngleLines) {\n dctx!.beginPath();\n dctx!.moveTo(g2lx(center.x), g2ly(center.y));\n dctx!.lineTo(g2lx(anglePoint.x), g2ly(anglePoint.y));\n dctx!.stroke();\n }\n\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = Ray.fromPoints(center, anglePoint);\n const hitResult = gameStore.BV.intersect(lightRay);\n\n if (angle === 0) firstPoint = hitResult.hit ? hitResult.intersect : anglePoint;\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n // Draw a line from the last non arc location back to the arc\n const dest = g2l(anglePoint);\n ctx.lineTo(dest.x, dest.y);\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, angle);\n lastArcAngle = -1;\n }\n path.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n // Finish the final arc.\n if (lastArcAngle === -1) path.lineTo(g2lx(firstPoint!.x), g2ly(firstPoint!.y));\n else path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, 2 * Math.PI);\n\n if (gameStore.fullFOW) {\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n ctx.fill(path);\n }\n\n aura.lastPath = path;\n } else {\n this.vCtx.globalCompositeOperation = \"source-over\";\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n const polygon = computeVisibility(center, \"vision\");\n this.vCtx.beginPath();\n this.vCtx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) this.vCtx.lineTo(g2lx(point[0]), g2ly(point[1]));\n this.vCtx.closePath();\n this.vCtx.fill();\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = this.vCtx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n this.vCtx.fillStyle = gradient;\n } else {\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n this.vCtx.globalCompositeOperation = \"source-in\";\n this.vCtx.beginPath();\n this.vCtx.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), 0, 2 * Math.PI);\n this.vCtx.fill();\n ctx.drawImage(this.virtualCanvas, 0, 0);\n }\n }\n\n // At the DM Side due to opacity of the two fow layers, it looks strange if we just render them on top of eachother like players.\n if (gameStore.fowLOS) {\n ctx.globalCompositeOperation = \"source-in\";\n ctx.drawImage(layerManager.getLayer(\"fow-players\")!.canvas, 0, 0);\n }\n\n for (const preShape of this.preFogShapes) {\n if (!preShape.visibleInCanvas(this.canvas)) continue;\n const ogComposite = preShape.globalCompositeOperation;\n if (!gameStore.fullFOW) {\n if (preShape.globalCompositeOperation === \"source-over\")\n preShape.globalCompositeOperation = \"destination-out\";\n else if (preShape.globalCompositeOperation === \"destination-out\")\n preShape.globalCompositeOperation = \"source-over\";\n }\n preShape.draw(ctx);\n preShape.globalCompositeOperation = ogComposite;\n }\n\n if (gameStore.fullFOW) {\n ctx.globalCompositeOperation = \"source-out\";\n ctx.fillStyle = getFogColour();\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n super.draw(false);\n\n ctx.globalCompositeOperation = originalOperation;\n }\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"menuContainer\"}},[_c('div',{ref:\"rm\",style:({\n left: _vm.visible.settings ? '200px' : '0',\n top: _vm.visible.locations ? '100px' : '0'\n }),attrs:{\"id\":\"radialmenu\"}},[_c('div',{staticClass:\"rm-wrapper\"},[_c('div',{staticClass:\"rm-toggler\"},[_c('ul',{staticClass:\"rm-list\",class:{ 'rm-list-dm': _vm.IS_DM }},[(_vm.IS_DM)?_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-locations\"},on:{\"click\":function($event){_vm.visible.locations = !_vm.visible.locations}}},[_vm._m(0)]):_vm._e(),_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-settings\"},on:{\"click\":function($event){_vm.visible.settings = !_vm.visible.settings}}},[_vm._m(1)])])]),_vm._m(2)])]),_c('transition',{attrs:{\"name\":\"settings\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'left 500ms'}}},[(_vm.visible.settings)?_c('div',{ref:\"settings\",attrs:{\"id\":\"menu\"},on:{\"click\":_vm.settingsClick}},[_c('div',{staticStyle:{\"width\":\"200px\",\"height\":\"90%\",\"overflow-y\":\"auto\",\"overflow-x\":\"hidden\"}},[(_vm.IS_DM)?[_c('button',{staticClass:\"accordion\"},[_vm._v(\"Assets\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('a',{staticClass:\"actionButton\",attrs:{\"href\":\"/assets\",\"target\":\"blank\",\"title\":\"Open asset manager\"}},[_c('i',{staticClass:\"fas fa-external-link-alt\"})]),_c('div',{staticClass:\"directory\",attrs:{\"id\":\"menu-tokens\"}},[_c('asset-node',{attrs:{\"asset\":_vm.assets}}),(!_vm.assets)?_c('div',[_vm._v(\"No assets\")]):_vm._e()],1)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Notes\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\",attrs:{\"id\":\"menu-notes\"}},[_c('a',{staticClass:\"actionButton\",on:{\"click\":_vm.createNote}},[_c('i',{staticClass:\"far fa-plus-square\"})]),_vm._l((_vm.notes),function(note){return _c('div',{key:note.uuid,staticStyle:{\"cursor\":\"pointer\"},on:{\"click\":function($event){_vm.openNote(note)}}},[_vm._v(_vm._s(note.title || \"[?]\"))])}),(!_vm.notes.length)?_c('div',[_vm._v(\"No notes\")]):_vm._e()],2)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"DM Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"useGridInput\"}},[_vm._v(\"Use grid:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.useGrid),expression:\"useGrid\"}],attrs:{\"id\":\"useGridInput\",\"type\":\"checkbox\",\"checked\":\"checked\"},domProps:{\"checked\":Array.isArray(_vm.useGrid)?_vm._i(_vm.useGrid,null)>-1:(_vm.useGrid)},on:{\"change\":function($event){var $$a=_vm.useGrid,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.useGrid=$$a.concat([$$v]))}else{$$i>-1&&(_vm.useGrid=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.useGrid=$$c}}}}),_c('label',{attrs:{\"for\":\"useFOWInput\"}},[_vm._v(\"Fill entire canvas with FOW:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fullFOW),expression:\"fullFOW\"}],attrs:{\"id\":\"useFOWInput\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fullFOW)?_vm._i(_vm.fullFOW,null)>-1:(_vm.fullFOW)},on:{\"change\":function($event){var $$a=_vm.fullFOW,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fullFOW=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fullFOW=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fullFOW=$$c}}}}),_c('label',{attrs:{\"for\":\"fowOpacity\"}},[_vm._v(\"FOW opacity:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.fowOpacity),expression:\"fowOpacity\",modifiers:{\"number\":true}}],attrs:{\"id\":\"fowOpacity\",\"type\":\"number\",\"min\":\"0\",\"max\":\"1\",\"step\":\"0.1\"},domProps:{\"value\":(_vm.fowOpacity)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.fowOpacity=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"fowLOS\"}},[_vm._v(\"Only show lights in LoS:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fowLOS),expression:\"fowLOS\"}],attrs:{\"id\":\"fowLOS\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fowLOS)?_vm._i(_vm.fowLOS,null)>-1:(_vm.fowLOS)},on:{\"change\":function($event){var $$a=_vm.fowLOS,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fowLOS=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fowLOS=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fowLOS=$$c}}}}),_c('label',{attrs:{\"for\":\"unitSizeInput\"}},[_vm._v(\"Unit Size (in ft.):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.unitSize),expression:\"unitSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"unitSizeInput\",\"type\":\"number\"},domProps:{\"value\":(_vm.unitSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.unitSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"gridSizeInput\"}},[_vm._v(\"Grid Size (in pixels):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.gridSize),expression:\"gridSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"gridSizeInput\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.gridSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.gridSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'bvh'}},[_vm._v(\"BVH\")]),_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'triangle'}},[_vm._v(\"Triangle\")])]),_c('label',{attrs:{\"for\":\"vmininp\"}},[_vm._v(\"Minimal full vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMin),expression:\"visionRangeMin\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmininp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMin)},on:{\"change\":function($event){_vm.visionRangeMin=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"vmaxinp\"}},[_vm._v(\"Maximal vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMax),expression:\"visionRangeMax\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmaxinp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMax)},on:{\"change\":function($event){_vm.visionRangeMax=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"invitation\"}},[_vm._v(\"Invitation Code:\")]),_c('input',{attrs:{\"id\":\"invitation\",\"type\":\"text\",\"readonly\":\"readonly\"},domProps:{\"value\":_vm.invitationCode}})])])]:_vm._e(),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Client Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"gridColour\"}},[_vm._v(\"Grid Colour:\")]),_c('color-picker',{attrs:{\"id\":\"gridColour\",\"color\":_vm.gridColour},on:{\"update:color\":function($event){_vm.gridColour=$event}}}),_c('label',{attrs:{\"for\":\"fowColour\"}},[_vm._v(\"FOW Colour:\")]),_c('color-picker',{attrs:{\"id\":\"fowColour\",\"color\":_vm.fowColour},on:{\"update:color\":function($event){_vm.fowColour=$event}}}),_c('label',{attrs:{\"for\":\"rulerColour\"}},[_vm._v(\"Ruler Colour:\")]),_c('color-picker',{attrs:{\"id\":\"rulerColour\",\"color\":_vm.rulerColour},on:{\"update:color\":function($event){_vm.rulerColour=$event}}})],1)])],2),_c('router-link',{staticClass:\"accordion\",staticStyle:{\"text-decoration\":\"none\",\"display\":\"inline-block\",\"position\":\"absolute\",\"bottom\":\"0\"},attrs:{\"to\":\"/dashboard\"}},[_vm._v(\"Exit\")])],1):_vm._e()]),_c('transition',{attrs:{\"name\":\"locations\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'top 500ms'}}},[(_vm.IS_DM && _vm.visible.locations)?_c('div',{attrs:{\"id\":\"locations-menu\"}},[_c('div',[_vm._l((_vm.locations),function(location){return _c('div',{key:location,on:{\"click\":function($event){_vm.changeLocation(location)}}},[_vm._v(_vm._s(location))])}),_c('div',{on:{\"click\":_vm.createLocation}},[_c('i',{staticClass:\"fas fa-plus\"})])],2)]):_vm._e()]),_c('img',{attrs:{\"id\":\"dragImage\"}})],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"far fa-compass\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"fas fa-cog\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"rm-topper\"},[_c('i',{staticClass:\"icon-share-alt\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"","import { ServerCircle } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Circle extends Shape {\n type = \"circle\";\n r: number;\n constructor(center: GlobalPoint, r: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(center, fillColour, strokeColour, uuid);\n this.r = r || 1;\n }\n asDict(): ServerCircle {\n // const base = this.getBaseDict();\n // base.r = this.r;\n // base.border = this.border;\n // return base;\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n });\n }\n fromDict(data: ServerCircle) {\n super.fromDict(data);\n this.r = data.radius;\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(this.refPoint.x - this.r, this.refPoint.y - this.r),\n this.r * 2,\n this.r * 2,\n );\n }\n\n get points() {\n return this.getBoundingBox().points;\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const loc = g2l(this.refPoint);\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.fill();\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = g2lz(5);\n ctx.strokeStyle = this.strokeColour;\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.stroke();\n }\n }\n contains(point: GlobalPoint): boolean {\n return (point.x - this.refPoint.x) ** 2 + (point.y - this.refPoint.y) ** 2 < this.r ** 2;\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint;\n this.refPoint = centerPoint;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid() {\n const gs = gameStore.gridSize;\n let targetX;\n let targetY;\n if (((2 * this.r) / gs) % 2 === 0) {\n targetX = Math.round(this.refPoint.x / gs) * gs;\n } else {\n targetX = Math.round((this.refPoint.x - gs / 2) / gs) * gs + this.r;\n }\n if (((2 * this.r) / gs) % 2 === 0) {\n targetY = Math.round(this.refPoint.y / gs) * gs;\n } else {\n targetY = Math.round((this.refPoint.y - gs / 2) / gs) * gs + this.r;\n }\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.r = Math.max(Math.round(this.r / gs) * gs, gs / 2);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n const diff = l2g(point).subtract(this.refPoint);\n this.r = Math.sqrt(Math.pow(diff.length(), 2) / 2);\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class MapTool extends Tool {\n name = \"Map\";\n active = false;\n xCount = 3;\n yCount = 3;\n startPoint: GlobalPoint | null = null;\n rect: Rect | null = null;\n\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = true;\n\n this.startPoint = l2g(getMouse(event));\n this.rect = new Rect(this.startPoint.clone(), 0, 0, \"rgba(0,0,0,0)\", \"black\");\n layer.addShape(this.rect, false, false);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.rect === null || this.startPoint === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n const endPoint = l2g(getMouse(event));\n\n this.rect.w = Math.abs(endPoint.x - this.startPoint.x);\n this.rect.h = Math.abs(endPoint.y - this.startPoint.y);\n this.rect.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.rect === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n if (layer.selection.length !== 1) {\n layer.removeShape(this.rect, false, false);\n return;\n }\n\n const w = this.rect.w;\n const h = this.rect.h;\n const sel = layer.selection[0];\n\n if (sel instanceof BaseRect) {\n sel.w *= (this.xCount * gameStore.gridSize) / w;\n sel.h *= (this.yCount * gameStore.gridSize) / h;\n }\n\n layer.removeShape(this.rect, false, false);\n }\n}\n","import { render, staticRenderFns } from \"./load.vue?vue&type=template&id=ff095222&\"\nimport script from \"./load.vue?vue&type=script&lang=ts&\"\nexport * from \"./load.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"load.vue\"\nexport default component.exports","import Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class PanTool extends Tool {\n name = \"Pan\";\n panStart = new LocalPoint(0, 0);\n active = false;\n\n onMouseDown(event: MouseEvent) {\n this.panStart = getMouse(event);\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active) return;\n const mouse = getMouse(event);\n const distance = mouse.subtract(this.panStart).multiply(1 / gameStore.zoomFactor);\n gameStore.increasePanX(Math.round(distance.x));\n gameStore.increasePanY(Math.round(distance.y));\n this.panStart = mouse;\n layerManager.invalidate();\n }\n onMouseUp(event: MouseEvent) {\n this.active = false;\n sendClientOptions();\n }\n}\n","import { render, staticRenderFns } from \"./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"\nimport script from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"44a31e42\",\n null\n \n)\n\ncomponent.options.__file = \"selectcontext.vue\"\nexport default component.exports","import Vue from \"vue\";\n\nimport { app } from \"@/main\";\n\n// Reference: https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\nexport function uuidv4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport function capitalize(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nexport function alphSort(a: string, b: string) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n else return 1;\n}\n\nexport function getHTMLFont(element: HTMLElement) {\n let font = element.style.font;\n while (font === null && element.parentElement !== null) {\n element = element.parentElement;\n font = element.style.font;\n }\n if (font === null) font = window.getComputedStyle(document.body).getPropertyValue(\"font\");\n return font;\n}\n\nexport function getHTMLTextWidth(text: string, font: string): number {\n let fakeElement = document.getElementById(\"emptycanvas\");\n if (fakeElement === null) {\n fakeElement = document.createElement(\"canvas\");\n fakeElement.id = \"emptycanvas\";\n fakeElement.style.display = \"\";\n document.body.appendChild(fakeElement);\n }\n const ctx = fakeElement.getContext(\"2d\")!;\n ctx.font = font;\n return Math.ceil(ctx.measureText(text).width);\n}\n\nexport function partition(arr: T[], predicate: (n: T) => boolean) {\n const ret: T[][] = [[], []];\n arr.forEach(n => (predicate(n) ? ret[1].push(n) : ret[0].push(n)));\n return ret;\n}\n\nexport function calcFontScale(ctx: CanvasRenderingContext2D, text: string, width: number, height: number) {\n const points = Number(ctx.font.split(\"px\")[0]) * 0.2;\n const fontWidth = ctx.measureText(text).width;\n return Math.min(width / fontWidth, height / points);\n}\n\nexport function fixedEncodeURIComponent(str: string) {\n return encodeURIComponent(str).replace(/[!'()*]/g, c => {\n return \"%\" + c.charCodeAt(0).toString(16);\n });\n}\n\nexport class OrderedMap {\n keys: K[] = [];\n values: V[] = [];\n\n get length() {\n return this.keys.length;\n }\n\n get(key: K) {\n return this.values[this.keys.indexOf(key)];\n }\n getIndexValue(idx: number) {\n return this.values[idx];\n }\n getIndexKey(idx: number) {\n return this.keys[idx];\n }\n set(key: K, value: V) {\n this.keys.push(key);\n this.values.push(value);\n }\n has(key: K) {\n return this.indexOf(key) >= 0;\n }\n indexOf(element: K) {\n return this.keys.indexOf(element);\n }\n remove(element: K) {\n const idx = this.indexOf(element);\n this.keys.splice(idx, 1);\n this.values.splice(idx, 1);\n }\n}\n\nexport function getComponent(): T {\n return app.$children[0].$refs.activeComponent;\n}\n\nexport function getRef(ref: string): T {\n const active = app.$children[0].$refs.activeComponent;\n return active.$refs[ref];\n}\n","import { render, staticRenderFns } from \"./contextMenu.vue?vue&type=template&id=606797b4&\"\nimport script from \"./contextMenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextMenu.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextMenu.vue\"\nexport default component.exports","import { EdgeCirculator, Point, Sign, Triangle, Vertex } from \"./tds\";\n\ntype Line = number[];\n\nexport function cw(index: number) {\n return (index + 2) % 3;\n}\n\nexport function ccw(index: number) {\n return (index + 1) % 3;\n}\n\nexport function edgeInfo(va: Vertex, vb: Vertex) {\n const ec = new EdgeCirculator(va, null);\n if (ec.valid) {\n do {\n const indv = 3 - ec.t!.indexV(va) - ec.ri;\n const v = ec.t!.vertices[indv]!;\n if (!v.infinite) {\n if (v === vb) {\n return { includes: true, vi: vb, fr: ec.t!, i: ec.ri };\n } else {\n const orient = orientation(va.point!, vb.point!, v.point!);\n if (orient === Sign.COLLINEAR && collinearBetween(va.point!, v.point!, vb.point!)) {\n return { includes: true, vi: v, fr: ec.t!, i: ec.ri };\n }\n }\n }\n } while (ec.next());\n }\n return { includes: false };\n}\n\nexport function collinearBetween(p: Point, q: Point, r: Point): boolean {\n let cPQ: Sign;\n let cQR: Sign;\n if (compare(0, p, r) === Sign.EQUAL) {\n cPQ = compare(1, p, q);\n cQR = compare(1, q, r);\n } else {\n cPQ = compare(0, p, q);\n cQR = compare(0, q, r);\n }\n return (cPQ === Sign.SMALLER && cQR === Sign.SMALLER) || (cPQ === Sign.LARGER && cQR === Sign.LARGER);\n}\n\nfunction compare(index: number, a: Point, b: Point): Sign {\n if (a[index] < b[index]) return Sign.SMALLER;\n if (a[index] > b[index]) return Sign.LARGER;\n return Sign.EQUAL;\n}\n\nexport function orientation(p: Point, q: Point, r: Point) {\n const px = p[0];\n const py = p[1];\n const qx = q[0];\n const qy = q[1];\n const rx = r[0];\n const ry = r[1];\n const pqx = qx - px;\n const pqy = qy - py;\n const prx = rx - px;\n const pry = ry - py;\n const det = determinant(pqx, pqy, prx, pry);\n let maxX = Math.abs(pqx);\n let maxY = Math.abs(pqy);\n const aprX = Math.abs(prx);\n const aprY = Math.abs(pry);\n if (maxX < aprX) maxX = aprX;\n if (maxY < aprY) maxY = aprY;\n if (maxX > maxY) [maxX, maxY] = [maxY, maxX];\n // underflow proection in eps computation?? Math.sqrt(Number.MIN_VALUE, Number.EPSILON)\n if (maxX < 2e-162 && maxX === 0) {\n return Sign.ZERO;\n }\n // overflow protection in det computation\n if (maxY < 1e153) {\n const eps = Number.EPSILON * maxX * maxY;\n if (det > eps) return Sign.POSITIVE;\n if (det < -eps) return Sign.NEGATIVE;\n }\n return Sign.ZERO;\n}\n\nexport function determinant(a00: number, a01: number, a10: number, a11: number) {\n return a00 * a11 - a01 * a10;\n}\n\nexport function hasInexactNegativeOrientation(p: Point, q: Point, r: Point) {\n return determinant(q[0] - p[0], q[1] - p[1], r[0] - p[0], r[1] - p[1]) < 0;\n}\n\nexport function sideOfOrientedCircle(t: Triangle, p: Point, perturb: boolean): Sign {\n if (!t.isInfinite())\n return sideOfOrientedCircleP(t.vertices[0]!.point!, t.vertices[1]!.point!, t.vertices[2]!.point!, p, perturb);\n throw new Error(\"SSS\");\n}\n\nfunction sideOfOrientedCircleP(p0: Point, p1: Point, p2: Point, p: Point, perturb: boolean): Sign {\n const os = getOrientedSide(p0, p1, p2, p);\n if (os !== Sign.ON_ORIENTED_BOUNDARY || !perturb) return os;\n const points = [p0, p1, p2, p];\n points.sort((a, b) => a[0] - b[0] || a[1] - b[1]);\n for (const point of points.reverse()) {\n if (point === p) return Sign.ON_NEGATIVE_SIDE;\n let o = orientation(p0, p1, p);\n if (point === p2 && o !== Sign.COLLINEAR) return o;\n o = orientation(p0, p, p2);\n if (point === p1 && o !== Sign.COLLINEAR) return o;\n o = orientation(p, p1, p2);\n if (point === p0 && o !== Sign.COLLINEAR) return o;\n }\n return Sign.ON_NEGATIVE_SIDE;\n}\n\nexport function xyEqual(p: Point, q: Point) {\n return p[0] === q[0] && p[1] === q[1];\n}\n\nexport function xySmaller(p: Point, q: Point) {\n return p[0] < q[0] || (p[0] === q[0] && p[1] < q[1]);\n}\n\nexport function xyCompare(p: Point, q: Point) {\n if (xySmaller(p, q)) return Sign.SMALLER;\n if (xyEqual(p, q)) return Sign.EQUAL;\n return Sign.LARGER;\n}\n\nfunction getOrientedSide(p: Point, q: Point, r: Point, t: Point): Sign {\n const qpx = q[0] - p[0];\n const qpy = q[1] - p[1];\n const rpx = r[0] - p[0];\n const rpy = r[1] - p[1];\n const tpx = t[0] - p[0];\n const tpy = t[1] - p[1];\n const tqx = t[0] - q[0];\n const tqy = t[1] - q[1];\n const rqx = r[0] - q[0];\n const rqy = r[1] - q[1];\n\n const det = determinant(qpx * tpy - qpy * tpx, tpx * tqx + tpy * tqy, qpx * rpy - qpy * rpx, rpx * rqx + rpy * rqy);\n let maxx = Math.abs(qpx);\n let maxy = Math.abs(qpy);\n const arpx = Math.abs(rpx);\n const arpy = Math.abs(rpy);\n const atqx = Math.abs(tqx);\n const atqy = Math.abs(tqy);\n const atpx = Math.abs(tpx);\n const atpy = Math.abs(tpy);\n const arqx = Math.abs(rqx);\n const arqy = Math.abs(rqy);\n\n if (maxx < arpx) maxx = arpx;\n if (maxx < atpx) maxx = atpx;\n if (maxx < atqx) maxx = atqx;\n if (maxx < arqx) maxx = arqx;\n\n if (maxy < arpy) maxy = arpy;\n if (maxy < atpy) maxy = atpy;\n if (maxy < atqy) maxy = atqy;\n if (maxy < arqy) maxy = arqy;\n\n if (maxx > maxy) [maxx, maxy] = [maxy, maxx];\n\n if (maxx < 1e-73 && maxx === 0) return Sign.ON_ORIENTED_BOUNDARY;\n // sqrt(sqrt(max_double/16\n else if (maxy < 1e76) {\n const eps = Number.EPSILON * maxx * maxy * (maxy * maxy);\n if (det > eps) return Sign.ON_POSITIVE_SIDE;\n if (det < -eps) return Sign.ON_NEGATIVE_SIDE;\n }\n\n return Sign.ZERO;\n}\n\nfunction segSegDoIntersectCrossing(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p3, p4, p2) !== Sign.RIGHT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p3, p4, p2) !== Sign.LEFT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nfunction segSegDoIntersectContained(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p1, p2, p4) !== Sign.LEFT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p1, p2, p4) !== Sign.RIGHT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nexport function intersection(pa: Point, pb: Point, pc: Point, pd: Point) {\n const i = getIntersectionType(pa, pb, pc, pd);\n switch (i.intersectionType) {\n case IntersectionType.POINT:\n return i.point!;\n case IntersectionType.NO_INTERSECTION:\n return null;\n }\n throw new Error(\"sdfgighowen\");\n}\n\nenum IntersectionType {\n NO_INTERSECTION,\n POINT,\n SEGMENT,\n}\n\nfunction getLine(p0: Point, p1: Point): Line {\n if (p0[0] === p1[0]) return [1, 0, -p0[0]];\n if (p0[1] === p1[1]) return [0, 1, -p0[1]];\n const x = p1[0] - p0[0];\n const y = p1[1] - p0[1];\n return [-y, x, -x * p0[1] + y * p0[0]];\n}\n\nfunction getIntersectionType(pa: Point, pb: Point, pc: Point, pd: Point) {\n if (!doIntersect(pa, pb, pc, pd)) return { intersectionType: IntersectionType.NO_INTERSECTION, point: null };\n const l1 = getLine(pa, pb);\n const l2 = getLine(pc, pd);\n const info = getIntersectionTypeLine(l1, l2);\n switch (info.intersectionType) {\n case IntersectionType.POINT: {\n return info;\n }\n }\n throw new Error(\"gzseuihgpib\");\n}\n\nfunction getIntersectionTypeLine(la: Line, lb: Line) {\n const denom = la[0] * lb[1] - lb[0] * la[1];\n const nom1 = la[1] * lb[2] - lb[1] * la[2];\n const nom2 = lb[0] * la[2] - la[0] * lb[2];\n return {\n intersectionType: IntersectionType.POINT,\n point: [nom1 / denom, nom2 / denom],\n };\n}\n\nfunction doIntersect(A1: Point, A2: Point, B1: Point, B2: Point): boolean {\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A2, B1) || xySmaller(B2, A1)) return false;\n } else {\n if (xySmaller(A2, B2) || xySmaller(B1, A1)) return false;\n }\n } else {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A1, B1) || xySmaller(B2, A2)) return false;\n } else {\n if (xySmaller(A1, B2) || xySmaller(B1, A2)) return false;\n }\n }\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A1, A2);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A1, A2);\n }\n }\n }\n }\n }\n } else {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A2, A1);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A2, A1);\n }\n }\n }\n }\n }\n }\n}\n\nfunction nextUp(x: number) {\n if (x !== x) {\n return x;\n }\n if (x === -1 / 0) {\n return -Number.MAX_VALUE;\n }\n if (x === +1 / 0) {\n return +1 / 0;\n }\n if (x === +Number.MAX_VALUE) {\n return +1 / 0;\n }\n let y = x * (x < 0 ? 1 - Number.EPSILON / 2 : 1 + Number.EPSILON);\n if (y === x) {\n y = Number.MIN_VALUE * Number.EPSILON > 0 ? x + Number.MIN_VALUE * Number.EPSILON : x + Number.MIN_VALUE;\n }\n if (y === +1 / 0) {\n y = +Number.MAX_VALUE;\n }\n const b = x + (y - x) / 2;\n if (x < b && b < y) {\n y = b;\n }\n const c = (y + x) / 2;\n if (x < c && c < y) {\n y = c;\n }\n return y === 0 ? -0 : y;\n}\n\nexport function ulp(x: number) {\n return x < 0 ? nextUp(x) - x : x + nextUp(-x);\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=7c80ae3a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=7c80ae3a&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component\nexport default class Modal extends Vue {\n @Prop(Boolean) visible!: boolean;\n @Prop({ type: Boolean, default: true }) mask!: boolean;\n\n $refs!: {\n container: HTMLElement;\n };\n\n positioned = false;\n offsetX = 0;\n offsetY = 0;\n screenX = 0;\n screenY = 0;\n dragging = false;\n\n // Example of mounted required: opening note\n mounted() {\n this.updatePosition();\n }\n // Example of updated required: opening initiative\n updated() {\n this.updatePosition();\n }\n\n close(event: MouseEvent) {\n this.$emit(\"close\");\n }\n updatePosition() {\n if (!this.positioned) {\n const container = this.$refs.container;\n if (container.offsetWidth === 0 && container.offsetHeight === 0) return;\n this.$refs.container.style.left = (window.innerWidth - container.offsetWidth) / 2 + \"px\";\n this.$refs.container.style.top = (window.innerHeight - container.offsetHeight) / 2 + \"px\";\n this.positioned = true;\n }\n }\n dragStart(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"\");\n // Because the drag event is happening on the header, we have to change the drag image\n // in order to give the impression that the entire modal is dragged.\n event.dataTransfer.setDragImage(this.$refs.container, event.offsetX, event.offsetY);\n this.offsetX = event.offsetX;\n this.offsetY = event.offsetY;\n this.screenX = event.screenX;\n this.screenY = event.screenY;\n this.dragging = true;\n }\n dragEnd(event: DragEvent) {\n this.dragging = false;\n let left = event.clientX - this.offsetX;\n let top = event.clientY - this.offsetY;\n if (event.clientX === 0 && event.clientY === 0 && event.pageX === 0 && event.pageY === 0) {\n left = parseInt(this.$refs.container.style.left!, 10) - (this.screenX - event.screenX);\n top = parseInt(this.$refs.container.style.top!, 10) - (this.screenY - event.screenY);\n }\n if (left < 0) left = 0;\n if (left > window.innerWidth - 100) left = window.innerWidth - 100;\n if (top < 0) top = 0;\n if (top > window.innerHeight - 100) top = window.innerHeight - 100;\n this.$refs.container.style.left = left + \"px\";\n this.$refs.container.style.top = top + \"px\";\n this.$refs.container.style.display = \"block\";\n }\n dragOver(event: DragEvent) {\n if (this.dragging) this.$refs.container.style.display = \"none\";\n }\n}\n","import io from \"socket.io-client\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { assetStore } from \"./store\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\", { autoConnect: false });\n\n// export const socket = io.connect(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\");\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n window.location.href = destination;\n});\nsocket.on(\"Folder.Root.Set\", (root: number) => {\n assetStore.setRoot(root);\n});\nsocket.on(\"Folder.Set\", (folder: Asset) => {\n assetStore.clear();\n if (folder.children) {\n for (const child of folder.children) {\n assetStore.idMap.set(child.id, child);\n if (child.file_hash) {\n assetStore.files.push(child.id);\n } else {\n assetStore.folders.push(child.id);\n }\n }\n }\n});\nsocket.on(\"Folder.Create\", (folder: Asset) => {\n assetStore.folders.push(folder.id);\n assetStore.idMap.set(folder.id, folder);\n});\nsocket.on(\"Asset.Upload.Finish\", (asset: Asset) => {\n assetStore.idMap.set(asset.id, asset);\n assetStore.files.push(asset.id);\n});\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=1fee50f5&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=1fee50f5&scoped=true&lang=css&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { ServerMultiLine } from \"../comm/types/shapes\";\n\nexport class MultiLine extends Shape {\n type = \"multiline\";\n _points: GlobalPoint[] = [];\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n points?: GlobalPoint[],\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this._points = points || [];\n this.lineWidth = lineWidth || 3;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._points.length; i++) this._points[i] = this._points[i].add(delta);\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n line_width: this.lineWidth,\n points: this._points.map(p => ({ x: p.x, y: p.y })),\n });\n }\n fromDict(data: ServerMultiLine) {\n super.fromDict(data);\n this._points = data.points.map(p => new GlobalPoint(p.x, p.y));\n }\n get points() {\n return this._points.map(point => [point.x, point.y]);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._points) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n for (const p of this._points) ctx.lineTo(g2lx(p.x), g2ly(p.y));\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = g2lz(this.lineWidth);\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._points[resizePoint - 1] = l2g(point);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"outer\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}},[_c('div',{staticClass:\"current-color\",style:(_vm.transparent ? 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)' : 'background-color:' + _vm.color),on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],staticClass:\"mask\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.closePicker($event)}}}),_c('chrome-picker',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],ref:\"chromePicker\",style:({position: 'fixed', left:_vm.left + 'px', top:_vm.top + 'px', 'z-index': 9999}),attrs:{\"value\":_vm.color,\"tabindex\":\"-1\"},on:{\"input\":_vm.updateColor}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=template&id=b4f2c0b0&scoped=true&\"","import { render, staticRenderFns } from \"./draw.vue?vue&type=template&id=639cd890&scoped=true&\"\nimport script from \"./draw.vue?vue&type=script&lang=ts&\"\nexport * from \"./draw.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"639cd890\",\n null\n \n)\n\ncomponent.options.__file = \"draw.vue\"\nexport default component.exports","import tinycolor from \"tinycolor2\";\n\nimport { LocalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function getMouse(e: MouseEvent): LocalPoint {\n return new LocalPoint(e.pageX, e.pageY);\n}\n\nexport function getFogColour(opposite: boolean = false): string {\n const tc = tinycolor(gameStore.fowColour);\n if (gameStore.IS_DM) tc.setAlpha(opposite ? 1 : gameStore.fowOpacity);\n else tc.setAlpha(1);\n return tc.toRgbString();\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport * as tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { Watch } from \"vue-property-decorator\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n computed: {\n ...mapState(\"game\", [\"unitSize\"]),\n },\n})\nexport default class CreateTokenModal extends Vue {\n x = 0;\n y = 0;\n visible = false;\n text = \"X\";\n fillColour = \"rgba(255, 255, 255, 1)\";\n borderColour = \"rgba(0, 0, 0, 1)\";\n\n mounted() {\n this.updatePreview();\n }\n\n @Watch(\"text\")\n onTextChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"fillColour\")\n onFillChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"borderColour\")\n onBorderChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n\n open(x: number, y: number) {\n this.visible = true;\n this.x = x;\n this.y = y;\n }\n submit() {\n const layer = layerManager.getLayer();\n if (layer === undefined) return;\n const token = new CircularToken(\n l2g(new LocalPoint(this.x, this.y)),\n getUnitDistance(gameStore.unitSize / 2),\n this.text,\n \"10px serif\",\n this.fillColour,\n this.borderColour,\n );\n token.addOwner(gameStore.username);\n layer.addShape(token, true);\n layer.invalidate(false);\n this.visible = false;\n }\n updatePreview() {\n const ctx = (this.$refs.canvas).getContext(\"2d\")!;\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.beginPath();\n const dest = { x: ctx.canvas.width / 2, y: ctx.canvas.height / 2 };\n const r = Math.min(dest.x, dest.y) * 0.9;\n\n ctx.fillStyle = this.fillColour;\n\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.fill();\n if (this.borderColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = 5;\n ctx.strokeStyle = this.borderColour;\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.save();\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, r, r);\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class NoteDialog extends Vue {\n visible = false;\n note: Note | null = null;\n\n open(note: Note) {\n this.visible = true;\n this.note = note;\n }\n calcHeight() {\n if (this.$refs.textarea) {\n const el = this.$refs.textarea;\n el.style.height = \"auto\";\n el.style.height = el.scrollHeight + \"px\";\n // Using the return value without the above did not achieve what I want, so hey /shrug\n return el.scrollHeight + \"px\";\n }\n return \"100px\";\n }\n updateNote() {\n if (this.note) gameStore.updateNote({ note: this.note, sync: true });\n }\n removeNote() {\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result && this.note) {\n gameStore.removeNote({ note: this.note, sync: true });\n this.visible = false;\n }\n },\n () => {},\n );\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=ccaf03d6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=ccaf03d6&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport { Watch } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Polygon } from \"@/game/shapes/polygon\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n },\n})\nexport default class DrawTool extends Tool {\n name = \"Draw\";\n active = false;\n\n startPoint: GlobalPoint | null = null;\n shape: Shape | null = null;\n brushHelper: Circle | null = null;\n ruler: Line | null = null;\n\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"draw-polygon\", \"paint-brush\"];\n modeSelect = \"normal\";\n modes = [\"normal\", \"reveal\", \"hide\"];\n\n brushSize = getUnitDistance(gameStore.unitSize);\n\n get helperSize(): number {\n if (this.shapeSelect === \"paint-brush\") return this.brushSize / 2;\n return getUnitDistance(this.unitSize) / 8;\n }\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n\n @Watch(\"fillColour\")\n onFillChange() {\n if (this.brushHelper) this.brushHelper.fillColour = this.fillColour;\n }\n\n @Watch(\"modeSelect\")\n onModeUpdate(newValue: string, oldValue: string) {\n this.onModeChange(newValue, oldValue);\n }\n\n setupBrush() {\n if (this.brushHelper === null) return;\n if (this.modeSelect === \"reveal\" || this.modeSelect === \"hide\") {\n this.brushHelper.options.set(\"preFogShape\", true);\n this.brushHelper.options.set(\"skipDraw\", true);\n this.brushHelper.fillColour = \"rgba(0, 0, 0, 1)\";\n\n if (this.modeSelect === \"reveal\") this.brushHelper.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.brushHelper.globalCompositeOperation = \"destination-out\";\n } else {\n this.brushHelper.options.delete(\"preFogShape\");\n this.brushHelper.options.delete(\"skipDraw\");\n this.brushHelper.globalCompositeOperation = \"source-over\";\n this.brushHelper.fillColour = this.fillColour;\n }\n }\n onModeChange(newValue: string, oldValue: string) {\n if (this.brushHelper === null) return;\n\n const fowLayer = layerManager.getLayer(\"fow\");\n const normalLayer = layerManager.getLayer();\n if (fowLayer === undefined || normalLayer === undefined) return;\n\n this.setupBrush();\n\n if (newValue !== \"normal\" && oldValue === \"normal\") {\n normalLayer.removeShape(this.brushHelper, false);\n fowLayer.addShape(this.brushHelper, false);\n } else if (newValue === \"normal\" && oldValue !== \"normal\") {\n normalLayer.addShape(this.brushHelper, false);\n fowLayer.removeShape(this.brushHelper, false);\n }\n }\n getLayer() {\n if (this.modeSelect === \"normal\") return layerManager.getLayer();\n return layerManager.getLayer(\"fow\");\n }\n onMouseDown(event: MouseEvent) {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (!this.active) {\n this.startPoint = l2g(getMouse(event));\n this.active = true;\n switch (this.shapeSelect) {\n case \"square\": {\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n break;\n }\n case \"circle\": {\n this.shape = new Circle(\n this.startPoint.clone(),\n this.helperSize,\n this.fillColour,\n this.borderColour,\n );\n break;\n }\n case \"paint-brush\": {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n break;\n }\n case \"draw-polygon\": {\n this.shape = new Polygon(this.startPoint.clone(), [], this.fillColour, this.borderColour);\n break;\n }\n default:\n return;\n }\n\n if (this.modeSelect !== \"normal\") {\n this.shape.options.set(\"preFogShape\", true);\n this.shape.options.set(\"skipDraw\", true);\n this.shape.fillColour = \"rgba(0, 0, 0, 1)\";\n }\n if (this.modeSelect === \"reveal\") this.shape.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.shape.globalCompositeOperation = \"destination-out\";\n\n this.shape.addOwner(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n layer.addShape(this.shape, true, false, false);\n\n // Push brushhelper to back\n this.pushBrushBack();\n } else if (this.shape !== null && this.shape instanceof Polygon) {\n // For polygon draw\n this.shape._vertices.push(l2g(getMouse(event)));\n }\n if (this.shape !== null && this.shape instanceof Polygon) {\n const lastPoint = l2g(getMouse(event));\n if (this.ruler === null) {\n this.ruler = new Line(lastPoint, lastPoint, 3, \"black\");\n layer.addShape(this.ruler, false);\n } else {\n this.ruler.refPoint = lastPoint;\n this.ruler.endPoint = lastPoint;\n }\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n layer.invalidate(false);\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n }\n }\n onMouseMove(event: MouseEvent) {\n const endPoint = l2g(getMouse(event));\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (this.brushHelper !== null) {\n this.brushHelper.r = this.helperSize;\n this.brushHelper.refPoint = endPoint;\n if (!this.active) layer.invalidate(false);\n }\n\n if (!this.active || this.startPoint === null || this.shape === null) return;\n\n switch (this.shapeSelect) {\n case \"square\": {\n (this.shape).w = Math.abs(endPoint.x - this.startPoint.x);\n (this.shape).h = Math.abs(endPoint.y - this.startPoint.y);\n this.shape.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n break;\n }\n case \"circle\": {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n break;\n }\n case \"paint-brush\": {\n (this.shape)._points.push(endPoint);\n break;\n }\n case \"draw-polygon\": {\n this.ruler!.endPoint = endPoint;\n break;\n }\n }\n\n if (!(this.shape instanceof Polygon)) {\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n }\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null || this.shape instanceof Polygon) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n this.finaliseShape();\n }\n onContextMenu(event: MouseEvent) {\n if (!this.active || this.shape === null || !(this.shape instanceof Polygon)) return;\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n layer.removeShape(this.ruler!, false);\n this.ruler = null;\n this.finaliseShape();\n }\n\n private finaliseShape() {\n if (this.shape === null) return;\n if (this.shape.visionObstruction) gameStore.recalculateVision();\n if (this.shape.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\n }\n\n onSelect() {\n const layer = this.getLayer();\n if (layer === undefined) return;\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n onDeselect() {\n const layer = this.getLayer();\n if (this.brushHelper !== null && layer !== undefined) layer.removeShape(this.brushHelper, false);\n if (this.active && layer !== undefined && this.shape !== null) {\n layer.removeShape(this.shape, true, false);\n this.shape = null;\n this.active = false;\n layer.invalidate(false);\n }\n }\n\n private pushBrushBack() {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (this.brushHelper !== null) layer.removeShape(this.brushHelper, false);\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, l2g } from \"@/game/units\";\n\nexport class Line extends Shape {\n type = \"line\";\n endPoint: GlobalPoint;\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n endPoint: GlobalPoint,\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this.endPoint = endPoint;\n this.lineWidth = lineWidth === undefined ? 1 : lineWidth;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n x2: this.endPoint.x,\n y2: this.endPoint.y,\n line_width: this.lineWidth,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y], [this.endPoint.x, this.endPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(Math.min(this.refPoint.x, this.endPoint.x), Math.min(this.refPoint.y, this.endPoint.y)),\n Math.abs(this.refPoint.x - this.endPoint.x),\n Math.abs(this.refPoint.y - this.endPoint.y),\n );\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.strokeStyle = this.strokeColour;\n ctx.beginPath();\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n ctx.lineTo(g2lx(this.endPoint.x), g2ly(this.endPoint.y));\n ctx.lineWidth = this.lineWidth;\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this.refPoint = l2g(point);\n else this.endPoint = l2g(point);\n }\n}\n","// import \"./class-component-hooks\";\n\nimport axios, { AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Router from \"vue-router\";\n\nVue.use(Router);\n\nimport AssetManager from \"@/assetManager/manager.vue\";\nimport Login from \"@/auth/login.vue\";\nimport Logout from \"@/auth/logout\";\nimport LoadComponent from \"@/core/components/load.vue\";\nimport Dashboard from \"@/dashboard/main.vue\";\nimport Game from \"@/game/game.vue\";\nimport Invitation from \"@/invitation/invitation\";\n\nimport { coreStore } from \"@/core/store\";\n// import { AssetManager } from \"./assetManager/assets\";\n// const AssetManager = () => import(\"./assetManager/assets\").then(m => m.AssetManager);\n\nexport const router = new Router({\n mode: \"history\",\n base: process.env.BASE_URL,\n routes: [\n {\n path: \"/\",\n redirect: \"/dashboard\",\n },\n {\n path: \"/_load\",\n name: \"load\",\n component: LoadComponent,\n },\n {\n path: \"/assets\",\n component: AssetManager,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/auth\",\n component: { template: \"\" },\n children: [{ path: \"login\", component: Login }, { path: \"logout\", component: Logout }],\n },\n {\n path: \"/invite/:code\",\n component: Invitation,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/dashboard\",\n component: Dashboard,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/game/:creator/:room\",\n component: Game,\n meta: {\n auth: true,\n },\n },\n ],\n});\n\nrouter.beforeEach((to, from, next) => {\n if (!coreStore.initialized && to.path !== \"/_load\") {\n next({ path: \"/_load\" });\n axios\n .get(\"/api/auth\")\n .then((response: AxiosResponse) => {\n if (response.data.auth) {\n coreStore.setAuthenticated(true);\n coreStore.setUsername(response.data.username);\n }\n coreStore.setInitialized(true);\n router.push(to.path);\n })\n .catch(() => {\n console.error(\"Authentication check could not be fulfilled.\");\n });\n } else if (to.matched.some(record => record.meta.auth) && !coreStore.authenticated) {\n next({ path: \"/auth/login\", query: { redirect: to.path } });\n } else {\n next();\n }\n});\n","\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class Tool extends Vue {\n name = \"\";\n selected = false;\n active = false;\n get detailRight(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n\n return `${window.innerWidth - Math.min(window.innerWidth - 25, mid + 75)}px`;\n }\n get detailArrow(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n const right = Math.min(window.innerWidth - 25, mid + 75);\n return `${right - mid - 14}px`; // border width\n }\n created() {\n this.$parent.$on(\"mousedown\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseDown(event);\n });\n this.$parent.$on(\"mouseup\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseUp(event);\n });\n this.$parent.$on(\"mousemove\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseMove(event);\n });\n this.$parent.$on(\"contextmenu\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onContextMenu(event);\n });\n this.$parent.$on(\"tools-select-change\", (newValue: string, oldValue: string) => {\n if (oldValue === this.name) {\n this.selected = false;\n this.onDeselect();\n } else if (newValue === this.name) {\n this.selected = true;\n this.onSelect();\n }\n });\n }\n onSelect() {}\n onDeselect() {}\n onMouseDown(event: MouseEvent) {}\n onMouseUp(event: MouseEvent) {}\n onMouseMove(event: MouseEvent) {}\n onContextMenu(event: MouseEvent) {}\n}\n","import { render, staticRenderFns } from \"./tools.vue?vue&type=template&id=1fee50f5&scoped=true&\"\nimport script from \"./tools.vue?vue&type=script&lang=ts&\"\nexport * from \"./tools.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tools.vue?vue&type=style&index=0&id=1fee50f5&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1fee50f5\",\n null\n \n)\n\ncomponent.options.__file = \"tools.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"","import { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerAsset } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport class Asset extends BaseRect {\n type = \"assetrect\";\n img: HTMLImageElement;\n src: string = \"\";\n constructor(img: HTMLImageElement, topleft: GlobalPoint, w: number, h: number, uuid?: string) {\n super(topleft, w, h, undefined, undefined, uuid);\n this.img = img;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n src: this.src,\n });\n }\n fromDict(data: ServerAsset) {\n super.fromDict(data);\n this.src = data.src;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n try {\n ctx.drawImage(this.img, g2lx(this.refPoint.x), g2ly(this.refPoint.y), g2lz(this.w), g2lz(this.h));\n } catch (error) {\n console.warn(`Shape ${this.uuid} could not load the image ${this.src}`);\n }\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.src,\n has_img: true,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import {\n BoundingBox,\n EdgeCirculator,\n FaceCirculator,\n LineFaceCirculator,\n LocateType,\n Point,\n Sign,\n TDS,\n Triangle,\n Vertex,\n} from \"./tds\";\nimport {\n ccw,\n collinearBetween,\n cw,\n edgeInfo,\n hasInexactNegativeOrientation,\n intersection,\n orientation,\n sideOfOrientedCircle,\n xyEqual,\n} from \"./triag\";\n\nexport type Edge = [Triangle, number];\n\nexport class CDT {\n tds: TDS;\n constructor() {\n this.tds = new TDS();\n }\n insertConstraint(a: Point, b: Point) {\n const va = this.insert(a);\n const vb = this.insert(b);\n if (va !== vb) this.insertConstraintV(va, vb);\n }\n\n insertConstraintV(va: Vertex, vb: Vertex) {\n const stack = [[va, vb]];\n while (stack.length > 0) {\n const v = stack.pop()!;\n const info = edgeInfo(v[0], v[1]);\n if (info.includes) {\n this.markConstraint(info.fr!, info.i!);\n if (info.vi! !== v[1]) {\n stack.push([info.vi!, v[1]]);\n }\n continue;\n }\n const intersectionInfo = this.findIntersectedFaces(v[0], v[1]);\n if (intersectionInfo.found) {\n if (intersectionInfo.vi !== v[0] && intersectionInfo.vi !== v[1]) {\n stack.push([v[0], intersectionInfo.vi]);\n stack.push([intersectionInfo.vi, v[1]]);\n } else {\n stack.push(v);\n }\n continue;\n }\n this.triangulateHole(intersectionInfo.intersectedFaces, intersectionInfo.listAB, intersectionInfo.listBA);\n if (intersectionInfo.vi !== v[1]) {\n stack.push([intersectionInfo.vi, v[1]]);\n }\n }\n }\n\n triangulateHole(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[]) {\n const edges: Edge[] = [];\n this.triangulateHole2(intersectedFaces, listAB, listBA, edges);\n this.propagatingFlipE(edges);\n }\n\n triangulateHole2(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[], edges: Edge[]) {\n if (listAB.length > 0) {\n this.triangulateHalfHole(listAB, edges);\n this.triangulateHalfHole(listBA, edges);\n const fl = listAB[0][0];\n const fr = listBA[0][0];\n fl.neighbours[2] = fr;\n fr.neighbours[2] = fl;\n fl.constraints[2] = true;\n fr.constraints[2] = true;\n\n while (intersectedFaces.length > 0) {\n this.tds.deleteTriangle(intersectedFaces.shift()!);\n }\n }\n }\n\n triangulateHalfHole(conflictBoundaries: Edge[], edges: Edge[]) {\n let iC = 0;\n let iN: number;\n let iT: number;\n const current = () => conflictBoundaries[iC];\n const next = () => conflictBoundaries[iN];\n const tempo = () => conflictBoundaries[iT];\n\n const va = current()[0].vertices[ccw(current()[1])]!;\n iN = iC;\n ++iN;\n\n let n: Triangle;\n let n1: Triangle;\n let n2: Triangle;\n let ind: number;\n let ind1: number;\n let ind2: number;\n do {\n n1 = current()[0];\n ind1 = current()[1];\n if (n1.neighbours[ind1] !== null) {\n n = n1.neighbours[ind1]!;\n ind = cw(n.indexV(n1.vertices[cw(ind1)]!));\n n1 = n.neighbours[ind]!;\n ind1 = this.tds.mirrorIndex(n, ind);\n }\n n2 = next()[0];\n ind2 = next()[1];\n if (n2.neighbours[ind2] !== null) {\n n = n2.neighbours[ind2]!;\n ind = cw(n.indexV(n2.vertices[cw(ind2)]!));\n n2 = n.neighbours[ind]!;\n ind2 = this.tds.mirrorIndex(n, ind);\n }\n const v0 = n1.vertices[ccw(ind1)]!;\n const v1 = n1.vertices[cw(ind1)]!;\n const v2 = n2.vertices[cw(ind2)]!;\n const orient = orientation(v0.point!, v1.point!, v2.point!);\n switch (orient) {\n case Sign.RIGHT_TURN: {\n const newlf = this.tds.createTriangle(v0, v2, v1, null, null, null);\n edges.push([newlf, 2]);\n newlf.neighbours[1] = n1;\n newlf.neighbours[0] = n2;\n n1.neighbours[ind1] = newlf;\n n2.neighbours[ind2] = newlf;\n if (n1.isConstrained(ind1)) newlf.constraints[1] = true;\n if (n2.isConstrained(ind2)) newlf.constraints[0] = true;\n v0.triangle = newlf;\n v1.triangle = newlf;\n v2.triangle = newlf;\n iT = iC + 1;\n conflictBoundaries.splice(iC, 0, [newlf, 2]);\n conflictBoundaries.splice(Math.max(iT, iN), 1);\n conflictBoundaries.splice(Math.min(iT, iN), 1);\n iN = iC;\n if (v0 !== va) --iC;\n else ++iN;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.COLLINEAR: {\n ++iC;\n ++iN;\n break;\n }\n }\n } while (iN < conflictBoundaries.length);\n }\n\n findIntersectedFaces(vaa: Vertex, vbb: Vertex) {\n const aa = vaa.point!;\n const bb = vbb.point!;\n const listAB: Edge[] = [];\n const listBA: Edge[] = [];\n const intersectedFaces: Triangle[] = [];\n const lfc = new LineFaceCirculator(vaa, this, bb);\n let ind = lfc.pos!.indexV(vaa);\n let vi: Vertex;\n if (lfc.pos!.isConstrained(ind)) {\n vi = this.intersect(lfc.pos!, ind, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n }\n let lf = lfc.pos!.neighbours[ccw(ind)]!;\n let rf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n intersectedFaces.unshift(lfc.pos!);\n let previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n let currentVertex = lfc.pos!.vertices[ind]!;\n let done = false;\n while (currentVertex !== vbb && !done) {\n let i1: number;\n let i2: number;\n const orient = orientation(aa, bb, currentVertex.point!);\n switch (orient) {\n case Sign.COLLINEAR: {\n done = true;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.RIGHT_TURN: {\n if (orient === Sign.LEFT_TURN) {\n i1 = ccw(ind);\n i2 = cw(ind);\n } else {\n i1 = cw(ind);\n i2 = ccw(ind);\n }\n if (lfc.pos!.isConstrained(i1)) {\n vi = this.intersect(lfc.pos!, i1, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n } else {\n lf = lfc.pos!.neighbours[i2]!;\n intersectedFaces.unshift(lfc.pos!);\n if (orient === Sign.LEFT_TURN) listAB.push([lf, lf.indexT(lfc.pos!)]);\n else listBA.unshift([lf, lf.indexT(lfc.pos!)]);\n previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n currentVertex = lfc.pos!.vertices[ind]!;\n }\n break;\n }\n }\n }\n vi = currentVertex;\n intersectedFaces.unshift(lfc.pos!);\n lf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n rf = lfc.pos!.neighbours[ccw(ind)]!;\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n return { found: false, vi, listAB, listBA, intersectedFaces };\n }\n\n intersect(t: Triangle, i: number, vaa: Vertex, vbb: Vertex): Vertex {\n const vcc = t.vertices[cw(i)]!;\n const vdd = t.vertices[ccw(i)]!;\n const pa = vaa.point!;\n const pb = vbb.point!;\n const pc = vcc.point!;\n const pd = vdd.point!;\n let pi = intersection(pa, pb, pc, pd);\n if (pi !== pa && pi !== pb && pi !== pc && pi !== pd) {\n const bbox = new BoundingBox(pi!);\n bbox.dilate(4);\n if (bbox.overlaps(new BoundingBox(pa))) pi = pa;\n if (bbox.overlaps(new BoundingBox(pb))) pi = pb;\n if (bbox.overlaps(new BoundingBox(pc))) pi = pc;\n if (bbox.overlaps(new BoundingBox(pd))) pi = pd;\n }\n let vi: Vertex;\n if (pi === null) throw new Error(\"what\");\n else {\n this.removeConstrainedEdge(t, i);\n vi = this.insert(pi, t);\n }\n\n if (vi !== vcc && vi !== vdd) {\n this.insertConstraintV(vcc, vi);\n this.insertConstraintV(vi, vdd);\n } else {\n this.insertConstraintV(vcc, vdd);\n }\n return vi;\n }\n\n removeConstrainedEdge(t: Triangle, i: number) {\n t.constraints[i] = false;\n if (this.tds.dimension === 2) t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = false;\n }\n\n updateConstraintsOpposite(v: Vertex) {\n let t = v.triangle!;\n const start = t;\n let indf: number;\n do {\n indf = t.indexV(v);\n if (t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)]) t.constraints[indf] = true;\n else t.constraints[indf] = false;\n t = t.neighbours[ccw(indf)]!;\n } while (t !== start);\n }\n\n markConstraint(t: Triangle, i: number) {\n if (this.tds.dimension === 1) t.constraints[2] = true;\n else {\n t.constraints[i] = true;\n t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = true;\n }\n }\n\n insert(p: Point, start: Triangle | null = null) {\n const locateInfo = this.locate(p, this.iLocate(p, start));\n const va = this.insertb(p, locateInfo.loc, locateInfo.lt, locateInfo.li);\n this.flipAround(va);\n return va;\n }\n\n flipAround(v: Vertex) {\n if (this.tds.dimension <= 1) return;\n let t = v.triangle!;\n let i: number;\n let next: Triangle;\n const start = t;\n do {\n i = t.indexV(v);\n next = t.neighbours[ccw(i)]!;\n this.propagatingFlip(t, i);\n t = next;\n } while (next !== start);\n }\n\n propagatingFlip(t: Triangle, i: number, depth = 0) {\n if (!this.isFlipable(t, i)) return;\n const maxDepth = 100;\n if (depth === maxDepth) {\n throw new Error(\"maxde\");\n return;\n }\n const ni = t.neighbours[i]!;\n this.flip(t, i);\n this.propagatingFlip(t, i, depth + 1);\n i = ni.indexV(t.vertices[i]!);\n this.propagatingFlip(ni, i, depth + 1);\n }\n\n lessEdge(e1: Edge, e2: Edge) {\n const ind1 = e1[1];\n const ind2 = e2[1];\n return e1[0].uid < e2[0].uid || (e1[0].uid === e2[0].uid && ind1 < ind2);\n }\n\n propagatingFlipE(edges: Edge[]) {\n let eI = 0;\n let t: Triangle;\n let i: number;\n let eni: Edge;\n const edgeSet: Edge[] = [];\n while (eI < edges.length) {\n t = edges[eI][0];\n i = edges[eI][1];\n if (this.isFlipable(t, i)) {\n eni = [t.neighbours[i]!, this.tds.mirrorIndex(t, i)];\n if (this.lessEdge(edges[eI], eni)) edgeSet.push(edges[eI]);\n else edgeSet.push(eni);\n }\n ++eI;\n }\n let indf: number;\n let ni: Triangle;\n let indn: number;\n let ei: Edge;\n const e: (Edge | null)[] = [null, null, null, null];\n while (edgeSet.length > 0) {\n t = edgeSet[0][0];\n indf = edgeSet[0][1];\n ni = t.neighbours[indf]!;\n indn = this.tds.mirrorIndex(t, indf);\n ei = [t, indf];\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === ei[0] && ed[1] === ei[1]), 1);\n e[0] = [t, cw(indf)];\n e[1] = [t, ccw(indf)];\n e[2] = [ni, cw(indn)];\n e[3] = [ni, ccw(indn)];\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni))\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === edge![0] && ed[1] === edge![1]), 1);\n else edgeSet.splice(edgeSet.findIndex(ed => ed[0] === eni[0] && ed[1] === eni[1]), 1);\n }\n\n this.flip(t, indf);\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n if (this.isFlipable(tt, ii)) {\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni)) edgeSet.push(edge!);\n else edgeSet.push(eni);\n }\n }\n }\n }\n\n flip(t: Triangle, i: number) {\n const u = t.neighbours[i]!;\n const j = this.tds.mirrorIndex(t, i);\n const t1 = t.neighbours[cw(i)]!;\n const i1 = this.tds.mirrorIndex(t, cw(i));\n const t2 = t.neighbours[ccw(i)]!;\n const i2 = this.tds.mirrorIndex(t, ccw(i));\n const t3 = u.neighbours[cw(j)]!;\n const i3 = this.tds.mirrorIndex(u, cw(j));\n const t4 = u.neighbours[ccw(j)]!;\n const i4 = this.tds.mirrorIndex(u, ccw(j));\n this.tds.flip(t, i);\n t.constraints[t.indexT(u)] = false;\n u.constraints[u.indexT(t)] = false;\n t1.neighbours[i1]!.constraints[this.tds.mirrorIndex(t1, i1)] = t1.constraints[i1];\n t2.neighbours[i2]!.constraints[this.tds.mirrorIndex(t2, i2)] = t2.constraints[i2];\n t3.neighbours[i3]!.constraints[this.tds.mirrorIndex(t3, i3)] = t3.constraints[i3];\n t4.neighbours[i4]!.constraints[this.tds.mirrorIndex(t4, i4)] = t4.constraints[i4];\n }\n\n isFlipable(t: Triangle, i: number, perturb = true) {\n const ni = t.neighbours[i]!;\n if (t.isInfinite() || ni.isInfinite()) return false;\n if (t.constraints[i]) return false;\n return sideOfOrientedCircle(ni, t.vertices[i]!.point!, perturb) === Sign.ON_POSITIVE_SIDE;\n }\n\n insertb(a: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n let insertInConstrainedEdge = false;\n let v1: Vertex;\n let v2: Vertex;\n if (lt === LocateType.EDGE && loc!.isConstrained(li)) {\n insertInConstrainedEdge = true;\n v1 = loc!.vertices[ccw(li)]!;\n v2 = loc!.vertices[cw(li)]!;\n }\n const va = this.insertc(a, loc, lt, li);\n if (insertInConstrainedEdge) this.updateConstraintsIncident(va, v1!, v2!);\n else if (lt !== LocateType.VERTEX) this.clearConstraintsIncident(va);\n if (this.tds.dimension === 2) this.updateConstraintsOpposite(va);\n return va;\n }\n\n updateConstraintsIncident(va: Vertex, c1: Vertex, c2: Vertex) {\n if (this.tds.dimension === 0) return;\n if (this.tds.dimension === 1) {\n const ec = new EdgeCirculator(va, null);\n do {\n ec.t!.constraints[2] = true;\n } while (ec.next());\n } else {\n const fc = new FaceCirculator(va, null);\n do {\n const indf = fc.t!.indexV(va);\n const cwi = cw(indf);\n const ccwi = ccw(indf);\n if (fc.t!.vertices[cwi] === c1 || fc.t!.vertices[cwi] === c2) {\n fc.t!.constraints[ccwi] = true;\n fc.t!.constraints[cwi] = false;\n } else {\n fc.t!.constraints[ccwi] = false;\n fc.t!.constraints[cwi] = true;\n }\n } while (fc.next());\n }\n }\n\n clearConstraintsIncident(v: Vertex) {\n const ec = new EdgeCirculator(v, null);\n if (ec.valid) {\n do {\n const t = ec.t!;\n const indf = ec.ri;\n t.constraints[indf] = false;\n if (this.tds.dimension === 2) t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)] = false;\n } while (ec.next());\n }\n }\n\n insertc(p: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n if (this.tds.vertices.length === 1) {\n return this.insertFirst(p);\n } else if (this.tds.vertices.length === 2) {\n if (lt === LocateType.VERTEX) return this.tds.finiteVertex;\n else return this.insertSecond(p);\n }\n switch (lt) {\n case LocateType.VERTEX: {\n return loc!.vertices[li]!;\n }\n case LocateType.OUTSIDE_AFFINE_HULL: {\n return this.insertOutsideAffineHull(p);\n }\n case LocateType.OUTSIDE_CONVEX_HULL: {\n return this.insertOutsideConvexHull(p, loc!);\n }\n case LocateType.EDGE: {\n return this.insertInEdge(p, loc!, li);\n }\n case LocateType.FACE: {\n return this.insertInFace(p, loc!);\n }\n }\n throw new Error(\"qwe\");\n return new Vertex();\n }\n\n insertInEdge(p: Point, loc: Triangle, li: number): Vertex {\n const v = this.tds.insertInEdge(loc, li);\n v.point = p;\n return v;\n }\n\n insertInFace(p: Point, loc: Triangle): Vertex {\n const v = this.tds.insertInFace(loc);\n v.point = p;\n return v;\n }\n\n insertFirst(p: Point): Vertex {\n const v = this.tds.insertDimUp();\n v.point = p;\n return v;\n }\n\n insertSecond(p: Point): Vertex {\n const v = this.tds.insertDimUp(this.tds._infinite, true);\n v.point = p;\n return v;\n }\n\n insertOutsideAffineHull(p: Point): Vertex {\n let conform = false;\n if (this.tds.dimension === 1) {\n const t = this.tds.finiteEdge.first!;\n const orient = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n conform = orient === Sign.COUNTERCLOCKWISE;\n }\n const v = this.tds.insertDimUp(this.tds._infinite, conform);\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull(p: Point, t: Triangle): Vertex {\n let v: Vertex;\n if (this.tds.dimension === 1) {\n throw new Error(\"sdfasdasd\");\n } else {\n v = this.insertOutsideConvexHull2(p, t);\n }\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull2(p: Point, t: Triangle): Vertex {\n let li = t.indexV(this.tds._infinite);\n const ccwlist: Triangle[] = [];\n const cwlist: Triangle[] = [];\n let fc = new FaceCirculator(this.tds._infinite, t);\n let done = false;\n while (!done) {\n fc.prev();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) ccwlist.push(fc.t!);\n else done = true;\n }\n fc = new FaceCirculator(this.tds._infinite, t);\n done = false;\n while (!done) {\n fc.next();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) cwlist.push(fc.t!);\n else done = true;\n }\n const v = this.tds.insertInFace(t);\n v.point = p;\n let th;\n while (ccwlist.length > 0) {\n th = ccwlist[0];\n li = ccw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n ccwlist.shift();\n }\n while (cwlist.length > 0) {\n th = cwlist[0];\n li = cw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n cwlist.shift();\n }\n fc = new FaceCirculator(v, null);\n while (!fc.t!.isInfinite()) fc.next();\n this.tds._infinite.triangle = fc.t!;\n return v;\n }\n\n locate(p: Point, start: Triangle | null) {\n let lt = 0;\n let li = 0;\n if (this.tds.dimension < 0) {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 0) {\n if (xyEqual(p, this.tds.finiteVertex.triangle!.vertices[0]!.point!)) {\n lt = LocateType.VERTEX;\n } else {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n }\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 1) {\n return this.marchLocate1D(p);\n }\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)]!;\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)]!;\n }\n return this.marchLocate2D(start, p);\n }\n\n marchLocate1D(p: Point) {\n const ff = this.tds._infinite.triangle!;\n const iv = ff.indexV(this.tds._infinite);\n const t = ff.neighbours[iv]!;\n const pqt = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n if (pqt === Sign.RIGHT_TURN || pqt === Sign.LEFT_TURN) {\n return { loc: new Triangle(), lt: LocateType.OUTSIDE_AFFINE_HULL, li: 4 };\n }\n const i = t.indexT(ff);\n if (collinearBetween(p, t.vertices[1 - i]!.point!, t.vertices[i]!.point!))\n return { loc: ff, lt: LocateType.OUTSIDE_CONVEX_HULL, li: iv };\n\n if (xyEqual(p, t.vertices[1 - i]!.point!)) return { loc: t, lt: LocateType.VERTEX, li: 1 - i };\n throw new Error(\"sdfsdf\");\n }\n\n marchLocate2D(c: Triangle, p: Point) {\n let prev = null;\n let first = true;\n let lt: LocateType | undefined;\n let li: number | undefined;\n while (true) {\n if (c.isInfinite()) {\n return { loc: c, lt: LocateType.OUTSIDE_CONVEX_HULL, li: c.indexV(this.tds._infinite) };\n }\n const leftFirst = 0; // Math.round(Math.random());\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n let o0: Sign;\n let o1: Sign;\n let o2: Sign;\n if (first) {\n prev = c;\n first = false;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (leftFirst) {\n if (c.neighbours[0]! === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1]! === prev) {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1] === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n }\n const sum =\n (o0 === Sign.COLLINEAR ? 1 : 0) + (o1 === Sign.COLLINEAR ? 1 : 0) + (o2 === Sign.COLLINEAR ? 1 : 0);\n switch (sum) {\n case 0: {\n lt = LocateType.FACE;\n li = 4;\n break;\n }\n case 1: {\n lt = LocateType.EDGE;\n li = o0 === Sign.COLLINEAR ? 2 : o1 === Sign.COLLINEAR ? 0 : 1;\n break;\n }\n case 2: {\n lt = LocateType.VERTEX;\n li = o0 !== Sign.COLLINEAR ? 2 : o1 !== Sign.COLLINEAR ? 0 : 1;\n break;\n }\n }\n if (lt === undefined || li === undefined) throw new Error(\"ert\");\n return { loc: c, lt, li };\n }\n }\n\n iLocate(p: Point, start: Triangle | null) {\n if (this.tds.dimension < 2) return start;\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)];\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)];\n }\n let prev = null;\n let c = start!;\n let first = true;\n let nTurns = 2500;\n while (true) {\n if (!nTurns--) return c;\n if (c.isInfinite()) return c;\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n if (first) {\n prev = c;\n first = false;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (c.neighbours[1] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n } else {\n prev = c;\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n }\n }\n break;\n }\n return c;\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy, l2gz } from \"@/game/units\";\n\nclass LayerManager {\n layers: Layer[] = [];\n width = window.innerWidth;\n height = window.innerHeight;\n\n UUIDMap: Map = new Map();\n\n // Refresh interval and redraw setter.\n interval = 30;\n\n constructor() {\n requestAnimationFrame(this.drawLoop);\n }\n\n reset() {\n this.layers = [];\n this.UUIDMap = new Map();\n }\n\n drawLoop = () => {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].draw();\n }\n requestAnimationFrame(this.drawLoop);\n };\n\n setWidth(width: number): void {\n this.width = width;\n for (const layer of this.layers) {\n layer.canvas.width = width;\n layer.width = width;\n }\n }\n\n setHeight(height: number): void {\n this.height = height;\n for (const layer of this.layers) {\n layer.canvas.height = height;\n layer.height = height;\n }\n }\n\n addLayer(layer: Layer): void {\n this.layers.push(layer);\n if (!gameStore.IS_DM && !layer.playerEditable) return;\n if (layer.selectable) gameStore.addLayer(layer.name);\n }\n\n hasLayer(name: string): boolean {\n return this.layers.some(l => l.name === name);\n }\n\n getLayer(name?: string) {\n name = name === undefined ? gameStore.selectedLayer : name;\n for (const layer of this.layers) {\n if (layer.name === name) return layer;\n }\n }\n\n selectLayer(name: string, sync: boolean = true): void {\n let found = false;\n for (const layer of this.layers) {\n if (!layer.selectable) continue;\n if (found && layer.name !== \"fow\") layer.ctx.globalAlpha = 0.3;\n else layer.ctx.globalAlpha = 1.0;\n\n if (name === layer.name) {\n gameStore.selectLayer({ name, sync });\n found = true;\n }\n\n layer.clearSelection();\n layer.invalidate(true);\n }\n }\n\n getGridLayer(): GridLayer | undefined {\n return this.getLayer(\"grid\");\n }\n\n hasSelection() {\n const selection = this.getSelection();\n return selection !== undefined && selection.length > 0;\n }\n\n // THIS INCLUDES POTENTIALLY THE SelectTool.SelectionHelper !!!\n getSelection() {\n const layer = this.getLayer();\n if (layer === undefined) return undefined;\n return layer.selection;\n }\n\n invalidate(): void {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].invalidate(true);\n }\n }\n\n invalidateLight() {\n for (let i = this.layers.length - 1; i >= 0; i--)\n if (this.layers[i].isVisionLayer) this.layers[i].invalidate(true);\n }\n\n dropAsset(event: DragEvent) {\n const layer = this.getLayer();\n if (layer === undefined || event === null || event.dataTransfer === null) return;\n const image = document.createElement(\"img\");\n image.src = event.dataTransfer.getData(\"text/plain\");\n const asset = new Asset(\n image,\n new GlobalPoint(l2gx(event.clientX), l2gy(event.clientY)),\n l2gz(image.width),\n l2gz(image.height),\n );\n asset.src = new URL(image.src).pathname;\n\n if (gameStore.useGrid) {\n const gs = gameStore.gridSize;\n asset.refPoint = new GlobalPoint(\n Math.round(asset.refPoint.x / gs) * gs,\n Math.round(asset.refPoint.y / gs) * gs,\n );\n asset.w = Math.max(Math.round(asset.w / gs) * gs, gs);\n asset.h = Math.max(Math.round(asset.h / gs) * gs, gs);\n }\n\n layer.addShape(asset, true);\n }\n}\n\nexport const layerManager = new LayerManager();\n(window).lm = layerManager;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"\nimport script from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"73816298\",\n null\n \n)\n\ncomponent.options.__file = \"createtoken_modal.vue\"\nexport default component.exports","import { BoundingRect } from \"@/game/shapes/boundingrect\";\n\nexport class BoundingNode {\n bbox: BoundingRect;\n nPrimitives: number;\n children: BoundingNode[] = [];\n constructor(nPrimitives: number, bbox: BoundingRect) {\n this.nPrimitives = nPrimitives;\n this.bbox = bbox;\n }\n}\n\nexport class LeafNode extends BoundingNode {\n firstPrimOffset: number;\n constructor(first: number, n: number, bbox: BoundingRect) {\n super(n, bbox);\n this.firstPrimOffset = first;\n }\n}\n\nexport class InteriorNode extends BoundingNode {\n dimension: number;\n constructor(dimension: number, c1: BoundingNode, c2: BoundingNode) {\n super(0, c1.bbox.union(c2.bbox));\n this.dimension = dimension;\n this.children.push(c1);\n this.children.push(c2);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"","import Tools from \"../ui/tools/tools.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\n\nexport function onKeyUp(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n } else {\n if (event.key === \"Delete\" || event.key === \"Del\" || event.key === \"Backspace\") {\n if (layerManager.getLayer === undefined) {\n console.log(\"No active layer selected for delete operation\");\n return;\n }\n const l = layerManager.getLayer()!;\n for (let i = l.selection.length - 1; i >= 0; i--) {\n const sel = l.selection[i];\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) {\n l.selection.splice(i, 1);\n continue;\n }\n l.removeShape(sel, true, false);\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n EventBus.$emit(\"Initiative.Remove\", sel.uuid);\n }\n }\n }\n}\n\nexport function onKeyDown(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n if (event.keyCode === 65 && event.ctrlKey) event.target!.select();\n } else {\n if (event.keyCode >= 37 && event.keyCode <= 40) {\n // todo: this should already be rounded\n const gridSize = Math.round(gameStore.gridSize);\n let offsetX = gridSize * (event.keyCode % 2);\n let offsetY = gridSize * (event.keyCode % 2 ? 0 : 1);\n if (layerManager.hasSelection()) {\n const selection = layerManager.getSelection()!;\n offsetX *= event.keyCode <= 38 ? -1 : 1;\n offsetY *= event.keyCode <= 38 ? -1 : 1;\n let delta = new Vector(offsetX, offsetY);\n if (!event.shiftKey || !gameStore.IS_DM) {\n // First check for collisions. Using the smooth wall slide collision check used on mouse move is overkill here.\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n delta = calculateDelta(delta, sel);\n }\n }\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n sel.refPoint = sel.refPoint.add(delta);\n // todo: Fix again\n // if (sel.refPoint.x % gridSize !== 0 || sel.refPoint.y % gridSize !== 0) sel.snapToGrid();\n socket.emit(\"Shape.Position.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n gameStore.recalculateVision();\n layerManager.getLayer()!.invalidate(false);\n } else {\n // The pan offsets should be in the opposite direction to give the correct feel.\n gameStore.increasePanX(offsetX * (event.keyCode <= 38 ? 1 : -1));\n gameStore.increasePanY(offsetY * (event.keyCode <= 38 ? 1 : -1));\n layerManager.invalidate();\n sendClientOptions();\n }\n } else if (event.keyCode === 68) {\n const layer = layerManager.getLayer();\n if (layer) {\n layer.clearSelection();\n layer.invalidate(true);\n }\n }\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport ShapeContext from \"@/game/ui/selection/shapecontext.vue\";\nimport CreateTokenModal from \"@/game/ui/tools/createtoken_modal.vue\";\nimport DrawTool from \"@/game/ui/tools/draw.vue\";\nimport MapTool from \"@/game/ui/tools/map.vue\";\nimport PanTool from \"@/game/ui/tools/pan\";\nimport SelectTool from \"@/game/ui/tools/select.vue\";\n\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { RulerTool } from \"@/game/ui/tools/ruler\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component({\n components: {\n \"select-tool\": SelectTool,\n \"pan-tool\": PanTool,\n \"draw-tool\": DrawTool,\n \"ruler-tool\": RulerTool,\n \"map-tool\": MapTool,\n \"shape-menu\": ShapeContext,\n \"createtoken-dialog\": CreateTokenModal,\n },\n watch: {\n currentTool(newValue, oldValue) {\n this.$emit(\"tools-select-change\", newValue, oldValue);\n },\n },\n})\nexport default class Tools extends Vue {\n $refs!: {\n selectTool: InstanceType;\n };\n\n currentTool = \"Select\";\n tools = [\"Select\", \"Pan\", \"Draw\", \"Ruler\", \"Map\"];\n dmTools = [\"Map\"];\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get currentToolComponent(): string {\n return `${this.currentTool.toLowerCase()}-tool`;\n }\n\n mousedown(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mousedown\", event, targetTool);\n }\n mouseup(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mouseup\", event, targetTool);\n }\n mousemove(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if ((event.buttons & 4) !== 0) {\n targetTool = \"Pan\";\n } else if ((event.button & 1) > 1) {\n return;\n }\n\n this.$emit(\"mousemove\", event, targetTool);\n\n // Annotation hover\n let found = false;\n for (const uuid of gameStore.annotations) {\n if (layerManager.UUIDMap.has(uuid) && layerManager.hasLayer(\"draw\")) {\n const shape = layerManager.UUIDMap.get(uuid)!;\n if (shape.contains(l2g(getMouse(event)))) {\n found = true;\n gameManager.annotationManager.setActiveText(shape.annotation);\n }\n }\n }\n if (!found && gameManager.annotationManager.shown) {\n gameManager.annotationManager.setActiveText(\"\");\n }\n }\n mouseleave(event: MouseEvent) {\n // When leaving the window while a mouse is pressed down, act as if it was released\n if ((event.buttons & 1) !== 0) {\n this.$emit(\"mouseup\", event, this.currentTool);\n }\n }\n contextmenu(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n if (event.button !== 2 || (event.target).tagName !== \"CANVAS\") return;\n this.$emit(\"contextmenu\", event, this.currentTool);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=32cec914&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=32cec914&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class Prompt extends Vue {\n $refs!: {\n answer: HTMLElement;\n };\n\n visible = false;\n question = \"\";\n answer = \"\";\n title = \"\";\n\n resolve = (value: string) => {};\n reject = () => {};\n\n submit() {\n this.resolve(this.answer);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.question = \"\";\n this.answer = \"\";\n this.title = \"\";\n }\n prompt(question: string, title: string): Promise {\n this.question = question;\n this.title = title;\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.answer.focus();\n });\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_vm._l((_vm.folders),function(folder){return _c('li',{key:folder,staticClass:\"folder\",on:{\"click\":function($event){$event.stopPropagation();return _vm.toggle($event)}}},[_vm._v(\"\\n \"+_vm._s(folder)+\"\\n \"),_c('asset-node',{attrs:{\"asset\":_vm.asset[folder]}})],1)}),_vm._l((_vm.files),function(file){return _c('li',{key:file.name,staticClass:\"file draggable token\",attrs:{\"draggable\":\"true\"},on:{\"mouseover\":function($event){_vm.showImage = file.hash},\"mouseout\":function($event){_vm.showImage = null},\"dragstart\":function($event){_vm.dragStart($event, '/static/assets/' + file.hash)}}},[_vm._v(\"\\n \"+_vm._s(file.name)+\"\\n \"),(_vm.showImage == file.hash)?_c('div',{staticClass:\"preview\"},[_c('img',{staticClass:\"asset-preview-image\",attrs:{\"src\":'/static/assets/' + file.hash}})]):_vm._e()])})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=template&id=62c91cd3&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._v(_vm._s(_vm.message))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=template&id=ff095222&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{attrs:{\"id\":\"toolselect\"}},[_c('ul',_vm._l((_vm.tools),function(tool){return (!_vm.dmTools.includes(tool) || _vm.IS_DM)?_c('li',{key:tool,ref:tool + '-selector',refInFor:true,class:{'tool-selected': _vm.currentTool === tool},on:{\"click\":function($event){_vm.currentTool = tool}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(tool))])]):_vm._e()}))]),_c('div',[[_c('select-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Select'),expression:\"currentTool === 'Select'\"}],ref:\"selectTool\"}),_c('pan-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Pan'),expression:\"currentTool === 'Pan'\"}]}),_c('keep-alive',[_c('draw-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Draw'),expression:\"currentTool === 'Draw'\"}]})],1),_c('ruler-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Ruler'),expression:\"currentTool === 'Ruler'\"}]}),_c('map-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Map'),expression:\"currentTool === 'Map'\"}]}),_c('shape-menu',{ref:\"shapecontext\"}),_c('createtoken-dialog',{ref:\"createtokendialog\"})]],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=template&id=1fee50f5&scoped=true&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"","import { GlobalPoint, Point, Ray, Vector } from \"@/game/geom\";\nimport { g2lx, g2ly } from \"../units\";\n\nexport class BoundingRect {\n readonly w: number;\n readonly h: number;\n readonly topLeft: GlobalPoint;\n readonly topRight: GlobalPoint;\n readonly botRight: GlobalPoint;\n readonly botLeft: GlobalPoint;\n\n constructor(topleft: GlobalPoint, w: number, h: number) {\n this.w = w;\n this.h = h;\n this.topLeft = topleft;\n this.topRight = new GlobalPoint(topleft.x + w, topleft.y);\n this.botRight = new GlobalPoint(topleft.x + w, topleft.y + h);\n this.botLeft = new GlobalPoint(topleft.x, topleft.y + h);\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.topLeft.x <= point.x &&\n this.topRight.x >= point.x &&\n this.topLeft.y <= point.y &&\n this.botLeft.y >= point.y\n );\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.topLeft.x, this.topLeft.y]];\n return [\n [this.topLeft.x, this.topLeft.y],\n [this.botLeft.x, this.botLeft.y],\n [this.botRight.x, this.botRight.y],\n [this.topRight.x, this.topRight.y],\n ];\n }\n\n offset(vector: Vector): BoundingRect {\n return new BoundingRect(this.topLeft.add(vector), this.w, this.h);\n }\n\n union(other: BoundingRect): BoundingRect {\n const xmin = Math.min(this.topLeft.x, other.topLeft.x);\n const xmax = Math.max(this.topRight.x, other.topRight.x);\n const ymin = Math.min(this.topLeft.y, other.topLeft.y);\n const ymax = Math.max(this.botLeft.y, other.botLeft.y);\n return new BoundingRect(new GlobalPoint(xmin, ymin), xmax - xmin, ymax - ymin);\n }\n\n getDiagCorner(botright: boolean) {\n return botright ? this.botRight : this.topLeft;\n }\n\n intersectsWith(other: BoundingRect): boolean {\n return !(\n other.topLeft.x > this.topRight.x ||\n other.topRight.x < this.topLeft.x ||\n other.topLeft.y > this.botLeft.y ||\n other.botLeft.y < this.topLeft.y\n );\n }\n\n intersectsWithInner(other: BoundingRect): boolean {\n return !(\n other.topLeft.x >= this.topRight.x ||\n other.topRight.x <= this.topLeft.x ||\n other.topLeft.y >= this.botLeft.y ||\n other.botLeft.y <= this.topLeft.y\n );\n }\n\n intersectP(ray: Ray, invDir: Vector, dirIsNeg: boolean[]) {\n let txmin = invDir.x * (this.getDiagCorner(dirIsNeg[0]).x - ray.origin!.x);\n let txmax = invDir.x * (this.getDiagCorner(!dirIsNeg[0]).x - ray.origin!.x);\n const tymin = invDir.y * (this.getDiagCorner(dirIsNeg[1]).y - ray.origin!.y);\n const tymax = invDir.y * (this.getDiagCorner(!dirIsNeg[1]).y - ray.origin!.y);\n if (txmin > tymax || tymin > txmax) return { hit: false, min: txmin, max: txmax };\n if (tymin > txmin) txmin = tymin;\n if (tymax < txmax) txmax = tymax;\n return { hit: txmin < ray.tMax! && txmax > 0, min: txmin, max: txmax };\n }\n\n center(): GlobalPoint {\n return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n const coreVisible = !(\n g2lx(this.topLeft.x) > canvas.width ||\n g2ly(this.topLeft.y) > canvas.height ||\n g2lx(this.topRight.x) < 0 ||\n g2ly(this.botRight.y) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"formcontainer\"}},[(_vm.owned || _vm.joined)?_c('form',[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"Your sessions\")]),_c('div',{staticClass:\"input\"},[_vm._l((_vm.owned),function(room,i){return _c('router-link',{key:'o-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[0]))])}),_vm._l((_vm.joined),function(room,i){return _c('router-link',{key:'j-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[1])+\"/\"+_vm._s(room[0]))])})],2),(_vm.owned.length === 0)?_c('div',{staticClass:\"input\"},[_vm._v(\"No active sessions\")]):_vm._e()])]):_vm._e(),_vm._m(0),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.createRoom($event)}}},[_c('fieldset',[(!_vm.owned && !_vm.joined)?_c('legend',{staticClass:\"legend\"},[_vm._v(\"Create a session\")]):_c('div',{staticClass:\"input\"},[_vm._v(\"Create a new session\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newSessionName),expression:\"newSessionName\"}],attrs:{\"type\":\"text\",\"name\":\"room_name\",\"placeholder\":\"Session Name\"},domProps:{\"value\":(_vm.newSessionName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newSessionName=$event.target.value}}}),_vm._m(1)]),_vm._m(2)])]),_c('div',{attrs:{\"id\":\"account-options\"}},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Account Settings\",\"to\":\"/account\"}},[_c('i',{staticClass:\"fas fa-cog\"})])],1),_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Logout\",\"to\":\"/auth/logout\"}},[_c('i',{staticClass:\"fas fa-sign-out-alt\"})])],1)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h4',[_c('span',[_vm._v(\"OR\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fab fa-d-and-d\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"title\":\"Create\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=template&id=61eb1455&scoped=true&\"","/*\nThis module defines some Point classes.\nA strong focus is made to ensure that at no time a global and a local point are mixed up with each other.\nAt first glance this adds weird looking hacks as ts does not support nominal typing.\n*/\n\nexport function getPointDistance(p1: Point, p2: Point) {\n const a = p1.x - p2.x;\n const b = p1.y - p2.y;\n return Math.sqrt(a * a + b * b);\n}\n\nexport class Point {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n static fromArray(point: number[]) {\n return new Point(point[0], point[1]);\n }\n add(vec: Vector) {\n return new Point(this.x + vec.x, this.y + vec.y);\n }\n subtract(other: Point) {\n return new Vector(this.x - other.x, this.y - other.y);\n }\n clone(): Point {\n return new Point(this.x, this.y);\n }\n get(dimension: 0 | 1) {\n if (dimension === 0) return this.x;\n return this.y;\n }\n asArray(): number[] {\n return [this.x, this.y];\n }\n}\nexport class GlobalPoint extends Point {\n // This is to differentiate with LocalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _GlobalPoint!: string;\n add(vec: Vector): GlobalPoint {\n return super.add(vec);\n }\n subtract(other: GlobalPoint): Vector {\n return super.subtract(other);\n }\n clone(): GlobalPoint {\n return super.clone();\n }\n static fromArray(point: number[]) {\n return new GlobalPoint(point[0], point[1]);\n }\n}\n\nexport class LocalPoint extends Point {\n // This is to differentiate with GlobalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _LocalPoint!: string;\n add(vec: Vector): LocalPoint {\n return super.add(vec);\n }\n subtract(other: LocalPoint): Vector {\n return super.subtract(other);\n }\n clone(): LocalPoint {\n return super.clone();\n }\n}\n\nexport class Vector {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n dot(other: Vector): number {\n return this.x * other.x + this.y * other.y;\n }\n inverse(): Vector {\n return new Vector(this.x === 0 ? 0 : 1 / this.x, this.y === 0 ? 0 : 1 / this.y);\n }\n length(): number {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize(): Vector {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse(): Vector {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number): Vector {\n return new Vector(this.x * scale, this.y * scale);\n }\n angle(): number {\n return (Math.atan2(this.y, this.x) * 180) / Math.PI;\n }\n}\n\nexport class Ray {\n readonly direction: Vector;\n readonly origin: T;\n tMax: number;\n constructor(origin: T, direction: Vector, tMax?: number) {\n this.direction = direction;\n this.origin = origin;\n if (tMax === undefined) tMax = Infinity;\n this.tMax = tMax;\n }\n static fromPoints(p1: T, p2: T): Ray {\n const vec = new Vector(p2.x - p1.x, p2.y - p1.y);\n let maxT;\n if (Math.abs(vec.x) > 0.01) maxT = (p2.x - p1.x) / vec.x;\n else maxT = (p2.y - p1.y) / vec.y;\n return new Ray(p1, vec, maxT);\n }\n get(t: number): T {\n return new Point(this.origin.x + t * this.direction.x, this.origin.y + t * this.direction.y);\n }\n getDistance(t1: number, t2: number) {\n return Math.sqrt(Math.pow(t2 - t1, 2) * (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n getT(t1: number, distance: number) {\n return t1 + Math.sqrt(Math.pow(distance, 2) / (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport vueSlider from \"vue-slider-component\";\n\nimport \"@/game/api/events\";\n\nimport { throttle } from \"lodash\";\nimport { mapGetters, mapState } from \"vuex\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\nimport MenuBar from \"@/game/ui/menu/menu.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\nimport SelectionInfo from \"@/game/ui/selection/selection_info.vue\";\nimport Tools from \"@/game/ui/tools/tools.vue\";\n\nimport { createConnection, socket } from \"@/game/api/socket\";\nimport { onKeyDown, onKeyUp } from \"@/game/events/keyboard\";\nimport { scrollZoom } from \"@/game/events/mouse\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { LocalPoint } from \"./geom\";\n\n@Component({\n components: {\n \"tool-bar\": Tools,\n \"selection-info\": SelectionInfo,\n \"prompt-dialog\": Prompt,\n \"confirm-dialog\": ConfirmDialog,\n \"menu-bar\": MenuBar,\n \"initiative-dialog\": Initiative,\n \"zoom-slider\": vueSlider,\n \"note-dialog\": NoteDialog,\n },\n beforeRouteEnter(to, from, next) {\n createConnection(to);\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class Game extends Vue {\n $refs!: {\n confirm: InstanceType;\n tools: InstanceType;\n };\n\n ready = {\n manager: false,\n tools: false,\n };\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get layers(): string[] {\n return gameStore.layers;\n }\n\n get selectedLayer(): string {\n return gameStore.selectedLayer;\n }\n\n get zoomFactor(): number {\n return gameStore.zoomFactor;\n }\n\n set zoomFactor(value: number) {\n gameStore.updateZoom({\n newZoomValue: value,\n zoomLocation: l2g(new LocalPoint(window.innerWidth / 2, window.innerHeight / 2)),\n });\n }\n\n mounted() {\n window.addEventListener(\"resize\", () => {\n layerManager.setWidth(window.innerWidth);\n layerManager.setHeight(window.innerHeight);\n layerManager.invalidate();\n });\n window.addEventListener(\"wheel\", throttle(scrollZoom));\n window.addEventListener(\"keyup\", onKeyUp);\n window.addEventListener(\"keydown\", onKeyDown);\n // // prevent double clicking text selection\n window.addEventListener(\"selectstart\", e => {\n e.preventDefault();\n return false;\n });\n this.ready.manager = true;\n }\n\n mousedown(event: MouseEvent) {\n this.$refs.tools.mousedown(event);\n }\n mouseup(event: MouseEvent) {\n this.$refs.tools.mouseup(event);\n }\n mousemove(event: MouseEvent) {\n this.$refs.tools.mousemove(event);\n }\n mouseleave(event: MouseEvent) {\n this.$refs.tools.mouseleave(event);\n }\n contextmenu(event: MouseEvent) {\n this.$refs.tools.contextmenu(event);\n }\n selectLayer(layer: string) {\n layerManager.selectLayer(layer);\n }\n drop(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n if (event.dataTransfer.files.length > 0) {\n this.$refs.confirm\n .open(\"Uploading files should be done through the asset manager.\", \"Ok\", \"\")\n .then(() => {}, () => {});\n } else if (event.dataTransfer.getData(\"text/plain\") === \"\") {\n return;\n } else {\n layerManager.dropAsset(event);\n }\n }\n}\n","import { GlobalPoint, LocalPoint, Ray } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function g2l(obj: GlobalPoint): LocalPoint {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n return new LocalPoint((obj.x + panX) * z, (obj.y + panY) * z);\n}\n\nexport function g2lx(x: number) {\n return g2l(new GlobalPoint(x, 0)).x;\n}\n\nexport function g2ly(y: number) {\n return g2l(new GlobalPoint(0, y)).y;\n}\n\nexport function g2lz(z: number) {\n return z * gameStore.zoomFactor;\n}\n\nexport function getUnitDistance(r: number) {\n return (r / gameStore.unitSize) * gameStore.gridSize;\n}\n\nexport function g2lr(r: number) {\n return g2lz(getUnitDistance(r));\n}\n\nexport function l2g(obj: LocalPoint): GlobalPoint;\nexport function l2g(obj: Ray): Ray;\nexport function l2g(obj: LocalPoint | Ray): GlobalPoint | Ray {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n if (obj instanceof LocalPoint) {\n return new GlobalPoint(obj.x / z - panX, obj.y / z - panY);\n } else {\n return new Ray(l2g(obj.origin), obj.direction.multiply(1 / z), obj.tMax);\n }\n}\n\nexport function l2gx(x: number) {\n return l2g(new LocalPoint(x, 0)).x;\n}\n\nexport function l2gy(y: number) {\n return l2g(new LocalPoint(0, y)).y;\n}\n\nexport function l2gz(z: number) {\n return z / gameStore.zoomFactor;\n}\n\nexport function l2gr(r: number) {\n return l2gz(getUnitDistance(r));\n}\n\n(window).g2lx = g2lx;\n(window).g2ly = g2ly;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport AssetNode from \"@/game/ui/menu/asset_node.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\n\nimport { getRef, uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n \"asset-node\": AssetNode,\n },\n computed: {\n ...mapState(\"game\", [\"invitationCode\", \"IS_DM\", \"locations\", \"assets\", \"notes\"]),\n },\n})\nexport default class MenuBar extends Vue {\n visible = {\n settings: false,\n locations: false,\n };\n\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n set useGrid(value: boolean) {\n gameStore.setUseGrid({ useGrid: value, sync: true });\n }\n get fullFOW(): boolean {\n return gameStore.fullFOW;\n }\n set fullFOW(value: boolean) {\n gameStore.setFullFOW({ fullFOW: value, sync: true });\n }\n get fowOpacity(): number {\n return gameStore.fowOpacity;\n }\n set fowOpacity(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setFOWOpacity({ fowOpacity: value, sync: true });\n }\n get fowLOS(): boolean {\n return gameStore.fowLOS;\n }\n set fowLOS(value: boolean) {\n gameStore.setLineOfSight({ fowLOS: value, sync: true });\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n set unitSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setUnitSize({ unitSize: value, sync: true });\n }\n get gridSize(): number {\n return gameStore.gridSize;\n }\n set gridSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setGridSize({ gridSize: value, sync: true });\n }\n get gridColour(): string {\n return gameStore.gridColour;\n }\n set gridColour(value: string) {\n gameStore.setGridColour({ colour: value, sync: true });\n }\n get fowColour(): string {\n return gameStore.fowColour;\n }\n set fowColour(value: string) {\n gameStore.setFOWColour({ colour: value, sync: true });\n }\n get rulerColour(): string {\n return gameStore.rulerColour;\n }\n set rulerColour(value: string) {\n gameStore.setRulerColour({ colour: value, sync: true });\n }\n get visionRangeMin(): number {\n return gameStore.visionRangeMin;\n }\n set visionRangeMin(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMin({ value, sync: true });\n }\n get visionRangeMax(): number {\n return gameStore.visionRangeMax;\n }\n set visionRangeMax(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMax({ value, sync: true });\n }\n settingsClick(event: { target: HTMLElement }) {\n if (event.target.classList.contains(\"accordion\")) {\n event.target.classList.toggle(\"accordion-active\");\n const next = event.target.nextElementSibling;\n if (next !== null) next.style.display = next.style.display === \"\" ? \"block\" : \"\";\n }\n }\n changeLocation(name: string) {\n socket.emit(\"Location.Change\", name);\n }\n createLocation() {\n getRef(\"prompt\")\n .prompt(`New location name:`, `Create new location`)\n .then(\n (value: string) => {\n socket.emit(\"Location.New\", value);\n },\n () => {},\n );\n }\n createNote() {\n const note = { title: \"New note\", text: \"\", uuid: uuidv4() };\n gameStore.newNote({ note, sync: true });\n this.openNote(note);\n }\n openNote(note: Note) {\n getRef(\"note\").open(note);\n }\n changeVisionMode(event: { target: HTMLSelectElement }) {\n const value = event.target.value.toLowerCase();\n if (value !== \"bvh\" && value !== \"triangle\") return;\n gameStore.setVisionMode({ mode: value, sync: true });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n layerManager.invalidate();\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.IS_DM)?_c('li',{on:{\"click\":_vm.bringPlayers}},[_vm._v(\"Bring players\")]):_vm._e(),_c('li',{on:{\"click\":_vm.createToken}},[_vm._v(\"Create basic token\")]),_c('li',{on:{\"click\":_vm.showInitiative}},[_vm._v(\"Show initiative\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"","import { CDT } from \"./cdt\";\nimport { ccw, cw, orientation, ulp } from \"./triag\";\n\nexport type Point = number[];\n\nexport const INFINITE = -7e310;\n\nlet _INFINITE_VERTEX: Vertex;\n\nexport enum Sign {\n NEGATIVE = -1,\n ZERO = 0,\n POSITIVE = 1,\n\n RIGHT_TURN = -1,\n LEFT_TURN = 1,\n\n SMALLER = -1,\n EQUAL = 0,\n LARGER = 1,\n\n CLOCKWISE = -1,\n COUNTERCLOCKWISE = 1,\n\n COLLINEAR = 0,\n COPLANAR = 0,\n DEGENERATE = 0,\n\n ON_NEGATIVE_SIDE = -1,\n ON_ORIENTED_BOUNDARY = 0,\n ON_POSITIVE_SIDE = 1,\n}\n\nenum LineFaceState {\n UNDEFINED = -1,\n VERTEX_VERTEX = 0,\n VERTEX_EDGE = 1,\n EDGE_VERTEX = 2,\n EDGE_EDGE = 3,\n}\n\nfunction newPoint(): Point {\n return [INFINITE, INFINITE];\n}\n\nexport class Triangle {\n vertices: (Vertex | null)[] = [];\n neighbours: (Triangle | null)[] = [null, null, null];\n constraints = [false, false, false];\n static _counter = 0;\n uid = Triangle._counter++;\n\n constructor(...vertices: (Vertex | null)[]) {\n this.vertices = vertices;\n }\n\n from(t: Triangle): this {\n this.vertices = t.vertices.slice(0, t.vertices.length);\n this.neighbours = t.neighbours.slice(0, t.neighbours.length);\n this.constraints = t.constraints.slice(0, t.constraints.length);\n return this;\n }\n\n get dimension() {\n return this.vertices.length - 1;\n }\n\n addVertex(vertex: Vertex) {\n if (vertex === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(vertex);\n vertex.triangle = this;\n }\n\n isConstrained(index: number): boolean {\n return this.constraints[index];\n }\n\n reorient() {\n // If certain indices do not exist yet thay will append faulty undefined's, thus we slice them\n this.vertices = [this.vertices[1], this.vertices[0], this.vertices[2]].slice(0, this.vertices.length);\n this.neighbours = [this.neighbours[1], this.neighbours[0], this.neighbours[2]];\n this.constraints = [this.constraints[1], this.constraints[0], this.constraints[2]];\n }\n\n indexV(v: Vertex): number {\n return this.vertices.indexOf(v);\n }\n\n indexT(t: Triangle): number {\n return this.neighbours.indexOf(t);\n }\n\n isInfinite(index?: number): boolean {\n if (index === undefined) {\n return this.vertices.includes(_INFINITE_VERTEX);\n } else {\n return this.vertices[ccw(index)]!.infinite || this.vertices[cw(index)]!.infinite;\n }\n }\n\n contains(point: Point) {\n const A =\n -this.vertices[1]!.point![1] * this.vertices[2]!.point![0] +\n this.vertices[0]!.point![1] * (-this.vertices[1]!.point![0] + this.vertices[2]!.point![0]) +\n this.vertices[0]!.point![0] * (this.vertices[1]!.point![1] - this.vertices[2]!.point![1]) +\n this.vertices[1]!.point![0] * this.vertices[2]!.point![1];\n const sign = A < 0 ? -1 : 1;\n const s =\n (this.vertices[0]!.point![1] * this.vertices[2]!.point![0] -\n this.vertices[0]!.point![0] * this.vertices[2]!.point![1] +\n (this.vertices[2]!.point![1] - this.vertices[0]!.point![1]) * point[0] +\n (this.vertices[0]!.point![0] - this.vertices[2]!.point![0]) * point[1]) *\n sign;\n if (s < 0) return false;\n const t =\n (this.vertices[0]!.point![0] * this.vertices[1]!.point![1] -\n this.vertices[0]!.point![1] * this.vertices[1]!.point![0] +\n (this.vertices[0]!.point![1] - this.vertices[1]!.point![1]) * point[0] +\n (this.vertices[1]!.point![0] - this.vertices[0]!.point![0]) * point[1]) *\n sign;\n\n return t > 0 && s + t < A * sign;\n }\n}\n\nexport class Vertex {\n infinite = false;\n private _point: Point | undefined;\n triangle: Triangle | undefined;\n\n constructor(point?: Point) {\n this._point = point;\n }\n\n get point(): Point | undefined {\n return this._point;\n }\n\n set point(point: Point | undefined) {\n this._point = point;\n this.infinite = false;\n }\n}\n\nexport class EdgeCirculator {\n ri: number;\n v: Vertex | null;\n t: Triangle | null;\n _ri: number;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 1) {\n this.ri = 0;\n this.v = null;\n this.t = null;\n } else {\n const i = this.t.indexV(v!);\n if (this.t.dimension === 2) this.ri = ccw(i);\n else this.ri = 2;\n }\n this._ri = this.ri;\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n next(): boolean {\n let i = this.t!.indexV(this.v!);\n if (this.t!.dimension === 1) {\n this.t = this.t!.neighbours[i === 0 ? 1 : 0];\n } else {\n this.t = this.t!.neighbours[ccw(i)];\n i = this.t!.indexV(this.v!);\n this.ri = ccw(i);\n }\n return this.ri !== this._ri || this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class EdgeIterator {\n private i = 0;\n pos: Triangle | null;\n edge: Edge = new Edge();\n tds: TDS;\n _es = 0;\n constructor(tds: TDS) {\n this.tds = tds;\n this.edge.second = 0;\n if (tds.dimension <= 0) {\n this.pos = null;\n return;\n }\n this.pos = tds.triangles[0];\n if (tds.dimension === 1) this.edge.second = 2;\n while (this.pos !== null && !this.associatedEdge()) {\n throw new Error(\"[poi\");\n }\n\n if (tds.dimension === 1) this._es = 2;\n }\n\n get valid(): boolean {\n return (this.pos !== null || this._es !== this.edge.second) && this.pos!.isInfinite(this.edge.second);\n }\n\n next() {\n do {\n this.increment();\n } while (this.pos !== null && !this.associatedEdge());\n }\n\n collect(): Edge {\n this.edge.first = this.pos;\n return this.edge;\n }\n\n associatedEdge(): boolean {\n if (this.tds.dimension === 1) return true;\n return (\n this.tds.triangles.indexOf(this.pos!) < this.tds.triangles.indexOf(this.pos!.neighbours[this.edge.second]!)\n );\n }\n\n increment() {\n if (this.tds.dimension === 1) {\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else if (this.edge.second === 2) {\n this.edge.second = 0;\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else {\n this.edge.second++;\n }\n }\n}\n\nexport class FaceCirculator {\n v: Vertex | null;\n t: Triangle | null;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 2) {\n this.v = null;\n this.t = null;\n }\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n prev() {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[cw(i)];\n }\n\n next(): boolean {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[ccw(i)];\n return this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class LineFaceCirculator {\n private i = 0;\n pos: Triangle | null = null;\n _tr: CDT;\n s: LineFaceState = LineFaceState.UNDEFINED;\n p: Point;\n q: Point;\n\n constructor(v: Vertex, tr: CDT, dir: Point) {\n this._tr = tr;\n this.p = v.point!;\n this.q = dir;\n\n const fc = new FaceCirculator(v, null);\n let ic = fc.t!.indexV(v);\n let vt = fc.t!.vertices[cw(ic)]!;\n while (v === _INFINITE_VERTEX || orientation(this.p, this.q, vt.point!) !== Sign.LEFT_TURN) {\n fc.next();\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n if (!fc.valid) {\n return;\n }\n }\n\n let vr = fc.t!.vertices[ccw(ic)]!;\n let pqr: Sign = Sign.RIGHT_TURN;\n // tslint:disable:no-conditional-assignment\n while (vr !== _INFINITE_VERTEX && (pqr = orientation(this.p, this.q, vr.point!)) === Sign.LEFT_TURN) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n }\n\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n\n if (vr === _INFINITE_VERTEX) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n pqr = orientation(this.p, this.q, vr.point!);\n switch (pqr) {\n case Sign.RIGHT_TURN:\n case Sign.COLLINEAR: {\n fc.next();\n ic = fc.t!.indexV(_INFINITE_VERTEX);\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ic;\n break;\n }\n case Sign.LEFT_TURN: {\n break;\n }\n }\n } else if (pqr === Sign.COLLINEAR) {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(ic);\n } else {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_EDGE;\n this.i = ic;\n }\n }\n\n next() {\n this.increment();\n }\n\n increment() {\n let o: Sign;\n if (this.s === LineFaceState.VERTEX_VERTEX || this.s === LineFaceState.EDGE_VERTEX) {\n do {\n const n = this.pos!.neighbours[cw(this.i)]!;\n this.i = n.indexT(this.pos!);\n this.pos = n;\n if (this.pos!.vertices[this.i] === _INFINITE_VERTEX) {\n o = Sign.COLLINEAR;\n this.i = cw(this.i);\n break;\n }\n o = orientation(this.p, this.q, this.pos!.vertices[this.i]!.point!);\n this.i = cw(this.i);\n } while (o === Sign.LEFT_TURN);\n if (o === Sign.COLLINEAR) {\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(this.i);\n } else {\n this.s = LineFaceState.VERTEX_EDGE;\n }\n } else {\n const n = this.pos!.neighbours[this.i]!;\n const ni = n.indexT(this.pos!);\n this.pos = n;\n o =\n this.pos!.vertices[ni]! === _INFINITE_VERTEX\n ? Sign.COLLINEAR\n : orientation(this.p, this.q, this.pos!.vertices[ni]!.point!);\n switch (o) {\n case Sign.LEFT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = ccw(ni);\n break;\n }\n case Sign.RIGHT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = cw(ni);\n break;\n }\n default: {\n this.s = LineFaceState.EDGE_VERTEX;\n this.i = ni;\n }\n }\n }\n }\n}\n\nclass Edge {\n first: Triangle | null = null;\n second: number = 0;\n}\n\nexport enum LocateType {\n VERTEX,\n EDGE,\n FACE,\n OUTSIDE_CONVEX_HULL,\n OUTSIDE_AFFINE_HULL,\n}\n\nexport class TDS {\n dimension = -1;\n vertices: Vertex[] = [];\n triangles: Triangle[] = [];\n _infinite: Vertex;\n\n constructor() {\n this._infinite = this.createVertex();\n _INFINITE_VERTEX = this._infinite;\n const t = new Triangle();\n t.addVertex(this._infinite);\n this.triangles.push(t);\n }\n\n createVertex(): Vertex {\n const v = this.infiniteVertex;\n if (v === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(v);\n return v;\n }\n\n createTriangle(\n v0: Vertex | null,\n v1: Vertex | null,\n v2: Vertex | null,\n n0: Triangle | null,\n n1: Triangle | null,\n n2: Triangle | null,\n ) {\n const t = new Triangle(v0, v1, v2);\n t.neighbours[0] = n0;\n t.neighbours[1] = n1;\n t.neighbours[2] = n2;\n this.triangles.push(t);\n return t;\n }\n\n deleteTriangle(trig: Triangle) {\n this.triangles = this.triangles.filter(t => t !== trig);\n }\n\n setAdjacency(t0: Triangle, i0: number, t1: Triangle, i1: number) {\n t0.neighbours[i0] = t1;\n t1.neighbours[i1] = t0;\n }\n\n get finiteVertex(): Vertex {\n return this.vertices[1];\n }\n\n get infiniteVertex(): Vertex {\n const v = new Vertex(newPoint());\n v.infinite = true;\n return v;\n }\n\n get finiteEdge(): Edge {\n if (this.dimension < 1) throw new Error(\"aspo\");\n const ei = new EdgeIterator(this);\n while (ei.valid) ei.next();\n return ei.collect();\n }\n\n insertDimUp(w: Vertex = new Vertex(), orient: boolean = true): Vertex {\n const v = this.createVertex();\n this.dimension++;\n let t1: Triangle;\n let t2: Triangle;\n switch (this.dimension) {\n case 0: {\n t1 = this.triangles[0];\n t2 = new Triangle(v);\n this.triangles.push(t2);\n this.setAdjacency(t1, 0, t2, 0);\n v.triangle = t2;\n break;\n }\n case 1:\n case 2: {\n const deleteList: Triangle[] = [];\n const triangles = this.triangles.slice(0, this.triangles.length);\n for (const trig of triangles) {\n const copy = new Triangle().from(trig);\n this.triangles.push(copy);\n trig.vertices[this.dimension] = v;\n copy.vertices[this.dimension] = w;\n this.setAdjacency(trig, this.dimension, copy, this.dimension);\n if (trig.vertices.includes(w)) deleteList.push(copy);\n }\n for (const trig of triangles) {\n const neighbour = trig.neighbours[this.dimension];\n for (let j = 0; j < this.dimension; ++j) {\n neighbour!.neighbours[j] = trig.neighbours[j]!.neighbours[this.dimension];\n }\n }\n\n let lfit = 0;\n if (this.dimension === 1) {\n if (orient) {\n triangles[lfit].reorient();\n lfit++;\n triangles[lfit].neighbours[1]!.reorient();\n } else {\n triangles[lfit].neighbours[1]!.reorient();\n lfit++;\n triangles[lfit].reorient();\n }\n } else {\n for (const trig of triangles) {\n if (orient) trig.neighbours[2]!.reorient();\n else trig.reorient();\n }\n }\n\n for (const trig of deleteList) {\n let j = 1;\n if (trig.vertices[0] === w) j = 0;\n t1 = trig.neighbours[this.dimension]!;\n const i1 = this.mirrorIndex(trig, this.dimension);\n t2 = trig.neighbours[j]!;\n const i2 = this.mirrorIndex(trig, j);\n this.setAdjacency(t1, i1, t2, i2);\n this.deleteTriangle(trig);\n }\n v.triangle = triangles[0];\n break;\n }\n default: {\n throw new Error(\"Dimension unknown\");\n }\n }\n return v;\n }\n\n mirrorIndex(t: Triangle, i: number): number {\n if (t.dimension === 1) {\n const j = t.neighbours[i]!.indexV(t.vertices[i === 0 ? 1 : 0]!);\n return j === 0 ? 1 : 0;\n }\n return ccw(t.neighbours[i]!.indexV(t.vertices[ccw(i)]!));\n }\n\n insertInFace(t: Triangle) {\n const v = this.createVertex();\n const v0 = t.vertices[0]!;\n const v1 = t.vertices[1]!;\n const v2 = t.vertices[2]!;\n const n1 = t.neighbours[1]!;\n const n2 = t.neighbours[2]!;\n const t1 = this.createTriangle(v0, v, v2, t, n1, null);\n const t2 = this.createTriangle(v0, v1, v, t, null, n2);\n this.setAdjacency(t1, 2, t2, 1);\n if (n1 !== null) {\n const i1 = this.mirrorIndex(t, 1);\n n1.neighbours[i1] = t1;\n }\n if (n2 !== null) {\n const i2 = this.mirrorIndex(t, 2);\n n2.neighbours[i2] = t2;\n }\n t.vertices[0] = v;\n t.neighbours[1] = t1;\n t.neighbours[2] = t2;\n if (v0.triangle === t) v0.triangle = t2;\n v.triangle = t;\n return v;\n }\n\n flip(t: Triangle, i: number) {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n const vCW = t.vertices[cw(i)]!;\n const vCCW = t.vertices[ccw(i)]!;\n const tr = t.neighbours[ccw(i)]!;\n const tri = this.mirrorIndex(t, ccw(i));\n const bl = n.neighbours[ccw(ni)]!;\n const bli = this.mirrorIndex(n, ccw(ni));\n\n t.vertices[cw(i)] = n.vertices[ni]!;\n n.vertices[cw(ni)] = t.vertices[i]!;\n\n this.setAdjacency(t, i, bl, bli);\n this.setAdjacency(t, ccw(i), n, ccw(ni));\n this.setAdjacency(n, ni, tr, tri);\n\n if (vCW.triangle! === t) vCW.triangle = n;\n if (vCCW.triangle! === n) vCCW.triangle = t;\n }\n\n insertInEdge(t: Triangle, i: number) {\n let v: Vertex;\n if (this.dimension === 1) {\n v = this.createVertex();\n const ff = t.neighbours[0]!;\n const vv = t.vertices[1]!;\n const g = this.createTriangle(v, vv, null, ff, t, null);\n t.vertices[1] = v;\n t.neighbours[0] = g;\n ff.neighbours[1] = g;\n v.triangle = g;\n vv.triangle = ff;\n } else {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n v = this.insertInFace(t);\n this.flip(n, ni);\n }\n return v;\n }\n}\n\nexport class BoundingBox {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n constructor(p: Point) {\n this.x1 = p[0];\n this.y1 = p[1];\n this.x2 = p[0];\n this.y2 = p[1];\n }\n\n dilate(dist: number) {\n this.x1 -= dist * ulp(this.x1);\n this.y1 -= dist * ulp(this.y1);\n this.x2 += dist * ulp(this.x2);\n this.y2 += dist * ulp(this.y2);\n }\n\n overlaps(other: BoundingBox): boolean {\n if (this.x2 < other.x1 || other.x2 < this.x1) return false;\n if (this.y2 < other.y1 || other.y2 < this.y1) return false;\n return true;\n }\n}\n","import { partition } from \"@/core/utils\";\nimport { GlobalPoint, Ray } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\nimport { BoundingNode, InteriorNode, LeafNode } from \"@/game/visibility/bvh/node\";\n\ninterface BuildInfo {\n index: number;\n bbox: BoundingRect;\n center: BoundingRect;\n}\ninterface LinearBHVNode {\n bbox: BoundingRect;\n nPrimitives: number;\n}\ninterface LinearLeafNode extends LinearBHVNode {\n primitivesOffset: number;\n}\ninterface LinearInternalNode extends LinearBHVNode {\n secondChildOffset: number;\n dimension: number;\n}\n\nexport class BoundingVolume {\n totalNodes = 0;\n buildData: BuildInfo[] = [];\n shapes: string[];\n orderedPrims: string[] = [];\n root: BoundingNode | null;\n nodes: LinearBHVNode[] = [];\n\n offset = 0;\n\n constructor(shapes: string[]) {\n this.shapes = shapes;\n if (this.shapes.length === 0) {\n this.root = null;\n this.nodes = [];\n return;\n }\n for (let i = 0; i < shapes.length; i++) {\n const shape = layerManager.UUIDMap.get(shapes[i])!;\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n }\n this.root = this.recursiveBuild(0, shapes.length);\n this.compact();\n }\n\n draw() {\n const ctx = layerManager.getLayer(\"draw\")!.ctx;\n for (const node of this.nodes) {\n const b = node.bbox;\n ctx.strokeRect(g2lx(b.topLeft.x), g2ly(b.topLeft.y), g2lz(b.w), g2lz(b.h));\n }\n }\n\n recursiveBuild(start: number, end: number): BoundingNode {\n this.totalNodes++;\n let bbox = this.buildData[start].bbox;\n for (let i = start + 1; i < end; i++) bbox = bbox.union(this.buildData[i].bbox);\n const nPrimitives = end - start;\n if (nPrimitives === 1) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n } else {\n let centroidBbox = this.buildData[start].center;\n for (let i = start; i < end; i++) centroidBbox = centroidBbox.union(this.buildData[i].center);\n const dimension = centroidBbox.getMaxExtent();\n if (centroidBbox.botRight.get(dimension) === centroidBbox.topLeft.get(dimension)) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n }\n // Use shitty Middle thingy until an introselect js algo is added\n const pMid = 0.5 * (centroidBbox.topLeft.get(dimension) + centroidBbox.botRight.get(dimension));\n const partitionedData = partition(\n this.buildData.slice(start, end),\n (n: BuildInfo) => n.center.center().get(dimension) < pMid,\n );\n const flattened = ([]).concat.apply([], partitionedData);\n if (partitionedData[0].length === 0 || partitionedData[1].length === 0) console.log(\"EMPTY\");\n this.buildData.splice(start, flattened.length, ...flattened);\n const mid = partitionedData[0].length + start;\n return new InteriorNode(dimension, this.recursiveBuild(start, mid), this.recursiveBuild(mid, end));\n }\n }\n\n intersect(ray: Ray, stopOnFirstHit?: boolean) {\n if (this.nodes.length === 0) return { hit: false, intersect: ray.get(0), tMin: 0, tMax: ray.tMax };\n if (stopOnFirstHit === undefined) stopOnFirstHit = false;\n // Initialize return values\n let hit = false;\n let tMin = 0;\n let tMax = ray.tMax;\n\n // Initialize work variables\n let todoOffset = 0;\n let nodeNum = 0;\n const todo: number[] = [];\n\n // Precalculate intersection vectors\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n\n while (true) {\n const node = this.nodes[nodeNum];\n\n const i = node.bbox.intersectP(ray, invDir, dirIsNegative);\n if (i.hit) {\n if (node.nPrimitives > 0) {\n // TODO: nPrimitives is currently always 1 , this could be generalised\n // for (let i=0; i < node.nPrimitives; i++) {\n // if (this.shapes[(node).primitivesOffset + i])\n // }\n hit = true;\n tMin = ray.tMax = i.min;\n tMax = i.max;\n if (todoOffset === 0 || stopOnFirstHit) break;\n nodeNum = todo[--todoOffset];\n } else {\n if (dirIsNegative[(node).dimension]) {\n todo[todoOffset++] = nodeNum + 1;\n nodeNum = (node).secondChildOffset;\n } else {\n todo[todoOffset++] = (node).secondChildOffset;\n nodeNum++;\n }\n }\n } else {\n if (todoOffset === 0) break;\n nodeNum = todo[--todoOffset];\n }\n }\n return { hit, intersect: ray.get(tMin), tMin, tMax };\n }\n\n private compact() {\n this.offset = 0;\n if (this.root !== null) this.flatten(this.root);\n }\n\n private flatten(node: BoundingNode) {\n const index = this.offset;\n const myOffset = this.offset++;\n if (node.nPrimitives === 0) {\n this.flatten(node.children[0]);\n const secondOffset = this.flatten(node.children[1]);\n this.nodes[index] = {\n bbox: node.bbox,\n dimension: (node).dimension,\n nPrimitives: 0,\n secondChildOffset: secondOffset,\n };\n } else {\n this.nodes[index] = {\n bbox: node.bbox,\n primitivesOffset: (node).firstPrimOffset,\n nPrimitives: node.nPrimitives,\n };\n }\n return myOffset;\n }\n\n private createLeaf(start: number, end: number, nPrimitives: number, bbox: BoundingRect) {\n const size = this.orderedPrims.length;\n for (let i = start; i < end; i++) this.orderedPrims.push(this.shapes[this.buildData[i].index]);\n return new LeafNode(size, nPrimitives, bbox);\n }\n}\n","import Initiative from \"./ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { AnnotationManager } from \"@/game/ui/annotation\";\nimport { g2l } from \"@/game/units\";\n\nexport class GameManager {\n selectedTool: number = 0;\n\n annotationManager = new AnnotationManager();\n\n addShape(shape: ServerShape): void {\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Shape with unknown layer ${shape.layer} could not be added`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n const sh = createShapeFromDict(shape);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${shape.type_} could not be added`);\n return;\n }\n layer.addShape(sh, false);\n layer.invalidate(false);\n }\n\n updateShape(data: { shape: ServerShape; redraw: boolean; move: boolean }): void {\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Shape with unknown layer ${data.shape.layer} could not be added`);\n return;\n }\n const sh = createShapeFromDict(data.shape, true);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${data.shape.type_} could not be added`);\n return;\n }\n const oldShape = layerManager.UUIDMap.get(data.shape.uuid);\n if (oldShape === undefined) {\n console.log(`Shape with unknown id could not be updated`);\n return;\n }\n const redrawInitiative = sh.owners !== oldShape.owners;\n const shape = Object.assign(oldShape, sh);\n shape.checkVisionSources();\n shape.setMovementBlock(shape.movementObstruction);\n shape.setIsToken(shape.isToken);\n if (data.redraw) layerManager.getLayer(data.shape.layer)!.invalidate(false);\n if (redrawInitiative) getRef(\"initiative\").$forceUpdate();\n }\n\n setCenterPosition(position: GlobalPoint) {\n const localPos = g2l(position);\n gameStore.increasePanX((window.innerWidth / 2 - localPos.x) / gameStore.zoomFactor);\n gameStore.increasePanY((window.innerHeight / 2 - localPos.y) / gameStore.zoomFactor);\n layerManager.invalidate();\n sendClientOptions();\n }\n}\n\nexport const gameManager = new GameManager();\n(window).gameManager = gameManager;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Initiative\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('draggable',{attrs:{\"id\":\"initiative-list\",\"options\":{setData: _vm.fakeSetData, disabled: !_vm.$store.state.game.IS_DM}},on:{\"change\":_vm.updateOrder},model:{value:(_vm.data),callback:function ($$v) {_vm.data=$$v},expression:\"data\"}},[_vm._l((_vm.data),function(actor){return [_c('div',{key:actor.uuid,staticStyle:{\"display\":\"flex\",\"flex-direction\":\"column\",\"align-items\":\"flex-end\"}},[_c('div',{staticClass:\"initiative-actor\",class:{'initiative-selected': _vm.currentActor === actor.uuid},style:({'cursor': _vm.$store.state.game.IS_DM && 'move'}),on:{\"mouseenter\":function($event){_vm.toggleHighlight(actor, true)},\"mouseleave\":function($event){_vm.toggleHighlight(actor, false)}}},[(actor.has_img)?[_c('img',{attrs:{\"src\":actor.source,\"width\":\"30px\",\"height\":\"30px\"}})]:[_c('span',{staticStyle:{\"width\":\"auto\"}},[_vm._v(_vm._s(actor.source))])],_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(actor.initiative),expression:\"actor.initiative\",modifiers:{\"lazy\":true,\"number\":true}}],class:{'notAllowed': !_vm.owns(actor)},attrs:{\"type\":\"text\",\"placeholder\":\"value\",\"disabled\":!_vm.owns(actor)},domProps:{\"value\":(actor.initiative)},on:{\"change\":[function($event){_vm.$set(actor, \"initiative\", _vm._n($event.target.value))},function($event){_vm.syncInitiative(actor)}],\"blur\":function($event){_vm.$forceUpdate()}}}),_c('div',{staticClass:\"initiative-effects-icon\",class:{'notAllowed': !_vm.owns(actor)},staticStyle:{\"opacity\":\"0.6\"},on:{\"click\":function($event){_vm.createEffect(actor, _vm.getDefaultEffect(), true)}}},[_c('i',{staticClass:\"fas fa-stopwatch\"}),(actor.effects)?[_vm._v(_vm._s(actor.effects.length))]:[_vm._v(\"0\")]],2),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.visible ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'visible')}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.group ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'group')}}},[_c('i',{staticClass:\"fas fa-users\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': _vm.owns(actor) ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.removeInitiative(actor.uuid, true, true)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})])],2),(actor.effects)?_c('div',{staticClass:\"initiative-effect\"},_vm._l((actor.effects),function(effect){return _c('div',{key:effect.uuid},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.name),expression:\"effect.name\"}],attrs:{\"type\":\"text\",\"size\":effect.name.length || 1},domProps:{\"value\":(effect.name)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.turns),expression:\"effect.turns\"}],attrs:{\"type\":\"text\",\"size\":effect.turns.toString().length || 1},domProps:{\"value\":(effect.turns)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"turns\", $event.target.value)}}})])})):_vm._e()])]})],2),_c('div',{attrs:{\"id\":\"initiative-bar\"}},[_c('div',{attrs:{\"id\":\"initiative-round\"}},[_vm._v(\"Round \"+_vm._s(_vm.roundCounter))]),_c('div',{staticStyle:{\"display\":\"flex\"}}),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":function($event){_vm.setRound(0, true); _vm.setTurn(_vm.data[0].uuid, true)}}},[_c('i',{staticClass:\"fas fa-sync-alt\"})]),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":_vm.nextTurn}},[_c('i',{staticClass:\"fas fa-chevron-right\"})])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=template&id=ccaf03d6&scoped=true&\"","\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class LoadComponent extends Vue {\n message = \"Loading...\";\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.getActiveLayer() !== undefined)?_c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.getLayers().length > 1)?_c('li',[_vm._v(\"Layer\\n \"),_c('ul',_vm._l((_vm.getLayers()),function(layer){return _c('li',{key:layer.name,style:([_vm.getActiveLayer().name === layer.name ? {'background-color':'#82c8a0'}: {}]),on:{\"click\":function($event){_vm.setLayer(layer.name)}}},[_vm._v(_vm._s(layer.name))])}))]):_vm._e(),_c('li',{on:{\"click\":_vm.moveToBack}},[_vm._v(\"Move to back\")]),_c('li',{on:{\"click\":_vm.moveToFront}},[_vm._v(\"Move to front\")]),_c('li',{on:{\"click\":_vm.addInitiative}},[_vm._v(_vm._s(_vm.getInitiativeWord())+\" initiative\")]),_c('li',{on:{\"click\":_vm.openEditDialog}},[_vm._v(\"Show properties\")])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=6d744362&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=6d744362&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component\nexport default class Dashboard extends Vue {\n owned = [];\n joined = [];\n error = \"\";\n\n newSessionName = \"\";\n\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n axios\n .get(\"/api/rooms\")\n .then((response: AxiosResponse) => {\n next((vm: this) => {\n vm.owned = response.data.owned;\n vm.joined = response.data.joined;\n });\n })\n .catch((err: AxiosError) => {\n next((vm: this) => {\n vm.error = err.message;\n });\n });\n }\n\n createRoom(event: Event) {\n axios\n .post(\"/api/rooms\", {\n name: this.newSessionName,\n })\n .then((response: AxiosResponse) => {\n this.$router.push(`/game/${coreStore.username}/${this.newSessionName}`);\n })\n .catch((err: AxiosError) => {\n this.error = err.message;\n });\n }\n}\n","import { render, staticRenderFns } from \"./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"\nimport script from \"./confirm.vue?vue&type=script&lang=ts&\"\nexport * from \"./confirm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1883e207\",\n null\n \n)\n\ncomponent.options.__file = \"confirm.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.left + 'px',\"top\":_vm.top + 'px'},on:{\"close\":_vm.close}},[_c('li',{on:{\"click\":_vm.rename}},[_vm._v(\"Rename\")]),_c('li',{on:{\"click\":_vm.remove}},[_vm._v(\"Remove\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=template&id=606797b4&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Edit asset\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('label',{attrs:{\"for\":\"shapeselectiondialog-name\"}},[_vm._v(\"Name\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.name),expression:\"shape.name\"}],staticStyle:{\"grid-column\":\"numerator / end\"},attrs:{\"type\":\"text\",\"id\":\"shapeselectiondialog-name\"},domProps:{\"value\":(_vm.shape.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.shape, \"name\", $event.target.value)}}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-istoken\"}},[_vm._v(\"Is a token\")]),_c('input',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-istoken\"},domProps:{\"checked\":_vm.shape.isToken},on:{\"click\":_vm.setToken}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-visionblocker\"}},[_vm._v(\"Blocks vision/light\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.visionObstruction),expression:\"shape.visionObstruction\"}],staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-visionblocker\"},domProps:{\"checked\":Array.isArray(_vm.shape.visionObstruction)?_vm._i(_vm.shape.visionObstruction,null)>-1:(_vm.shape.visionObstruction)},on:{\"change\":[function($event){var $$a=_vm.shape.visionObstruction,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.shape, \"visionObstruction\", $$c)}},_vm.setVisionBlocker]}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-moveblocker\"}},[_vm._v(\"Blocks movement\")]),_c('input',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-moveblocker\"},domProps:{\"checked\":_vm.shape.movementObstruction},on:{\"click\":_vm.setMovementBlocker}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-strokecolour\"}},[_vm._v(\"Border colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"color\":_vm.shape.strokeColour},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"strokeColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-fillcolour\"}},[_vm._v(\"Fill colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"color\":_vm.shape.fillColour},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"fillColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Access\")]),_vm._l((_vm.shape.owners),function(owner){return [_c('input',{key:owner,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\"},domProps:{\"value\":owner},on:{\"change\":function($event){_vm.updateOwner($event, owner)}}}),(owner !== '')?_c('div',{key:'remove-' + owner,staticStyle:{\"grid-column-start\":\"remove\"},on:{\"click\":function($event){_vm.removeOwner(owner)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Trackers\")]),_vm._l((_vm.shape.trackers),function(tracker){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(tracker.name),expression:\"tracker.name\"}],key:'name-'+tracker.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\"},domProps:{\"value\":(tracker.name)},on:{\"change\":function($event){_vm.updateShape(false);},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.value),expression:\"tracker.value\",modifiers:{\"number\":true}}],key:'value-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\"},domProps:{\"value\":(tracker.value)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+tracker.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.maxvalue),expression:\"tracker.maxvalue\",modifiers:{\"number\":true}}],key:'maxvalue-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\"},domProps:{\"value\":(tracker.maxvalue)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"maxvalue\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'sspan-'+tracker.uuid}),_c('div',{key:'visibility-'+tracker.uuid,style:({opacity: tracker.visible ? 1.0 : 0.3}),on:{\"click\":function($event){tracker.visible = !tracker.visible;_vm.updateShape(false)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('span',{key:'tspan-'+tracker.uuid}),(tracker.name !== '' || tracker.value !== 0)?_c('div',{key:'remove-'+tracker.uuid,on:{\"click\":function($event){_vm.removeTracker(tracker.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Auras\")]),_vm._l((_vm.shape.auras),function(aura){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(aura.name),expression:\"aura.name\"}],key:'name-'+aura.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\"},domProps:{\"value\":(aura.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.value),expression:\"aura.value\",modifiers:{\"number\":true}}],key:'value-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\"},domProps:{\"value\":(aura.value)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+aura.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.dim),expression:\"aura.dim\",modifiers:{\"number\":true}}],key:'dimvalue-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Dim value\"},domProps:{\"value\":(aura.dim)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"dim\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('color-picker',{key:'colour-'+aura.uuid,attrs:{\"color\":aura.colour},on:{\"update:color\":function($event){_vm.$set(aura, \"colour\", $event)},\"input\":function($event){_vm.updateAuraColour(aura, $event)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{key:'visibility-'+aura.uuid,style:({opacity: aura.visible ? 1.0 : 0.3}),on:{\"click\":function($event){aura.visible = !aura.visible;_vm.updateShape(true)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{key:'visionsource-'+aura.uuid,style:({opacity: aura.visionSource ? 1.0 : 0.3}),on:{\"click\":function($event){_vm.updateAuraVisionSource(aura)}}},[_c('i',{staticClass:\"fas fa-lightbulb\"})]),(aura.name !== '' || aura.value !== 0)?_c('div',{key:'remove-'+aura.uuid,on:{\"click\":function($event){_vm.removeAura(aura.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Annotation\")]),_c('textarea',{staticClass:\"spanrow\",domProps:{\"value\":_vm.shape.annotation},on:{\"change\":_vm.updateAnnotation}})],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=template&id=7c80ae3a&scoped=true&\"","import Vue from \"vue\";\nexport const EventBus = new Vue();\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Rect extends BaseRect {\n type = \"rect\";\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, w, h, fillColour, strokeColour, uuid);\n }\n asDict() {\n return super.getBaseDict();\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const z = gameStore.zoomFactor;\n const loc = g2l(this.refPoint);\n ctx.fillRect(loc.x, loc.y, this.w * z, this.h * z);\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = 5;\n ctx.strokeRect(loc.x, loc.y, this.w * z, this.h * z);\n }\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"","import { Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly } from \"@/game/units\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWPlayersLayer extends Layer {\n isVisionLayer: boolean = true;\n\n draw(): void {\n if (!this.valid) {\n // console.time(\"VI\");\n const ctx = this.ctx;\n\n if (!gameStore.fowLOS || Settings.skipPlayerFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n const drctx = layerManager.getLayer(\"draw\")!.ctx;\n drctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n\n const originalOperation = ctx.globalCompositeOperation;\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n // For the DM this is done at the end of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (!gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n // Then cut out all the player vision auras\n const maxLength = ctx.canvas.width + ctx.canvas.height;\n\n for (const tokenId of gameStore.ownedtokens) {\n const token = layerManager.UUIDMap.get(tokenId);\n if (token === undefined) continue;\n const center = token.center();\n const lcenter = g2l(center);\n if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 2 / 180) * Math.PI) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = new Ray(center, new Vector(cos, sin));\n const hitResult = gameStore.BV.intersect(lightRay);\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Draw a line from the last non arc location back to the arc\n ctx.lineTo(lcenter.x + maxLength * cos, lcenter.y + maxLength * sin);\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, angle);\n lastArcAngle = -1;\n }\n ctx.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n\n // Finish the final arc.\n if (lastArcAngle !== -1) ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, 2 * Math.PI);\n else ctx.closePath();\n ctx.fill();\n } else {\n if (true) {\n // Add a gradient vision dropoff\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMin),\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMax),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n try {\n const polygon = computeVisibility(token.center(), \"vision\");\n ctx.beginPath();\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n ctx.closePath();\n ctx.fill();\n } catch {}\n }\n }\n\n // For the players this is done at the beginning of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n ctx.globalCompositeOperation = originalOperation;\n // console.timeEnd(\"VI\");\n }\n }\n}\n","import { socket } from \"@/game/api/socket\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly } from \"@/game/units\";\n\nexport class Layer {\n name: string;\n width: number;\n height: number;\n canvas: HTMLCanvasElement;\n ctx: CanvasRenderingContext2D;\n\n selectable: boolean = false;\n playerEditable: boolean = false;\n isVisionLayer: boolean = false;\n\n // When set to false, the layer will be redrawn on the next tick\n valid: boolean = false;\n // The collection of shapes that this layer contains.\n // These are ordered on a depth basis.\n shapes: Shape[] = [];\n\n // Collection of shapes that are currently selected\n selection: Shape[] = [];\n\n // Extra selection highlighting settings\n selectionColor = \"#CC0000\";\n selectionWidth = 2;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n this.canvas = canvas;\n this.name = name;\n this.width = canvas.width;\n this.height = canvas.height;\n this.ctx = canvas.getContext(\"2d\")!;\n }\n\n invalidate(skipLightUpdate: boolean): void {\n this.valid = false;\n if (!skipLightUpdate) {\n layerManager.invalidateLight();\n }\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n if (temporary === undefined) temporary = false;\n shape.layer = this.name;\n this.shapes.push(shape);\n layerManager.UUIDMap.set(shape.uuid, shape);\n shape.checkVisionSources(invalidate);\n shape.setMovementBlock(shape.movementObstruction, invalidate);\n if (shape.ownedBy(gameStore.username) && shape.isToken) gameStore.ownedtokens.push(shape.uuid);\n if (shape.annotation.length) gameStore.annotations.push(shape.uuid);\n if (sync) socket.emit(\"Shape.Add\", { shape: shape.asDict(), temporary });\n if (invalidate) this.invalidate(!sync);\n }\n\n setShapes(shapes: ServerShape[]): void {\n for (const serverShape of shapes) {\n const shape = createShapeFromDict(serverShape);\n if (shape === undefined) {\n console.log(`Shape with unknown type ${serverShape.type_} could not be added`);\n return;\n }\n this.addShape(shape, false, false, false);\n }\n this.clearSelection(); // TODO: Fix keeping selection on those items that are not moved.\n this.invalidate(false);\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (temporary === undefined) temporary = false;\n this.shapes.splice(this.shapes.indexOf(shape), 1);\n\n if (sync) socket.emit(\"Shape.Remove\", { shape, temporary });\n const lsI = gameStore.visionSources.findIndex(ls => ls.shape === shape.uuid);\n const lbI = gameStore.visionBlockers.findIndex(ls => ls === shape.uuid);\n\n const mbI = gameStore.movementblockers.findIndex(ls => ls === shape.uuid);\n const anI = gameStore.annotations.findIndex(ls => ls === shape.uuid);\n if (lsI >= 0) gameStore.visionSources.splice(lsI, 1);\n if (lbI >= 0) gameStore.visionBlockers.splice(lbI, 1);\n if (mbI >= 0) gameStore.movementblockers.splice(mbI, 1);\n if (anI >= 0) gameStore.annotations.splice(anI, 1);\n\n const annotationIndex = gameStore.annotations.indexOf(shape.uuid);\n if (annotationIndex >= 0) gameStore.annotations.splice(annotationIndex, 1);\n\n const ownedIndex = gameStore.ownedtokens.indexOf(shape.uuid);\n if (ownedIndex >= 0) gameStore.ownedtokens.splice(ownedIndex, 1);\n\n layerManager.UUIDMap.delete(shape.uuid);\n\n const index = this.selection.indexOf(shape);\n if (index >= 0) this.selection.splice(index, 1);\n if (lbI >= 0) gameStore.recalculateVision();\n if (mbI >= 0) gameStore.recalculateMovement();\n this.invalidate(!sync);\n }\n\n clear(): void {\n this.ctx.clearRect(0, 0, this.width, this.height);\n }\n\n clearSelection(): void {\n this.selection = [];\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n }\n\n draw(doClear?: boolean): void {\n if (!this.valid) {\n const ctx = this.ctx;\n const ogOP = ctx.globalCompositeOperation;\n doClear = doClear === undefined ? true : doClear;\n\n if (doClear) this.clear();\n\n const state = this;\n\n // We iteratre twice over all shapes\n // First to draw the auras and a second time to draw the shapes themselves\n // Otherwise auras from one shape could be overlapping another shape itself.\n\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.drawAuras(ctx);\n });\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.draw(ctx);\n });\n\n if (this.selection != null) {\n ctx.fillStyle = this.selectionColor;\n ctx.strokeStyle = this.selectionColor;\n ctx.lineWidth = this.selectionWidth;\n const z = gameStore.zoomFactor;\n this.selection.forEach(sel => {\n ctx.globalCompositeOperation = sel.globalCompositeOperation;\n const bb = sel.getBoundingBox();\n // TODO: REFACTOR THIS TO Shape.drawSelection(ctx);\n ctx.strokeRect(g2lx(bb.topLeft.x), g2ly(bb.topLeft.y), bb.w * z, bb.h * z);\n\n for (const p of sel.points) {\n ctx.beginPath();\n ctx.arc(g2lx(p[0]), g2ly(p[1]), 3, 0, 2 * Math.PI);\n ctx.fill();\n }\n ctx.beginPath();\n ctx.moveTo(g2lx(sel.points[0][0]), g2ly(sel.points[0][1]));\n for (let i = 1; i <= sel.points.length; i++) {\n const vertex = sel.points[i % sel.points.length];\n ctx.lineTo(g2lx(vertex[0]), g2ly(vertex[1]));\n }\n ctx.stroke();\n });\n }\n ctx.globalCompositeOperation = ogOP;\n this.valid = true;\n }\n }\n\n moveShapeOrder(shape: Shape, destinationIndex: number, sync: boolean): void {\n const oldIdx = this.shapes.indexOf(shape);\n if (oldIdx === destinationIndex) return;\n this.shapes.splice(oldIdx, 1);\n this.shapes.splice(destinationIndex, 0, shape);\n if (sync) socket.emit(\"Shape.Order.Set\", { shape: shape.asDict(), index: destinationIndex });\n this.invalidate(true);\n }\n}\n","import { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport function scrollZoom(e: WheelEvent) {\n if (!e.target || !(e.target).tagName || (e.target).tagName !== \"CANVAS\") return;\n let delta: number;\n delta = Math.sign(e.deltaY) * -1;\n gameStore.updateZoom({ newZoomValue: gameStore.zoomFactor + 0.1 * delta, zoomLocation: l2g(getMouse(e)) });\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=62c91cd3&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=62c91cd3&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"","import { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2lx, g2ly, l2g, l2gx, l2gy } from \"@/game/units\";\n\nexport abstract class BaseRect extends Shape {\n w: number;\n h: number;\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, fillColour, strokeColour, uuid);\n this.w = w;\n this.h = h;\n }\n getBaseDict() {\n return Object.assign(super.getBaseDict(), {\n width: this.w,\n height: this.h,\n });\n }\n getBoundingBox() {\n return new BoundingRect(this.refPoint, this.w, this.h);\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.refPoint.x, this.refPoint.y]];\n // note to self: topright and botleft are swapped because I'm retarded.\n const topright = this.refPoint.add(new Vector(0, this.h));\n const botright = this.refPoint.add(new Vector(this.w, this.h));\n const botleft = this.refPoint.add(new Vector(this.w, 0));\n return [\n [this.refPoint.x, this.refPoint.y],\n [topright.x, topright.y],\n [botright.x, botright.y],\n [botleft.x, botleft.y],\n ];\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.refPoint.x <= point.x &&\n this.refPoint.x + this.w >= point.x &&\n this.refPoint.y <= point.y &&\n this.refPoint.y + this.h >= point.y\n );\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint.add(new Vector(this.w / 2, this.h / 2));\n this.refPoint = new GlobalPoint(centerPoint.x - this.w / 2, centerPoint.y - this.h / 2);\n }\n\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n if (super.visibleInCanvas(canvas)) return true;\n const coreVisible = !(\n g2lx(this.refPoint.x) > canvas.width ||\n g2ly(this.refPoint.y) > canvas.height ||\n g2lx(this.refPoint.x + this.w) < 0 ||\n g2ly(this.refPoint.y + this.h) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n snapToGrid() {\n const gs = gameStore.gridSize;\n const center = this.center();\n const mx = center.x;\n const my = center.y;\n\n let targetX;\n let targetY;\n\n if ((this.w / gs) % 2 === 0) {\n targetX = Math.round(mx / gs) * gs - this.w / 2;\n } else {\n targetX = (Math.round((mx + gs / 2) / gs) - 1 / 2) * gs - this.w / 2;\n }\n if ((this.h / gs) % 2 === 0) {\n targetY = Math.round(my / gs) * gs - this.h / 2;\n } else {\n targetY = (Math.round((my + gs / 2) / gs) - 1 / 2) * gs - this.h / 2;\n }\n\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.refPoint = new GlobalPoint(Math.round(this.refPoint.x / gs) * gs, Math.round(this.refPoint.y / gs) * gs);\n this.w = Math.max(Math.round(this.w / gs) * gs, gs);\n this.h = Math.max(Math.round(this.h / gs) * gs, gs);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n switch (resizePoint) {\n case 0: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = l2g(point);\n break;\n }\n case 1: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint = new GlobalPoint(l2gx(point.x), this.refPoint.y);\n break;\n }\n case 2: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n break;\n }\n case 3: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = new GlobalPoint(this.refPoint.x, l2gy(point.y));\n break;\n }\n }\n\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint = this.refPoint.add(new Vector(this.w, 0));\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint = this.refPoint.add(new Vector(0, this.h));\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=cad11dd2&\"\nimport script from \"./select.vue?vue&type=script&lang=ts&\"\nexport * from \"./select.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"select.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./main.vue?vue&type=template&id=61eb1455&scoped=true&\"\nimport script from \"./main.vue?vue&type=script&lang=ts&\"\nexport * from \"./main.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"61eb1455\",\n null\n \n)\n\ncomponent.options.__file = \"main.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"AssetManager\"}},[_c('div',{attrs:{\"id\":\"titlebar\"}},[_vm._v(\"Asset Manager\")]),_c('div',{attrs:{\"id\":\"main\"}},[_c('div',{attrs:{\"id\":\"assets\"},on:{\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.currentFolder)}}},[_c('div',{attrs:{\"id\":\"breadcrumbs\"}},[_c('div',[_vm._v(\"/\")]),_vm._l((_vm.path),function(dir){return _c('div',{key:dir},[_vm._v(_vm._s(_vm.idMap.get(dir).name))])})],2),_c('div',{attrs:{\"id\":\"actionbar\"}},[_c('input',{attrs:{\"id\":\"files\",\"type\":\"file\",\"multiple\":\"\",\"hidden\":\"\"},on:{\"change\":function($event){_vm.upload()}}}),_c('div',{attrs:{\"title\":\"Create folder\"},on:{\"click\":_vm.createDirectory}},[_c('i',{staticClass:\"fas fa-plus-square\"})]),_c('div',{attrs:{\"title\":\"Upload files\"},on:{\"click\":_vm.prepareUpload}},[_c('i',{staticClass:\"fas fa-upload\"})])]),_c('div',{attrs:{\"id\":\"explorer\"}},[(_vm.path.length)?_c('div',{staticClass:\"inode folder\",on:{\"dblclick\":function($event){_vm.changeDirectory(-1)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.parentFolder)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(\"..\")])]):_vm._e(),_vm._l((_vm.folders),function(key){return _c('div',{key:key,staticClass:\"inode folder\",class:{'inode-selected': _vm.selected.includes(key)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, key)},\"dblclick\":function($event){_vm.changeDirectory(key)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, key)},\"dragstart\":function($event){_vm.startDrag($event, key)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, key)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(key).name))])])}),_vm._l((_vm.files),function(file){return _c('div',{key:file,staticClass:\"inode file\",class:{'inode-selected': _vm.selected.includes(file)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, file)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, file)},\"dragstart\":function($event){_vm.startDrag($event, file)}}},[_c('img',{attrs:{\"src\":'/static/assets/' + _vm.idMap.get(file).file_hash,\"width\":\"50\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(file).name))])])})],2)]),(_vm.firstSelectedFile)?_c('div',{attrs:{\"id\":\"asset-details\"}},[_c('div',{attrs:{\"id\":\"asset-detail-title\"}},[_vm._v(_vm._s(_vm.firstSelectedFile.name))]),_c('img',{attrs:{\"src\":'/static/assets/' + _vm.firstSelectedFile.file_hash}})]):_vm._e()]),_c('AssetContextMenu',{ref:\"cm\"}),_c('Prompt',{ref:\"prompt\"}),_c('ConfirmDialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=template&id=5b0def98&\"","\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy } from \"@/game/units\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class SelectContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n open(event: MouseEvent) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n }\n bringPlayers() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Players.Bring\", { x: l2gx(this.x), y: l2gy(this.y) });\n this.close();\n }\n createToken() {\n (this.$parent.$parent.$refs.createtokendialog).open(this.x, this.y);\n this.close();\n }\n showInitiative() {\n EventBus.$emit(\"Initiative.Show\");\n this.close();\n }\n}\n","import Axios from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component({})\nexport default class Logout extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/logout\").then(() => {\n coreStore.setAuthenticated(false);\n coreStore.setUsername(\"\");\n next({ path: \"/auth/login\" });\n });\n }\n}\n","import { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { rootStore } from \"@/store\";\n\nexport interface CoreState {\n authenticated: boolean;\n initialized: boolean;\n username: string;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule implements CoreState {\n authenticated = false;\n initialized = false;\n username = \"\";\n\n @Mutation\n setAuthenticated(auth: boolean) {\n this.authenticated = auth;\n }\n\n @Mutation\n setInitialized(init: boolean) {\n this.initialized = init;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n}\n\nexport const coreStore = getModule(CoreStore);\n","import Vue from \"vue\";\n\nimport App from \"@/App.vue\";\nimport { router } from \"@/router\";\nimport { rootStore } from \"@/store\";\n\nVue.config.productionTip = false;\nVue.config.devtools = true;\nVue.config.performance = true;\n\nexport const app = new Vue({\n router,\n store: rootStore,\n render: h => h(App),\n}).$mount(\"#app\");\n\n(window).app = app;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component({\n props: [\"visible\", \"left\", \"top\"],\n})\nexport default class ContextMenu extends Vue {}\n","import Axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\n@Component({ template: \"\" })\nexport default class Initiative extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/invite\", {\n code: to.params.code,\n })\n .then((response: AxiosResponse) => {\n next({ path: response.data.sessionUrl });\n })\n .catch((error: AxiosError) => {\n console.error(\"Invitation code could not be redeemed\");\n next({ path: \"/dashboard\" });\n });\n }\n}\n","import { render, staticRenderFns } from \"./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"\nimport script from \"./prompt.vue?vue&type=script&lang=ts&\"\nexport * from \"./prompt.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0602c2e6\",\n null\n \n)\n\ncomponent.options.__file = \"prompt.vue\"\nexport default component.exports","import { GlobalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nimport { Edge } from \"./cdt\";\nimport { drawPolygon } from \"./draw\";\nimport { PA_CDT } from \"./pa\";\nimport { Point, Sign, Triangle } from \"./tds\";\nimport { ccw, cw, orientation } from \"./triag\";\n\nexport function computeVisibility(q: GlobalPoint, target: \"vision\" | \"movement\", drawt?: boolean): number[][] {\n if (drawt === undefined) drawt = gameStore.drawTEContour;\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT[target].locate(Q, null).loc;\n if (triangle === null) {\n console.error(\"Triangle not found\");\n return [];\n }\n // triangle.fill();\n rawOutput.push(triangle.vertices[1]!.point!);\n if (!triangle.isConstrained(0))\n expandEdge(Q, triangle.vertices[2]!.point!, triangle.vertices[1]!.point!, triangle, 0, rawOutput);\n rawOutput.push(triangle.vertices[2]!.point!);\n if (!triangle.isConstrained(1))\n expandEdge(Q, triangle.vertices[0]!.point!, triangle.vertices[2]!.point!, triangle, 1, rawOutput);\n rawOutput.push(triangle.vertices[0]!.point!);\n if (!triangle.isConstrained(2))\n expandEdge(Q, triangle.vertices[1]!.point!, triangle.vertices[0]!.point!, triangle, 2, rawOutput);\n // console.timeEnd(\"CV\");\n\n if (drawt) drawPolygon(rawOutput, \"red\");\n\n return rawOutput;\n}\n\nfunction expandEdge(\n q: Point,\n left: number[],\n right: number[],\n fh: Triangle,\n index: number,\n rawOutput: number[][],\n): void {\n // fh.edge(index).draw();\n const nfh = fh.neighbours[index]!;\n // nfh.fill(\"rgba(255, 0, 0, 0.25)\");\n const nIndex = nfh.indexT(fh);\n const rIndex = ccw(nIndex);\n const lIndex = cw(nIndex);\n const nvh = nfh.vertices[nIndex]!;\n const rvh = nfh.vertices[lIndex]!;\n const lvh = nfh.vertices[rIndex]!;\n\n const re: Edge = [nfh, rIndex];\n const le: Edge = [nfh, lIndex];\n\n const ro = orientation(q, right, nvh.point!);\n const lo = orientation(q, left, nvh.point!);\n\n // const ctx = layerManager.getLayer(\"draw\")!.ctx;\n // ctx.beginPath();\n // ctx.strokeStyle = \"red\";\n // ctx.lineJoin = \"round\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(left[0]), g2ly(left[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.strokeStyle = \"blue\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(right[0]), g2ly(right[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.closePath();\n // ctx.stroke();\n\n // Right edge is seen if the new vertex is ccw of the right ray\n if (ro === Sign.COUNTERCLOCKWISE) {\n if (re[0].isConstrained(re[1])) {\n // See if current right ray is rvh\n if (right !== rvh.point!) rawOutput.push(raySegIntersection(q, right, nvh.point!, rvh.point!));\n if (lo === Sign.COUNTERCLOCKWISE) rawOutput.push(raySegIntersection(q, left, nvh.point!, rvh.point!));\n } else {\n if (lo === Sign.COUNTERCLOCKWISE) return expandEdge(q, left, right, nfh, rIndex, rawOutput);\n else expandEdge(q, nvh.point!, right, nfh, rIndex, rawOutput);\n }\n }\n\n if (ro !== Sign.CLOCKWISE && lo !== Sign.COUNTERCLOCKWISE) {\n rawOutput.push(nvh.point!);\n }\n\n if (lo === Sign.CLOCKWISE) {\n if (le[0].isConstrained(le[1])) {\n if (ro === Sign.CLOCKWISE) {\n rawOutput.push(raySegIntersection(q, right, nvh.point!, lvh.point!));\n }\n if (left !== lvh.point!) {\n rawOutput.push(raySegIntersection(q, left, nvh.point!, lvh.point!));\n }\n return;\n } else {\n if (ro === Sign.CLOCKWISE) {\n return expandEdge(q, left, right, nfh, lIndex, rawOutput);\n } else {\n return expandEdge(q, left, nvh.point!, nfh, lIndex, rawOutput);\n }\n }\n }\n}\n\nfunction raySegIntersection(q: Point, b: Point, s: Point, t: Point) {\n const denominator = (t[1] - s[1]) * (b[0] - q[0]) - (t[0] - s[0]) * (b[1] - q[1]);\n const ua = ((t[0] - s[0]) * (q[1] - s[1]) - (t[1] - s[1]) * (q[0] - s[0])) / denominator;\n // const ub = ((b[0] - q.x) * (q.y - s[1]) - (b[1] - q.y) * (q.x - s[0])) / denominator;\n const x = q[0] + ua * (b[0] - q[0]);\n const y = q[1] + ua * (b[1] - q[1]);\n\n return [x, y];\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',[_vm._v(\"#X\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.xCount),expression:\"xCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.xCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.xCount=$event.target.value}}}),_c('div',[_vm._v(\"#Y\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.yCount),expression:\"yCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.yCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.yCount=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=template&id=2104f147&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=7c80ae3a&scoped=true&\"\nimport script from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./edit_dialog.vue?vue&type=style&index=0&id=7c80ae3a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7c80ae3a\",\n null\n \n)\n\ncomponent.options.__file = \"edit_dialog.vue\"\nexport default component.exports","export class Settings {\n static angleSteps = 4;\n static drawAngleLines = false;\n static drawFirstLightHit = false;\n static skipPlayerFOW = false;\n static skipLightFOW = false;\n\n static tempFill: string = \"fog\";\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { coreStore } from \"@/core/store\";\n\n@Component\nexport default class Login extends Vue {\n username = \"\";\n password = \"\";\n error = \"\";\n\n login() {\n axios\n .post(\"/api/login\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n register() {\n axios\n .post(\"/api/register\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n focusin(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"0\";\n }\n }\n\n focusout(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"1\";\n }\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(\"Create basic token\")])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('label',{attrs:{\"for\":\"createtokendialog-text\"}},[_vm._v(\"Text\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.text),expression:\"text\"}],attrs:{\"type\":\"text\",\"id\":\"createtokendialog-name\"},domProps:{\"value\":(_vm.text)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.text=$event.target.value}}}),_c('label',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"colours\"},[_c('span',[_vm._v(\"Fill:\")]),_c('color-picker',{attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('span',[_vm._v(\"Border:\")]),_c('color-picker',{attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('canvas',{ref:\"canvas\",attrs:{\"width\":\"100px\",\"height\":\"100px\"}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(\"div\")}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=template&id=1e034b42&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{\"name\":\"modal\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.visible),expression:\"visible\"}],staticClass:\"mask\",class:{'modal-mask': _vm.mask, 'dialog-mask': !_vm.mask},on:{\"click\":_vm.close,\"dragover\":function($event){$event.preventDefault();return _vm.dragOver($event)}}},[_c('div',{ref:\"container\",staticClass:\"modal-container\",on:{\"click\":function($event){$event.stopPropagation();}}},[_vm._t(\"header\",null,{dragStart:_vm.dragStart,dragEnd:_vm.dragEnd}),_vm._t(\"default\")],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"","import Component from \"vue-class-component\";\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Line } from \"@/game/shapes/line\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component\nexport class RulerTool extends Tool {\n name = \"Ruler\";\n active = false;\n startPoint: GlobalPoint | null = null;\n ruler: Line | null = null;\n text: Text | null = null;\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n this.active = true;\n this.startPoint = l2g(getMouse(event));\n this.ruler = new Line(this.startPoint, this.startPoint, 3, gameStore.rulerColour);\n this.text = new Text(this.startPoint.clone(), \"\", \"bold 20px serif\");\n this.ruler.addOwner(gameStore.username);\n this.text.addOwner(gameStore.username);\n layer.addShape(this.ruler, true, true);\n layer.addShape(this.text, true, true);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n const endPoint = l2g(getMouse(event));\n\n this.ruler.endPoint = endPoint;\n socket.emit(\"Shape.Update\", { shape: this.ruler!.asDict(), redraw: true, temporary: true });\n\n const diffsign = Math.sign(endPoint.x - this.startPoint.x) * Math.sign(endPoint.y - this.startPoint.y);\n const xdiff = Math.abs(endPoint.x - this.startPoint.x);\n const ydiff = Math.abs(endPoint.y - this.startPoint.y);\n const label =\n Math.round((Math.sqrt(xdiff ** 2 + ydiff ** 2) * gameStore.unitSize) / gameStore.gridSize) + \" ft\";\n const angle = Math.atan2(diffsign * ydiff, xdiff);\n const xmid = Math.min(this.startPoint.x, endPoint.x) + xdiff / 2;\n const ymid = Math.min(this.startPoint.y, endPoint.y) + ydiff / 2;\n this.text.refPoint = new GlobalPoint(xmid, ymid);\n this.text.text = label;\n this.text.angle = angle;\n socket.emit(\"Shape.Update\", { shape: this.text.asDict(), redraw: true, temporary: true });\n layer.invalidate(true);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n layer.removeShape(this.ruler, true, true);\n layer.removeShape(this.text, true, true);\n layer.invalidate(true);\n this.ruler = this.startPoint = this.text = null;\n }\n}\n","import { render, staticRenderFns } from \"./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"\nimport script from \"./modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"12ed61ba\",\n null\n \n)\n\ncomponent.options.__file = \"modal.vue\"\nexport default component.exports","import { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nimport { CDT } from \"./cdt\";\n\nexport let PA_CDT = {\n vision: new CDT(),\n movement: new CDT(),\n};\n\nexport function triangulate(target: \"vision\" | \"movement\", partial: boolean = false) {\n const cdt = new CDT();\n\n let shapes;\n if (target === \"vision\") shapes = gameStore.visionBlockers;\n else shapes = gameStore.movementblockers;\n\n for (const sh of shapes) {\n const shape = layerManager.UUIDMap.get(sh)!;\n if (partial && !shape.visibleInCanvas(layerManager.getLayer()!.canvas)) continue;\n for (let i = 0; i < shape.points.length; i++) {\n cdt.insertConstraint(shape.points[i], shape.points[(i + 1) % shape.points.length]);\n }\n }\n // LEFT WALL\n cdt.insertConstraint([-1e10, -1e10], [-1e10, 1e10]);\n cdt.insertConstraint([-1e10, 1e10], [-1e11, 1e10]);\n cdt.insertConstraint([-1e11, 1e10], [-1e11, -1e10]);\n cdt.insertConstraint([-1e11, -1e10], [-1e10, -1e10]);\n // TOP WALL\n cdt.insertConstraint([-1e10, -1e10], [1e10, -1e10]);\n cdt.insertConstraint([1e10, -1e10], [1e10, -1e11]);\n cdt.insertConstraint([1e10, -1e11], [-1e10, -1e11]);\n cdt.insertConstraint([-1e10, -1e11], [-1e10, -1e10]);\n // RIGHT WALL\n cdt.insertConstraint([1e10, -1e10], [1e10, 1e10]);\n cdt.insertConstraint([1e10, 1e10], [1e11, 1e10]);\n cdt.insertConstraint([1e11, 1e10], [1e11, -1e10]);\n cdt.insertConstraint([1e11, -1e10], [1e10, -1e10]);\n // BOT WALL\n cdt.insertConstraint([-1e10, 1e10], [1e10, 1e10]);\n cdt.insertConstraint([1e10, 1e10], [1e10, 1e11]);\n cdt.insertConstraint([1e10, 1e11], [-1e10, 1e11]);\n cdt.insertConstraint([-1e10, 1e11], [-1e10, 1e10]);\n PA_CDT[target] = cdt;\n (window).CDT = PA_CDT;\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Prop } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n})\nexport default class EditDialog extends Vue {\n @Prop() shape!: Shape;\n\n visible = false;\n\n mounted() {\n EventBus.$on(\"EditDialog.Open\", (shape: Shape) => {\n this.shape = shape;\n this.visible = true;\n });\n }\n\n beforeDestroy() {\n EventBus.$off();\n }\n\n updated() {\n this.addEmpty();\n }\n\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.addOwner(\"\");\n if (\n !this.shape.trackers.length ||\n this.shape.trackers[this.shape.trackers.length - 1].name !== \"\" ||\n this.shape.trackers[this.shape.trackers.length - 1].value !== 0\n )\n this.shape.trackers.push({ uuid: uuidv4(), name: \"\", value: 0, maxvalue: 0, visible: false });\n if (\n !this.shape.auras.length ||\n this.shape.auras[this.shape.auras.length - 1].name !== \"\" ||\n this.shape.auras[this.shape.auras.length - 1].value !== 0\n )\n this.shape.auras.push({\n uuid: uuidv4(),\n name: \"\",\n value: 0,\n dim: 0,\n visionSource: false,\n colour: \"rgba(0,0,0,0)\",\n visible: false,\n });\n }\n updateShape(redraw: boolean, temporary = false) {\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary });\n if (redraw) layerManager.invalidate();\n this.addEmpty();\n }\n setToken(event: { target: HTMLInputElement }) {\n this.shape.setIsToken(event.target.checked);\n this.updateShape(true);\n }\n setVisionBlocker(event: { target: HTMLInputElement }) {\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n setMovementBlocker(event: { target: HTMLInputElement }) {\n this.shape.setMovementBlock(event.target.checked);\n this.updateShape(false);\n }\n updateAnnotation(event: { target: HTMLInputElement }) {\n const hadAnnotation = this.shape.annotation !== \"\";\n this.shape.annotation = event.target.value;\n if (this.shape.annotation !== \"\" && !hadAnnotation) {\n gameStore.annotations.push(this.shape.uuid);\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n } else if (this.shape.annotation === \"\" && hadAnnotation) {\n gameStore.annotations.splice(gameStore.annotations.findIndex(an => an === this.shape.uuid));\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n }\n this.updateShape(false);\n }\n updateOwner(event: { target: HTMLInputElement }, oldValue: string) {\n this.shape.updateOwner(oldValue, event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n this.shape.removeOwner(value);\n this.updateShape(gameStore.fowLOS);\n }\n removeTracker(uuid: string) {\n this.shape.trackers = this.shape.trackers.filter(tr => tr.uuid !== uuid);\n this.updateShape(false);\n }\n removeAura(uuid: string) {\n this.shape.auras = this.shape.auras.filter(au => au.uuid !== uuid);\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n updateAuraVisionSource(aura: Aura) {\n aura.visionSource = !aura.visionSource;\n const i = gameStore.visionSources.findIndex(ls => ls.aura === aura.uuid);\n if (aura.visionSource && i === -1) gameStore.visionSources.push({ shape: this.shape.uuid, aura: aura.uuid });\n else if (!aura.visionSource && i >= 0) gameStore.visionSources.splice(i, 1);\n // aura.lastPath = undefined;\n layerManager.invalidateLight();\n this.updateShape(true);\n }\n updateAuraColour(aura: Aura, colour: string) {\n const layer = layerManager.getLayer(this.shape.layer);\n if (layer === undefined) return;\n layer.invalidate(!aura.visionSource);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"main\"},on:{\"mouseleave\":_vm.mouseleave}},[_c('menu-bar'),_c('div',{attrs:{\"id\":\"board\"}},[(_vm.ready.manager)?[_c('tool-bar',{ref:\"tools\"})]:_vm._e(),_c('div',{attrs:{\"id\":\"layers\"},on:{\"mousedown\":_vm.mousedown,\"mouseup\":_vm.mouseup,\"mousemove\":_vm.mousemove,\"contextmenu\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.contextmenu($event)},\"dragover\":function($event){$event.preventDefault();},\"drop\":_vm.drop}}),(_vm.layers.length > 1)?_c('div',{attrs:{\"id\":\"layerselect\"}},[_c('ul',_vm._l((_vm.layers),function(layer){return _c('li',{key:layer.name,class:{ 'layer-selected': layer === _vm.selectedLayer },on:{\"click\":function($event){_vm.selectLayer(layer)}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(layer))])])}))]):_vm._e()],2),_c('selection-info',{ref:\"selectionInfo\"}),_c('initiative-dialog',{ref:\"initiative\",attrs:{\"id\":\"initiativedialog\"}}),_c('note-dialog',{ref:\"note\"}),_c('zoom-slider',{attrs:{\"id\":\"zoomer\",\"height\":6,\"width\":200,\"min\":0.01,\"max\":5.0,\"interval\":0.1,\"dot-width\":8,\"dot-height\":20,\"tooltip-dir\":'bottom',\"tooltip\":'hover',\"formatter\":_vm.zoomFactor.toFixed(1),\"slider-style\":{'border-radius': '15%'},\"bg-style\":{'background-color': '#fff', 'box-shadow': '0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)'},\"process-style\":{'background-color': '#fff'}},model:{value:(_vm.zoomFactor),callback:function ($$v) {_vm.zoomFactor=$$v},expression:\"zoomFactor\"}}),_c('prompt-dialog',{ref:\"prompt\"}),_c('confirm-dialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=template&id=6d744362&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class ConfirmDialog extends Vue {\n $refs!: {\n confirm: HTMLButtonElement;\n };\n\n visible = false;\n yes = \"Yes\";\n no = \"No\";\n title = \"\";\n\n resolve = (ok: boolean) => {};\n reject = () => {};\n\n confirm() {\n this.resolve(true);\n this.close();\n }\n deny() {\n this.resolve(false);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.title = \"\";\n }\n open(title: string, yes = \"yes\", no = \"no\"): Promise {\n this.yes = yes;\n this.no = no;\n this.title = title;\n\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.confirm.focus();\n });\n\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","import { render, staticRenderFns } from \"./map.vue?vue&type=template&id=2104f147&\"\nimport script from \"./map.vue?vue&type=script&lang=ts&\"\nexport * from \"./map.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"map.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('button',{ref:\"confirm\",on:{\"click\":_vm.confirm}},[_vm._v(_vm._s(_vm.yes))]),(!!_vm.no)?_c('button',{on:{\"click\":_vm.deny}},[_vm._v(_vm._s(_vm.no))]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"","\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { getComponent, getRef } from \"@/core/utils\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class AssetContextMenu extends Vue {\n visible = false;\n left = 0;\n top = 0;\n open(event: MouseEvent, inode: number) {\n if (!assetStore.selected.includes(inode)) getComponent().select(event, inode);\n\n this.visible = true;\n this.left = event.pageX;\n this.top = event.pageY;\n this.$nextTick(() => {\n this.$children[0].$el.focus();\n });\n }\n close() {\n this.visible = false;\n }\n rename() {\n if (assetStore.selected.length !== 1) return;\n const asset = assetStore.idMap.get(assetStore.selected[0])!;\n\n getRef(\"prompt\")\n .prompt(\"New name:\", `Renaming ${asset.name}`)\n .then(\n (name: string) => {\n socket.emit(\"Asset.Rename\", {\n asset: asset.id,\n name,\n });\n asset.name = name;\n getComponent().$forceUpdate();\n },\n () => {},\n );\n this.close();\n }\n remove() {\n if (assetStore.selected.length === 0) return;\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result) {\n for (const sel of assetStore.selected) {\n socket.emit(\"Asset.Remove\", sel);\n if (assetStore.files.includes(sel))\n assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.clearSelected();\n }\n },\n () => {},\n );\n this.close();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"","import { ServerPolygon } from \"../comm/types/shapes\";\nimport { GlobalPoint, LocalPoint } from \"../geom\";\nimport { g2lx, g2ly, g2lz, l2g } from \"../units\";\nimport { getFogColour } from \"../utils\";\nimport { BoundingRect } from \"./boundingrect\";\nimport { Shape } from \"./shape\";\n\nexport class Polygon extends Shape {\n type = \"polygon\";\n _vertices: GlobalPoint[] = [];\n\n constructor(\n startPoint: GlobalPoint,\n vertices: GlobalPoint[] = [],\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, fillColour, strokeColour, uuid);\n this._vertices = vertices;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._vertices.length; i++) this._vertices[i] = this._vertices[i].add(delta);\n }\n\n get vertices() {\n return [this._refPoint, ...this._vertices];\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n vertices: this._vertices.map(p => ({ x: p.x, y: p.y })),\n });\n }\n\n fromDict(data: ServerPolygon) {\n super.fromDict(data);\n this._vertices = data.vertices.map(v => new GlobalPoint(v.x, v.y));\n }\n\n get points() {\n return this.vertices.map(point => [point.x, point.y]);\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else if (this.vertices.length === 2) ctx.strokeStyle = this.fillColour;\n else ctx.strokeStyle = this.strokeColour;\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n ctx.lineWidth = g2lz(2);\n\n ctx.beginPath();\n ctx.moveTo(g2lx(this.vertices[0].x), g2ly(this.vertices[0].y));\n for (let i = 1; i <= this.vertices.length; i++) {\n const vertex = this.vertices[i % this.vertices.length];\n ctx.lineTo(g2lx(vertex.x), g2ly(vertex.y));\n }\n ctx.fill();\n ctx.stroke();\n }\n\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._vertices[resizePoint - 1] = l2g(point);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._vertices) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}]},[_vm._v(\"Mode\")]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}],staticClass:\"selectgroup\"},_vm._l((_vm.modes),function(mode){return _c('div',{key:mode,staticClass:\"option\",class:{'option-selected': _vm.modeSelect === mode},on:{\"click\":function($event){_vm.modeSelect = mode}}},[_vm._v(_vm._s(mode))])})),_c('div',[_vm._v(\"Shape\")]),_c('div',{staticClass:\"selectgroup\"},_vm._l((_vm.shapes),function(shape){return _c('div',{key:shape,staticClass:\"option\",class:{'option-selected': _vm.shapeSelect === shape},on:{\"click\":function($event){_vm.shapeSelect = shape}}},[_c('i',{staticClass:\"fas\",class:'fa-' + shape})])})),_c('div',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"selectgroup\"},[_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}]},[_vm._v(\"Brush size\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.brushSize),expression:\"brushSize\"},{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}],staticStyle:{\"max-width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.brushSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.brushSize=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=template&id=639cd890&scoped=true&\"","import { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=5b0def98&\"\nimport script from \"./manager.vue?vue&type=script&lang=ts&\"\nexport * from \"./manager.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./manager.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"manager.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./tool.vue?vue&type=template&id=1e034b42&\"\nimport script from \"./tool.vue?vue&type=script&lang=ts&\"\nexport * from \"./tool.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tool.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"tool.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_vm._v(\"\\n \"+_vm._s(_vm.question)+\"\\n \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.answer),expression:\"answer\"}],ref:\"answer\",attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.answer)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.submit($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.answer=$event.target.value}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport draggable from \"vuedraggable\";\nVue.component(\"draggable\", draggable);\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { InitiativeData, InitiativeEffect } from \"@/game/comm/types/general\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n draggable,\n },\n})\nexport default class Initiative extends Vue {\n visible = false;\n data: InitiativeData[] = [];\n currentActor: string | null = null;\n roundCounter = 0;\n\n mounted() {\n EventBus.$on(\"Initiative.Clear\", this.clear);\n EventBus.$on(\"Initiative.Remove\", (data: string) => this.removeInitiative(data));\n EventBus.$on(\"Initiative.Show\", () => (this.visible = true));\n\n socket.on(\"Initiative.Set\", (data: InitiativeData[]) => {\n this.data = data;\n });\n socket.on(\"Initiative.Turn.Update\", (data: string) => this.setTurn(data, false));\n socket.on(\"Initiative.Round.Update\", (data: number) => this.setRound(data, false));\n socket.on(\"Initiative.Effect.New\", (data: { actor: string; effect: InitiativeEffect }) => {\n const actor = this.getActor(data.actor);\n if (actor === undefined) return;\n this.createEffect(actor, data.effect, false);\n });\n socket.on(\"Initiative.Effect.Update\", (data: { actor: string; effect: InitiativeEffect }) =>\n this.updateEffect(data.actor, data.effect, false),\n );\n }\n\n beforeDestroy() {\n EventBus.$off();\n }\n\n // Utilities\n clear() {\n this.data = [];\n this.currentActor = null;\n }\n getActor(actorId: string) {\n return this.data.find(a => a.uuid === actorId);\n }\n contains(uuid: string) {\n return this.data.some(d => d.uuid === uuid);\n }\n owns(actor: InitiativeData): boolean {\n if (gameStore.IS_DM) return true;\n const shape = layerManager.UUIDMap.get(actor.uuid);\n // Shapes that are unknown to this client are hidden from this client but owned by other clients\n if (shape === undefined) return false;\n return shape.owners.includes(gameStore.username);\n }\n getDefaultEffect() {\n return { uuid: uuidv4(), name: \"New Effect\", turns: 10 };\n }\n fakeSetData(dataTransfer: DataTransfer) {\n dataTransfer.setData(\"Hack\", \"\");\n }\n syncInitiative(data: InitiativeData | { uuid: string }) {\n socket.emit(\"Initiative.Update\", data);\n }\n // Events\n addInitiative(data: InitiativeData) {\n const d = this.data.findIndex(a => a.uuid === data.uuid);\n if (d >= 0) return;\n if (data.initiative === undefined) data.initiative = 0;\n this.syncInitiative(data);\n }\n removeInitiative(uuid: string) {\n const d = this.data.findIndex(a => a.uuid === uuid);\n if (d < 0 || this.data[d].group) return;\n this.syncInitiative({ uuid });\n // Remove highlight\n const shape = layerManager.UUIDMap.get(uuid);\n if (shape === undefined) return;\n if (shape.showHighlight) {\n shape.showHighlight = false;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n }\n updateOrder() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Initiative.Set\", this.data.map(d => d.uuid));\n }\n setTurn(actorId: string | null, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.currentActor = actorId;\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n if (actor.effects) {\n for (let e = actor.effects.length - 1; e >= 0; e--) {\n if (actor.effects[e].turns <= 0) actor.effects.splice(e, 1);\n else actor.effects[e].turns--;\n }\n }\n if (sync) socket.emit(\"Initiative.Turn.Update\", actorId);\n }\n setRound(round: number, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.roundCounter = round;\n if (sync) socket.emit(\"Initiative.Round.Update\", round);\n }\n nextTurn() {\n if (!gameStore.IS_DM) return;\n const order = this.data;\n const next = order[(order.findIndex(a => a.uuid === this.currentActor) + 1) % order.length];\n if (this.data[0].uuid === next.uuid) this.setRound(this.roundCounter + 1, true);\n this.setTurn(next.uuid, true);\n }\n toggleHighlight(actor: InitiativeData, show: boolean) {\n const shape = layerManager.UUIDMap.get(actor.uuid);\n if (shape === undefined) return;\n shape.showHighlight = show;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n toggleOption(actor: InitiativeData, option: \"visible\" | \"group\") {\n if (!this.owns(actor)) return;\n actor[option] = !actor[option];\n this.syncInitiative(actor);\n }\n createEffect(actor: InitiativeData, effect: InitiativeEffect, sync: boolean) {\n if (!this.owns(actor)) return;\n actor.effects.push(effect);\n if (sync) socket.emit(\"Initiative.Effect.New\", { actor: actor.uuid, effect });\n }\n syncEffect(actor: InitiativeData, effect: InitiativeEffect) {\n if (!this.owns(actor)) return;\n socket.emit(\"Initiative.Effect.Update\", { actor: actor.uuid, effect });\n }\n updateEffect(actorId: string, effect: InitiativeEffect, sync: boolean) {\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n const effectIndex = actor.effects.findIndex(e => e.uuid === effect.uuid);\n if (effectIndex === undefined) return;\n actor.effects[effectIndex] = effect;\n if (sync) this.syncEffect(actor, effect);\n else this.$forceUpdate();\n }\n}\n","import { render, staticRenderFns } from \"./selection_info.vue?vue&type=template&id=32cec914&scoped=true&\"\nimport script from \"./selection_info.vue?vue&type=script&lang=ts&\"\nexport * from \"./selection_info.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selection_info.vue?vue&type=style&index=0&id=32cec914&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"32cec914\",\n null\n \n)\n\ncomponent.options.__file = \"selection_info.vue\"\nexport default component.exports","// import Vuex from \"vuex\";\nimport { Action, getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { g2l, l2g } from \"@/game/units\";\nimport { BoundingVolume } from \"@/game/visibility/bvh/bvh\";\nimport { rootStore } from \"@/store\";\nimport { triangulate } from \"./visibility/te/pa\";\n\nexport interface GameState {\n boardInitialized: boolean;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"game\", namespaced: true })\nclass GameStore extends VuexModule implements GameState {\n // This is a limited view of selectable layers that is used to generate the layer selection UI and ability to switch layers\n // See the layerManager for proper layer management tools\n layers: string[] = [];\n selectedLayerIndex = -1;\n boardInitialized = false;\n\n locations: string[] = [];\n\n assets: AssetList = {};\n\n notes: Note[] = [];\n\n IS_DM = false;\n gridSize = 50;\n username = \"\";\n roomName = \"\";\n roomCreator = \"\";\n invitationCode = \"\";\n\n gridColour = \"rgba(0, 0, 0, 1)\";\n fowColour = \"rgba(0, 0, 0, 1)\";\n rulerColour = \"rgba(255, 0, 0, 1)\";\n panX = 0;\n panY = 0;\n zoomFactor = 1;\n\n unitSize = 5;\n useGrid = true;\n fullFOW = false;\n fowOpacity = 0.3;\n fowLOS = false;\n locationName = \"\";\n\n visionSources: { shape: string; aura: string }[] = [];\n visionBlockers: string[] = [];\n annotations: string[] = [];\n movementblockers: string[] = [];\n ownedtokens: string[] = [];\n\n BV = Object.freeze(new BoundingVolume([]));\n\n visionMode: \"bvh\" | \"triangle\" = \"bvh\";\n drawTEContour = false;\n visionRangeMin = 1640;\n visionRangeMax = 3281;\n\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n @Mutation\n setVisionMode(data: { mode: \"bvh\" | \"triangle\"; sync: boolean }) {\n this.visionMode = data.mode;\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_mode: data.mode });\n }\n\n @Mutation\n setBoardInitialized(boardInitialized: boolean) {\n this.boardInitialized = boardInitialized;\n }\n\n @Mutation\n setDM(isDM: boolean) {\n this.IS_DM = isDM;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n\n @Mutation\n setRoomName(name: string) {\n this.roomName = name;\n }\n\n @Mutation\n setRoomCreator(name: string) {\n this.roomCreator = name;\n }\n\n @Mutation\n setInvitationCode(code: string) {\n this.invitationCode = code;\n }\n\n @Mutation\n addLayer(name: string) {\n this.layers.push(name);\n if (this.selectedLayerIndex === -1) this.selectedLayerIndex = this.layers.indexOf(name);\n }\n\n @Mutation\n selectLayer(data: { name: string; sync: boolean }) {\n const index = this.layers.indexOf(data.name);\n if (index >= 0) this.selectedLayerIndex = index;\n if (data.sync) socket.emit(\"Client.ActiveLayer.Set\", data.name);\n }\n\n @Mutation\n newNote(data: { note: Note; sync: boolean }) {\n this.notes.push(data.note);\n if (data.sync) socket.emit(\"Note.New\", data.note);\n }\n\n @Mutation\n setAssets(assets: AssetList) {\n this.assets = assets;\n }\n\n @Mutation\n setLocations(locations: string[]) {\n this.locations = locations;\n }\n\n @Mutation\n resetLayerInfo() {\n this.layers = [];\n this.selectedLayerIndex = -1;\n }\n\n @Mutation\n recalculateVision(partial = false) {\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(\"vision\", partial);\n else this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n }\n }\n\n @Mutation\n recalculateMovement(partial = false) {\n if (this.boardInitialized && this.visionMode === \"triangle\") triangulate(\"movement\", partial);\n }\n\n @Mutation\n updateZoom(data: { newZoomValue: number; zoomLocation: GlobalPoint }) {\n if (data.newZoomValue === this.zoomFactor) return;\n if (data.newZoomValue < 0.1) data.newZoomValue = 0.01;\n if (data.newZoomValue > 5) data.newZoomValue = 5;\n\n const oldLoc = g2l(data.zoomLocation);\n\n this.zoomFactor = data.newZoomValue;\n\n const newLoc = l2g(oldLoc);\n\n // Change the pan settings to keep the zoomLocation in the same exact location before and after the zoom.\n const diff = newLoc.subtract(data.zoomLocation);\n this.panX += diff.x;\n this.panY += diff.y;\n\n layerManager.invalidate();\n sendClientOptions();\n }\n\n @Mutation\n setGridColour(data: { colour: string; sync: boolean }) {\n this.gridColour = data.colour;\n layerManager.getGridLayer()!.drawGrid();\n if (data.sync) socket.emit(\"Client.Options.Set\", { gridColour: data.colour });\n }\n\n @Mutation\n setFOWColour(data: { colour: string; sync: boolean }) {\n this.fowColour = data.colour;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Client.Options.Set\", { fowColour: data.colour });\n }\n\n @Mutation\n setRulerColour(data: { colour: string; sync: boolean }) {\n this.rulerColour = data.colour;\n if (data.sync) socket.emit(\"Client.Options.Set\", { rulerColour: data.colour });\n }\n\n @Mutation\n setPanX(x: number) {\n this.panX = x;\n }\n\n @Mutation\n setPanY(y: number) {\n this.panY = y;\n }\n\n @Mutation\n setZoomFactor(zoomFactor: number) {\n this.zoomFactor = zoomFactor;\n }\n\n @Mutation\n increasePanX(increase: number) {\n this.panX += increase;\n }\n\n @Mutation\n increasePanY(increase: number) {\n this.panY += increase;\n }\n\n @Mutation\n setUnitSize(data: { unitSize: number; sync: boolean }) {\n if (this.unitSize !== data.unitSize && data.unitSize > 0 && data.unitSize < Infinity) {\n this.unitSize = data.unitSize;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { unit_size: data.unitSize });\n }\n }\n\n @Mutation\n setUseGrid(data: { useGrid: boolean; sync: boolean }) {\n if (this.useGrid !== data.useGrid) {\n this.useGrid = data.useGrid;\n const gridLayer = layerManager.getGridLayer()!;\n if (data.useGrid) gridLayer.canvas.style.display = \"block\";\n else gridLayer.canvas.style.display = \"none\";\n if (data.sync) socket.emit(\"Location.Options.Set\", { use_grid: data.useGrid });\n }\n }\n\n @Mutation\n setGridSize(data: { gridSize: number; sync: boolean }): void {\n if (this.gridSize !== data.gridSize && data.gridSize > 0) {\n this.gridSize = data.gridSize;\n const gridLayer = layerManager.getGridLayer();\n if (gridLayer !== undefined) gridLayer.drawGrid();\n if (data.sync) socket.emit(\"Gridsize.Set\", data.gridSize);\n }\n }\n\n @Mutation\n setVisionRangeMin(data: { value: number; sync: boolean }): void {\n this.visionRangeMin = data.value;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_min_range: data.value });\n }\n\n @Mutation\n setVisionRangeMax(data: { value: number; sync: boolean }): void {\n this.visionRangeMax = Math.max(data.value, this.visionRangeMin);\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_max_range: this.visionRangeMax });\n }\n\n @Mutation\n setFullFOW(data: { fullFOW: boolean; sync: boolean }) {\n if (this.fullFOW !== data.fullFOW) {\n this.fullFOW = data.fullFOW;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { full_fow: data.fullFOW });\n }\n }\n\n @Mutation\n setFOWOpacity(data: { fowOpacity: number; sync: boolean }) {\n this.fowOpacity = data.fowOpacity;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_opacity: data.fowOpacity });\n }\n\n @Mutation\n setLineOfSight(data: { fowLOS: boolean; sync: boolean }) {\n if (this.fowLOS !== data.fowLOS) {\n this.fowLOS = data.fowLOS;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_los: data.fowLOS });\n }\n }\n\n @Mutation\n setLocationName(name: string) {\n this.locationName = name;\n }\n\n @Mutation\n updateNote(data: { note: Note; sync: boolean }) {\n const actualNote = this.notes.find(n => n.uuid === data.note.uuid);\n if (actualNote === undefined) return;\n actualNote.title = data.note.title;\n actualNote.text = data.note.text;\n if (data.sync) socket.emit(\"Note.Update\", actualNote);\n }\n\n @Mutation\n removeNote(data: { note: Note; sync: boolean }) {\n this.notes = this.notes.filter(n => n.uuid !== data.note.uuid);\n if (data.sync) socket.emit(\"Note.Remove\", data.note.uuid);\n }\n\n @Action\n clear() {\n (this.context.state).visionSources = [];\n (this.context.state).visionBlockers = [];\n (this.context.state).ownedtokens = [];\n (this.context.state).annotations = [];\n (this.context.state).movementblockers = [];\n (this.context.state).notes = [];\n this.context.commit(\"recalculateVision\");\n this.context.commit(\"recalculateMovement\");\n }\n}\n\nexport const gameStore = getModule(GameStore);\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"","import { ServerAura } from \"@/game/comm/types/shapes\";\n\nexport const aurasFromServer = (auras: ServerAura[]): Aura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n visionSource: aura.vision_source,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n\nexport const aurasToServer = (auras: Aura[]): ServerAura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n vision_source: aura.visionSource,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"\nimport script from \"./note.vue?vue&type=script&lang=ts&\"\nexport * from \"./note.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7a3669fd\",\n null\n \n)\n\ncomponent.options.__file = \"note.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./initiative.vue?vue&type=template&id=ccaf03d6&scoped=true&\"\nimport script from \"./initiative.vue?vue&type=script&lang=ts&\"\nexport * from \"./initiative.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./initiative.vue?vue&type=style&index=0&id=ccaf03d6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"ccaf03d6\",\n null\n \n)\n\ncomponent.options.__file = \"initiative.vue\"\nexport default component.exports","import { ServerLayer } from \"@/game/comm/types/general\";\nimport { FOWLayer } from \"@/game/layers/fow\";\nimport { FOWPlayersLayer } from \"@/game/layers/fowplayers\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nexport function createLayer(layerInfo: ServerLayer) {\n // Create canvas element\n const canvas = document.createElement(\"canvas\");\n canvas.style.zIndex = layerManager.layers.length.toString();\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n\n // Create the Layer instance\n let layer: Layer;\n if (layerInfo.type_ === \"grid\") layer = new GridLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow\") layer = new FOWLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow-players\") layer = new FOWPlayersLayer(canvas, layerInfo.name);\n else layer = new Layer(canvas, layerInfo.name);\n layer.selectable = layerInfo.selectable;\n layer.playerEditable = layerInfo.player_editable;\n layerManager.addLayer(layer);\n\n // Add the element to the DOM\n const layers = document.getElementById(\"layers\");\n if (layers === null) {\n console.warn(\"Layers div is missing, this will prevent the main game board from loading!\");\n return;\n }\n if (layerInfo.name !== \"fow-players\") layers.appendChild(canvas);\n\n if (layerInfo.type_ === \"grid\" && layerInfo.size) gameStore.setGridSize({ gridSize: layerInfo.size, sync: false });\n // Load layer shapes\n layer.setShapes(layerInfo.shapes);\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{on:{\"focusin\":_vm.focusin,\"focusout\":_vm.focusout,\"submit\":function($event){$event.preventDefault();return _vm.login($event)}}},[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"PlanarAlly\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.username),expression:\"username\"}],attrs:{\"type\":\"text\",\"name\":\"username\",\"placeholder\":\"Username\",\"autocomplete\":\"username\",\"required\":\"\"},domProps:{\"value\":(_vm.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.username=$event.target.value}}}),_vm._m(0)]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"type\":\"password\",\"name\":\"password\",\"placeholder\":\"Password\",\"autocomplete\":\"current-password\",\"required\":\"\"},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.password=$event.target.value}}}),_vm._m(1)]),_c('div',{staticStyle:{\"display\":\"flex\"}},[_c('button',{staticStyle:{\"visibility\":\"hidden\",\"display\":\"none\"},attrs:{\"type\":\"submit\",\"name\":\"login\"}}),_c('button',{staticClass:\"submit\",attrs:{\"type\":\"button\",\"name\":\"register\",\"title\":\"Register\"},on:{\"click\":_vm.register}},[_c('i',{staticClass:\"fas fa-plus\"})]),_vm._m(2)])]),(_vm.error)?_c('div',{staticClass:\"feedback\"},[_c('p',{staticClass:\"error\"},[_c('strong',[_vm._v(\"Error:\")]),_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \")])]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-user-circle\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-lock\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"name\":\"login\",\"title\":\"Login\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport EditDialog from \"@/game/ui/selection/edit_dialog.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\n\n@Component({\n components: {\n \"edit-dialog\": EditDialog,\n },\n})\nexport default class SelectionInfo extends Vue {\n shape: Shape | null = null;\n\n mounted() {\n EventBus.$on(\"SelectionInfo.Shape.Set\", (shape: Shape | null) => {\n this.shape = shape;\n });\n }\n\n beforeDestroy() {\n EventBus.$off();\n }\n\n openEditDialog() {\n (this.$refs.editDialog).visible = true;\n }\n changeValue(object: Tracker | Aura, redraw: boolean) {\n if (this.shape === null) return;\n getRef(\"prompt\")\n .prompt(`New ${object.name} value:`, `Updating ${object.name}`)\n .then(\n (value: string) => {\n if (this.shape === null) return;\n const ogValue = object.value;\n if (value[0] === \"+\" || value[0] === \"-\") object.value += parseInt(value, 10);\n else object.value = parseInt(value, 10);\n if (isNaN(object.value)) object.value = ogValue;\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\n if (redraw) layerManager.invalidate();\n },\n () => {},\n );\n }\n}\n","import { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { BoardInfo, Note, ServerClient, ServerLocation } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createLayer } from \"@/game/layers/utils\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { router } from \"@/router\";\n\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"connect_error\", (error: any) => {\n console.error(\"Could not connect to game session.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"error\", (error: any) => {\n console.error(\"Game session does not exist.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n router.push(destination);\n});\nsocket.on(\"Room.Info.Set\", (data: { name: string; creator: string; invitationCode: string }) => {\n gameStore.setRoomName(data.name);\n gameStore.setRoomCreator(data.creator);\n gameStore.setInvitationCode(data.invitationCode);\n});\nsocket.on(\"Username.Set\", (username: string) => {\n gameStore.setUsername(username);\n gameStore.setDM(username === window.location.pathname.split(\"/\")[2]);\n});\nsocket.on(\"Client.Options.Set\", (options: ServerClient) => {\n gameStore.setGridColour({ colour: options.grid_colour, sync: false });\n gameStore.setFOWColour({ colour: options.fow_colour, sync: false });\n gameStore.setRulerColour({ colour: options.ruler_colour, sync: false });\n gameStore.setPanX(options.pan_x);\n gameStore.setPanY(options.pan_y);\n gameStore.setZoomFactor(options.zoom_factor);\n if (options.active_layer) layerManager.selectLayer(options.active_layer, false);\n if (layerManager.getGridLayer() !== undefined) layerManager.getGridLayer()!.invalidate();\n});\nsocket.on(\"Location.Set\", (data: Partial) => {\n if (data.name !== undefined) gameStore.setLocationName(data.name);\n if (data.unit_size !== undefined) gameStore.setUnitSize({ unitSize: data.unit_size, sync: false });\n if (data.use_grid !== undefined) gameStore.setUseGrid({ useGrid: data.use_grid, sync: false });\n if (data.full_fow !== undefined) gameStore.setFullFOW({ fullFOW: data.full_fow, sync: false });\n if (data.fow_opacity !== undefined) gameStore.setFOWOpacity({ fowOpacity: data.fow_opacity, sync: false });\n if (data.fow_los !== undefined) gameStore.setLineOfSight({ fowLOS: data.fow_los, sync: false });\n if (data.vision_min_range !== undefined) gameStore.setVisionRangeMin({ value: data.vision_min_range, sync: false });\n if (data.vision_max_range !== undefined) gameStore.setVisionRangeMax({ value: data.vision_max_range, sync: false });\n if (data.vision_mode !== undefined) {\n gameStore.setVisionMode({ mode: data.vision_mode, sync: false });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n }\n});\nsocket.on(\"Position.Set\", (data: { x: number; y: number }) => {\n gameManager.setCenterPosition(new GlobalPoint(data.x, data.y));\n});\nsocket.on(\"Notes.Set\", (notes: Note[]) => {\n for (const note of notes) gameStore.newNote({ note, sync: false });\n});\nsocket.on(\"Asset.List.Set\", (assets: AssetList) => {\n gameStore.setAssets(assets);\n});\nsocket.on(\"Board.Set\", (locationInfo: BoardInfo) => {\n gameStore.clear();\n gameStore.setLocations(locationInfo.locations);\n document.getElementById(\"layers\")!.innerHTML = \"\";\n gameStore.resetLayerInfo();\n layerManager.reset();\n for (const layer of locationInfo.layers) createLayer(layer);\n // Force the correct opacity render on other layers.\n layerManager.selectLayer(layerManager.getLayer()!.name, false);\n EventBus.$emit(\"Initiative.Clear\");\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n gameStore.setBoardInitialized(true);\n});\nsocket.on(\"Gridsize.Set\", (gridSize: number) => {\n gameStore.setGridSize({ gridSize, sync: false });\n});\nsocket.on(\"Shape.Add\", (shape: ServerShape) => {\n gameManager.addShape(shape);\n});\nsocket.on(\"Shape.Remove\", (shape: ServerShape) => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(`Attempted to remove an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n layer.removeShape(layerManager.UUIDMap.get(shape.uuid)!, false);\n layer.invalidate(false);\n});\nsocket.on(\"Shape.Order.Set\", (data: { shape: ServerShape; index: number }) => {\n if (!layerManager.UUIDMap.has(data.shape.uuid)) {\n console.log(`Attempted to move the shape order of an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${data.shape.layer}`);\n return;\n }\n const shape = layerManager.UUIDMap.get(data.shape.uuid)!;\n const layer = layerManager.getLayer(shape.layer)!;\n layer.moveShapeOrder(shape, data.index, false);\n});\nsocket.on(\"Shape.Layer.Change\", (data: { uuid: string; layer: string }) => {\n const shape = layerManager.UUIDMap.get(data.uuid);\n if (shape === undefined) return;\n shape.moveLayer(data.layer, false);\n});\nsocket.on(\"Shape.Update\", (data: { shape: ServerShape; redraw: boolean; move: boolean }) => {\n gameManager.updateShape(data);\n});\nsocket.on(\"Temp.Clear\", (shapes: ServerShape[]) => {\n shapes.forEach(shape => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(\"Attempted to remove an unknown temporary shape\");\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const realShape = layerManager.UUIDMap.get(shape.uuid)!;\n layerManager.getLayer(shape.layer)!.removeShape(realShape, false);\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/server/static/js/app.41dd580f.js b/server/static/js/app.41dd580f.js new file mode 100644 index 000000000..7bc64b826 --- /dev/null +++ b/server/static/js/app.41dd580f.js @@ -0,0 +1,2 @@ +(function(e){function t(t){for(var s,r,a=t[0],l=t[1],c=t[2],d=0,h=[];de.fillText(t.text,t.x,t.y)),e.restore()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){}getMaxHeight(e){const t=this.getLines(e),i=30;return i*t.length}getMaxWidth(e){const t=this.getLines(e),i=t.map(t=>e.measureText(t.text).width);return Math.max(...i)}getLines(e){const t=this.text.split("\n"),i=[],s=e.canvas.width,n=30,o=0;let r=0;for(const a of t){let t="";const l=a.split(" ");for(const a of l){const l=t+a+" ",c=e.measureText(l),u=c.width;u>s?(e.fillText(t,o,r),i.push({text:t,x:o,y:r}),t=a+" ",r+=n):t=l}i.push({text:t,x:o,y:r}),r+=n}return i}}t.Text=r},"01be":function(e,t,i){"use strict";var s=i("919a"),n=i.n(s);n.a},"033f":function(e,t,i){"use strict";i.r(t);var s=i("a1f4"),n=i("a68b");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("7997");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"759e5a8a",null);a.options.__file="shapecontext.vue",t["default"]=a.exports},"034f":function(e,t,i){"use strict";var s=i("64a9"),n=i.n(s);n.a},"0584":function(e,t,i){"use strict";var s=i("de21"),n=i.n(s);n.a},"0634":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("66cb")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("c345a"),l=i("60a3");let c=class extends o.default{constructor(){super(...arguments),this.display=!1,this.left=0,this.top=0,this.transparent=!1}mounted(){this.transparent=0===this.$refs.chromePicker.val.rgba.a,this.setPosition()}open(){this.display||this.disabled||(this.setPosition(),this.display=!0,this.$nextTick(()=>this.$children[0].$el.focus()))}updateColor(e){this.transparent=0===e.rgba.a;const t=n.default(e.rgba).toRgbString();this.$emit("update:color",t),this.$emit("input",t)}closePicker(){this.display=!1,this.$emit("change",this.color)}setPosition(){const e=this.$el.getBoundingClientRect();e.right+224>window.innerWidth?this.left=e.left-224:this.left=e.right,e.bottom+242>window.innerHeight?this.top=e.top-242:this.top=e.bottom}};s.__decorate([l.Prop(String)],c.prototype,"color",void 0),s.__decorate([l.Prop(Boolean)],c.prototype,"disabled",void 0),c=s.__decorate([r.default({components:{"chrome-picker":a.Chrome}})],c),t.default=c},"07f5":function(e,t,i){"use strict";i.r(t);var s=i("412c"),n=i("d588");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("561b"),i("b62e");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"05b88da7",null);a.options.__file="game.vue",t["default"]=a.exports},"0a75":function(e,t,i){},"0b13":function(e,t,i){},"0bc6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("8055"));function o(e){t.socket.io.opts.query=`user=${e.params.creator}&room=${e.params.room}`,t.socket.connect()}t.socket=n.default(location.protocol+"//"+location.host+"/planarally",{autoConnect:!1}),t.createConnection=o},"0cf7":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("4aec")),a=s.__importDefault(i("a535")),l=s.__importDefault(i("cec2")),c=i("5338"),u=i("2d5b"),d=i("4a5b");let h=class extends n.default{constructor(){super(...arguments),this.path=[],this.draggingSelection=!1}get folders(){return u.assetStore.folders}get files(){return u.assetStore.files}get selected(){return u.assetStore.selected}get idMap(){return u.assetStore.idMap}get currentFolder(){return this.path.length?this.path[this.path.length-1]:u.assetStore.root}get parentFolder(){let e=this.path[this.path.length-2];return void 0===e&&(e=u.assetStore.root),e}get firstSelectedFile(){for(const e of u.assetStore.selected)if(u.assetStore.idMap.get(e).file_hash)return u.assetStore.idMap.get(e);return null}changeDirectory(e){e<0?this.path.pop():this.path.push(e),u.assetStore.clearSelected(),c.socket.emit("Folder.Get",this.currentFolder)}createDirectory(){const e=window.prompt("New folder name");null!==e&&c.socket.emit("Folder.Create",{name:e,parent:this.currentFolder})}moveInode(e,t){u.assetStore.files.includes(e)?u.assetStore.files.splice(u.assetStore.files.indexOf(e),1):u.assetStore.folders.splice(u.assetStore.folders.indexOf(e),1),u.assetStore.idMap.delete(e),c.socket.emit("Inode.Move",{inode:e,target:t})}select(e,t){if(e.shiftKey&&u.assetStore.selected.length>0){const e=[...u.assetStore.files,...u.assetStore.folders],i=e.indexOf(u.assetStore.selected[u.assetStore.selected.length-1]),s=e.indexOf(t);for(let t=i;t!==s;i0&&this.upload(e.dataTransfer.files,t);this.draggingSelection=!1}prepareUpload(){document.getElementById("files").click()}upload(e,t){const i=document.getElementById("files").files;if(void 0===e){if(!i)return;e=i}void 0===t&&(t=this.currentFolder);const s=1e5;for(const n of e){const e=d.uuidv4(),i=Math.ceil(n.size/s);for(let o=0;o{c.socket.emit("Asset.Upload",{name:n.name,directory:t,data:r.result,slice:o,totalSlices:i,uuid:e})})}}}};h=s.__decorate([o.default({components:{Prompt:l.default,ConfirmDialog:a.default,AssetContextMenu:r.default},beforeRouteEnter(e,t,i){c.socket.connect(),i()},beforeRouteLeave(e,t,i){c.socket.disconnect(),i()}})],h),t.default=h},"0ddd":function(e,t,i){"use strict";i.r(t);var s=i("8f54"),n=i("4bc3");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("9dd4");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"6d718094",null);a.options.__file="asset_node.vue",t["default"]=a.exports},1:function(e,t){},"104d":function(e,t,i){"use strict";var s=i("5722"),n=i.n(s);n.a},1077:function(e,t,i){"use strict";i.r(t);var s=i("f994"),n=i("1eee");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("3cd3");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"bc30fc14",null);a.options.__file="login.vue",t["default"]=a.exports},1216:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("6f92"),n=i("92b1"),o=i("98ef"),r=i("4aee");function a(e,t){const i=s.layerManager.getLayer("draw");if(void 0===i)return;const o=i.ctx;o.lineJoin="round",o.lineJoin="round",o.beginPath(),o.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,o.moveTo(n.g2lx(e[0][0]),n.g2ly(e[0][1]));for(const s of e)o.lineTo(n.g2lx(s[0]),n.g2ly(s[1]));o.closePath(),o.stroke()}function l(e,t){const i=s.layerManager.getLayer("draw");if(void 0===i)return;const n=i.ctx;n.lineJoin="round",n.lineJoin="round",n.beginPath(),n.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,n.moveTo(e[0][0],e[0][1]);for(const s of e)n.lineTo(s[0],s[1]);n.closePath(),n.stroke()}function c(e,t){return t?e:n.g2lx(e)}function u(e,t){return t?e:n.g2ly(e)}t.drawPolygon=a,t.drawPolygonL=l;let d=0,h=0;function f(e,t,i,s,n){e.beginPath(),e.strokeStyle=s?"rgba(255, 0, 0, 0.30)":"rgba(0, 0, 0, 0.30)",e.moveTo(c(t[0],n),u(t[1],n)),e.lineTo(c(i[0],n),u(i[1],n)),e.closePath(),e.stroke()}function p(e,t=!0,i=!0,n=0){d=0,h=0;let a=0;const l=s.layerManager.getLayer("draw");if(void 0===l)return;const p=l.ctx;i&&p.clearRect(0,0,2e3,1e3),p.lineJoin="round",p.lineJoin="round";const g=new o.EdgeIterator(e);while(g.valid)g.next(),g.collect();g.collect();do{const e=g.edge.first.vertices[r.ccw(g.edge.second)].point,t=g.edge.first.vertices[r.cw(g.edge.second)].point;if(n>0){if(e[0]===-1/0||t[0]===-1/0){g.next();continue}h++,g.edge.first.constraints[g.edge.second]?(d++,2===n&&console.log(`Edge: (*) ${e} > ${t}`)):2===n&&console.log(`Edge: ${e} > ${t}`)}do{g.next(),g.collect()}while(g.valid)}while(null!==g.pos);for(const s of e.triangles){if(s.isInfinite())continue;a++;const e=[];p.fillStyle="red",void 0!==s.vertices[0]&&(e.push(s.vertices[0].point),p.beginPath(),p.arc(c(s.vertices[0].point[0],t),u(s.vertices[0].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==s.vertices[1]&&(e.push(s.vertices[1].point),p.arc(c(s.vertices[1].point[0],t),u(s.vertices[1].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==s.vertices[2]&&(e.push(s.vertices[2].point),p.arc(c(s.vertices[2].point[0],t),u(s.vertices[2].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),2===n&&console.log("[T] ",...e,s.constraints),p.moveTo(c(s.vertices[0].point[0],t),u(s.vertices[0].point[1],t)),void 0!==s.vertices[0]&&void 0!==s.vertices[1]&&f(p,s.vertices[0].point,s.vertices[1].point,s.constraints[2],t),void 0!==s.vertices[1]&&void 0!==s.vertices[2]&&f(p,s.vertices[1].point,s.vertices[2].point,s.constraints[0],t),void 0!==s.vertices[2]&&void 0!==s.vertices[0]&&f(p,s.vertices[2].point,s.vertices[0].point,s.constraints[1],t)}n>0&&(console.log(`Edges: ${d}/${h}`),console.log(`Faces: ${a}`))}window.DP=a,window.DPL=l,window.DPT=p},1289:function(e,t,i){"use strict";i.r(t);var s=i("df64"),n=i("d677");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("8790");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"0bf2b7ba",null);a.options.__file="accordion.vue",t["default"]=a.exports},"12d3":function(e,t,i){"use strict";var s=i("a260"),n=i.n(s);n.a},1327:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importStar(i("66cb")),o=i("4a5b"),r=i("4709"),a=i("f10f"),l=i("92b1");class c extends r.Circle{constructor(e,t,i,s,n,o,r){super(e,t,n,o,r),this.type="circulartoken",this.text=i,this.font=s}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r,text:this.text,font:this.font})}fromDict(e){super.fromDict(e),this.r=e.radius,this.text=e.text,this.font=e.font}draw(e){super.draw(e),e.font=this.font,e.save();const t=l.g2l(this.center());e.textAlign="center",e.textBaseline="middle";const i=o.calcFontScale(e,this.text,l.g2lz(this.r),l.g2lz(this.r)),s=0;e.transform(i,s,-s,i,t.x,t.y),e.fillStyle=n.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}getInitiativeRepr(){return{uuid:this.uuid,visible:!a.gameStore.IS_DM,group:!1,source:""===this.name||"Unknown shape"===this.name?this.text:this.name,has_img:!1,effects:[],index:1/0}}}t.CircularToken=c},1625:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6f92"),o=i("b2ed"),r=i("0180"),a=i("f10f"),l=i("92b1");class c{constructor(){this.shown=!1;const e=new s.GlobalPoint(0,0);this.annotationText=new r.Text(e,"","bold 20px serif",0,"rgba(230, 230, 230, 1)"),this.annotationRect=new o.Rect(e,0,0,"rgba(0, 0, 0, 0.6)")}setActiveText(e){if(void 0===this.layer){if(!n.layerManager.hasLayer("draw"))return void console.warn("There is no draw layer to draw annotations on!");this.layer=n.layerManager.getLayer("draw"),this.layer.addShape(this.annotationRect,!1),this.layer.addShape(this.annotationText,!1)}this.shown=""!==e,this.annotationText.refPoint=l.l2g(new s.LocalPoint(this.layer.canvas.width/2,50)),this.annotationText.text=e;const t=this.shown?this.annotationText.getMaxWidth(this.layer.ctx)+10:0,i=this.shown?this.annotationText.getMaxHeight(this.layer.ctx)+10:0;this.annotationRect.refPoint=l.l2g(new s.LocalPoint(this.layer.canvas.width/2-t/2,30)),this.annotationRect.w=t/a.gameStore.zoomFactor,this.annotationRect.h=i/a.gameStore.zoomFactor,this.layer.invalidate(!0)}}t.AnnotationManager=c},"19f9":function(e,t,i){"use strict";i.r(t);var s=i("45bf"),n=i("8cd4");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("c242");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"aaf3f05e",null);a.options.__file="menu.vue",t["default"]=a.exports},"1c76":function(e,t,i){"use strict";i.r(t);var s=i("2c88"),n=i("300e");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("7f1e");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="contextmenu.vue",t["default"]=a.exports},"1dd6":function(e,t,i){"use strict";i.r(t);var s=i("5ae5"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"1eee":function(e,t,i){"use strict";i.r(t);var s=i("d30b"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"206a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6f92"),o=i("6c30"),r=i("4709"),a=i("1327"),l=i("5e7c"),c=i("574e"),u=i("b2ed"),d=i("0180"),h=i("e4ea");function f(e){let t;const i=new s.GlobalPoint(e.x,e.y);if("rect"===e.type_){const s=e;t=new u.Rect(i,s.width,s.height,s.fill_colour,s.stroke_colour,s.uuid)}else if("circle"===e.type_){const s=e;t=new r.Circle(i,s.radius,s.fill_colour,s.stroke_colour,s.uuid)}else if("circulartoken"===e.type_){const s=e;t=new a.CircularToken(i,s.radius,s.text,s.font,s.fill_colour,s.stroke_colour,s.uuid)}else if("line"===e.type_){const n=e;t=new l.Line(i,new s.GlobalPoint(n.x2,n.y2),n.line_width,n.stroke_colour,n.uuid)}else if("multiline"===e.type_){const n=e;t=new c.MultiLine(i,n.points.map(e=>new s.GlobalPoint(e.x,e.y)),n.line_width,n.stroke_colour,n.uuid)}else if("polygon"===e.type_){const n=e;t=new h.Polygon(i,n.vertices.map(e=>new s.GlobalPoint(e.x,e.y)),n.fill_colour,n.stroke_colour,n.uuid)}else if("text"===e.type_){const s=e;t=new d.Text(i,s.text,s.font,s.angle,s.fill_colour,s.stroke_colour,s.uuid)}else{if("assetrect"!==e.type_)return;{const s=e,r=new Image(s.width,s.height);s.src.startsWith("http")?r.src=new URL(s.src).pathname:r.src=s.src,t=new o.Asset(r,i,s.width,s.height,s.uuid),r.onload=(()=>{n.layerManager.getLayer(e.layer).invalidate(!1)})}}return t.fromDict(e),t}t.createShapeFromDict=f},"223d":function(e,t,i){"use strict";var s=i("e756"),n=i.n(s);n.a},"22bd":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("SelectContext",{ref:"selectcontext"})},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},2469:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("66cb")),o=i("4a5b"),r=i("0bc6"),a=i("f312"),l=i("8f0a"),c=i("6f92"),u=i("f10f"),d=i("92b1");class h{constructor(e,t,i,s){this.fillColour="#000",this.strokeColour="rgba(0,0,0,0)",this.name="Unknown shape",this.nameVisible=!0,this.trackers=[],this.auras=[],this.labels=[],this._owners=[],this.visionObstruction=!1,this.movementObstruction=!1,this.isToken=!1,this.showHighlight=!1,this.annotation="",this.globalCompositeOperation="source-over",this.options=new Map,this._refPoint=e,this.uuid=s||o.uuidv4(),void 0!==t&&(this.fillColour=t),void 0!==i&&(this.strokeColour=i)}get refPoint(){return this._refPoint}set refPoint(e){this._refPoint=e}visibleInCanvas(e){return!1}getPointIndex(e,t=0){for(const[i,s]of this.points.entries())if(Math.abs(e.x-s[0])<=t&&Math.abs(e.y-s[1])<=t)return i;return-1}getPointOrientation(e){const t=l.GlobalPoint.fromArray(this.points[(this.points.length+e-1)%this.points.length]),i=l.GlobalPoint.fromArray(this.points[e]),s=l.GlobalPoint.fromArray(this.points[(e+1)%this.points.length]),n=s.subtract(t),o=t.add(n.multiply(.5));return i.subtract(o).normalize()}invalidate(e){const t=c.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(e=!0){const t=this,i=u.gameStore.visionBlockers.indexOf(this.uuid);let s=!1;this.visionObstruction&&-1===i?(u.gameStore.visionBlockers.push(this.uuid),s=!0):!this.visionObstruction&&i>=0&&(u.gameStore.visionBlockers.splice(i,1),s=!0),s&&e&&u.gameStore.recalculateVision(),this.auras.forEach(e=>{const i=u.gameStore.visionSources,s=i.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===s?i.push({shape:t.uuid,aura:e.uuid}):!e.visionSource&&s>=0&&i.splice(s,1)});for(let n=u.gameStore.visionSources.length-1;n>=0;n--){const e=u.gameStore.visionSources[n];e.shape===t.uuid&&(t.auras.some(t=>t.uuid===e.aura&&t.visionSource)||u.gameStore.visionSources.splice(n,1))}}setMovementBlock(e,t=!0){this.movementObstruction=e||!1;const i=u.gameStore.movementblockers.indexOf(this.uuid);let s=!1;this.movementObstruction&&-1===i?(u.gameStore.movementblockers.push(this.uuid),s=!0):!this.movementObstruction&&i>=0&&(u.gameStore.movementblockers.splice(i,1),s=!0),s&&t&&u.gameStore.recalculateMovement()}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=u.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?u.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&u.gameStore.ownedtokens.splice(e,1)}}getBaseDict(){return{type_:this.type,uuid:this.uuid,x:this.refPoint.x,y:this.refPoint.y,layer:this.layer,draw_operator:this.globalCompositeOperation,movement_obstruction:this.movementObstruction,vision_obstruction:this.visionObstruction,auras:a.aurasToServer(this.auras),trackers:this.trackers,labels:this.labels,owners:this._owners,fill_colour:this.fillColour,stroke_colour:this.strokeColour,name:this.name,name_visible:this.nameVisible,annotation:this.annotation,is_token:this.isToken,options:JSON.stringify([...this.options])}}fromDict(e){this.layer=e.layer,this.globalCompositeOperation=e.draw_operator,this.movementObstruction=e.movement_obstruction,this.visionObstruction=e.vision_obstruction,this.auras=a.aurasFromServer(e.auras),this.trackers=e.trackers,this.labels=e.labels,this._owners=e.owners,this.isToken=e.is_token,this.nameVisible=e.name_visible,e.annotation&&(this.annotation=e.annotation),e.name&&(this.name=e.name),e.options&&(this.options=new Map(JSON.parse(e.options)))}draw(e){if(void 0!==this.globalCompositeOperation?e.globalCompositeOperation=this.globalCompositeOperation:e.globalCompositeOperation="source-over",this.showHighlight){const t=this.getBoundingBox();e.strokeStyle="red",e.strokeRect(d.g2lx(t.topLeft.x)-5,d.g2ly(t.topLeft.y)-5,d.g2lz(t.w)+10,d.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const s=d.g2l(this.center()),o=d.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(s.x,s.y,d.g2lr(i.value),s.x,s.y,d.g2lr(i.value+i.dim)),o=n.default(i.colour);e.fillStyle=t,t.addColorStop(0,i.colour),t.addColorStop(1,o.setAlpha(0).toRgbString())}if(i.visionSource&&void 0!==i.lastPath)try{e.fill(i.lastPath)}catch(t){e.arc(s.x,s.y,o,0,2*Math.PI),e.fill(),console.warn(t)}else e.arc(s.x,s.y,o,0,2*Math.PI),e.fill()}}getInitiativeRepr(){return{uuid:this.uuid,visible:!u.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=c.layerManager.getLayer(this.layer),s=c.layerManager.getLayer(e);void 0!==i&&void 0!==s&&(this.layer=e,i.shapes.splice(i.shapes.indexOf(this),1),s.shapes.push(this),i.invalidate(!0),s.invalidate(!1),t&&r.socket.emit("Shape.Layer.Change",{uuid:this.uuid,layer:e}))}get owners(){return Object.freeze(this._owners.slice())}ownedBy(e){return void 0===e&&(e=u.gameStore.username),u.gameStore.IS_DM||this._owners.includes(e)}addOwner(e){this._owners.includes(e)||this._owners.push(e)}updateOwner(e,t){const i=this._owners.findIndex(t=>t===e);i>=0?this._owners.splice(i,1,t):this.addOwner(t)}removeOwner(e){const t=this._owners.findIndex(t=>t===e);this._owners.splice(t,1)}}t.Shape=h},"255e":function(e,t,i){"use strict";i.r(t);var s=i("851c"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},2686:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!==e.note?i("modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("span",{on:{click:function(t){e.$refs.title.select()}}},[i("i",{staticClass:"fas fa-pencil-alt",staticStyle:{"font-size":"15px"}})]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.note.title,expression:"note.title"}],ref:"title",domProps:{value:e.note.title},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"title",t.target.value)}}}),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.note.text,expression:"note.text"}],ref:"textarea",style:{height:e.calcHeight()},domProps:{value:e.note.text},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"text",t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.removeNote}},[i("i",{staticClass:"far fa-trash-alt"}),e._v(" Remove\n ")])])]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"26a5":function(e,t,i){"use strict";var s=i("f2d0"),n=i.n(s);n.a},2756:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=s.__importDefault(i("496c")),r=s.__importDefault(i("ea6a")),a=i("4a5b"),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("b2ed"),h=i("f10f"),f=i("2838"),p=i("92b1"),g=i("5a5c");var v;(function(e){e[e["Noop"]=0]="Noop",e[e["Resize"]=1]="Resize",e[e["Drag"]=2]="Drag",e[e["GroupSelect"]=3]="GroupSelect"})(v=t.SelectOperations||(t.SelectOperations={}));const m=new c.GlobalPoint(-1e3,-1e3);let y=class extends r.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizePoint=0,this.deltaChanged=!1,this.dragRay=new c.Ray(new c.LocalPoint(0,0),new c.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new d.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(h.gameStore.username)||this.selectionHelper.addOwner(h.gameStore.username);const i=g.getMouse(e),s=p.l2g(i);let n,o=!1;n=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let r=n.length-1;r>=0;r--){const e=n[r];if(this.resizePoint=e.getPointIndex(s,p.l2gz(3)),this.resizePoint>=0){t.selection=[e],a.getRef("selectionInfo").shape=e,this.mode=v.Resize,t.invalidate(!0),o=!0;break}if(e.contains(s)){const s=e;-1===t.selection.indexOf(s)&&(t.selection=[s],a.getRef("selectionInfo").shape=s),this.mode=v.Drag;const n=p.g2l(s.refPoint);this.dragRay=new c.Ray(n,i.subtract(n)),t.invalidate(!0),o=!0;break}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)a.getRef("selectionInfo").shape=e;this.selectionStartPoint=s,this.selectionHelper.refPoint=this.selectionStartPoint,this.selectionHelper.w=0,this.selectionHelper.h=0,t.selection=[this.selectionHelper],t.invalidate(!0)}this.active=!0}onMouseMove(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=g.getMouse(e),s=p.l2g(i);if(this.deltaChanged=!1,this.mode===v.GroupSelect){const e=s;this.selectionHelper.w=Math.abs(e.x-this.selectionStartPoint.x),this.selectionHelper.h=Math.abs(e.y-this.selectionStartPoint.y),this.selectionHelper.refPoint=new c.GlobalPoint(Math.min(this.selectionStartPoint.x,e.x),Math.min(this.selectionStartPoint.y,e.y)),t.invalidate(!0)}else if(t.selection.length){const n=p.g2l(t.selection[t.selection.length-1].refPoint),o=n.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/h.gameStore.zoomFactor);const a=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!h.gameStore.IS_DM))for(const e of t.selection)e.ownedBy()&&e.uuid!==this.selectionHelper.uuid&&(r=f.calculateDelta(r,e),r!==a&&(this.deltaChanged=!0));for(const e of t.selection)e.ownedBy()&&(e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})));t.invalidate(!1)}else if(this.mode===v.Resize)for(const e of t.selection)e.ownedBy()&&(e.resize(this.resizePoint,i),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1),this.updateCursor(t,s));else this.updateCursor(t,s)}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer();this.mode===v.GroupSelect?(t.clearSelection(),t.shapes.forEach(e=>{if(!e.ownedBy())return;if(e===this.selectionHelper)return;const i=e.getBoundingBox();e.ownedBy()&&this.selectionHelper.refPoint.x<=i.topRight.x&&this.selectionHelper.refPoint.x+this.selectionHelper.w>=i.topLeft.x&&this.selectionHelper.refPoint.y<=i.botLeft.y&&this.selectionHelper.refPoint.y+this.selectionHelper.h>=i.topLeft.y&&t.selection.push(e)}),t.selection.length>0&&t.selection.push(this.selectionHelper),t.invalidate(!0)):t.selection.length&&t.selection.forEach(i=>{if(i.ownedBy()){if(this.mode===v.Drag){if(this.dragRay.origin.x===p.g2lx(i.refPoint.x)&&this.dragRay.origin.y===p.g2ly(i.refPoint.y))return;!h.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(h.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1))}}),this.mode=v.Noop,this.active=!1}onContextMenu(e){if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer(),i=g.getMouse(e),s=p.l2g(i);for(const n of t.selection)if(n.contains(s)&&n!==this.selectionHelper)return t.selection=[n],a.getRef("selectionInfo").shape=n,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,n);this.$refs.selectcontext.open(e)}updateCursor(e,t){for(const i of e.selection){const e=i.getPointIndex(t,p.l2gz(3));if(e<0)document.body.style.cursor="default";else{let t=i.getPointOrientation(e).angle();t<0&&(t+=360);const s=22.5;(t>=315+s||t=135+s&&t<225-s)&&(document.body.style.cursor="ew-resize"),(t>=45+s&&t<135-s||t>=225+s&&t<315-s)&&(document.body.style.cursor="ns-resize"),(t>=s&&t<90-s||t>=180+s&&t<270-s)&&(document.body.style.cursor="nwse-resize"),(t>=90+s&&t<180-s||t>=270+s&&t<360-s)&&(document.body.style.cursor="nesw-resize")}}}};y=s.__decorate([n.default({components:{SelectContext:o.default}})],y),t.default=y},2838:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6f92"),o=i("f10f"),r=i("d6be"),a=i("98ef"),l=i("4aee");function c(e,t,i){if(0===e.x&&0===e.y)return e;if("bvh"===o.gameStore.visionMode){void 0===i&&(i=[]);const r=t.getBoundingBox(),a=r.offset(e);let l=!1;for(const t of o.gameStore.movementblockers){if(i.includes(t))continue;const o=n.layerManager.UUIDMap.get(t),c=o.getBoundingBox();let u=c.intersectsWithInner(a);if(!u){const t=s.Ray.fromPoints(r.topLeft.add(e.normalize()),a.topLeft),i=t.direction.inverse(),n=[i.x<0,i.y<0];u=c.intersectP(t,i,n).hit}if(u){const n=c.center(),o=r.center(),a=o.subtract(n),u=new s.Vector(1,0),d=new s.Vector(0,1);let h=a.dot(u),f=a.dot(d);h>c.w/2&&(h=c.w/2),h<-c.w/2&&(h=-c.w/2),f>c.h/2&&(f=c.h/2),f<-c.h/2&&(f=-c.h/2);const p=n.add(u.multiply(h)).add(d.multiply(f));p.x===r.topLeft.x||p.x===r.topRight.x?e=new s.Vector(0,e.y):p.y===r.topLeft.y||p.y===r.botLeft.y?e=new s.Vector(e.x,0):p.xr.topRight.x?e=new s.Vector(p.x-r.topRight.x,e.y):p.yr.botLeft.y&&(e=new s.Vector(e.x,p.y-r.botLeft.y)),l=!0,i.push(t);break}}return l&&(e=c(e,t,i)),e}{const i=r.PA_CDT.movement.locate(t.center().asArray(),null).loc;for(const s of t.points){const t=r.PA_CDT.movement.locate(s,i),n=t.loc;null!==n&&(e=u(s,n,e))}return e}}function u(e,t,i,n=[]){const o=new s.GlobalPoint(e[0],e[1]),r=o.add(i).asArray();if(t.contains(r))return i;n.push(t);for(let c=0;c<3;c++){if(n.includes(t.neighbours[c]))continue;const d=t.vertices[l.cw(c)].point,h=t.vertices[l.ccw(c)].point,f=l.intersection(e,r,d,h);if(null===f)continue;if(!t.isConstrained(c))return u(e,t.neighbours[c],i,n);if(f[0]===o.x&&f[1]===o.y){l.orientation;const t=l.orientation(e,r,h);if(t===a.Sign.LEFT_TURN)continue;if(t===a.Sign.ZERO)continue}let p=new s.GlobalPoint(f[0],f[1]).subtract(o).multiply(.8);p.length()<1&&(p=new s.Vector(0,0)),p.length()!["__files"].includes(e)).sort(a.alphSort)}get files(){return this.asset.__files?this.asset.__files.concat().sort((e,t)=>e.name.toLowerCase()>t.name.toLowerCase()?1:-1):[]}toggle(e){for(let t=0;tthis.$children[0].$el.focus())}close(){this.visible=!1,this.shape=null}getLayers(){return c.layerManager.layers.filter(e=>e.selectable&&(u.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return c.layerManager.getLayer()}getInitiativeWord(){return null===this.shape?"":a.getRef("initiative").contains(this.shape.uuid)?"Show":"Add"}setLayer(e){null!==this.shape&&(this.shape.moveLayer(e,!0),this.close())}moveToBack(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,0,!0),this.close()}moveToFront(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,e.shapes.length-1,!0),this.close()}addInitiative(){if(null===this.shape)return;const e=a.getRef("initiative");e.contains(this.shape.uuid)||e.addInitiative(this.shape.getInitiativeRepr()),e.visible=!0,this.close()}openEditDialog(){l.EventBus.$emit("EditDialog.Open",this.shape),this.close()}};d=s.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},3481:function(e,t,i){"use strict";i.r(t);var s=i("47e6"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"38c9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("bab4"),n=i("f10f");class o extends s.Layer{invalidate(){this.valid=!1}draw(e){this.valid||this.drawGrid()}drawGrid(){const e=this.ctx;this.clear(),e.beginPath();const t=n.gameStore.gridSize;for(let i=0;i1,expression:"showUI && layers.length>1"}],attrs:{id:"layerselect"}},[i("ul",e._l(e.layers,function(t){return i("li",{key:t.name,class:{"layer-selected":t===e.selectedLayer},on:{mousedown:function(i){e.selectLayer(t)}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])])}))])],2),i("selection-info",{directives:[{name:"show",rawName:"v-show",value:e.showUI,expression:"showUI"}],ref:"selectionInfo"}),i("initiative-dialog",{ref:"initiative",attrs:{id:"initiativedialog"}}),i("note-dialog",{ref:"note"}),i("label-dialog",{ref:"labels"}),i("zoom-slider",{directives:[{name:"show",rawName:"v-show",value:e.showUI,expression:"showUI"}],attrs:{id:"zoomer",height:6,width:200,min:0,max:1,interval:.1,"dot-width":8,"dot-height":20,"tooltip-dir":"bottom",tooltip:"hover",formatter:e.zoomDisplay.toFixed(1),"slider-style":{"border-radius":"15%"},"bg-style":{"background-color":"#fff","box-shadow":"0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)"},"process-style":{"background-color":"#fff"}},model:{value:e.zoomDisplay,callback:function(t){e.zoomDisplay=t},expression:"zoomDisplay"}}),i("prompt-dialog",{ref:"prompt"}),i("confirm-dialog",{ref:"confirm"})],1)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},4185:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("bab4"),o=i("6f92"),r=i("d1ec"),a=i("4709"),l=i("f10f"),c=i("92b1"),u=i("5a5c"),d=i("cee3");class h extends n.Layer{constructor(e,t){super(e,t),this.isVisionLayer=!0,this.preFogShapes=[],this.virtualCanvas=document.createElement("canvas"),this.virtualCanvas.width=window.innerWidth,this.virtualCanvas.height=window.innerHeight,this.vCtx=this.virtualCanvas.getContext("2d")}addShape(e,t,i,s=!0){super.addShape(e,t,i,s),e.options.has("preFogShape")&&e.options.get("preFogShape")&&this.preFogShapes.push(e)}removeShape(e,t,i){if(e.options.has("preFogShape")&&e.options.get("preFogShape")){const t=this.preFogShapes.findIndex(t=>t.uuid===e.uuid);this.preFogShapes.splice(t,1)}super.removeShape(e,t,i)}draw(){if(!this.valid){const e=this.ctx;if(r.Settings.skipLightFOW)return e.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);const t=e.globalCompositeOperation;e.clearRect(0,0,this.canvas.width,this.canvas.height),e.fillStyle="rgba(0, 0, 0, 1)";const i=o.layerManager.getLayer("draw").ctx;(r.Settings.drawAngleLines||r.Settings.drawFirstLightHit)&&i.clearRect(0,0,i.canvas.width,i.canvas.height),l.gameStore.fullFOW&&o.layerManager.hasLayer("tokens")&&o.layerManager.getLayer("tokens").shapes.forEach(t=>{if(!t.ownedBy()||!t.isToken)return;const i=t.getBoundingBox(),s=c.g2l(t.center()),n=.8*c.g2lz(i.w);e.beginPath(),e.arc(s.x,s.y,n,0,2*Math.PI);const o=e.createRadialGradient(s.x,s.y,n/2,s.x,s.y,n);o.addColorStop(0,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=o,e.fill()}),this.vCtx.clearRect(0,0,window.innerWidth,window.innerHeight);for(const n of l.gameStore.visionSources){const t=o.layerManager.UUIDMap.get(n.shape);if(void 0===t)continue;const u=t.auras.find(e=>e.uuid===n.aura);if(void 0===u)continue;const h=c.getUnitDistance(u.value+u.dim),f=t.center(),p=c.g2l(f),g=new a.Circle(f,h);if(g.visibleInCanvas(e.canvas))if("bvh"===l.gameStore.visionMode){let t=-1;const n=new Path2D;let o;n.moveTo(p.x,p.y);for(let a=0;a<2*Math.PI;a+=r.Settings.angleSteps/180*Math.PI){const d=new s.GlobalPoint(f.x+h*Math.cos(a),f.y+h*Math.sin(a));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(f.x),c.g2ly(f.y)),i.lineTo(c.g2lx(d.x),c.g2ly(d.y)),i.stroke());const g=s.Ray.fromPoints(f,d),v=l.gameStore.BV.intersect(g);if(0===a&&(o=v.hit?v.intersect:d),v.hit)-1!==t&&(n.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,a),t=-1),n.lineTo(c.g2lx(v.intersect.x),c.g2ly(v.intersect.y));else if(-1===t){t=a;const i=c.g2l(d);e.lineTo(i.x,i.y)}}if(-1===t?n.lineTo(c.g2lx(o.x),c.g2ly(o.y)):n.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));t.addColorStop(0,"rgba(0, 0, 0, 1)"),t.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=t}else e.fillStyle="rgba(0, 0, 0, 1)";e.fill(n)}u.lastPath=n}else{this.vCtx.globalCompositeOperation="source-over",this.vCtx.fillStyle="rgba(0, 0, 0, 1)";const t=d.computeVisibility(f,"vision");this.vCtx.beginPath(),this.vCtx.moveTo(c.g2lx(t[0][0]),c.g2ly(t[0][1]));for(const e of t)this.vCtx.lineTo(c.g2lx(e[0]),c.g2ly(e[1]));if(this.vCtx.closePath(),this.vCtx.fill(),u.dim>0){const e=this.vCtx.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),this.vCtx.fillStyle=e}else this.vCtx.fillStyle="rgba(0, 0, 0, 1)";this.vCtx.globalCompositeOperation="source-in",this.vCtx.beginPath(),this.vCtx.arc(p.x,p.y,c.g2lr(u.value+u.dim),0,2*Math.PI),this.vCtx.fill(),e.drawImage(this.virtualCanvas,0,0)}}l.gameStore.fowLOS&&(e.globalCompositeOperation="source-in",e.drawImage(o.layerManager.getLayer("fow-players").canvas,0,0));for(const s of this.preFogShapes){if(!s.visibleInCanvas(this.canvas))continue;const t=s.globalCompositeOperation;l.gameStore.fullFOW||("source-over"===s.globalCompositeOperation?s.globalCompositeOperation="destination-out":"destination-out"===s.globalCompositeOperation&&(s.globalCompositeOperation="source-over")),s.draw(e),s.globalCompositeOperation=t}l.gameStore.fullFOW&&(e.globalCompositeOperation="source-out",e.fillStyle=u.getFogColour(),e.fillRect(0,0,e.canvas.width,e.canvas.height)),super.draw(!1),e.globalCompositeOperation=t}}}t.FOWLayer=h},4486:function(e,t,i){"use strict";i.r(t);var s=i("a097"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"45bf":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"menuContainer"}},[i("div",{ref:"rm",style:{left:e.visible.settings?"200px":"0",top:e.visible.locations?"100px":"0"},attrs:{id:"radialmenu"}},[i("div",{staticClass:"rm-wrapper"},[i("div",{staticClass:"rm-toggler"},[i("ul",{staticClass:"rm-list",class:{"rm-list-dm":e.IS_DM}},[e.IS_DM?i("li",{staticClass:"rm-item",attrs:{id:"rm-locations"},on:{click:function(t){e.visible.locations=!e.visible.locations}}},[e._m(0)]):e._e(),i("li",{staticClass:"rm-item",attrs:{id:"rm-settings"},on:{click:function(t){e.visible.settings=!e.visible.settings}}},[e._m(1)])])]),e._m(2)])]),i("transition",{attrs:{name:"settings"},on:{enter:function(t){e.$refs.rm.style.transition="left 500ms"}}},[e.visible.settings?i("div",{ref:"settings",attrs:{id:"menu"},on:{click:e.settingsClick}},[i("div",{staticStyle:{width:"200px",height:"90%","overflow-y":"auto","overflow-x":"hidden"}},[e.IS_DM?[i("button",{staticClass:"accordion"},[e._v("Assets")]),i("div",{staticClass:"accordion-panel"},[i("a",{staticClass:"actionButton",attrs:{href:"/assets",target:"blank",title:"Open asset manager"}},[i("i",{staticClass:"fas fa-external-link-alt"})]),i("div",{staticClass:"directory",attrs:{id:"menu-tokens"}},[i("asset-node",{attrs:{asset:e.assets}}),e.assets?e._e():i("div",[e._v("No assets")])],1)]),i("button",{staticClass:"accordion"},[e._v("Notes")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel",attrs:{id:"menu-notes"}},[i("a",{staticClass:"actionButton",on:{click:e.createNote}},[i("i",{staticClass:"far fa-plus-square"})]),e._l(e.notes,function(t){return i("div",{key:t.uuid,staticStyle:{cursor:"pointer"},on:{click:function(i){e.openNote(t)}}},[e._v(e._s(t.title||"[?]"))])}),e.notes.length?e._e():i("div",[e._v("No notes")])],2)]),i("button",{staticClass:"accordion"},[e._v("DM Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"useGridInput"}},[e._v("Use grid:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.useGrid,expression:"useGrid"}],attrs:{id:"useGridInput",type:"checkbox",checked:"checked"},domProps:{checked:Array.isArray(e.useGrid)?e._i(e.useGrid,null)>-1:e.useGrid},on:{change:function(t){var i=e.useGrid,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&(e.useGrid=i.concat([o])):r>-1&&(e.useGrid=i.slice(0,r).concat(i.slice(r+1)))}else e.useGrid=n}}}),i("label",{attrs:{for:"useFOWInput"}},[e._v("Fill entire canvas with FOW:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fullFOW,expression:"fullFOW"}],attrs:{id:"useFOWInput",type:"checkbox"},domProps:{checked:Array.isArray(e.fullFOW)?e._i(e.fullFOW,null)>-1:e.fullFOW},on:{change:function(t){var i=e.fullFOW,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&(e.fullFOW=i.concat([o])):r>-1&&(e.fullFOW=i.slice(0,r).concat(i.slice(r+1)))}else e.fullFOW=n}}}),i("label",{attrs:{for:"fowOpacity"}},[e._v("FOW opacity:")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.fowOpacity,expression:"fowOpacity",modifiers:{number:!0}}],attrs:{id:"fowOpacity",type:"number",min:"0",max:"1",step:"0.1"},domProps:{value:e.fowOpacity},on:{input:function(t){t.target.composing||(e.fowOpacity=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"fowLOS"}},[e._v("Only show lights in LoS:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fowLOS,expression:"fowLOS"}],attrs:{id:"fowLOS",type:"checkbox"},domProps:{checked:Array.isArray(e.fowLOS)?e._i(e.fowLOS,null)>-1:e.fowLOS},on:{change:function(t){var i=e.fowLOS,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&(e.fowLOS=i.concat([o])):r>-1&&(e.fowLOS=i.slice(0,r).concat(i.slice(r+1)))}else e.fowLOS=n}}}),i("label",{attrs:{for:"unitSizeInput"}},[e._v("Unit Size (in ft.):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.unitSize,expression:"unitSize",modifiers:{number:!0}}],attrs:{id:"unitSizeInput",type:"number"},domProps:{value:e.unitSize},on:{input:function(t){t.target.composing||(e.unitSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"gridSizeInput"}},[e._v("Grid Size (in pixels):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridSize,expression:"gridSize",modifiers:{number:!0}}],attrs:{id:"gridSizeInput",type:"number",min:"0"},domProps:{value:e.gridSize},on:{input:function(t){t.target.composing||(e.gridSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",{domProps:{selected:"bvh"===e.$store.state.game.visionMode}},[e._v("BVH")]),i("option",{domProps:{selected:"triangle"===e.$store.state.game.visionMode}},[e._v("Triangle")])]),i("label",{attrs:{for:"vmininp"}},[e._v("Minimal full vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMin,expression:"visionRangeMin",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmininp",type:"number",min:"0"},domProps:{value:e.visionRangeMin},on:{change:function(t){e.visionRangeMin=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"vmaxinp"}},[e._v("Maximal vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMax,expression:"visionRangeMax",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmaxinp",type:"number",min:"0"},domProps:{value:e.visionRangeMax},on:{change:function(t){e.visionRangeMax=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"invitation"}},[e._v("Invitation Code:")]),i("input",{attrs:{id:"invitation",type:"text",readonly:"readonly"},domProps:{value:e.invitationCode}})])])]:e._e(),i("button",{staticClass:"accordion"},[e._v("Client Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"gridColour"}},[e._v("Grid Colour:")]),i("color-picker",{attrs:{id:"gridColour",color:e.gridColour},on:{"update:color":function(t){e.gridColour=t}}}),i("label",{attrs:{for:"fowColour"}},[e._v("FOW Colour:")]),i("color-picker",{attrs:{id:"fowColour",color:e.fowColour},on:{"update:color":function(t){e.fowColour=t}}}),i("label",{attrs:{for:"rulerColour"}},[e._v("Ruler Colour:")]),i("color-picker",{attrs:{id:"rulerColour",color:e.rulerColour},on:{"update:color":function(t){e.rulerColour=t}}})],1)])],2),i("router-link",{staticClass:"accordion",staticStyle:{"text-decoration":"none",display:"inline-block",position:"absolute",bottom:"0"},attrs:{to:"/dashboard"}},[e._v("Exit")])],1):e._e()]),i("transition",{attrs:{name:"locations"},on:{enter:function(t){e.$refs.rm.style.transition="top 500ms"}}},[e.IS_DM&&e.visible.locations?i("div",{attrs:{id:"locations-menu"}},[i("div",[e._l(e.locations,function(t){return i("div",{key:t,on:{click:function(i){e.changeLocation(t)}}},[e._v(e._s(t))])}),i("div",{on:{click:e.createLocation}},[i("i",{staticClass:"fas fa-plus"})])],2)]):e._e()]),i("img",{attrs:{id:"dragImage"}})],1)},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"far fa-compass"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"fas fa-cog"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"rm-topper"},[i("i",{staticClass:"icon-share-alt"})])}];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"45fb":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Edit asset")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("div",{staticClass:"grid"},[i("label",{attrs:{for:"shapeselectiondialog-name"}},[e._v("Name")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.name,expression:"shape.name"}],staticStyle:{"grid-column":"numerator / remove"},attrs:{type:"text",id:"shapeselectiondialog-name",disabled:!e.owned},domProps:{value:e.shape.name},on:{change:function(t){e.updateShape(!1)},input:function(t){t.target.composing||e.$set(e.shape,"name",t.target.value)}}}),i("div",{style:{opacity:e.shape.nameVisible?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(t){e.shape.nameVisible=!e.shape.nameVisible,e.updateShape(!1)}}},[i("i",{staticClass:"fas fa-eye"})]),i("label",{attrs:{for:"shapeselectiondialog-istoken"}},[e._v("Is a token")]),i("input",{staticClass:"styled-checkbox",staticStyle:{"grid-column-start":"remove"},attrs:{type:"checkbox",id:"shapeselectiondialog-istoken",disabled:!e.owned},domProps:{checked:e.shape.isToken},on:{click:e.setToken}}),i("label",{attrs:{for:"shapeselectiondialog-visionblocker"}},[e._v("Blocks vision/light")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.visionObstruction,expression:"shape.visionObstruction"}],staticStyle:{"grid-column-start":"remove"},attrs:{type:"checkbox",id:"shapeselectiondialog-visionblocker",disabled:!e.owned},domProps:{checked:Array.isArray(e.shape.visionObstruction)?e._i(e.shape.visionObstruction,null)>-1:e.shape.visionObstruction},on:{change:[function(t){var i=e.shape.visionObstruction,s=t.target,n=!!s.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);s.checked?r<0&&e.$set(e.shape,"visionObstruction",i.concat([o])):r>-1&&e.$set(e.shape,"visionObstruction",i.slice(0,r).concat(i.slice(r+1)))}else e.$set(e.shape,"visionObstruction",n)},e.setVisionBlocker]}}),i("label",{attrs:{for:"shapeselectiondialog-moveblocker"}},[e._v("Blocks movement")]),i("input",{staticStyle:{"grid-column-start":"remove"},attrs:{type:"checkbox",id:"shapeselectiondialog-moveblocker",disabled:!e.owned},domProps:{checked:e.shape.movementObstruction},on:{click:e.setMovementBlocker}}),i("label",{attrs:{for:"shapeselectiondialog-strokecolour"}},[e._v("Border colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove"},attrs:{color:e.shape.strokeColour,disabled:!e.owned},on:{"update:color":function(t){e.$set(e.shape,"strokeColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("label",{attrs:{for:"shapeselectiondialog-fillcolour"}},[e._v("Fill colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove"},attrs:{color:e.shape.fillColour,disabled:!e.owned},on:{"update:color":function(t){e.$set(e.shape,"fillColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("div",{staticClass:"spanrow header"},[e._v("Access")]),e._l(e.shape.owners,function(t){return[i("input",{key:t,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name",disabled:!e.owned},domProps:{value:t},on:{change:function(i){e.updateOwner(i,t)}}}),""!==t?i("div",{key:"remove-"+t,style:{opacity:e.owned?1:.3,textAlign:"center",gridColumnStart:"remove"},attrs:{disabled:!e.owned},on:{click:function(i){e.removeOwner(t)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Trackers")]),e._l(e.shape.trackers,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"tracker.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name",disabled:!e.owned},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"tracker.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value",disabled:!e.owned},domProps:{value:t.value},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.maxvalue,expression:"tracker.maxvalue",modifiers:{number:!0}}],key:"maxvalue-"+t.uuid,attrs:{type:"text",title:"Current value",disabled:!e.owned},domProps:{value:t.maxvalue},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"maxvalue",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"sspan-"+t.uuid}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){t.visible=!t.visible,e.updateShape(!1)}}},[i("i",{staticClass:"fas fa-eye"})]),i("span",{key:"tspan-"+t.uuid}),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,style:{opacity:e.owned?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){e.removeTracker(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Auras")]),e._l(e.shape.auras,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"aura.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name",disabled:!e.owned},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"aura.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value",disabled:!e.owned},domProps:{value:t.value},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.dim,expression:"aura.dim",modifiers:{number:!0}}],key:"dimvalue-"+t.uuid,attrs:{type:"text",title:"Dim value",disabled:!e.owned},domProps:{value:t.dim},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"dim",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("color-picker",{key:"colour-"+t.uuid,attrs:{color:t.colour,disabled:!e.owned},on:{"update:color":function(i){e.$set(t,"colour",i)},input:function(i){e.updateAuraColour(t,i)},change:function(t){e.updateShape(!0)}}}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){t.visible=!t.visible,e.updateShape(!0)}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{key:"visionsource-"+t.uuid,style:{opacity:t.visionSource?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){e.updateAuraVisionSource(t)}}},[i("i",{staticClass:"fas fa-lightbulb"})]),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,style:{opacity:e.owned?1:.3,textAlign:"center"},attrs:{disabled:!e.owned},on:{click:function(i){e.removeAura(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Labels")]),i("div",{staticClass:"spanrow",attrs:{id:"labels"}},[e._l(e.shape.labels,function(t){return i("div",{key:t.uuid,staticClass:"label"},[t.category?[i("div",{staticClass:"label-user"},[e._v(e._s(t.category))]),i("div",{staticClass:"label-main",on:{click:function(i){e.removeLabel(t.uuid)}}},[e._v(e._s(t.name))])]:e._e(),t.category?e._e():[i("div",{staticClass:"label-main",on:{click:function(i){e.removeLabel(t.uuid)}}},[e._v(e._s(t.name))])]],2)}),e.owned?i("div",{staticClass:"label",attrs:{id:"label-add"}},[i("div",{staticClass:"label-main",on:{click:e.openLabelManager}},[e._v("+")])]):e._e()],2),i("div",{staticClass:"spanrow header"},[e._v("Annotation")]),i("textarea",{staticClass:"spanrow",attrs:{disabled:!e.owned},domProps:{value:e.shape.annotation},on:{change:e.updateAnnotation}})],2)])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},4709:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1"),c=i("5a5c");class u extends o.Shape{constructor(e,t,i,s,n){super(e,i,s,n),this.type="circle",this.r=t||1}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r})}fromDict(e){super.fromDict(e),this.r=e.radius}getBoundingBox(){return new n.BoundingRect(new s.GlobalPoint(this.refPoint.x-this.r,this.refPoint.y-this.r),2*this.r,2*this.r)}get points(){return this.getBoundingBox().points}draw(e){super.draw(e),e.beginPath(),"fog"===this.fillColour?e.fillStyle=c.getFogColour():e.fillStyle=this.fillColour;const t=l.g2l(this.refPoint);e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.beginPath(),e.lineWidth=l.g2lz(5),e.strokeStyle=this.strokeColour,e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.stroke())}contains(e){return Math.pow(e.x-this.refPoint.x,2)+Math.pow(e.y-this.refPoint.y,2){const t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t){return e.toLowerCase()t(e)?i[1].push(e):i[0].push(e)),i}function u(e,t,i,s){const n=.2*Number(e.font.split("px")[0]),o=e.measureText(t).width;return Math.min(i/o,s/n)}function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,e=>{return"%"+e.charCodeAt(0).toString(16)})}t.uuidv4=n,t.capitalize=o,t.alphSort=r,t.getHTMLFont=a,t.getHTMLTextWidth=l,t.partition=c,t.calcFontScale=u,t.fixedEncodeURIComponent=d;class h{constructor(){this.keys=[],this.values=[]}get length(){return this.keys.length}get(e){return this.values[this.keys.indexOf(e)]}getIndexValue(e){return this.values[e]}getIndexKey(e){return this.keys[e]}set(e,t){this.keys.push(e),this.values.push(t)}has(e){return this.indexOf(e)>=0}indexOf(e){return this.keys.indexOf(e)}remove(e){const t=this.indexOf(e);this.keys.splice(t,1),this.values.splice(t,1)}}function f(){return s.app.$children[0].$refs.activeComponent}function p(e){const t=s.app.$children[0].$refs.activeComponent;return t.$refs[e]}t.OrderedMap=h,t.getComponent=f,t.getRef=p},"4aec":function(e,t,i){"use strict";i.r(t);var s=i("a755"),n=i("f51a");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="contextMenu.vue",t["default"]=a.exports},"4aee":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("98ef");function n(e){return(e+2)%3}function o(e){return(e+1)%3}function r(e,t){const i=new s.EdgeCirculator(e,null);if(i.valid)do{const n=3-i.t.indexV(e)-i.ri,o=i.t.vertices[n];if(!o.infinite){if(o===t)return{includes:!0,vi:t,fr:i.t,i:i.ri};{const n=c(e.point,t.point,o.point);if(n===s.Sign.COLLINEAR&&a(e.point,o.point,t.point))return{includes:!0,vi:o,fr:i.t,i:i.ri}}}}while(i.next());return{includes:!1}}function a(e,t,i){let n,o;return l(0,e,i)===s.Sign.EQUAL?(n=l(1,e,t),o=l(1,t,i)):(n=l(0,e,t),o=l(0,t,i)),n===s.Sign.SMALLER&&o===s.Sign.SMALLER||n===s.Sign.LARGER&&o===s.Sign.LARGER}function l(e,t,i){return t[e]i[e]?s.Sign.LARGER:s.Sign.EQUAL}function c(e,t,i){const n=e[0],o=e[1],r=t[0],a=t[1],l=i[0],c=i[1],d=r-n,h=a-o,f=l-n,p=c-o,g=u(d,h,f,p);let v=Math.abs(d),m=Math.abs(h);const y=Math.abs(f),b=Math.abs(p);if(vm&&([v,m]=[m,v]),v<2e-162&&0===v)return s.Sign.ZERO;if(m<1e153){const e=Number.EPSILON*v*m;if(g>e)return s.Sign.POSITIVE;if(g<-e)return s.Sign.NEGATIVE}return s.Sign.ZERO}function u(e,t,i,s){return e*s-t*i}function d(e,t,i){return u(t[0]-e[0],t[1]-e[1],i[0]-e[0],i[1]-e[1])<0}function h(e,t,i){if(!e.isInfinite())return f(e.vertices[0].point,e.vertices[1].point,e.vertices[2].point,t,i);throw new Error("SSS")}function f(e,t,i,n,o){const r=m(e,t,i,n);if(r!==s.Sign.ON_ORIENTED_BOUNDARY||!o)return r;const a=[e,t,i,n];a.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);for(const l of a.reverse()){if(l===n)return s.Sign.ON_NEGATIVE_SIDE;let o=c(e,t,n);if(l===i&&o!==s.Sign.COLLINEAR)return o;if(o=c(e,n,i),l===t&&o!==s.Sign.COLLINEAR)return o;if(o=c(n,t,i),l===e&&o!==s.Sign.COLLINEAR)return o}return s.Sign.ON_NEGATIVE_SIDE}function p(e,t){return e[0]===t[0]&&e[1]===t[1]}function g(e,t){return e[0]y&&([m,y]=[y,m]),m<1e-73&&0===m)return s.Sign.ON_ORIENTED_BOUNDARY;if(y<1e76){const e=Number.EPSILON*m*y*(y*y);if(v>e)return s.Sign.ON_POSITIVE_SIDE;if(v<-e)return s.Sign.ON_NEGATIVE_SIDE}return s.Sign.ZERO}function y(e,t,i,n){switch(c(e,t,i)){case s.Sign.LEFT_TURN:return c(i,n,t)!==s.Sign.RIGHT_TURN;case s.Sign.RIGHT_TURN:return c(i,n,t)!==s.Sign.LEFT_TURN;case s.Sign.COLLINEAR:return!0}}function b(e,t,i,n){switch(c(e,t,i)){case s.Sign.LEFT_TURN:return c(e,t,n)!==s.Sign.LEFT_TURN;case s.Sign.RIGHT_TURN:return c(e,t,n)!==s.Sign.RIGHT_TURN;case s.Sign.COLLINEAR:return!0}}function _(e,t,i,s){const n=x(e,t,i,s);switch(n.intersectionType){case w.POINT:return n.point;case w.NO_INTERSECTION:return null}throw new Error("sdfgighowen")}var w;function S(e,t){if(e[0]===t[0])return[1,0,-e[0]];if(e[1]===t[1])return[0,1,-e[1]];const i=t[0]-e[0],s=t[1]-e[1];return[-s,i,-i*e[1]+s*e[0]]}function x(e,t,i,s){if(!C(e,t,i,s))return{intersectionType:w.NO_INTERSECTION,point:null};const n=S(e,t),o=S(i,s),r=M(n,o);switch(r.intersectionType){case w.POINT:return r}throw new Error("gzseuihgpib")}function M(e,t){const i=e[0]*t[1]-t[0]*e[1],s=e[1]*t[2]-t[1]*e[2],n=t[0]*e[2]-e[0]*t[2];return{intersectionType:w.POINT,point:[s/i,n/i]}}function C(e,t,i,n){if(g(e,t)){if(g(i,n)){if(g(t,i)||g(n,e))return!1}else if(g(t,n)||g(i,e))return!1}else if(g(i,n)){if(g(e,i)||g(n,t))return!1}else if(g(e,n)||g(i,t))return!1;if(g(e,t))if(g(i,n))switch(v(e,i)){case s.Sign.SMALLER:switch(v(t,i)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(t,n)){case s.Sign.SMALLER:return y(e,t,i,n);case s.Sign.EQUAL:return!0;default:return b(e,t,i,n)}}case s.Sign.EQUAL:return!0;default:switch(v(n,e)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(n,t)){case s.Sign.SMALLER:return y(i,n,e,t);case s.Sign.EQUAL:return!0;default:return b(i,n,e,t)}}}else switch(v(e,n)){case s.Sign.SMALLER:switch(v(t,n)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(t,i)){case s.Sign.SMALLER:return y(e,t,n,i);case s.Sign.EQUAL:return!0;default:return b(e,t,n,i)}}case s.Sign.EQUAL:return!0;default:switch(v(i,e)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(i,t)){case s.Sign.SMALLER:return y(n,i,e,t);case s.Sign.EQUAL:return!0;default:return b(n,i,e,t)}}}else if(g(i,n))switch(v(t,i)){case s.Sign.SMALLER:switch(v(e,i)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(e,n)){case s.Sign.SMALLER:return y(t,e,i,n);case s.Sign.EQUAL:return!0;default:return b(t,e,i,n)}}case s.Sign.EQUAL:return!0;default:switch(v(n,t)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(n,e)){case s.Sign.SMALLER:return y(i,n,t,e);case s.Sign.EQUAL:return!0;default:return b(i,n,t,e)}}}else switch(v(t,n)){case s.Sign.SMALLER:switch(v(e,n)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(e,i)){case s.Sign.SMALLER:return y(t,e,n,i);case s.Sign.EQUAL:return!0;default:return b(t,e,n,i)}}case s.Sign.EQUAL:return!0;default:switch(v(i,t)){case s.Sign.SMALLER:return!1;case s.Sign.EQUAL:return!0;default:switch(v(i,e)){case s.Sign.SMALLER:return y(n,i,t,e);case s.Sign.EQUAL:return!0;default:return b(n,i,t,e)}}}}function L(e){if(e!==e)return e;if(e===-1/0)return-Number.MAX_VALUE;if(e===1/0)return 1/0;if(e===+Number.MAX_VALUE)return 1/0;let t=e*(e<0?1-Number.EPSILON/2:1+Number.EPSILON);t===e&&(t=Number.MIN_VALUE*Number.EPSILON>0?e+Number.MIN_VALUE*Number.EPSILON:e+Number.MIN_VALUE),t===1/0&&(t=+Number.MAX_VALUE);const i=e+(t-e)/2;ewindow.innerWidth-100&&(t=window.innerWidth-100),i<0&&(i=0),i>window.innerHeight-100&&(i=window.innerHeight-100),this.$refs.container.style.left=t+"px",this.$refs.container.style.top=i+"px",this.$refs.container.style.display="block"}dragOver(e){this.dragging&&(this.$refs.container.style.display="none")}};s.__decorate([r.Prop(Boolean)],a.prototype,"visible",void 0),s.__decorate([r.Prop({type:Boolean,default:!0})],a.prototype,"mask",void 0),a=s.__decorate([o.default],a),t.default=a},5338:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("8055")),o=i("2d5b");t.socket=n.default(location.protocol+"//"+location.host+"/pa_assetmgmt",{autoConnect:!1}),t.socket.on("connect",()=>{console.log("Connected")}),t.socket.on("disconnect",()=>{console.log("Disconnected")}),t.socket.on("redirect",e=>{console.log("redirecting"),window.location.href=e}),t.socket.on("Folder.Root.Set",e=>{o.assetStore.setRoot(e)}),t.socket.on("Folder.Set",e=>{if(o.assetStore.clear(),e.children)for(const t of e.children)o.assetStore.idMap.set(t.id,t),t.file_hash?o.assetStore.files.push(t.id):o.assetStore.folders.push(t.id)}),t.socket.on("Folder.Create",e=>{o.assetStore.folders.push(e.id),o.assetStore.idMap.set(e.id,e)}),t.socket.on("Asset.Upload.Finish",e=>{o.assetStore.idMap.set(e.id,e),o.assetStore.files.push(e.id)})},5394:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=s.__importDefault(i("1289")),r=s.__importDefault(i("ea6a")),a=i("0bc6"),l=i("6f92"),c=i("f10f");let u=class extends r.default{constructor(){super(...arguments),this.name="Filter",this.active=!1}get labels(){const e={};for(const t of Object.keys(c.gameStore.labels)){const i=c.gameStore.labels[t];i.category?(i.category in e||(e[i.category]=[]),e[i.category].push([i.uuid,i.name]),e[i.category].sort((e,t)=>e[1].localeCompare(t[1]))):e[""].push([i.uuid,i.name])}return e}get initalValues(){const e={};for(const t of Object.keys(this.labels))e[t]=c.gameStore.labelFilters.filter(e=>this.labels[t].map(e=>e[0]).includes(e));return e}get categories(){return Object.keys(this.labels).sort()}isFilter(e){return c.gameStore.labelFilters.includes(e)}toggleFilter(e){const t=c.gameStore.labelFilters.indexOf(e);t>=0?c.gameStore.labelFilters.splice(t,1):c.gameStore.labelFilters.push(e),l.layerManager.invalidate()}toggleUnlabeled(){c.gameStore.toggleUnlabeledFilter(),l.layerManager.invalidate()}updateSelection(e){if(e.title in this.labels){for(const[t,i]of this.labels[e.title]){const i=c.gameStore.labelFilters.indexOf(t),s=e.selection.includes(t);i>=0&&!s?(c.gameStore.labelFilters.splice(i,1),a.socket.emit("Labels.Filter.Remove",t)):i<0&&s&&(c.gameStore.labelFilters.push(t),a.socket.emit("Labels.Filter.Add",t))}l.layerManager.invalidate()}}};u=s.__decorate([n.default({components:{accordion:o.default}})],u),t.default=u},"53ec":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=i("60a3");let a=class extends n.default{constructor(){super(...arguments),this.selected=[],this.active=!1}mounted(){this.selected=this.initialValues,this.updateCategory()}toggleDisplay(e){this.active=!this.active}toggleCategory(){const e=this.$refs.overall;e.checked?this.selected=this.items.map(e=>e[0]):this.selected=[],this.$emit("selectionupdate",{title:this.title,selection:this.selected})}updateCategory(){const e=this.$refs.overall;0===this.selected.length?(e.checked=!1,e.indeterminate=!1):this.selected.length===this.items.length?(e.checked=!0,e.indeterminate=!1):(e.checked=!1,e.indeterminate=!0)}toggleSelection(e){const t=this.selected.indexOf(e);-1===t?this.selected.push(e):this.selected.splice(t,1),this.updateCategory(),this.$emit("selectionupdate",{title:this.title,selection:this.selected})}};s.__decorate([r.Prop(String)],a.prototype,"title",void 0),s.__decorate([r.Prop({default:!0,type:Boolean})],a.prototype,"showArrow",void 0),s.__decorate([r.Prop({default:()=>[]})],a.prototype,"items",void 0),s.__decorate([r.Prop({default:()=>[]})],a.prototype,"initialValues",void 0),a=s.__decorate([o.default],a),t.default=a},"561b":function(e,t,i){"use strict";var s=i("a450"),n=i.n(s);n.a},5722:function(e,t,i){},"574e":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("92b1"),a=i("5a5c");class l extends o.Shape{constructor(e,t,i,s,n){super(e,"rgba(0, 0, 0, 0)",s||"#000",n),this.type="multiline",this._points=[],this._points=t||[],this.lineWidth=i||3}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._points=e.points.map(e=>new s.GlobalPoint(e.x,e.y))}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,o=this.refPoint.y;for(const s of this._points)s.xt&&(t=s.x),s.yo&&(o=s.y);return new n.BoundingRect(new s.GlobalPoint(e,i),t-e,o-i)}draw(e){super.draw(e),e.beginPath(),e.lineCap="round",e.lineJoin="round",e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y));for(const t of this._points)e.lineTo(r.g2lx(t.x),r.g2ly(t.y));"fog"===this.strokeColour?e.strokeStyle=a.getFogColour():e.strokeStyle=this.strokeColour,e.lineWidth=r.g2lz(this.lineWidth),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=r.l2g(t):this._points[e-1]=r.l2g(t)}}t.MultiLine=l},"59d8":function(e,t,i){"use strict";i.r(t);var s=i("e5ca"),n=i("6f8d");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("a7b3");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"639cd890",null);a.options.__file="draw.vue",t["default"]=a.exports},"59f0":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Initiative")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("draggable",{attrs:{id:"initiative-list",options:{setData:e.fakeSetData,disabled:!e.$store.state.game.IS_DM}},on:{change:e.updateOrder},model:{value:e.data,callback:function(t){e.data=t},expression:"data"}},[e._l(e.data,function(t){return[i("div",{key:t.uuid,staticStyle:{display:"flex","flex-direction":"column","align-items":"flex-end"}},[i("div",{staticClass:"initiative-actor",class:{"initiative-selected":e.currentActor===t.uuid},style:{cursor:e.$store.state.game.IS_DM&&"move"},on:{mouseenter:function(i){e.toggleHighlight(t,!0)},mouseleave:function(i){e.toggleHighlight(t,!1)}}},[t.has_img?[i("img",{attrs:{src:t.source,width:"30px",height:"30px"}})]:[i("span",{staticStyle:{width:"auto"}},[e._v(e._s(t.source))])],i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:t.initiative,expression:"actor.initiative",modifiers:{lazy:!0,number:!0}}],class:{notAllowed:!e.owns(t)},attrs:{type:"text",placeholder:"value",disabled:!e.owns(t)},domProps:{value:t.initiative},on:{change:[function(i){e.$set(t,"initiative",e._n(i.target.value))},function(i){e.syncInitiative(t)}],blur:function(t){e.$forceUpdate()}}}),i("div",{staticClass:"initiative-effects-icon",class:{notAllowed:!e.owns(t)},staticStyle:{opacity:"0.6"},on:{click:function(i){e.createEffect(t,e.getDefaultEffect(),!0)}}},[i("i",{staticClass:"fas fa-stopwatch"}),t.effects?[e._v(e._s(t.effects.length))]:[e._v("0")]],2),i("div",{class:{notAllowed:!e.owns(t)},style:{opacity:t.visible?"1.0":"0.3"},on:{click:function(i){e.toggleOption(t,"visible")}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{class:{notAllowed:!e.owns(t)},style:{opacity:t.group?"1.0":"0.3"},on:{click:function(i){e.toggleOption(t,"group")}}},[i("i",{staticClass:"fas fa-users"})]),i("div",{class:{notAllowed:!e.owns(t)},style:{opacity:e.owns(t)?"1.0":"0.3"},on:{click:function(i){e.removeInitiative(t.uuid,!0,!0)}}},[i("i",{staticClass:"fas fa-trash-alt"})])],2),t.effects?i("div",{staticClass:"initiative-effect"},e._l(t.effects,function(s){return i("div",{key:s.uuid},[i("input",{directives:[{name:"model",rawName:"v-model",value:s.name,expression:"effect.name"}],attrs:{type:"text",size:s.name.length||1},domProps:{value:s.name},on:{change:function(i){e.updateEffect(t.uuid,s,!0)},input:function(t){t.target.composing||e.$set(s,"name",t.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model",value:s.turns,expression:"effect.turns"}],attrs:{type:"text",size:s.turns.toString().length||1},domProps:{value:s.turns},on:{change:function(i){e.updateEffect(t.uuid,s,!0)},input:function(t){t.target.composing||e.$set(s,"turns",t.target.value)}}})])})):e._e()])]})],2),i("div",{attrs:{id:"initiative-bar"}},[i("div",{attrs:{id:"initiative-round"}},[e._v("Round "+e._s(e.roundCounter))]),i("div",{staticStyle:{display:"flex"}}),i("div",{staticClass:"initiative-bar-button",class:{notAllowed:!e.$store.state.game.IS_DM},on:{click:function(t){e.setRound(0,!0),e.updateTurn(e.data[0].uuid,!0)}}},[i("i",{staticClass:"fas fa-sync-alt"})]),i("div",{staticClass:"initiative-bar-button",class:{notAllowed:!e.$store.state.game.IS_DM},on:{click:e.nextTurn}},[i("i",{staticClass:"fas fa-chevron-right"})])])],1)])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"5a5c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("66cb")),o=i("8f0a"),r=i("f10f");function a(e){return new o.LocalPoint(e.pageX,e.pageY)}function l(e=!1){const t=n.default(r.gameStore.fowColour);return r.gameStore.IS_DM?t.setAlpha(e?1:r.gameStore.fowOpacity):t.setAlpha(1),t.toRgbString()}function c(e){return 1/(-5/3+28/15*Math.exp(1.83*e))}function u(e){return Math.log(15/28*(1/e+5/3))/1.83}t.getMouse=a,t.getFogColour=l,t.zoomValue=c,t.zoomDisplay=u},"5a81":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importStar(i("66cb")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("2f62"),l=s.__importDefault(i("3b36")),c=s.__importDefault(i("d65f")),u=i("4a5b"),d=i("8f0a"),h=i("6f92"),f=i("1327"),p=i("f10f"),g=i("92b1"),v=i("60a3");let m=class extends o.default{constructor(){super(...arguments),this.x=0,this.y=0,this.visible=!1,this.text="X",this.fillColour="rgba(255, 255, 255, 1)",this.borderColour="rgba(0, 0, 0, 1)"}mounted(){this.updatePreview()}onTextChange(e,t){this.updatePreview()}onFillChange(e,t){this.updatePreview()}onBorderChange(e,t){this.updatePreview()}open(e,t){this.visible=!0,this.x=e,this.y=t}submit(){const e=h.layerManager.getLayer();if(void 0===e)return;const t=new f.CircularToken(g.l2g(new d.LocalPoint(this.x,this.y)),g.getUnitDistance(p.gameStore.unitSize/2),this.text,"10px serif",this.fillColour,this.borderColour);t.addOwner(p.gameStore.username),e.addShape(t,!0),e.invalidate(!1),this.visible=!1}updatePreview(){const e=this.$refs.canvas.getContext("2d");e.clearRect(0,0,e.canvas.width,e.canvas.height),e.beginPath();const t={x:e.canvas.width/2,y:e.canvas.height/2},i=.9*Math.min(t.x,t.y);e.fillStyle=this.fillColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.borderColour&&(e.beginPath(),e.lineWidth=5,e.strokeStyle=this.borderColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.stroke()),e.save(),e.textAlign="center",e.textBaseline="middle";const s=u.calcFontScale(e,this.text,i,i),o=0;e.transform(s,o,-o,s,t.x,t.y),e.fillStyle=n.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}};s.__decorate([v.Watch("text")],m.prototype,"onTextChange",null),s.__decorate([v.Watch("fillColour")],m.prototype,"onFillChange",null),s.__decorate([v.Watch("borderColour")],m.prototype,"onBorderChange",null),m=s.__decorate([r.default({components:{Modal:c.default,"color-picker":l.default},computed:Object.assign({},a.mapState("game",["unitSize"]))})],m),t.default=m},"5ae5":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f")),a=i("4a5b"),l=i("f10f");let c=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.note=null}open(e){this.visible=!0,this.note=e}calcHeight(){if(this.$refs.textarea){const e=this.$refs.textarea;return e.style.height="auto",e.style.height=e.scrollHeight+"px",e.scrollHeight+"px"}return"100px"}updateNote(){this.note&&l.gameStore.updateNote({note:this.note,sync:!0})}removeNote(){a.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{e&&this.note&&(l.gameStore.removeNote({note:this.note,sync:!0}),this.visible=!1)},()=>{})}};c=s.__decorate([o.default({components:{Modal:r.default}})],c),t.default=c},"5b69":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=i("60a3"),r=s.__importDefault(i("3b36")),a=s.__importDefault(i("ea6a")),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("4709"),h=i("5e7c"),f=i("574e"),p=i("e4ea"),g=i("b2ed"),v=i("f10f"),m=i("92b1"),y=i("5a5c");let b=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.ruler=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","draw-polygon","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=m.getUnitDistance(v.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:m.getUnitDistance(this.unitSize)/8}get IS_DM(){return v.gameStore.IS_DM}get unitSize(){return v.gameStore.unitSize}get useGrid(){return v.gameStore.useGrid}onFillChange(){this.brushHelper&&(this.brushHelper.fillColour=this.fillColour)}onModeUpdate(e,t){this.onModeChange(e,t)}setupBrush(){null!==this.brushHelper&&("reveal"===this.modeSelect||"hide"===this.modeSelect?(this.brushHelper.options.set("preFogShape",!0),this.brushHelper.options.set("skipDraw",!0),this.brushHelper.fillColour="rgba(0, 0, 0, 1)","reveal"===this.modeSelect?this.brushHelper.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.brushHelper.globalCompositeOperation="destination-out")):(this.brushHelper.options.delete("preFogShape"),this.brushHelper.options.delete("skipDraw"),this.brushHelper.globalCompositeOperation="source-over",this.brushHelper.fillColour=this.fillColour))}onModeChange(e,t){if(null===this.brushHelper)return;const i=u.layerManager.getLayer("fow"),s=u.layerManager.getLayer();void 0!==i&&void 0!==s&&(this.setupBrush(),"normal"!==e&&"normal"===t?(s.removeShape(this.brushHelper,!1),i.addShape(this.brushHelper,!1)):"normal"===e&&"normal"!==t&&(s.addShape(this.brushHelper,!1),i.removeShape(this.brushHelper,!1)))}getLayer(){return"normal"===this.modeSelect?u.layerManager.getLayer():u.layerManager.getLayer("fow")}onMouseDown(e){const t=this.getLayer();if(void 0!==t){if(this.active)null!==this.shape&&this.shape instanceof p.Polygon&&this.shape._vertices.push(m.l2g(y.getMouse(e)));else{switch(this.startPoint=m.l2g(y.getMouse(e)),this.active=!0,this.shapeSelect){case"square":this.shape=new g.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);break;case"circle":this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);break;case"paint-brush":this.shape=new f.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour;break;case"draw-polygon":this.shape=new p.Polygon(this.startPoint.clone(),[],this.fillColour,this.borderColour);break;default:return}"normal"!==this.modeSelect&&(this.shape.options.set("preFogShape",!0),this.shape.options.set("skipDraw",!0),this.shape.fillColour="rgba(0, 0, 0, 1)"),"reveal"===this.modeSelect?this.shape.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.shape.globalCompositeOperation="destination-out"),this.shape.addOwner(v.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),t.addShape(this.shape,!0,!1,!1),this.pushBrushBack()}if(null!==this.shape&&this.shape instanceof p.Polygon){const i=m.l2g(y.getMouse(e));null===this.ruler?(this.ruler=new h.Line(i,i,3,"black"),t.addShape(this.ruler,!1)):(this.ruler.refPoint=i,this.ruler.endPoint=i),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0),t.invalidate(!1),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0})}}else console.log("No active layer!")}onMouseMove(e){const t=m.l2g(y.getMouse(e)),i=this.getLayer();if(void 0!==i){if(null!==this.brushHelper&&(this.brushHelper.r=this.helperSize,this.brushHelper.refPoint=t,this.active||i.invalidate(!1)),this.active&&null!==this.startPoint&&null!==this.shape){switch(this.shapeSelect){case"square":this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint=new c.GlobalPoint(Math.min(this.startPoint.x,t.x),Math.min(this.startPoint.y,t.y));break;case"circle":this.shape.r=t.subtract(this.startPoint).length();break;case"paint-brush":this.shape._points.push(t);break;case"draw-polygon":this.ruler.endPoint=t;break}this.shape instanceof p.Polygon||(l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0)),i.invalidate(!1)}}else console.log("No active layer!")}onMouseUp(e){!this.active||null===this.shape||this.shape instanceof p.Polygon||(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.finaliseShape())}onContextMenu(e){if(!this.active||null===this.shape||!(this.shape instanceof p.Polygon))return;const t=this.getLayer();void 0!==t?(t.removeShape(this.ruler,!1),this.ruler=null,this.finaliseShape()):console.log("No active layer!")}finaliseShape(){null!==this.shape&&(this.shape.visionObstruction&&v.gameStore.recalculateVision(),this.shape.movementObstruction&&v.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!1}),this.active=!1)}onSelect(){const e=this.getLayer();void 0!==e&&(this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1))}onDeselect(){const e=this.getLayer();null!==this.brushHelper&&void 0!==e&&e.removeShape(this.brushHelper,!1),this.active&&void 0!==e&&null!==this.shape&&(e.removeShape(this.shape,!0,!1),this.shape=null,this.active=!1,e.invalidate(!1))}pushBrushBack(){const e=this.getLayer();void 0!==e?(null!==this.brushHelper&&e.removeShape(this.brushHelper,!1),this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1)):console.log("No active layer!")}};s.__decorate([o.Watch("fillColour")],b.prototype,"onFillChange",null),s.__decorate([o.Watch("modeSelect")],b.prototype,"onModeUpdate",null),b=s.__decorate([n.default({components:{"color-picker":r.default}})],b),t.default=b},"5e7c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("92b1");class a extends o.Shape{constructor(e,t,i,s,n){super(e,"rgba(0, 0, 0, 0)",s||"#000",n),this.type="line",this.endPoint=t,this.lineWidth=void 0===i?1:i}asDict(){return Object.assign(this.getBaseDict(),{x2:this.endPoint.x,y2:this.endPoint.y,line_width:this.lineWidth})}get points(){return[[this.refPoint.x,this.refPoint.y],[this.endPoint.x,this.endPoint.y]]}getBoundingBox(){return new n.BoundingRect(new s.GlobalPoint(Math.min(this.refPoint.x,this.endPoint.x),Math.min(this.refPoint.y,this.endPoint.y)),Math.abs(this.refPoint.x-this.endPoint.x),Math.abs(this.refPoint.y-this.endPoint.y))}draw(e){super.draw(e),e.strokeStyle=this.strokeColour,e.beginPath(),e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y)),e.lineTo(r.g2lx(this.endPoint.x),r.g2ly(this.endPoint.y)),e.lineWidth=this.lineWidth,e.stroke()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this.refPoint=r.l2g(t):this.endPoint=r.l2g(t)}}t.Line=a},"5f86":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("8c4f"));o.default.use(r.default);const a=s.__importDefault(i("e914")),l=s.__importDefault(i("1077")),c=s.__importDefault(i("cad7")),u=s.__importDefault(i("47f7")),d=s.__importDefault(i("c6b4")),h=s.__importDefault(i("07f5")),f=s.__importDefault(i("ce87")),p=i("cc67");t.router=new r.default({mode:"history",base:"/",routes:[{path:"/",redirect:"/dashboard"},{path:"/_load",name:"load",component:u.default},{path:"/assets",component:a.default,meta:{auth:!0}},{path:"/auth",component:{template:""},children:[{path:"login",component:l.default},{path:"logout",component:c.default}]},{path:"/invite/:code",component:f.default,meta:{auth:!0}},{path:"/dashboard",component:d.default,meta:{auth:!0}},{path:"/game/:creator/:room",component:h.default,meta:{auth:!0}}]}),t.router.beforeEach((e,i,s)=>{p.coreStore.initialized||"/_load"===e.path?e.matched.some(e=>e.meta.auth)&&!p.coreStore.authenticated?s({path:"/auth/login",query:{redirect:e.path}}):s():(s({path:"/_load"}),n.default.get("/api/auth").then(i=>{i.data.auth&&(p.coreStore.setAuthenticated(!0),p.coreStore.setUsername(i.data.username)),p.coreStore.setInitialized(!0),t.router.push(e.path)}).catch(()=>{console.error("Authentication check could not be fulfilled.")}))})},"5fa9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9"));let r=class extends n.default{constructor(){super(...arguments),this.name="",this.selected=!1,this.active=!1}get detailRight(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2;return`${window.innerWidth-Math.min(window.innerWidth-25,t+75)}px`}get detailArrow(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2,i=Math.min(window.innerWidth-25,t+75);return`${i-t-14}px`}created(){this.$parent.$on("mousedown",(e,t)=>{t===this.name&&this.onMouseDown(e)}),this.$parent.$on("mouseup",(e,t)=>{t===this.name&&this.onMouseUp(e)}),this.$parent.$on("mousemove",(e,t)=>{t===this.name&&this.onMouseMove(e)}),this.$parent.$on("contextmenu",(e,t)=>{t===this.name&&this.onContextMenu(e)}),this.$parent.$on("tools-select-change",(e,t)=>{t===this.name?(this.selected=!1,this.onDeselect()):e===this.name&&(this.selected=!0,this.onSelect())})}onSelect(){}onDeselect(){}onMouseDown(e){}onMouseUp(e){}onMouseMove(e){}onContextMenu(e){}};r=s.__decorate([o.default],r),t.default=r},"602f":function(e,t,i){},6100:function(e,t,i){"use strict";i.r(t);var s=i("f3c9"),n=i("e94f");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("a5a4");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"cf33581e",null);a.options.__file="tools.vue",t["default"]=a.exports},6465:function(e,t,i){"use strict";i.r(t);var s=i("5fa9"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"64a9":function(e,t,i){},6542:function(e,t,i){},"6c30":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("c266"),n=i("f10f"),o=i("92b1");class r extends s.BaseRect{constructor(e,t,i,s,n){super(t,i,s,void 0,void 0,n),this.type="assetrect",this.src="",this.img=e}asDict(){return Object.assign(this.getBaseDict(),{src:this.src})}fromDict(e){super.fromDict(e),this.src=e.src}draw(e){super.draw(e);try{e.drawImage(this.img,o.g2lx(this.refPoint.x),o.g2ly(this.refPoint.y),o.g2lz(this.w),o.g2lz(this.h))}catch(t){console.warn(`Shape ${this.uuid} could not load the image ${this.src}`)}}getInitiativeRepr(){return{uuid:this.uuid,visible:!n.gameStore.IS_DM,group:!1,source:this.src,has_img:!0,effects:[],index:1/0}}}t.Asset=r},"6e4a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("98ef"),n=i("4aee");class o{constructor(){this.tds=new s.TDS}insertConstraint(e,t){const i=this.insert(e),s=this.insert(t);i!==s&&this.insertConstraintV(i,s)}insertConstraintV(e,t){const i=[[e,t]];while(i.length>0){const e=i.pop(),t=n.edgeInfo(e[0],e[1]);if(t.includes){this.markConstraint(t.fr,t.i),t.vi!==e[1]&&i.push([t.vi,e[1]]);continue}const s=this.findIntersectedFaces(e[0],e[1]);s.found?s.vi!==e[0]&&s.vi!==e[1]?(i.push([e[0],s.vi]),i.push([s.vi,e[1]])):i.push(e):(this.triangulateHole(s.intersectedFaces,s.listAB,s.listBA),s.vi!==e[1]&&i.push([s.vi,e[1]]))}}triangulateHole(e,t,i){const s=[];this.triangulateHole2(e,t,i,s),this.propagatingFlipE(s)}triangulateHole2(e,t,i,s){if(t.length>0){this.triangulateHalfHole(t,s),this.triangulateHalfHole(i,s);const n=t[0][0],o=i[0][0];n.neighbours[2]=o,o.neighbours[2]=n,n.constraints[2]=!0,o.constraints[2]=!0;while(e.length>0)this.tds.deleteTriangle(e.shift())}}triangulateHalfHole(e,t){let i,o,r=0;const a=()=>e[r],l=()=>e[i],c=a()[0].vertices[n.ccw(a()[1])];let u,d,h,f,p,g;i=r,++i;do{d=a()[0],p=a()[1],null!==d.neighbours[p]&&(u=d.neighbours[p],f=n.cw(u.indexV(d.vertices[n.cw(p)])),d=u.neighbours[f],p=this.tds.mirrorIndex(u,f)),h=l()[0],g=l()[1],null!==h.neighbours[g]&&(u=h.neighbours[g],f=n.cw(u.indexV(h.vertices[n.cw(g)])),h=u.neighbours[f],g=this.tds.mirrorIndex(u,f));const v=d.vertices[n.ccw(p)],m=d.vertices[n.cw(p)],y=h.vertices[n.cw(g)],b=n.orientation(v.point,m.point,y.point);switch(b){case s.Sign.RIGHT_TURN:{const s=this.tds.createTriangle(v,y,m,null,null,null);t.push([s,2]),s.neighbours[1]=d,s.neighbours[0]=h,d.neighbours[p]=s,h.neighbours[g]=s,d.isConstrained(p)&&(s.constraints[1]=!0),h.isConstrained(g)&&(s.constraints[0]=!0),v.triangle=s,m.triangle=s,y.triangle=s,o=r+1,e.splice(r,0,[s,2]),e.splice(Math.max(o,i),1),e.splice(Math.min(o,i),1),i=r,v!==c?--r:++i;break}case s.Sign.LEFT_TURN:case s.Sign.COLLINEAR:++r,++i;break}}while(i0){t=r[0][0],a=r[0][1],l=t.neighbours[a],c=this.tds.mirrorIndex(t,a),u=[t,a],r.splice(r.findIndex(e=>e[0]===u[0]&&e[1]===u[1]),1),d[0]=[t,n.cw(a)],d[1]=[t,n.ccw(a)],d[2]=[l,n.cw(c)],d[3]=[l,n.ccw(c)];for(const e of d){const t=e[0],i=e[1];s=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,s)?r.splice(r.findIndex(t=>t[0]===e[0]&&t[1]===e[1]),1):r.splice(r.findIndex(e=>e[0]===s[0]&&e[1]===s[1]),1)}this.flip(t,a);for(const e of d){const t=e[0],i=e[1];this.isFlipable(t,i)&&(s=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,s)?r.push(e):r.push(s))}}}flip(e,t){const i=e.neighbours[t],s=this.tds.mirrorIndex(e,t),o=e.neighbours[n.cw(t)],r=this.tds.mirrorIndex(e,n.cw(t)),a=e.neighbours[n.ccw(t)],l=this.tds.mirrorIndex(e,n.ccw(t)),c=i.neighbours[n.cw(s)],u=this.tds.mirrorIndex(i,n.cw(s)),d=i.neighbours[n.ccw(s)],h=this.tds.mirrorIndex(i,n.ccw(s));this.tds.flip(e,t),e.constraints[e.indexT(i)]=!1,i.constraints[i.indexT(e)]=!1,o.neighbours[r].constraints[this.tds.mirrorIndex(o,r)]=o.constraints[r],a.neighbours[l].constraints[this.tds.mirrorIndex(a,l)]=a.constraints[l],c.neighbours[u].constraints[this.tds.mirrorIndex(c,u)]=c.constraints[u],d.neighbours[h].constraints[this.tds.mirrorIndex(d,h)]=d.constraints[h]}isFlipable(e,t,i=!0){const o=e.neighbours[t];return!e.isInfinite()&&!o.isInfinite()&&(!e.constraints[t]&&n.sideOfOrientedCircle(o,e.vertices[t].point,i)===s.Sign.ON_POSITIVE_SIDE)}insertb(e,t,i,o){let r,a,l=!1;i===s.LocateType.EDGE&&t.isConstrained(o)&&(l=!0,r=t.vertices[n.ccw(o)],a=t.vertices[n.cw(o)]);const c=this.insertc(e,t,i,o);return l?this.updateConstraintsIncident(c,r,a):i!==s.LocateType.VERTEX&&this.clearConstraintsIncident(c),2===this.tds.dimension&&this.updateConstraintsOpposite(c),c}updateConstraintsIncident(e,t,i){if(0!==this.tds.dimension)if(1===this.tds.dimension){const t=new s.EdgeCirculator(e,null);do{t.t.constraints[2]=!0}while(t.next())}else{const o=new s.FaceCirculator(e,null);do{const s=o.t.indexV(e),r=n.cw(s),a=n.ccw(s);o.t.vertices[r]===t||o.t.vertices[r]===i?(o.t.constraints[a]=!0,o.t.constraints[r]=!1):(o.t.constraints[a]=!1,o.t.constraints[r]=!0)}while(o.next())}}clearConstraintsIncident(e){const t=new s.EdgeCirculator(e,null);if(t.valid)do{const e=t.t,i=t.ri;e.constraints[i]=!1,2===this.tds.dimension&&(e.neighbours[i].constraints[this.tds.mirrorIndex(e,i)]=!1)}while(t.next())}insertc(e,t,i,n){if(1===this.tds.vertices.length)return this.insertFirst(e);if(2===this.tds.vertices.length)return i===s.LocateType.VERTEX?this.tds.finiteVertex:this.insertSecond(e);switch(i){case s.LocateType.VERTEX:return t.vertices[n];case s.LocateType.OUTSIDE_AFFINE_HULL:return this.insertOutsideAffineHull(e);case s.LocateType.OUTSIDE_CONVEX_HULL:return this.insertOutsideConvexHull(e,t);case s.LocateType.EDGE:return this.insertInEdge(e,t,n);case s.LocateType.FACE:return this.insertInFace(e,t)}throw new Error("qwe")}insertInEdge(e,t,i){const s=this.tds.insertInEdge(t,i);return s.point=e,s}insertInFace(e,t){const i=this.tds.insertInFace(t);return i.point=e,i}insertFirst(e){const t=this.tds.insertDimUp();return t.point=e,t}insertSecond(e){const t=this.tds.insertDimUp(this.tds._infinite,!0);return t.point=e,t}insertOutsideAffineHull(e){let t=!1;if(1===this.tds.dimension){const i=this.tds.finiteEdge.first,o=n.orientation(i.vertices[0].point,i.vertices[1].point,e);t=o===s.Sign.COUNTERCLOCKWISE}const i=this.tds.insertDimUp(this.tds._infinite,t);return i.point=e,i}insertOutsideConvexHull(e,t){let i;if(1===this.tds.dimension)throw new Error("sdfasdasd");return i=this.insertOutsideConvexHull2(e,t),i.point=e,i}insertOutsideConvexHull2(e,t){let i=t.indexV(this.tds._infinite);const o=[],r=[];let a=new s.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.prev(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[n.ccw(i)].point,r=a.t.vertices[n.cw(i)].point;n.orientation(e,t,r)===s.Sign.LEFT_TURN?o.push(a.t):l=!0}a=new s.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.next(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[n.ccw(i)].point,o=a.t.vertices[n.cw(i)].point;n.orientation(e,t,o)===s.Sign.LEFT_TURN?r.push(a.t):l=!0}const c=this.tds.insertInFace(t);let u;c.point=e;while(o.length>0)u=o[0],i=n.ccw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),o.shift();while(r.length>0)u=r[0],i=n.cw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),r.shift();a=new s.FaceCirculator(c,null);while(!a.t.isInfinite())a.next();return this.tds._infinite.triangle=a.t,c}locate(e,t){let i=0,o=0;if(this.tds.dimension<0)return i=s.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(0===this.tds.dimension)return i=n.xyEqual(e,this.tds.finiteVertex.triangle.vertices[0].point)?s.LocateType.VERTEX:s.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(1===this.tds.dimension)return this.marchLocate1D(e);if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);return this.marchLocate2D(t,e)}marchLocate1D(e){const t=this.tds._infinite.triangle,i=t.indexV(this.tds._infinite),o=t.neighbours[i],r=n.orientation(o.vertices[0].point,o.vertices[1].point,e);if(r===s.Sign.RIGHT_TURN||r===s.Sign.LEFT_TURN)return{loc:new s.Triangle,lt:s.LocateType.OUTSIDE_AFFINE_HULL,li:4};const a=o.indexT(t);if(n.collinearBetween(e,o.vertices[1-a].point,o.vertices[a].point))return{loc:t,lt:s.LocateType.OUTSIDE_CONVEX_HULL,li:i};if(n.xyEqual(e,o.vertices[1-a].point))return{loc:o,lt:s.LocateType.VERTEX,li:1-a};throw new Error("sdfsdf")}marchLocate2D(e,t){let i,o,r=null,a=!0;while(1){if(e.isInfinite())return{loc:e,lt:s.LocateType.OUTSIDE_CONVEX_HULL,li:e.indexV(this.tds._infinite)};const l=0,c=e.vertices[0].point,u=e.vertices[1].point,d=e.vertices[2].point;let h,f,p;if(a){if(r=e,a=!1,h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}}else if(l)if(e.neighbours[0]===r){if(r=e,h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}if(p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}f=s.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}if(h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}p=s.Sign.POSITIVE}else{if(r=e,p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}if(f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}h=s.Sign.POSITIVE}else if(e.neighbours[0]===r){if(r=e,p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}if(h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}f=s.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,h=n.orientation(c,u,t),h===s.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}p=s.Sign.POSITIVE}else{if(r=e,f=n.orientation(u,d,t),f===s.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=n.orientation(d,c,t),p===s.Sign.NEGATIVE){e=e.neighbours[1];continue}h=s.Sign.POSITIVE}const g=(h===s.Sign.COLLINEAR?1:0)+(f===s.Sign.COLLINEAR?1:0)+(p===s.Sign.COLLINEAR?1:0);switch(g){case 0:i=s.LocateType.FACE,o=4;break;case 1:i=s.LocateType.EDGE,o=h===s.Sign.COLLINEAR?2:f===s.Sign.COLLINEAR?0:1;break;case 2:i=s.LocateType.VERTEX,o=h!==s.Sign.COLLINEAR?2:f!==s.Sign.COLLINEAR?0:1;break}if(void 0===i||void 0===o)throw new Error("ert");return{loc:e,lt:i,li:o}}}iLocate(e,t){if(this.tds.dimension<2)return t;if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);let i=null,s=t,o=!0,r=2500;while(1){if(!r--)return s;if(s.isInfinite())return s;const t=s.vertices[0].point,a=s.vertices[1].point,l=s.vertices[2].point;if(o){if(i=s,o=!1,n.hasInexactNegativeOrientation(t,a,e)){s=s.neighbours[2];continue}if(n.hasInexactNegativeOrientation(a,l,e)){s=s.neighbours[0];continue}if(n.hasInexactNegativeOrientation(l,t,e)){s=s.neighbours[1];continue}}else if(s.neighbours[0]===i){if(i=s,n.hasInexactNegativeOrientation(t,a,e)){s=s.neighbours[2];continue}if(n.hasInexactNegativeOrientation(l,t,e)){s=s.neighbours[1];continue}}else if(s.neighbours[1]===i){if(i=s,n.hasInexactNegativeOrientation(t,a,e)){s=s.neighbours[2];continue}if(n.hasInexactNegativeOrientation(a,l,e)){s=s.neighbours[0];continue}}else{if(i=s,n.hasInexactNegativeOrientation(l,t,e)){s=s.neighbours[1];continue}if(n.hasInexactNegativeOrientation(a,l,e)){s=s.neighbours[0];continue}}break}return s}}t.CDT=o},"6f8d":function(e,t,i){"use strict";i.r(t);var s=i("5b69"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"6f92":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("6c30"),o=i("f10f"),r=i("92b1");class a{constructor(){this.layers=[],this.width=window.innerWidth,this.height=window.innerHeight,this.UUIDMap=new Map,this.interval=30,this.drawLoop=(()=>{for(let e=this.layers.length-1;e>=0;e--)this.layers[e].draw();requestAnimationFrame(this.drawLoop)}),requestAnimationFrame(this.drawLoop)}reset(){this.layers=[],this.UUIDMap=new Map}setWidth(e){this.width=e;for(const t of this.layers)t.canvas.width=e,t.width=e}setHeight(e){this.height=e;for(const t of this.layers)t.canvas.height=e,t.height=e}addLayer(e){this.layers.push(e),(o.gameStore.IS_DM||e.playerEditable)&&e.selectable&&o.gameStore.addLayer(e.name)}hasLayer(e){return this.layers.some(t=>t.name===e)}getLayer(e){e=void 0===e?o.gameStore.selectedLayer:e;for(const t of this.layers)if(t.name===e)return t}selectLayer(e,t=!0){let i=!1;for(const s of this.layers)s.selectable&&(i&&"fow"!==s.name?s.ctx.globalAlpha=.3:s.ctx.globalAlpha=1,e===s.name&&(o.gameStore.selectLayer({name:e,sync:t}),i=!0),s.clearSelection(),s.invalidate(!0))}getGridLayer(){return this.getLayer("grid")}hasSelection(){const e=this.getSelection();return void 0!==e&&e.length>0}getSelection(){const e=this.getLayer();if(void 0!==e)return e.selection}invalidate(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].invalidate(!0)}invalidateLight(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].isVisionLayer&&this.layers[e].invalidate(!0)}dropAsset(e){const t=this.getLayer();if(void 0===t||null===e||null===e.dataTransfer)return;const i=document.createElement("img");i.src=e.dataTransfer.getData("text/plain");const a=new n.Asset(i,new s.GlobalPoint(r.l2gx(e.clientX),r.l2gy(e.clientY)),r.l2gz(i.width),r.l2gz(i.height));if(a.src=new URL(i.src).pathname,o.gameStore.useGrid){const e=o.gameStore.gridSize;a.refPoint=new s.GlobalPoint(Math.round(a.refPoint.x/e)*e,Math.round(a.refPoint.y/e)*e),a.w=Math.max(Math.round(a.w/e)*e,e),a.h=Math.max(Math.round(a.h/e)*e,e)}t.addShape(a,!0)}}t.layerManager=new a,window.lm=t.layerManager},7018:function(e,t,i){"use strict";i.r(t);var s=i("ebb9"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},7420:function(e,t,i){"use strict";i.r(t);var s=i("d320"),n=i("778b");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("c969");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"73816298",null);a.options.__file="createtoken_modal.vue",t["default"]=a.exports},"76b3":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(e,t){this.children=[],this.nPrimitives=e,this.bbox=t}}t.BoundingNode=s;class n extends s{constructor(e,t,i){super(t,i),this.firstPrimOffset=e}}t.LeafNode=n;class o extends s{constructor(e,t,i){super(0,t.bbox.union(i.bbox)),this.dimension=e,this.children.push(t),this.children.push(i)}}t.InteriorNode=o},"778b":function(e,t,i){"use strict";i.r(t);var s=i("5a81"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"77a6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("4a5b"),n=i("0bc6"),o=i("2b48"),r=i("af17"),a=i("8f0a"),l=i("6f92"),c=i("206a"),u=i("f10f"),d=i("2838");function h(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement);else if("Delete"===e.key||"Del"===e.key||"Backspace"===e.key){if(void 0===l.layerManager.getLayer)return void console.log("No active layer selected for delete operation");const e=l.layerManager.getLayer();for(let t=e.selection.length-1;t>=0;t--){const i=e.selection[t];s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==i.uuid?(e.removeShape(i,!0,!1),r.EventBus.$emit("SelectionInfo.Shape.Set",null),r.EventBus.$emit("Initiative.Remove",i.uuid)):e.selection.splice(t,1)}}}function f(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)65===e.keyCode&&e.ctrlKey&&e.target.select();else if(e.keyCode>=37&&e.keyCode<=40){const t=Math.round(u.gameStore.gridSize);let i=t*(e.keyCode%2),r=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const t=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,r*=e.keyCode<=38?-1:1;let o=new a.Vector(i,r);if(!e.shiftKey||!u.gameStore.IS_DM)for(const e of t)s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(o=d.calculateDelta(o,e));for(const e of t)s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(e.refPoint=e.refPoint.add(o),n.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1}));u.gameStore.recalculateVision(),l.layerManager.getLayer().invalidate(!1)}else u.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),u.gameStore.increasePanY(r*(e.keyCode<=38?1:-1)),l.layerManager.invalidate(),o.sendClientOptions()}else if(68===e.keyCode){const e=l.layerManager.getLayer();e&&(e.clearSelection(),e.invalidate(!0))}else if("u"===e.key&&e.ctrlKey)e.preventDefault(),e.stopPropagation(),u.gameStore.toggleUI();else if("c"===e.key&&e.ctrlKey){const e=l.layerManager.getLayer();if(!e)return;if(!e.selection)return;const t=[];for(const i of e.selection)s.getRef("tools").$refs.selectTool.selectionHelper.uuid!==i.uuid&&t.push(i.asDict());u.gameStore.setClipboard(t)}else if("v"===e.key&&e.ctrlKey){const e=l.layerManager.getLayer();if(!e)return;if(!u.gameStore.clipboard)return;e.selection=[];for(const t of u.gameStore.clipboard){t.x+=10,t.y+=10,t.uuid=s.uuidv4();const i=t.trackers;t.trackers=[];for(const e of i){const i=Object.assign({},e,{uuid:s.uuidv4()});t.trackers.push(i)}const n=t.auras;t.auras=[];for(const e of n){const i=Object.assign({},e,{uuid:s.uuidv4()});t.auras.push(i)}const o=c.createShapeFromDict(t);void 0!==o&&(e.addShape(o,!0),e.selection.push(o))}1===e.selection.length?r.EventBus.$emit("SelectionInfo.Shape.Set",e.selection[0]):r.EventBus.$emit("SelectionInfo.Shape.Set",null),e.invalidate(!1)}}t.onKeyUp=h,t.onKeyDown=f},"78c7":function(e,t,i){"use strict";var s=i("9227"),n=i.n(s);n.a},7997:function(e,t,i){"use strict";var s=i("39a7"),n=i.n(s);n.a},"7aaa":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("033f")),r=s.__importDefault(i("7420")),a=s.__importDefault(i("59d8")),l=s.__importDefault(i("bea6")),c=s.__importDefault(i("dec1")),u=s.__importDefault(i("4899")),d=s.__importDefault(i("c277")),h=i("6f92"),f=i("9cb7"),p=i("f10f"),g=i("d5df"),v=i("92b1"),m=i("5a5c"),y=s.__importDefault(i("65d9"));let b=class extends n.default{constructor(){super(...arguments),this.currentTool="Select",this.tools=["Select","Pan","Draw","Ruler","Map","Filter"],this.dmTools=["Map"]}get IS_DM(){return p.gameStore.IS_DM}get currentToolComponent(){return`${this.currentTool.toLowerCase()}-tool`}get visibleTools(){return this.tools.filter(e=>!this.dmTools.includes(e)||this.IS_DM)}mousedown(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mousedown",e,t)}mouseup(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mouseup",e,t)}mousemove(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(0!==(4&e.buttons))t="Pan";else if((1&e.button)>1)return;this.$emit("mousemove",e,t);let i=!1;for(const s of p.gameStore.annotations)if(h.layerManager.UUIDMap.has(s)&&h.layerManager.hasLayer("draw")){const t=h.layerManager.UUIDMap.get(s);t.contains(v.l2g(m.getMouse(e)))&&(i=!0,f.gameManager.annotationManager.setActiveText(t.annotation))}!i&&f.gameManager.annotationManager.shown&&f.gameManager.annotationManager.setActiveText("")}mouseleave(e){0!==(1&e.buttons)&&this.$emit("mouseup",e,this.currentTool)}contextmenu(e){"CANVAS"===e.target.tagName&&2===e.button&&"CANVAS"===e.target.tagName&&this.$emit("contextmenu",e,this.currentTool)}};b=s.__decorate([y.default({components:{"select-tool":d.default,"pan-tool":u.default,"draw-tool":a.default,"ruler-tool":g.RulerTool,"map-tool":c.default,"filter-tool":l.default,"shape-menu":o.default,"createtoken-dialog":r.default},watch:{currentTool(e,t){this.$emit("tools-select-change",e,t)}}})],b),t.default=b},"7ba5":function(e,t,i){"use strict";i.r(t);var s=i("fbdd"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"7e15":function(e,t,i){"use strict";i.r(t);var s=i("52a8"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"7f1e":function(e,t,i){"use strict";var s=i("fe11"),n=i.n(s);n.a},"851c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f"));let a=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.question="",this.answer="",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}submit(){this.resolve(this.answer),this.close()}close(){this.reject(),this.visible=!1,this.question="",this.answer="",this.title=""}prompt(e,t){return this.question=e,this.title=t,this.visible=!0,this.$nextTick(()=>{this.$refs.answer.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=s.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},8790:function(e,t,i){"use strict";var s=i("a912"),n=i.n(s);n.a},"88af":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e._v(e._s(e.message))])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"8cd4":function(e,t,i){"use strict";i.r(t);var s=i("9587"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},"8db6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("92b1");class o{constructor(e,t,i){this.w=t,this.h=i,this.topLeft=e,this.topRight=new s.GlobalPoint(e.x+t,e.y),this.botRight=new s.GlobalPoint(e.x+t,e.y+i),this.botLeft=new s.GlobalPoint(e.x,e.y+i)}contains(e){return this.topLeft.x<=e.x&&this.topRight.x>=e.x&&this.topLeft.y<=e.y&&this.botLeft.y>=e.y}get points(){return 0===this.w||0===this.h?[[this.topLeft.x,this.topLeft.y]]:[[this.topLeft.x,this.topLeft.y],[this.botLeft.x,this.botLeft.y],[this.botRight.x,this.botRight.y],[this.topRight.x,this.topRight.y]]}offset(e){return new o(this.topLeft.add(e),this.w,this.h)}union(e){const t=Math.min(this.topLeft.x,e.topLeft.x),i=Math.max(this.topRight.x,e.topRight.x),n=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new o(new s.GlobalPoint(t,n),i-t,r-n)}getDiagCorner(e){return e?this.botRight:this.topLeft}intersectsWith(e){return!(e.topLeft.x>this.topRight.x||e.topRight.xthis.botLeft.y||e.botLeft.y=this.topRight.x||e.topRight.x<=this.topLeft.x||e.topLeft.y>=this.botLeft.y||e.botLeft.y<=this.topLeft.y)}intersectP(e,t,i){let s=t.x*(this.getDiagCorner(i[0]).x-e.origin.x),n=t.x*(this.getDiagCorner(!i[0]).x-e.origin.x);const o=t.y*(this.getDiagCorner(i[1]).y-e.origin.y),r=t.y*(this.getDiagCorner(!i[1]).y-e.origin.y);return s>r||o>n?{hit:!1,min:s,max:n}:(o>s&&(s=o),r0,min:s,max:n})}center(){return this.topLeft.add(new s.Vector(this.w/2,this.h/2))}getMaxExtent(){return this.w>this.h?0:1}visibleInCanvas(e){const t=!(n.g2lx(this.topLeft.x)>e.width||n.g2ly(this.topLeft.y)>e.height||n.g2lx(this.topRight.x)<0||n.g2ly(this.botRight.y)<0);return!!t}}t.BoundingRect=o},"8e60":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"formcontainer"}},[e.owned||e.joined?i("form",[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("Your sessions")]),i("div",{staticClass:"input"},[e._l(e.owned,function(t,s){return i("router-link",{key:"o-"+s,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[0]))])}),e._l(e.joined,function(t,s){return i("router-link",{key:"j-"+s,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[1])+"/"+e._s(t[0]))])})],2),0===e.owned.length?i("div",{staticClass:"input"},[e._v("No active sessions")]):e._e()])]):e._e(),e._m(0),i("form",{on:{submit:function(t){return t.preventDefault(),e.createRoom(t)}}},[i("fieldset",[e.owned||e.joined?i("div",{staticClass:"input"},[e._v("Create a new session")]):i("legend",{staticClass:"legend"},[e._v("Create a session")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newSessionName,expression:"newSessionName"}],attrs:{type:"text",name:"room_name",placeholder:"Session Name"},domProps:{value:e.newSessionName},on:{input:function(t){t.target.composing||(e.newSessionName=t.target.value)}}}),e._m(1)]),e._m(2)])]),i("div",{attrs:{id:"account-options"}},[i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Account Settings",to:"/account"}},[i("i",{staticClass:"fas fa-cog"})])],1),i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Logout",to:"/auth/logout"}},[i("i",{staticClass:"fas fa-sign-out-alt"})])],1)])])},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("h4",[i("span",[e._v("OR")])])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fab fa-d-and-d"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",title:"Create"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"8f0a":function(e,t,i){"use strict";function s(e,t){const i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}Object.defineProperty(t,"__esModule",{value:!0}),t.getPointDistance=s;class n{constructor(e,t){this.x=e,this.y=t}static fromArray(e){return new n(e[0],e[1])}add(e){return new n(this.x+e.x,this.y+e.y)}subtract(e){return new a(this.x-e.x,this.y-e.y)}clone(){return new n(this.x,this.y)}get(e){return 0===e?this.x:this.y}asArray(){return[this.x,this.y]}}t.Point=n;class o extends n{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}static fromArray(e){return new o(e[0],e[1])}}t.GlobalPoint=o;class r extends n{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}t.LocalPoint=r;class a{constructor(e,t){this.x=e,this.y=t}dot(e){return this.x*e.x+this.y*e.y}inverse(){return new a(0===this.x?0:1/this.x,0===this.y?0:1/this.y)}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}normalize(){const e=this.length();return new a(this.x/e,this.y/e)}reverse(){return new a(-this.x,-this.y)}multiply(e){return new a(this.x*e,this.y*e)}angle(){return 180*Math.atan2(this.y,this.x)/Math.PI}}t.Vector=a;class l{constructor(e,t,i){this.direction=t,this.origin=e,void 0===i&&(i=1/0),this.tMax=i}static fromPoints(e,t){const i=new a(t.x-e.x,t.y-e.y);let s;return s=Math.abs(i.x)>.01?(t.x-e.x)/i.x:(t.y-e.y)/i.y,new l(e,i,s)}get(e){return new n(this.origin.x+e*this.direction.x,this.origin.y+e*this.direction.y)}getDistance(e,t){return Math.sqrt(Math.pow(t-e,2)*(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}getT(e,t){return e+Math.sqrt(Math.pow(t,2)/(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}}t.Ray=l},"8f54":function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ul",[e._l(e.folders,function(t){return i("li",{key:t,staticClass:"folder",on:{click:function(t){return t.stopPropagation(),e.toggle(t)}}},[e._v("\n "+e._s(t)+"\n "),i("asset-node",{attrs:{asset:e.asset[t]}})],1)}),e._l(e.files,function(t){return i("li",{key:t.name,staticClass:"file draggable token",attrs:{draggable:"true"},on:{mouseover:function(i){e.showImage=t.hash},mouseout:function(t){e.showImage=null},dragstart:function(i){e.dragStart(i,"/static/assets/"+t.hash)}}},[e._v("\n "+e._s(t.name)+"\n "),e.showImage==t.hash?i("div",{staticClass:"preview"},[i("img",{staticClass:"asset-preview-image",attrs:{src:"/static/assets/"+t.hash}})]):e._e()])})],2)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},9104:function(e,t,i){"use strict";var s=i("afd3"),n=i.n(s);n.a},"919a":function(e,t,i){},"91df":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("6f79"));i("fe80");const a=i("2ef0"),l=s.__importDefault(i("a535")),c=s.__importDefault(i("cec2")),u=s.__importDefault(i("f5fe")),d=s.__importDefault(i("f74c")),h=s.__importDefault(i("19f9")),f=s.__importDefault(i("f551")),p=s.__importDefault(i("f086")),g=s.__importDefault(i("6100")),v=i("0bc6"),m=i("77a6"),y=i("bb17"),b=i("6f92"),_=i("f10f"),w=i("92b1"),S=i("8f0a");let x=class extends n.default{constructor(){super(...arguments),this.ready={manager:!1,tools:!1}}get showUI(){return _.gameStore.showUI}get IS_DM(){return _.gameStore.IS_DM}get layers(){return _.gameStore.layers}get selectedLayer(){return _.gameStore.selectedLayer}get zoomDisplay(){return _.gameStore.zoomDisplay}set zoomDisplay(e){_.gameStore.updateZoom({newZoomDisplay:e,zoomLocation:w.l2g(new S.LocalPoint(window.innerWidth/2,window.innerHeight/2))})}mounted(){window.addEventListener("resize",this.resizeWindow),window.addEventListener("keyup",m.onKeyUp),window.addEventListener("keydown",m.onKeyDown),this.ready.manager=!0}destroyed(){window.removeEventListener("resize",this.resizeWindow),window.removeEventListener("keyup",m.onKeyUp),window.removeEventListener("keydown",m.onKeyDown),this.ready.manager=!1}zoom(e){a.throttle(y.scrollZoom)(e)}resizeWindow(){b.layerManager.setWidth(window.innerWidth),b.layerManager.setHeight(window.innerHeight),b.layerManager.invalidate()}mousedown(e){this.$refs.tools.mousedown(e)}mouseup(e){this.$refs.tools.mouseup(e)}mousemove(e){this.$refs.tools.mousemove(e)}mouseleave(e){this.$refs.tools.mouseleave(e)}contextmenu(e){this.$refs.tools.contextmenu(e)}selectLayer(e){b.layerManager.selectLayer(e)}drop(e){if(null!==e&&null!==e.dataTransfer)if(e.dataTransfer.files.length>0)this.$refs.confirm.open("Uploading files should be done through the asset manager.","Ok","").then(()=>{},()=>{});else{if(""===e.dataTransfer.getData("text/plain"))return;b.layerManager.dropAsset(e)}}};x=s.__decorate([o.default({components:{"tool-bar":g.default,"selection-info":p.default,"prompt-dialog":c.default,"confirm-dialog":l.default,"menu-bar":h.default,"initiative-dialog":u.default,"zoom-slider":r.default,"note-dialog":f.default,"label-dialog":d.default},beforeRouteEnter(e,t,i){v.createConnection(e),i()},beforeRouteLeave(e,t,i){v.socket.disconnect(),i()}})],x),t.default=x},9227:function(e,t,i){},"92b1":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("f10f");function o(e){const t=n.gameStore.zoomFactor,i=n.gameStore.panX,o=n.gameStore.panY;return new s.LocalPoint((e.x+i)*t,(e.y+o)*t)}function r(e){return o(new s.GlobalPoint(e,0)).x}function a(e){return o(new s.GlobalPoint(0,e)).y}function l(e){return e*n.gameStore.zoomFactor}function c(e){return e/n.gameStore.unitSize*n.gameStore.gridSize}function u(e){return l(c(e))}function d(e){const t=n.gameStore.zoomFactor,i=n.gameStore.panX,o=n.gameStore.panY;return e instanceof s.LocalPoint?new s.GlobalPoint(e.x/t-i,e.y/t-o):new s.Ray(d(e.origin),e.direction.multiply(1/t),e.tMax)}function h(e){return d(new s.LocalPoint(e,0)).x}function f(e){return d(new s.LocalPoint(0,e)).y}function p(e){return e/n.gameStore.zoomFactor}function g(e){return p(c(e))}t.g2l=o,t.g2lx=r,t.g2ly=a,t.g2lz=l,t.getUnitDistance=c,t.g2lr=u,t.l2g=d,t.l2gx=h,t.l2gy=f,t.l2gz=p,t.l2gr=g,window.g2lx=r,window.g2ly=a},9587:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=i("2f62"),a=s.__importDefault(i("3b36")),l=s.__importDefault(i("0ddd")),c=i("4a5b"),u=i("0bc6"),d=i("6f92"),h=i("f10f");let f=class extends n.default{constructor(){super(...arguments),this.visible={settings:!1,locations:!1}}get useGrid(){return h.gameStore.useGrid}set useGrid(e){h.gameStore.setUseGrid({useGrid:e,sync:!0})}get fullFOW(){return h.gameStore.fullFOW}set fullFOW(e){h.gameStore.setFullFOW({fullFOW:e,sync:!0})}get fowOpacity(){return h.gameStore.fowOpacity}set fowOpacity(e){"number"===typeof e&&h.gameStore.setFOWOpacity({fowOpacity:e,sync:!0})}get fowLOS(){return h.gameStore.fowLOS}set fowLOS(e){h.gameStore.setLineOfSight({fowLOS:e,sync:!0})}get unitSize(){return h.gameStore.unitSize}set unitSize(e){"number"===typeof e&&h.gameStore.setUnitSize({unitSize:e,sync:!0})}get gridSize(){return h.gameStore.gridSize}set gridSize(e){"number"===typeof e&&h.gameStore.setGridSize({gridSize:e,sync:!0})}get gridColour(){return h.gameStore.gridColour}set gridColour(e){h.gameStore.setGridColour({colour:e,sync:!0})}get fowColour(){return h.gameStore.fowColour}set fowColour(e){h.gameStore.setFOWColour({colour:e,sync:!0})}get rulerColour(){return h.gameStore.rulerColour}set rulerColour(e){h.gameStore.setRulerColour({colour:e,sync:!0})}get visionRangeMin(){return h.gameStore.visionRangeMin}set visionRangeMin(e){"number"===typeof e&&h.gameStore.setVisionRangeMin({value:e,sync:!0})}get visionRangeMax(){return h.gameStore.visionRangeMax}set visionRangeMax(e){"number"===typeof e&&h.gameStore.setVisionRangeMax({value:e,sync:!0})}settingsClick(e){if(e.target.classList.contains("accordion")){e.target.classList.toggle("accordion-active");const t=e.target.nextElementSibling;null!==t&&(t.style.display=""===t.style.display?"block":"")}}changeLocation(e){u.socket.emit("Location.Change",e)}createLocation(){c.getRef("prompt").prompt("New location name:","Create new location").then(e=>{u.socket.emit("Location.New",e)},()=>{})}createNote(){const e={title:"New note",text:"",uuid:c.uuidv4()};h.gameStore.newNote({note:e,sync:!0}),this.openNote(e)}openNote(e){c.getRef("note").open(e)}changeVisionMode(e){const t=e.target.value.toLowerCase();"bvh"!==t&&"triangle"!==t||(h.gameStore.setVisionMode({mode:t,sync:!0}),h.gameStore.recalculateVision(),h.gameStore.recalculateMovement(),d.layerManager.invalidate())}};f=s.__decorate([o.default({components:{"color-picker":a.default,"asset-node":l.default},computed:Object.assign({},r.mapState("game",["invitationCode","IS_DM","locations","assets","notes"]))})],f),t.default=f},"979e":function(e,t,i){"use strict";i.r(t);var s=i("0634"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},9845:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.IS_DM?i("li",{on:{click:e.bringPlayers}},[e._v("Bring players")]):e._e(),i("li",{on:{click:e.createToken}},[e._v("Create basic token")]),i("li",{on:{click:e.showInitiative}},[e._v("Show initiative")])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},"98ef":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("4aee");let n;var o,r;function a(){return[t.INFINITE,t.INFINITE]}t.INFINITE=-Infinity,function(e){e[e["NEGATIVE"]=-1]="NEGATIVE",e[e["ZERO"]=0]="ZERO",e[e["POSITIVE"]=1]="POSITIVE",e[e["RIGHT_TURN"]=-1]="RIGHT_TURN",e[e["LEFT_TURN"]=1]="LEFT_TURN",e[e["SMALLER"]=-1]="SMALLER",e[e["EQUAL"]=0]="EQUAL",e[e["LARGER"]=1]="LARGER",e[e["CLOCKWISE"]=-1]="CLOCKWISE",e[e["COUNTERCLOCKWISE"]=1]="COUNTERCLOCKWISE",e[e["COLLINEAR"]=0]="COLLINEAR",e[e["COPLANAR"]=0]="COPLANAR",e[e["DEGENERATE"]=0]="DEGENERATE",e[e["ON_NEGATIVE_SIDE"]=-1]="ON_NEGATIVE_SIDE",e[e["ON_ORIENTED_BOUNDARY"]=0]="ON_ORIENTED_BOUNDARY",e[e["ON_POSITIVE_SIDE"]=1]="ON_POSITIVE_SIDE"}(o=t.Sign||(t.Sign={})),function(e){e[e["UNDEFINED"]=-1]="UNDEFINED",e[e["VERTEX_VERTEX"]=0]="VERTEX_VERTEX",e[e["VERTEX_EDGE"]=1]="VERTEX_EDGE",e[e["EDGE_VERTEX"]=2]="EDGE_VERTEX",e[e["EDGE_EDGE"]=3]="EDGE_EDGE"}(r||(r={}));class l{constructor(...e){this.vertices=[],this.neighbours=[null,null,null],this.constraints=[!1,!1,!1],this.uid=l._counter++,this.vertices=e}from(e){return this.vertices=e.vertices.slice(0,e.vertices.length),this.neighbours=e.neighbours.slice(0,e.neighbours.length),this.constraints=e.constraints.slice(0,e.constraints.length),this}get dimension(){return this.vertices.length-1}addVertex(e){void 0===e&&console.log("UNDEFINED HIERE"),this.vertices.push(e),e.triangle=this}isConstrained(e){return this.constraints[e]}reorient(){this.vertices=[this.vertices[1],this.vertices[0],this.vertices[2]].slice(0,this.vertices.length),this.neighbours=[this.neighbours[1],this.neighbours[0],this.neighbours[2]],this.constraints=[this.constraints[1],this.constraints[0],this.constraints[2]]}indexV(e){return this.vertices.indexOf(e)}indexT(e){return this.neighbours.indexOf(e)}isInfinite(e){return void 0===e?this.vertices.includes(n):this.vertices[s.ccw(e)].infinite||this.vertices[s.cw(e)].infinite}contains(e){const t=-this.vertices[1].point[1]*this.vertices[2].point[0]+this.vertices[0].point[1]*(-this.vertices[1].point[0]+this.vertices[2].point[0])+this.vertices[0].point[0]*(this.vertices[1].point[1]-this.vertices[2].point[1])+this.vertices[1].point[0]*this.vertices[2].point[1],i=t<0?-1:1,s=(this.vertices[0].point[1]*this.vertices[2].point[0]-this.vertices[0].point[0]*this.vertices[2].point[1]+(this.vertices[2].point[1]-this.vertices[0].point[1])*e[0]+(this.vertices[0].point[0]-this.vertices[2].point[0])*e[1])*i;if(s<0)return!1;const n=(this.vertices[0].point[0]*this.vertices[1].point[1]-this.vertices[0].point[1]*this.vertices[1].point[0]+(this.vertices[0].point[1]-this.vertices[1].point[1])*e[0]+(this.vertices[1].point[0]-this.vertices[0].point[0])*e[1])*i;return n>0&&s+nt!==e)}setAdjacency(e,t,i,s){e.neighbours[t]=i,i.neighbours[s]=e}get finiteVertex(){return this.vertices[1]}get infiniteVertex(){const e=new c(a());return e.infinite=!0,e}get finiteEdge(){if(this.dimension<1)throw new Error("aspo");const e=new d(this);while(e.valid)e.next();return e.collect()}insertDimUp(e=new c,t=!0){const i=this.createVertex();let s,n;switch(this.dimension++,this.dimension){case 0:s=this.triangles[0],n=new l(i),this.triangles.push(n),this.setAdjacency(s,0,n,0),i.triangle=n;break;case 1:case 2:{const o=[],r=this.triangles.slice(0,this.triangles.length);for(const t of r){const s=(new l).from(t);this.triangles.push(s),t.vertices[this.dimension]=i,s.vertices[this.dimension]=e,this.setAdjacency(t,this.dimension,s,this.dimension),t.vertices.includes(e)&&o.push(s)}for(const e of r){const t=e.neighbours[this.dimension];for(let i=0;ie.center.center().get(r)0){if(i=!0,s=e.tMax=d.min,n=d.max,0===o||t)break;r=a[--o]}else c[u.dimension]?(a[o++]=r+1,r=u.secondChildOffset):(a[o++]=u.secondChildOffset,r++);else{if(0===o)break;r=a[--o]}}return{hit:i,intersect:e.get(s),tMin:s,tMax:n}}compact(){this.offset=0,null!==this.root&&this.flatten(this.root)}flatten(e){const t=this.offset,i=this.offset++;if(0===e.nPrimitives){this.flatten(e.children[0]);const i=this.flatten(e.children[1]);this.nodes[t]={bbox:e.bbox,dimension:e.dimension,nPrimitives:0,secondChildOffset:i}}else this.nodes[t]={bbox:e.bbox,primitivesOffset:e.firstPrimOffset,nPrimitives:e.nPrimitives};return i}createLeaf(e,t,i,s){const n=this.orderedPrims.length;for(let o=e;o1?i("li",[e._v("Layer\n "),i("ul",e._l(e.getLayers(),function(t){return i("li",{key:t.name,style:[e.getActiveLayer().name===t.name?{"background-color":"#82c8a0"}:{}],on:{click:function(i){e.setLayer(t.name)}}},[e._v(e._s(t.name))])}))]):e._e(),i("li",{on:{click:e.moveToBack}},[e._v("Move to back")]),i("li",{on:{click:e.moveToFront}},[e._v("Move to front")]),i("li",{on:{click:e.addInitiative}},[e._v(e._s(e.getInitiativeWord())+" initiative")]),i("li",{on:{click:e.openEditDialog}},[e._v("Show properties")])]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},a260:function(e,t,i){},a280:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",{attrs:{id:"accordion-container"}},e._l(e.categories,function(t){return i("accordion",{key:t,attrs:{title:t,showArrow:!1,items:e.labels[t],initialValues:e.initalValues[t]},on:{selectionupdate:e.updateSelection}})}))]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},a450:function(e,t,i){},a474:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{constructor(){super(...arguments),this.owned=[],this.joined=[],this.error="",this.newSessionName=""}beforeRouteEnter(e,t,i){n.default.get("/api/rooms").then(e=>{i(t=>{t.owned=e.data.owned,t.joined=e.data.joined})}).catch(e=>{i(t=>{t.error=e.message})})}createRoom(e){n.default.post("/api/rooms",{name:this.newSessionName}).then(e=>{this.$router.push(`/game/${a.coreStore.username}/${this.newSessionName}`)}).catch(e=>{this.error=e.message})}};l=s.__decorate([r.default],l),t.default=l},a535:function(e,t,i){"use strict";i.r(t);var s=i("e06e"),n=i("f30c");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("223d");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"1883e207",null);a.options.__file="confirm.vue",t["default"]=a.exports},a5a4:function(e,t,i){"use strict";var s=i("0b13"),n=i.n(s);n.a},a68b:function(e,t,i){"use strict";i.r(t);var s=i("308b"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},a755:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.left+"px",top:e.top+"px"},on:{close:e.close}},[i("li",{on:{click:e.rename}},[e._v("Rename")]),i("li",{on:{click:e.remove}},[e._v("Remove")])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},a7b3:function(e,t,i){"use strict";var s=i("6542"),n=i.n(s);n.a},a912:function(e,t,i){},a9a6:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Label manager")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("div",{staticClass:"grid"},[i("div",{staticClass:"header"},[i("abbr",{attrs:{title:"Category"}},[e._v("Cat.")])]),i("div",{staticClass:"header name"},[e._v("Name")]),i("div",{staticClass:"header"},[i("abbr",{attrs:{title:"Visible"}},[e._v("Vis.")])]),i("div",{staticClass:"header"},[i("abbr",{attrs:{title:"Delete"}},[e._v("Del.")])]),i("div",{staticClass:"separator spanrow",staticStyle:{margin:"0 0 7px"}}),i("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],ref:"search",staticClass:"spanrow",attrs:{type:"text",placeholder:"search"},domProps:{value:e.search},on:{input:function(t){t.target.composing||(e.search=t.target.value)}}})]),i("div",{staticClass:"grid scroll"},[e._l(e.categories,function(t){return[e._l(e.labels[t],function(t){return[i("div",{key:"row-"+t.uuid,staticClass:"row",on:{click:function(i){e.selectLabel(t.uuid)}}},[t.category?[i("div",{key:"cat-"+t.uuid},[e._v(e._s(t.category))]),i("div",{key:"name-"+t.uuid,staticClass:"name"},[e._v(e._s(t.name))])]:e._e(),t.category?e._e():[i("div",{key:"cat-"+t.uuid}),i("div",{key:"name-"+t.uuid,staticClass:"name"},[e._v(e._s(t.name))])],i("div",{key:"visible-"+t.uuid,class:{"lower-opacity":!t.visible},style:{textAlign:"center"},on:{click:function(i){i.stopPropagation(),e.toggleVisibility(t)}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{key:"delete-"+t.uuid,on:{click:function(i){i.stopPropagation(),e.deleteLabel(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})])],2)]})]}),0===e.labels.length?[i("div",{attrs:{id:"no-labels"}},[e._v("No labels exist yet")])]:e._e()],2),i("div",{staticClass:"grid"},[i("div",{staticClass:"separator spanrow"}),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.newCategory,expression:"newCategory",modifiers:{trim:!0}}],attrs:{type:"text"},domProps:{value:e.newCategory},on:{input:function(t){t.target.composing||(e.newCategory=t.target.value.trim())},blur:function(t){e.$forceUpdate()}}}),i("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.newName,expression:"newName",modifiers:{trim:!0}}],attrs:{type:"text"},domProps:{value:e.newName},on:{input:function(t){t.target.composing||(e.newName=t.target.value.trim())},blur:function(t){e.$forceUpdate()}}}),i("button",{attrs:{id:"addLabelButton"},on:{click:function(t){return t.stopPropagation(),e.addLabel(t)}}},[e._v("Add")])])])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},aa69:function(e,t,i){"use strict";i.r(t);var s=i("0cf7"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},af17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026"));t.EventBus=new n.default},afd3:function(e,t,i){},b0ac:function(e,t,i){"use strict";i.r(t);var s=i("a474"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},b0c0:function(e,t,i){},b2ed:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("c266"),n=i("f10f"),o=i("92b1"),r=i("5a5c");class a extends s.BaseRect{constructor(e,t,i,s,n,o){super(e,t,i,s,n,o),this.type="rect"}asDict(){return super.getBaseDict()}draw(e){super.draw(e),"fog"===this.fillColour?e.fillStyle=r.getFogColour():e.fillStyle=this.fillColour;const t=n.gameStore.zoomFactor,i=o.g2l(this.refPoint);e.fillRect(i.x,i.y,this.w*t,this.h*t),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.strokeStyle=this.strokeColour,e.lineWidth=5,e.strokeRect(i.x,i.y,this.w*t,this.h*t))}}t.Rect=a},b62e:function(e,t,i){"use strict";var s=i("3eaf"),n=i.n(s);n.a},b6bc:function(e,t,i){"use strict";i.r(t);var s=i("5394"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},b809:function(e,t,i){"use strict";i.r(t);var s=i("ca56"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},b906:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("bab4"),o=i("6f92"),r=i("d1ec"),a=i("f10f"),l=i("92b1"),c=i("cee3");class u extends n.Layer{constructor(){super(...arguments),this.isVisionLayer=!0}draw(){if(!this.valid){const t=this.ctx;if(!a.gameStore.fowLOS||r.Settings.skipPlayerFOW)return t.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);t.clearRect(0,0,this.canvas.width,this.canvas.height);const i=t.globalCompositeOperation;t.fillStyle="rgba(0, 0, 0, 1)",a.gameStore.IS_DM||super.draw(!a.gameStore.fullFOW);const n=t.canvas.width+t.canvas.height;for(const u of a.gameStore.ownedtokens){const i=o.layerManager.UUIDMap.get(u);if(void 0===i)continue;const d=i.center(),h=l.g2l(d);if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const o=Math.cos(i),r=Math.sin(i),c=new s.Ray(d,new s.Vector(o,r)),u=a.gameStore.BV.intersect(c);u.hit?(-1!==e&&(t.arc(h.x,h.y,n,e,i),e=-1),t.lineTo(l.g2lx(u.intersect.x),l.g2ly(u.intersect.y))):-1===e&&(t.lineTo(h.x+n*o,h.y+n*r),e=i)}-1!==e?t.arc(h.x,h.y,n,e,2*Math.PI):t.closePath(),t.fill()}else{{const e=t.createRadialGradient(h.x,h.y,l.g2lr(a.gameStore.visionRangeMin),h.x,h.y,l.g2lr(a.gameStore.visionRangeMax));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=e}try{const s=c.computeVisibility(i.center(),"vision");t.beginPath(),t.moveTo(l.g2lx(s[0][0]),l.g2ly(s[0][1]));for(const e of s)t.lineTo(l.g2lx(e[0]),l.g2ly(e[1]));t.closePath(),t.fill()}catch(e){}}}a.gameStore.IS_DM&&super.draw(!a.gameStore.fullFOW),t.globalCompositeOperation=i}}}t.FOWPlayersLayer=u},bab4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("0bc6"),n=i("af17"),o=i("6f92"),r=i("206a"),a=i("f10f"),l=i("92b1");class c{constructor(e,t){this.selectable=!1,this.playerEditable=!1,this.isVisionLayer=!1,this.valid=!1,this.shapes=[],this.selection=[],this.selectionColor="#CC0000",this.selectionWidth=2,this.canvas=e,this.name=t,this.width=e.width,this.height=e.height,this.ctx=e.getContext("2d")}invalidate(e){this.valid=!1,e||o.layerManager.invalidateLight()}addShape(e,t,i,n=!0){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(n),e.setMovementBlock(e.movementObstruction,n),e.ownedBy(a.gameStore.username)&&e.isToken&&a.gameStore.ownedtokens.push(e.uuid),e.annotation.length&&a.gameStore.annotations.push(e.uuid),t&&s.socket.emit("Shape.Add",{shape:e.asDict(),temporary:i}),n&&this.invalidate(!t)}setShapes(e){for(const t of e){const e=r.createShapeFromDict(t);if(void 0===e)return void console.log(`Shape with unknown type ${t.type_} could not be added`);this.addShape(e,!1,!1,!1)}this.clearSelection(),this.invalidate(!1)}removeShape(e,t,i){void 0===i&&(i=!1),this.shapes.splice(this.shapes.indexOf(e),1),t&&s.socket.emit("Shape.Remove",{shape:e.asDict(),temporary:i});const n=a.gameStore.visionSources.findIndex(t=>t.shape===e.uuid),r=a.gameStore.visionBlockers.findIndex(t=>t===e.uuid),l=a.gameStore.movementblockers.findIndex(t=>t===e.uuid),c=a.gameStore.annotations.findIndex(t=>t===e.uuid);n>=0&&a.gameStore.visionSources.splice(n,1),r>=0&&a.gameStore.visionBlockers.splice(r,1),l>=0&&a.gameStore.movementblockers.splice(l,1),c>=0&&a.gameStore.annotations.splice(c,1);const u=a.gameStore.annotations.indexOf(e.uuid);u>=0&&a.gameStore.annotations.splice(u,1);const d=a.gameStore.ownedtokens.indexOf(e.uuid);d>=0&&a.gameStore.ownedtokens.splice(d,1),o.layerManager.UUIDMap.delete(e.uuid);const h=this.selection.indexOf(e);h>=0&&this.selection.splice(h,1),r>=0&&a.gameStore.recalculateVision(),l>=0&&a.gameStore.recalculateMovement(),this.invalidate(!t)}clear(){this.ctx.clearRect(0,0,this.width,this.height)}clearSelection(){this.selection=[],n.EventBus.$emit("SelectionInfo.Shape.Set",null)}draw(e){if(!this.valid){const t=this.ctx,i=t.globalCompositeOperation;e=void 0===e||e,e&&this.clear();const s=this;if(this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(s.canvas)&&("fow"===s.name&&e.visionObstruction&&o.layerManager.getLayer().name!==s.name||e.drawAuras(t))}),this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||0===e.labels.length&&a.gameStore.filterNoLabel||e.labels.length&&a.gameStore.labelFilters.length&&!e.labels.some(e=>a.gameStore.labelFilters.includes(e.uuid))||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(s.canvas)&&("fow"===s.name&&e.visionObstruction&&o.layerManager.getLayer().name!==s.name||e.draw(t))}),null!=this.selection){t.fillStyle=this.selectionColor,t.strokeStyle=this.selectionColor,t.lineWidth=this.selectionWidth;const e=a.gameStore.zoomFactor;this.selection.forEach(i=>{t.globalCompositeOperation=i.globalCompositeOperation;const s=i.getBoundingBox();t.strokeRect(l.g2lx(s.topLeft.x),l.g2ly(s.topLeft.y),s.w*e,s.h*e);for(const e of i.points)t.beginPath(),t.arc(l.g2lx(e[0]),l.g2ly(e[1]),3,0,2*Math.PI),t.fill();t.beginPath(),t.moveTo(l.g2lx(i.points[0][0]),l.g2ly(i.points[0][1]));for(let e=1;e<=i.points.length;e++){const s=i.points[e%i.points.length];t.lineTo(l.g2lx(s[0]),l.g2ly(s[1]))}t.stroke()})}t.globalCompositeOperation=i,this.valid=!0}}moveShapeOrder(e,t,i){const n=this.shapes.indexOf(e);n!==t&&(this.shapes.splice(n,1),this.shapes.splice(t,0,e),i&&s.socket.emit("Shape.Order.Set",{shape:e.asDict(),index:t}),this.invalidate(!0))}}t.Layer=c},bb17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("f10f"),n=i("92b1"),o=i("5a5c");function r(e){if(!e.target||!e.target.tagName||"CANVAS"!==e.target.tagName)return;let t;t=-1*Math.sign(e.deltaY),s.gameStore.updateZoom({newZoomDisplay:s.gameStore.zoomDisplay-.1*t,zoomLocation:n.l2g(o.getMouse(e))})}t.scrollZoom=r},bea6:function(e,t,i){"use strict";i.r(t);var s=i("a280"),n=i("b6bc");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("e3f5"),i("e037");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"847e7ec4",null);a.options.__file="filter.vue",t["default"]=a.exports},bf44:function(e,t,i){},c1e0:function(e,t,i){},c242:function(e,t,i){"use strict";var s=i("bf44"),n=i.n(s);n.a},c266:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1");class c extends o.Shape{constructor(e,t,i,s,n,o){super(e,s,n,o),this.w=t,this.h=i}getBaseDict(){return Object.assign(super.getBaseDict(),{width:this.w,height:this.h})}getBoundingBox(){return new n.BoundingRect(this.refPoint,this.w,this.h)}get points(){if(0===this.w||0===this.h)return[[this.refPoint.x,this.refPoint.y]];const e=this.refPoint.add(new s.Vector(0,this.h)),t=this.refPoint.add(new s.Vector(this.w,this.h)),i=this.refPoint.add(new s.Vector(this.w,0));return[[this.refPoint.x,this.refPoint.y],[e.x,e.y],[t.x,t.y],[i.x,i.y]]}contains(e){return this.refPoint.x<=e.x&&this.refPoint.x+this.w>=e.x&&this.refPoint.y<=e.y&&this.refPoint.y+this.h>=e.y}center(e){if(void 0===e)return this.refPoint.add(new s.Vector(this.w/2,this.h/2));this.refPoint=new s.GlobalPoint(e.x-this.w/2,e.y-this.h/2)}visibleInCanvas(e){if(super.visibleInCanvas(e))return!0;const t=!(l.g2lx(this.refPoint.x)>e.width||l.g2ly(this.refPoint.y)>e.height||l.g2lx(this.refPoint.x+this.w)<0||l.g2ly(this.refPoint.y+this.h)<0);return!!t}snapToGrid(){const e=r.gameStore.gridSize,t=this.center(),i=t.x,n=t.y;let o,l;o=this.w/e%2===0?Math.round(i/e)*e-this.w/2:(Math.round((i+e/2)/e)-.5)*e-this.w/2,l=this.h/e%2===0?Math.round(n/e)*e-this.h/2:(Math.round((n+e/2)/e)-.5)*e-this.h/2;const c=a.calculateDelta(new s.Vector(o-this.refPoint.x,l-this.refPoint.y),this);this.refPoint=this.refPoint.add(c),this.invalidate(!1)}resizeToGrid(){const e=r.gameStore.gridSize;this.refPoint=new s.GlobalPoint(Math.round(this.refPoint.x/e)*e,Math.round(this.refPoint.y/e)*e),this.w=Math.max(Math.round(this.w/e)*e,e),this.h=Math.max(Math.round(this.h/e)*e,e),this.invalidate(!1)}resize(e,t){const i=r.gameStore.zoomFactor;switch(e){case 0:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=l.l2g(t);break;case 1:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint=new s.GlobalPoint(l.l2gx(t.x),this.refPoint.y);break;case 2:this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y);break;case 3:this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=new s.GlobalPoint(this.refPoint.x,l.l2gy(t.y));break}this.w/=i,this.h/=i,this.w<0&&(this.refPoint=this.refPoint.add(new s.Vector(this.w,0)),this.w=Math.abs(this.w)),this.h<0&&(this.refPoint=this.refPoint.add(new s.Vector(0,this.h)),this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var s=i("22bd"),n=i("e27a");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="select.vue",t["default"]=a.exports},c31c:function(e,t,i){},c6b4:function(e,t,i){"use strict";i.r(t);var s=i("8e60"),n=i("b0ac");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("d767");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"61eb1455",null);a.options.__file="main.vue",t["default"]=a.exports},c969:function(e,t,i){"use strict";var s=i("3a20"),n=i.n(s);n.a},c9a2:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"AssetManager"}},[i("div",{attrs:{id:"titlebar"}},[e._v("Asset Manager")]),i("div",{attrs:{id:"main"}},[i("div",{attrs:{id:"assets"},on:{dragover:function(t){return t.preventDefault(),e.moveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.currentFolder)}}},[i("div",{attrs:{id:"breadcrumbs"}},[i("div",[e._v("/")]),e._l(e.path,function(t){return i("div",{key:t},[e._v(e._s(e.idMap.get(t).name))])})],2),i("div",{attrs:{id:"actionbar"}},[i("input",{attrs:{id:"files",type:"file",multiple:"",hidden:""},on:{change:function(t){e.upload()}}}),i("div",{attrs:{title:"Create folder"},on:{click:e.createDirectory}},[i("i",{staticClass:"fas fa-plus-square"})]),i("div",{attrs:{title:"Upload files"},on:{click:e.prepareUpload}},[i("i",{staticClass:"fas fa-upload"})])]),i("div",{attrs:{id:"explorer"}},[e.path.length?i("div",{staticClass:"inode folder",on:{dblclick:function(t){e.changeDirectory(-1)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.parentFolder)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v("..")])]):e._e(),e._l(e.folders,function(t){return i("div",{key:t,staticClass:"inode folder",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},dblclick:function(i){e.changeDirectory(t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(i){i.preventDefault(),i.stopPropagation(),e.stopDrag(i,t)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])}),e._l(e.files,function(t){return i("div",{key:t,staticClass:"inode file",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)}}},[i("img",{attrs:{src:"/static/assets/"+e.idMap.get(t).file_hash,width:"50"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])})],2)]),e.firstSelectedFile?i("div",{attrs:{id:"asset-details"}},[i("div",{attrs:{id:"asset-detail-title"}},[e._v(e._s(e.firstSelectedFile.name))]),i("img",{attrs:{src:"/static/assets/"+e.firstSelectedFile.file_hash}})]):e._e()]),i("AssetContextMenu",{ref:"cm"}),i("Prompt",{ref:"prompt"}),i("ConfirmDialog",{ref:"confirm"})],1)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},ca56:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("1c76")),a=i("0bc6"),l=i("af17"),c=i("f10f"),u=i("92b1");let d=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.x=0,this.y=0}get IS_DM(){return c.gameStore.IS_DM}open(e){this.visible=!0,this.x=e.pageX,this.y=e.pageY,this.$nextTick(()=>this.$children[0].$el.focus())}close(){this.visible=!1}bringPlayers(){c.gameStore.IS_DM&&(a.socket.emit("Players.Bring",{x:u.l2gx(this.x),y:u.l2gy(this.y)}),this.close())}createToken(){this.$parent.$parent.$refs.createtokendialog.open(this.x,this.y),this.close()}showInitiative(){l.EventBus.$emit("Initiative.Show"),this.close()}};d=s.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},cad7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{beforeRouteEnter(e,t,i){n.default.post("/api/logout").then(()=>{a.coreStore.setAuthenticated(!1),a.coreStore.setUsername(""),i({path:"/auth/login"})})}};l=s.__decorate([r.default({})],l),t.default=l},cc67:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=i("6fc5"),o=i("3a0b");let r=class extends n.VuexModule{constructor(){super(...arguments),this.authenticated=!1,this.initialized=!1,this.username=""}setAuthenticated(e){this.authenticated=e}setInitialized(e){this.initialized=e}setUsername(e){this.username=e}};s.__decorate([n.Mutation],r.prototype,"setAuthenticated",null),s.__decorate([n.Mutation],r.prototype,"setInitialized",null),s.__decorate([n.Mutation],r.prototype,"setUsername",null),r=s.__decorate([n.Module({dynamic:!0,store:o.rootStore,name:"core"})],r),t.coreStore=n.getModule(r)},cd49:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("3dfd")),r=i("5f86"),a=i("3a0b");n.default.config.productionTip=!1,n.default.config.devtools=!0,n.default.config.performance=!0,t.app=new n.default({router:r.router,store:a.rootStore,render:e=>e(o.default)}).$mount("#app"),window.app=t.app},cde6:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9"));let r=class extends n.default{};r=s.__decorate([o.default({props:["visible","left","top"]})],r),t.default=r},ce87:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9"));let a=class extends o.default{beforeRouteEnter(e,t,i){n.default.post("/api/invite",{code:e.params.code}).then(e=>{i({path:e.data.sessionUrl})}).catch(e=>{console.error("Invitation code could not be redeemed"),i({path:"/dashboard"})})}};a=s.__decorate([r.default({template:""})],a),t.default=a},cec2:function(e,t,i){"use strict";i.r(t);var s=i("eb57"),n=i("255e");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("0584");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"0602c2e6",null);a.options.__file="prompt.vue",t["default"]=a.exports},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("f10f"),n=i("1216"),o=i("d6be"),r=i("98ef"),a=i("4aee");function l(e,t,i){void 0===i&&(i=s.gameStore.drawTEContour);const r=[e.x,e.y],a=[],l=o.PA_CDT[t].locate(r,null).loc;return null===l?(console.error("Triangle not found"),[]):(a.push(l.vertices[1].point),l.isConstrained(0)||c(r,l.vertices[2].point,l.vertices[1].point,l,0,a),a.push(l.vertices[2].point),l.isConstrained(1)||c(r,l.vertices[0].point,l.vertices[2].point,l,1,a),a.push(l.vertices[0].point),l.isConstrained(2)||c(r,l.vertices[1].point,l.vertices[0].point,l,2,a),i&&n.drawPolygon(a,"red"),a)}function c(e,t,i,s,n,o){const l=s.neighbours[n],d=l.indexT(s),h=a.ccw(d),f=a.cw(d),p=l.vertices[d],g=l.vertices[f],v=l.vertices[h],m=[l,h],y=[l,f],b=a.orientation(e,i,p.point),_=a.orientation(e,t,p.point);if(b===r.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&o.push(u(e,i,p.point,g.point)),_===r.Sign.COUNTERCLOCKWISE&&o.push(u(e,t,p.point,g.point));else{if(_===r.Sign.COUNTERCLOCKWISE)return c(e,t,i,l,h,o);c(e,p.point,i,l,h,o)}if(b!==r.Sign.CLOCKWISE&&_!==r.Sign.COUNTERCLOCKWISE&&o.push(p.point),_===r.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===r.Sign.CLOCKWISE&&o.push(u(e,i,p.point,v.point)),void(t!==v.point&&o.push(u(e,t,p.point,v.point)))):b===r.Sign.CLOCKWISE?c(e,t,i,l,f,o):c(e,t,p.point,l,f,o)}function u(e,t,i,s){const n=(s[1]-i[1])*(t[0]-e[0])-(s[0]-i[0])*(t[1]-e[1]),o=((s[0]-i[0])*(e[1]-i[1])-(s[1]-i[1])*(e[0]-i[0]))/n,r=e[0]+o*(t[0]-e[0]),a=e[1]+o*(t[1]-e[1]);return[r,a]}t.computeVisibility=l},cf8f:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",[e._v("#X")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.xCount,expression:"xCount"}],attrs:{type:"text"},domProps:{value:e.xCount},on:{input:function(t){t.target.composing||(e.xCount=t.target.value)}}}),i("div",[e._v("#Y")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.yCount,expression:"yCount"}],attrs:{type:"text"},domProps:{value:e.yCount},on:{input:function(t){t.target.composing||(e.yCount=t.target.value)}}})]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d065:function(e,t,i){"use strict";i.r(t);var s=i("45fb"),n=i("f8b3");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("514b");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"23de098e",null);a.options.__file="edit_dialog.vue",t["default"]=a.exports},d1ec:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{}s.angleSteps=4,s.drawAngleLines=!1,s.drawFirstLightHit=!1,s.skipPlayerFOW=!1,s.skipLightFOW=!1,s.tempFill="fog",t.Settings=s},d30b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("bc3a")),o=s.__importDefault(i("a026")),r=s.__importDefault(i("65d9")),a=i("cc67");let l=class extends o.default{constructor(){super(...arguments),this.username="",this.password="",this.error=""}login(){n.default.post("/api/login",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}register(){n.default.post("/api/register",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}focusin(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="0"}}focusout(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="1"}}};l=s.__decorate([r.default],l),t.default=l},d320:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v("Create basic token")])}}])},[i("div",{staticClass:"modal-body"},[i("label",{attrs:{for:"createtokendialog-text"}},[e._v("Text")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.text,expression:"text"}],attrs:{type:"text",id:"createtokendialog-name"},domProps:{value:e.text},on:{input:function(t){t.target.composing||(e.text=t.target.value)}}}),i("label",[e._v("Colours")]),i("div",{staticClass:"colours"},[i("span",[e._v("Fill:")]),i("color-picker",{attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("span",[e._v("Border:")]),i("color-picker",{attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("canvas",{ref:"canvas",attrs:{width:"100px",height:"100px"}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d323:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div")},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d445:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:"modal"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"mask",class:{"modal-mask":e.mask,"dialog-mask":!e.mask},on:{click:e.close,dragover:function(t){return t.preventDefault(),e.dragOver(t)}}},[i("div",{ref:"container",staticClass:"modal-container",on:{click:function(e){e.stopPropagation()}}},[e._t("header",null,{dragStart:e.dragStart,dragEnd:e.dragEnd}),e._t("default")],2)])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},d588:function(e,t,i){"use strict";i.r(t);var s=i("91df"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},d5df:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("65d9")),o=s.__importDefault(i("ea6a")),r=i("0bc6"),a=i("8f0a"),l=i("6f92"),c=i("5e7c"),u=i("0180"),d=i("f10f"),h=i("92b1"),f=i("5a5c");let p=class extends o.default{constructor(){super(...arguments),this.name="Ruler",this.active=!1,this.startPoint=null,this.ruler=null,this.text=null}onMouseDown(e){const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=h.l2g(f.getMouse(e)),this.ruler=new c.Line(this.startPoint,this.startPoint,3,d.gameStore.rulerColour),this.text=new u.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.addOwner(d.gameStore.username),this.text.addOwner(d.gameStore.username),t.addShape(this.ruler,!0,!0),t.addShape(this.text,!0,!0)):console.log("No draw layer!")}onMouseMove(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=h.l2g(f.getMouse(e));this.ruler.endPoint=i,r.socket.emit("Shape.Update",{shape:this.ruler.asDict(),redraw:!0,temporary:!0});const s=Math.sign(i.x-this.startPoint.x)*Math.sign(i.y-this.startPoint.y),n=Math.abs(i.x-this.startPoint.x),o=Math.abs(i.y-this.startPoint.y),c=Math.round(Math.sqrt(Math.pow(n,2)+Math.pow(o,2))*d.gameStore.unitSize/d.gameStore.gridSize)+" ft",u=Math.atan2(s*o,n),p=Math.min(this.startPoint.x,i.x)+n/2,g=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint=new a.GlobalPoint(p,g),this.text.text=c,this.text.angle=u,r.socket.emit("Shape.Update",{shape:this.text.asDict(),redraw:!0,temporary:!0}),t.invalidate(!0)}onMouseUp(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!1,t.removeShape(this.ruler,!0,!0),t.removeShape(this.text,!0,!0),t.invalidate(!0),this.ruler=this.startPoint=this.text=null):console.log("No active layer!")}};p=s.__decorate([n.default],p),t.RulerTool=p},d65f:function(e,t,i){"use strict";i.r(t);var s=i("d445"),n=i("7e15");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("26a5");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"12ed61ba",null);a.options.__file="modal.vue",t["default"]=a.exports},d677:function(e,t,i){"use strict";i.r(t);var s=i("53ec"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},d6be:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("6f92"),n=i("f10f"),o=i("6e4a");function r(e,i=!1){const r=new o.CDT;let a;a="vision"===e?n.gameStore.visionBlockers:n.gameStore.movementblockers;for(const t of a){const e=s.layerManager.UUIDMap.get(t);if(!i||e.visibleInCanvas(s.layerManager.getLayer().canvas))for(let t=0;t{this.shape=e,this.visible=!0}),d.EventBus.$on("EditDialog.AddLabel",e=>{this.visible&&(this.shape.labels.push(f.gameStore.labels[e]),this.updateShape(!0))})}beforeDestroy(){d.EventBus.$off("EditDialog.Open"),d.EventBus.$off("EditDialog.AddLabel")}updated(){this.addEmpty()}addEmpty(){""!==this.shape.owners[this.shape.owners.length-1]&&this.shape.addOwner(""),this.shape.trackers.length&&""===this.shape.trackers[this.shape.trackers.length-1].name&&0===this.shape.trackers[this.shape.trackers.length-1].value||this.shape.trackers.push({uuid:c.uuidv4(),name:"",value:0,maxvalue:0,visible:!1}),this.shape.auras.length&&""===this.shape.auras[this.shape.auras.length-1].name&&0===this.shape.auras[this.shape.auras.length-1].value||this.shape.auras.push({uuid:c.uuidv4(),name:"",value:0,dim:0,visionSource:!1,colour:"rgba(0,0,0,0)",visible:!1})}updateShape(e,t=!1){this.owned&&(u.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:e,temporary:t}),e&&h.layerManager.invalidate(),this.addEmpty())}setToken(e){this.owned&&(this.shape.setIsToken(e.target.checked),this.updateShape(!0))}setVisionBlocker(e){this.owned&&(this.shape.checkVisionSources(),this.updateShape(!0))}setMovementBlocker(e){this.owned&&(this.shape.setMovementBlock(e.target.checked),this.updateShape(!1))}updateAnnotation(e){if(!this.owned)return;const t=""!==this.shape.annotation;this.shape.annotation=e.target.value,""===this.shape.annotation||t?""===this.shape.annotation&&t&&(f.gameStore.annotations.splice(f.gameStore.annotations.findIndex(e=>e===this.shape.uuid)),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)):(f.gameStore.annotations.push(this.shape.uuid),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){this.owned&&(this.shape.updateOwner(t,e.target.value),this.updateShape(f.gameStore.fowLOS))}removeOwner(e){this.owned&&(this.shape.removeOwner(e),this.updateShape(f.gameStore.fowLOS))}removeTracker(e){this.owned&&(this.shape.trackers=this.shape.trackers.filter(t=>t.uuid!==e),this.updateShape(!1))}removeAura(e){this.owned&&(this.shape.auras=this.shape.auras.filter(t=>t.uuid!==e),this.shape.checkVisionSources(),this.updateShape(!0))}updateAuraVisionSource(e){if(!this.owned)return;e.visionSource=!e.visionSource;const t=f.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?f.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&f.gameStore.visionSources.splice(t,1),this.updateShape(!0)}updateAuraColour(e,t){if(!this.owned)return;const i=h.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}openLabelManager(){d.EventBus.$emit("LabelManager.Open")}removeLabel(e){this.owned&&(this.shape.labels=this.shape.labels.filter(t=>t.uuid!==e),this.updateShape(!0))}};s.__decorate([r.Prop()],p.prototype,"shape",void 0),p=s.__decorate([o.default({components:{Modal:l.default,"color-picker":a.default}})],p),t.default=p},da03:function(e,t,i){},dc37:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f"));let a=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.yes="Yes",this.no="No",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}confirm(){this.resolve(!0),this.close()}deny(){this.resolve(!1),this.close()}close(){this.reject(),this.visible=!1,this.title=""}open(e,t="yes",i="no"){return this.yes=t,this.no=i,this.title=e,this.visible=!0,this.$nextTick(()=>{this.$refs.confirm.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=s.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},de21:function(e,t,i){},deb9:function(e,t,i){"use strict";var s=i("c1e0"),n=i.n(s);n.a},dec1:function(e,t,i){"use strict";i.r(t);var s=i("cf8f"),n=i("3481");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="map.vue",t["default"]=a.exports},df64:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"accordion"},[i("div",{attrs:{id:"header"},on:{click:function(t){return t.preventDefault(),e.toggleDisplay(t)}}},[i("input",{ref:"overall",attrs:{type:"checkbox"},on:{click:function(t){return t.stopPropagation(),e.toggleCategory(t)}}}),i("strong",[e._v(e._s(e.title))]),e.showArrow?[i("span",{directives:[{name:"show",rawName:"v-show",value:e.showArrow&&!e.active,expression:"showArrow && !active"}],staticClass:"down-Arrow"},[e._v("▼")]),i("span",{directives:[{name:"show",rawName:"v-show",value:e.showArrow&&e.active,expression:"showArrow && active"}],staticClass:"up-Arrow"},[e._v("▲")])]:e._e()],2),i("div",{directives:[{name:"show",rawName:"v-show",value:e.active,expression:"active"}],attrs:{id:"body"}},e._l(e.items,function(t){return i("div",{key:t[0],staticClass:"item",on:{click:function(i){e.toggleSelection(t[0])}}},[i("input",{attrs:{type:"checkbox"},domProps:{checked:e.selected.includes(t[0])},on:{click:function(e){e.preventDefault()}}}),e._v(" "+e._s(t[1])+"\n ")])}))])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e037:function(e,t,i){"use strict";var s=i("da03"),n=i.n(s);n.a},e06e:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[i("button",{ref:"confirm",on:{click:e.confirm}},[e._v(e._s(e.yes))]),e.no?i("button",{on:{click:e.deny}},[e._v(e._s(e.no))]):e._e()])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e0e9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("1c76")),a=i("5338"),l=i("2d5b"),c=i("4a5b");let u=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.left=0,this.top=0}open(e,t){l.assetStore.selected.includes(t)||c.getComponent().select(e,t),this.visible=!0,this.left=e.pageX,this.top=e.pageY,this.$nextTick(()=>{this.$children[0].$el.focus()})}close(){this.visible=!1}rename(){if(1!==l.assetStore.selected.length)return;const e=l.assetStore.idMap.get(l.assetStore.selected[0]);c.getRef("prompt").prompt("New name:",`Renaming ${e.name}`).then(t=>{a.socket.emit("Asset.Rename",{asset:e.id,name:t}),e.name=t,c.getComponent().$forceUpdate()},()=>{}),this.close()}remove(){0!==l.assetStore.selected.length&&(c.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{if(e){for(const e of l.assetStore.selected)a.socket.emit("Asset.Remove",e),l.assetStore.files.includes(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.clearSelected()}},()=>{}),this.close())}};u=s.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e27a:function(e,t,i){"use strict";i.r(t);var s=i("2756"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},e3f5:function(e,t,i){"use strict";var s=i("a126"),n=i.n(s);n.a},e4b0:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d65f")),a=i("4a5b"),l=i("0bc6"),c=i("af17"),u=i("f10f");let d=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.newCategory="",this.newName="",this.search=""}mounted(){c.EventBus.$on("LabelManager.Open",()=>{this.visible=!0,this.newCategory="",this.newName="",this.$nextTick(()=>this.$refs.search.focus())})}beforeDestroy(){c.EventBus.$off("LabelManager.Open")}get labels(){const e={};for(const t of Object.keys(u.gameStore.labels)){const i=u.gameStore.labels[t];this.search.length&&`${i.category.toLowerCase()}${i.name.toLowerCase()}`.search(this.search.toLowerCase())<0||i.user===u.gameStore.username&&(i.category?(i.category in e||(e[i.category]=[]),e[i.category].push(i),e[i.category].sort((e,t)=>e.name.localeCompare(t.name))):e[""].push(i))}return e}get categories(){return Object.keys(this.labels).sort()}selectLabel(e){c.EventBus.$emit("EditDialog.AddLabel",e),this.visible=!1}toggleVisibility(e){e.visible=!e.visible,l.socket.emit("Label.Visibility.Set",{uuid:e.uuid,visible:e.visible})}addLabel(){if(""===this.newName)return;const e={uuid:a.uuidv4(),category:this.newCategory,name:this.newName,visible:!1,user:u.gameStore.username};u.gameStore.addLabel(e),l.socket.emit("Label.Add",e),this.newCategory="",this.newName=""}deleteLabel(e){u.gameStore.deleteLabel({uuid:e,user:u.gameStore.username}),l.socket.emit("Label.Delete",e)}};d=s.__decorate([o.default({components:{Modal:r.default}})],d),t.default=d},e4ea:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("8f0a"),n=i("92b1"),o=i("5a5c"),r=i("8db6"),a=i("2469");class l extends a.Shape{constructor(e,t=[],i,s,n){super(e,i,s,n),this.type="polygon",this._vertices=[],this._vertices=t}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._vertices=e.vertices.map(e=>new s.GlobalPoint(e.x,e.y))}get points(){return this.vertices.map(e=>[e.x,e.y])}draw(e){super.draw(e),e.lineCap="round",e.lineJoin="round","fog"===this.strokeColour?e.strokeStyle=o.getFogColour():2===this.vertices.length?e.strokeStyle=this.fillColour:e.strokeStyle=this.strokeColour,"fog"===this.fillColour?e.fillStyle=o.getFogColour():e.fillStyle=this.fillColour,e.lineWidth=n.g2lz(2),e.beginPath(),e.moveTo(n.g2lx(this.vertices[0].x),n.g2ly(this.vertices[0].y));for(let t=1;t<=this.vertices.length;t++){const i=this.vertices[t%this.vertices.length];e.lineTo(n.g2lx(i.x),n.g2ly(i.y))}e.fill(),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=n.l2g(t):this._vertices[e-1]=n.l2g(t)}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,n=this.refPoint.y;for(const s of this._vertices)s.xt&&(t=s.x),s.yn&&(n=s.y);return new r.BoundingRect(new s.GlobalPoint(e,i),t-e,n-i)}}t.Polygon=l},e5ca:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}]},[e._v("Mode")]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}],staticClass:"selectgroup"},e._l(e.modes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.modeSelect===t},on:{click:function(i){e.modeSelect=t}}},[e._v(e._s(t))])})),i("div",[e._v("Shape")]),i("div",{staticClass:"selectgroup"},e._l(e.shapes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.shapeSelect===t},on:{click:function(i){e.shapeSelect=t}}},[i("i",{staticClass:"fas",class:"fa-"+t})])})),i("div",[e._v("Colours")]),i("div",{staticClass:"selectgroup"},[i("color-picker",{staticClass:"option",attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("color-picker",{staticClass:"option",attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("div",{directives:[{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}]},[e._v("Brush size")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.brushSize,expression:"brushSize"},{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}],staticStyle:{"max-width":"100px"},attrs:{type:"text"},domProps:{value:e.brushSize},on:{input:function(t){t.target.composing||(e.brushSize=t.target.value)}}})]):e._e()},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e756:function(e,t,i){},e7db:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"outer",on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}},[i("div",{staticClass:"current-color",style:e.transparent?"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)":"background-color:"+e.color,on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}}),i("div",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],staticClass:"mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.closePicker(t)}}}),i("chrome-picker",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],ref:"chromePicker",style:{position:"fixed",left:e.left+"px",top:e.top+"px","z-index":9999},attrs:{value:e.color,tabindex:"-1"},on:{input:e.updateColor}})],1)},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},e914:function(e,t,i){"use strict";i.r(t);var s=i("c9a2"),n=i("aa69");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("78c7");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="manager.vue",t["default"]=a.exports},e94f:function(e,t,i){"use strict";i.r(t);var s=i("7aaa"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},ea6a:function(e,t,i){"use strict";i.r(t);var s=i("d323"),n=i("6465");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("12d3");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,null,null);a.options.__file="tool.vue",t["default"]=a.exports},eb57:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[e._v("\n "+e._s(e.question)+"\n "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.answer,expression:"answer"}],ref:"answer",attrs:{type:"text"},domProps:{value:e.answer},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.submit(t):null},input:function(t){t.target.composing||(e.answer=t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},ebb9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("1516"));n.default.component("draggable",r.default);const a=s.__importDefault(i("d65f")),l=i("4a5b"),c=i("0bc6"),u=i("af17"),d=i("6f92"),h=i("f10f");let f=class extends n.default{constructor(){super(...arguments),this.visible=!1,this.data=[],this.currentActor=null,this.roundCounter=0}mounted(){u.EventBus.$on("Initiative.Clear",this.clear),u.EventBus.$on("Initiative.Remove",e=>this.removeInitiative(e)),u.EventBus.$on("Initiative.Show",()=>this.visible=!0),c.socket.on("Initiative.Set",e=>{this.data=e}),c.socket.on("Initiative.Turn.Set",e=>this.setTurn(e)),c.socket.on("Initiative.Turn.Update",e=>this.updateTurn(e,!1)),c.socket.on("Initiative.Round.Update",e=>this.setRound(e,!1)),c.socket.on("Initiative.Effect.New",e=>{const t=this.getActor(e.actor);void 0!==t&&this.createEffect(t,e.effect,!1)}),c.socket.on("Initiative.Effect.Update",e=>this.updateEffect(e.actor,e.effect,!1))}beforeDestroy(){u.EventBus.$off("Initiative.Clear"),u.EventBus.$off("Initiative.Remove"),u.EventBus.$off("Initiative.Show")}clear(){this.data=[],this.currentActor=null}getActor(e){return this.data.find(t=>t.uuid===e)}contains(e){return this.data.some(t=>t.uuid===e)}owns(e){if(h.gameStore.IS_DM)return!0;const t=d.layerManager.UUIDMap.get(e.uuid);return void 0!==t&&t.owners.includes(h.gameStore.username)}getDefaultEffect(){return{uuid:l.uuidv4(),name:"New Effect",turns:10}}fakeSetData(e){e.setData("Hack","")}syncInitiative(e){c.socket.emit("Initiative.Update",e)}addInitiative(e){const t=this.data.findIndex(t=>t.uuid===e.uuid);t>=0||(void 0===e.initiative&&(e.initiative=0),this.syncInitiative(e))}removeInitiative(e){const t=this.data.findIndex(t=>t.uuid===e);if(t<0||this.data[t].group)return;this.syncInitiative({uuid:e});const i=d.layerManager.UUIDMap.get(e);void 0!==i&&i.showHighlight&&(i.showHighlight=!1,d.layerManager.getLayer(i.layer).invalidate(!0))}updateOrder(){h.gameStore.IS_DM&&c.socket.emit("Initiative.Set",this.data.map(e=>e.uuid))}updateTurn(e,t){if(!h.gameStore.IS_DM&&t)return;this.currentActor=e;const i=this.data.find(t=>t.uuid===e);if(void 0!==i){if(i.effects)for(let e=i.effects.length-1;e>=0;e--)i.effects[e].turns<=0?i.effects.splice(e,1):i.effects[e].turns--;t&&c.socket.emit("Initiative.Turn.Update",e)}}setRound(e,t){!h.gameStore.IS_DM&&t||(this.roundCounter=e,t&&c.socket.emit("Initiative.Round.Update",e))}setTurn(e){this.currentActor=e}nextTurn(){if(!h.gameStore.IS_DM)return;const e=this.data,t=e[(e.findIndex(e=>e.uuid===this.currentActor)+1)%e.length];this.data[0].uuid===t.uuid&&this.setRound(this.roundCounter+1,!0),this.updateTurn(t.uuid,!0)}toggleHighlight(e,t){const i=d.layerManager.UUIDMap.get(e.uuid);void 0!==i&&(i.showHighlight=t,d.layerManager.getLayer(i.layer).invalidate(!0))}toggleOption(e,t){this.owns(e)&&(e[t]=!e[t],this.syncInitiative(e))}createEffect(e,t,i){this.owns(e)&&(e.effects.push(t),i&&c.socket.emit("Initiative.Effect.New",{actor:e.uuid,effect:t}))}syncEffect(e,t){this.owns(e)&&c.socket.emit("Initiative.Effect.Update",{actor:e.uuid,effect:t})}updateEffect(e,t,i){const s=this.data.find(t=>t.uuid===e);if(void 0===s)return;const n=s.effects.findIndex(e=>e.uuid===t.uuid);void 0!==n&&(s.effects[n]=t,i?this.syncEffect(s,t):this.$forceUpdate())}};f=s.__decorate([o.default({components:{Modal:a.default,draggable:r.default}})],f),t.default=f},ee96:function(e,t,i){},f086:function(e,t,i){"use strict";i.r(t);var s=i("a112"),n=i("7ba5");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("01be");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"674cf937",null);a.options.__file="selection_info.vue",t["default"]=a.exports},f10f:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=i("6fc5"),r=i("0bc6"),a=i("2b48"),l=i("6f92"),c=i("92b1"),u=i("5a5c"),d=i("99e3"),h=i("d6be"),f=i("3a0b");let p=class extends o.VuexModule{constructor(){super(...arguments),this.layers=[],this.selectedLayerIndex=-1,this.boardInitialized=!1,this.locations=[],this.assets={},this.notes=[],this.IS_DM=!1,this.gridSize=50,this.username="",this.roomName="",this.roomCreator="",this.invitationCode="",this.gridColour="rgba(0, 0, 0, 1)",this.fowColour="rgba(0, 0, 0, 1)",this.rulerColour="rgba(255, 0, 0, 1)",this.panX=0,this.panY=0,this.zoomDisplay=.5,this.unitSize=5,this.useGrid=!0,this.fullFOW=!1,this.fowOpacity=.3,this.fowLOS=!1,this.locationName="",this.visionSources=[],this.visionBlockers=[],this.annotations=[],this.movementblockers=[],this.ownedtokens=[],this.BV=Object.freeze(new d.BoundingVolume([])),this.visionMode="bvh",this.drawTEContour=!1,this.visionRangeMin=1640,this.visionRangeMax=3281,this.clipboard=[],this.labels={},this.filterNoLabel=!1,this.labelFilters=[],this.showUI=!0}get selectedLayer(){return this.layers[this.selectedLayerIndex]}get zoomFactor(){return u.zoomValue(this.zoomDisplay)}setZoomDisplay(e){e!==this.zoomDisplay&&(e<0&&(e=0),e>1&&(e=1),this.zoomDisplay=e,l.layerManager.invalidate())}setVisionMode(e){this.visionMode=e.mode,e.sync&&r.socket.emit("Location.Options.Set",{vision_mode:e.mode})}setBoardInitialized(e){this.boardInitialized=e}toggleUnlabeledFilter(){this.filterNoLabel=!this.filterNoLabel}addLabel(e){n.default.set(this.labels,e.uuid,e)}setLabelFilters(e){this.labelFilters=e}setLabelVisibility(e){e.uuid in this.labels&&(this.labels[e.uuid].visible=e.visible)}deleteLabel(e){if(!(e.uuid in this.labels))return;const t=this.labels[e.uuid],i=new Set;for(const s of l.layerManager.UUIDMap.values()){const e=s.labels.indexOf(t);e>=0&&(s.labels.splice(e,1),i.add(s.layer))}for(const s of i)l.layerManager.getLayer(s).invalidate(!1);n.default.delete(this.labels,e.uuid)}setDM(e){this.IS_DM=e}setUsername(e){this.username=e}setRoomName(e){this.roomName=e}setRoomCreator(e){this.roomCreator=e}setInvitationCode(e){this.invitationCode=e}addLayer(e){this.layers.push(e),-1===this.selectedLayerIndex&&(this.selectedLayerIndex=this.layers.indexOf(e))}selectLayer(e){const t=this.layers.indexOf(e.name);t>=0&&(this.selectedLayerIndex=t),e.sync&&r.socket.emit("Client.ActiveLayer.Set",e.name)}newNote(e){this.notes.push(e.note),e.sync&&r.socket.emit("Note.New",e.note)}setAssets(e){this.assets=e}setLocations(e){this.locations=e}resetLayerInfo(){this.layers=[],this.selectedLayerIndex=-1}recalculateVision(e=!1){this.boardInitialized&&("triangle"===this.visionMode?h.triangulate("vision",e):this.BV=Object.freeze(new d.BoundingVolume(this.visionBlockers)))}recalculateMovement(e=!1){this.boardInitialized&&"triangle"===this.visionMode&&h.triangulate("movement",e)}updateZoom(e){if(e.newZoomDisplay===this.zoomDisplay)return;e.newZoomDisplay<0&&(e.newZoomDisplay=0),e.newZoomDisplay>1&&(e.newZoomDisplay=1);const t=c.g2l(e.zoomLocation);this.zoomDisplay=e.newZoomDisplay;const i=c.l2g(t),s=i.subtract(e.zoomLocation);this.panX+=s.x,this.panY+=s.y,l.layerManager.invalidate(),a.sendClientOptions()}setGridColour(e){this.gridColour=e.colour,l.layerManager.getGridLayer().drawGrid(),e.sync&&r.socket.emit("Client.Options.Set",{gridColour:e.colour})}setFOWColour(e){this.fowColour=e.colour,l.layerManager.invalidate(),e.sync&&r.socket.emit("Client.Options.Set",{fowColour:e.colour})}setRulerColour(e){this.rulerColour=e.colour,e.sync&&r.socket.emit("Client.Options.Set",{rulerColour:e.colour})}setPanX(e){this.panX=e}setPanY(e){this.panY=e}increasePanX(e){this.panX+=e}increasePanY(e){this.panY+=e}setUnitSize(e){this.unitSize!==e.unitSize&&e.unitSize>0&&e.unitSize<1/0&&(this.unitSize=e.unitSize,l.layerManager.invalidate(),e.sync&&r.socket.emit("Location.Options.Set",{unit_size:e.unitSize}))}setUseGrid(e){if(this.useGrid!==e.useGrid){this.useGrid=e.useGrid;const t=l.layerManager.getGridLayer();e.useGrid?t.canvas.style.display="block":t.canvas.style.display="none",e.sync&&r.socket.emit("Location.Options.Set",{use_grid:e.useGrid})}}setGridSize(e){if(this.gridSize!==e.gridSize&&e.gridSize>0){this.gridSize=e.gridSize;const t=l.layerManager.getGridLayer();void 0!==t&&t.drawGrid(),e.sync&&r.socket.emit("Gridsize.Set",e.gridSize)}}setVisionRangeMin(e){this.visionRangeMin=e.value,l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{vision_min_range:e.value})}setVisionRangeMax(e){this.visionRangeMax=Math.max(e.value,this.visionRangeMin),l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{vision_max_range:this.visionRangeMax})}setFullFOW(e){this.fullFOW!==e.fullFOW&&(this.fullFOW=e.fullFOW,l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{full_fow:e.fullFOW}))}setFOWOpacity(e){this.fowOpacity=e.fowOpacity,l.layerManager.invalidateLight(),e.sync&&r.socket.emit("Location.Options.Set",{fow_opacity:e.fowOpacity})}setLineOfSight(e){this.fowLOS!==e.fowLOS&&(this.fowLOS=e.fowLOS,l.layerManager.invalidate(),e.sync&&r.socket.emit("Location.Options.Set",{fow_los:e.fowLOS}))}setLocationName(e){this.locationName=e}updateNote(e){const t=this.notes.find(t=>t.uuid===e.note.uuid);void 0!==t&&(t.title=e.note.title,t.text=e.note.text,e.sync&&r.socket.emit("Note.Update",t))}removeNote(e){this.notes=this.notes.filter(t=>t.uuid!==e.note.uuid),e.sync&&r.socket.emit("Note.Remove",e.note.uuid)}toggleUI(){this.showUI=!this.showUI}setClipboard(e){this.clipboard=e}clear(){this.context.state.visionSources=[],this.context.state.visionBlockers=[],this.context.state.ownedtokens=[],this.context.state.annotations=[],this.context.state.movementblockers=[],this.context.state.notes=[],this.context.commit("recalculateVision"),this.context.commit("recalculateMovement")}};s.__decorate([o.Mutation],p.prototype,"setZoomDisplay",null),s.__decorate([o.Mutation],p.prototype,"setVisionMode",null),s.__decorate([o.Mutation],p.prototype,"setBoardInitialized",null),s.__decorate([o.Mutation],p.prototype,"toggleUnlabeledFilter",null),s.__decorate([o.Mutation],p.prototype,"addLabel",null),s.__decorate([o.Mutation],p.prototype,"setLabelFilters",null),s.__decorate([o.Mutation],p.prototype,"setLabelVisibility",null),s.__decorate([o.Mutation],p.prototype,"deleteLabel",null),s.__decorate([o.Mutation],p.prototype,"setDM",null),s.__decorate([o.Mutation],p.prototype,"setUsername",null),s.__decorate([o.Mutation],p.prototype,"setRoomName",null),s.__decorate([o.Mutation],p.prototype,"setRoomCreator",null),s.__decorate([o.Mutation],p.prototype,"setInvitationCode",null),s.__decorate([o.Mutation],p.prototype,"addLayer",null),s.__decorate([o.Mutation],p.prototype,"selectLayer",null),s.__decorate([o.Mutation],p.prototype,"newNote",null),s.__decorate([o.Mutation],p.prototype,"setAssets",null),s.__decorate([o.Mutation],p.prototype,"setLocations",null),s.__decorate([o.Mutation],p.prototype,"resetLayerInfo",null),s.__decorate([o.Mutation],p.prototype,"recalculateVision",null),s.__decorate([o.Mutation],p.prototype,"recalculateMovement",null),s.__decorate([o.Mutation],p.prototype,"updateZoom",null),s.__decorate([o.Mutation],p.prototype,"setGridColour",null),s.__decorate([o.Mutation],p.prototype,"setFOWColour",null),s.__decorate([o.Mutation],p.prototype,"setRulerColour",null),s.__decorate([o.Mutation],p.prototype,"setPanX",null),s.__decorate([o.Mutation],p.prototype,"setPanY",null),s.__decorate([o.Mutation],p.prototype,"increasePanX",null),s.__decorate([o.Mutation],p.prototype,"increasePanY",null),s.__decorate([o.Mutation],p.prototype,"setUnitSize",null),s.__decorate([o.Mutation],p.prototype,"setUseGrid",null),s.__decorate([o.Mutation],p.prototype,"setGridSize",null),s.__decorate([o.Mutation],p.prototype,"setVisionRangeMin",null),s.__decorate([o.Mutation],p.prototype,"setVisionRangeMax",null),s.__decorate([o.Mutation],p.prototype,"setFullFOW",null),s.__decorate([o.Mutation],p.prototype,"setFOWOpacity",null),s.__decorate([o.Mutation],p.prototype,"setLineOfSight",null),s.__decorate([o.Mutation],p.prototype,"setLocationName",null),s.__decorate([o.Mutation],p.prototype,"updateNote",null),s.__decorate([o.Mutation],p.prototype,"removeNote",null),s.__decorate([o.Mutation],p.prototype,"toggleUI",null),s.__decorate([o.Mutation],p.prototype,"setClipboard",null),s.__decorate([o.Action],p.prototype,"clear",null),p=s.__decorate([o.Module({dynamic:!0,store:f.rootStore,name:"game",namespaced:!0})],p),t.gameStore=o.getModule(p)},f19c:function(e,t,i){"use strict";var s=i("602f"),n=i.n(s);n.a},f2d0:function(e,t,i){},f30c:function(e,t,i){"use strict";i.r(t);var s=i("dc37"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},f312:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aurasFromServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,visionSource:i.vision_source,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t}),t.aurasToServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,vision_source:i.visionSource,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t})},f3c9:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{attrs:{id:"toolselect"}},[i("ul",e._l(e.visibleTools,function(t){return i("li",{key:t,ref:t+"-selector",refInFor:!0,class:{"tool-selected":e.currentTool===t},on:{mousedown:function(i){e.currentTool=t}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])])}))]),i("div",[[i("select-tool",{directives:[{name:"show",rawName:"v-show",value:"Select"===e.currentTool,expression:"currentTool === 'Select'"}],ref:"selectTool"}),i("pan-tool",{directives:[{name:"show",rawName:"v-show",value:"Pan"===e.currentTool,expression:"currentTool === 'Pan'"}]}),i("keep-alive",[i("draw-tool",{directives:[{name:"show",rawName:"v-show",value:"Draw"===e.currentTool,expression:"currentTool === 'Draw'"}]})],1),i("ruler-tool",{directives:[{name:"show",rawName:"v-show",value:"Ruler"===e.currentTool,expression:"currentTool === 'Ruler'"}]}),i("map-tool",{directives:[{name:"show",rawName:"v-show",value:"Map"===e.currentTool,expression:"currentTool === 'Map'"}]}),i("filter-tool",{directives:[{name:"show",rawName:"v-show",value:"Filter"===e.currentTool,expression:"currentTool === 'Filter'"}]}),i("shape-menu",{ref:"shapecontext"}),i("createtoken-dialog",{ref:"createtokendialog"})]],2)])},n=[];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},f51a:function(e,t,i){"use strict";i.r(t);var s=i("e0e9"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},f551:function(e,t,i){"use strict";i.r(t);var s=i("2686"),n=i("1dd6");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("28b6");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"7a3669fd",null);a.options.__file="note.vue",t["default"]=a.exports},f5fe:function(e,t,i){"use strict";i.r(t);var s=i("59f0"),n=i("7018");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("deb9");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"af4dc61a",null);a.options.__file="initiative.vue",t["default"]=a.exports},f692:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("4185"),n=i("b906"),o=i("38c9"),r=i("bab4"),a=i("6f92"),l=i("f10f");function c(e){const t=document.createElement("canvas");let i;t.style.zIndex=a.layerManager.layers.length.toString(),t.width=window.innerWidth,t.height=window.innerHeight,i="grid"===e.type_?new o.GridLayer(t,e.name):"fow"===e.type_?new s.FOWLayer(t,e.name):"fow-players"===e.type_?new n.FOWPlayersLayer(t,e.name):new r.Layer(t,e.name),i.selectable=e.selectable,i.playerEditable=e.player_editable,a.layerManager.addLayer(i);const c=document.getElementById("layers");null!==c?("fow-players"!==e.name&&c.appendChild(t),"grid"===e.type_&&e.size&&l.gameStore.setGridSize({gridSize:e.size,sync:!1}),i.setShapes(e.shapes)):console.warn("Layers div is missing, this will prevent the main game board from loading!")}t.createLayer=c},f74c:function(e,t,i){"use strict";i.r(t);var s=i("a9a6"),n=i("29a2");for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);i("9104");var r=i("2877"),a=Object(r["a"])(n["default"],s["a"],s["b"],!1,null,"4697341e",null);a.options.__file="labels.vue",t["default"]=a.exports},f8b3:function(e,t,i){"use strict";i.r(t);var s=i("d8ee"),n=i.n(s);for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);t["default"]=n.a},f994:function(e,t,i){"use strict";var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("form",{on:{focusin:e.focusin,focusout:e.focusout,submit:function(t){return t.preventDefault(),e.login(t)}}},[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("PlanarAlly")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],attrs:{type:"text",name:"username",placeholder:"Username",autocomplete:"username",required:""},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}}),e._m(0)]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",name:"password",placeholder:"Password",autocomplete:"current-password",required:""},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._m(1)]),i("div",{staticStyle:{display:"flex"}},[i("button",{staticStyle:{visibility:"hidden",display:"none"},attrs:{type:"submit",name:"login"}}),i("button",{staticClass:"submit",attrs:{type:"button",name:"register",title:"Register"},on:{click:e.register}},[i("i",{staticClass:"fas fa-plus"})]),e._m(2)])]),e.error?i("div",{staticClass:"feedback"},[i("p",{staticClass:"error"},[i("strong",[e._v("Error:")]),e._v("\n "+e._s(e.error)+"\n ")])]):e._e()])},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-user-circle"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-lock"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",name:"login",title:"Login"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return s}),i.d(t,"b",function(){return n})},fbdd:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("9ab4"),n=s.__importDefault(i("a026")),o=s.__importDefault(i("65d9")),r=s.__importDefault(i("d065")),a=i("4a5b"),l=i("0bc6"),c=i("af17"),u=i("6f92");let d=class extends n.default{constructor(){super(...arguments),this.shape=null}mounted(){c.EventBus.$on("SelectionInfo.Shape.Set",e=>{this.shape=e})}beforeDestroy(){c.EventBus.$off("SelectionInfo.Shape.Set")}openEditDialog(){this.$refs.editDialog.visible=!0}changeValue(e,t){null!==this.shape&&a.getRef("prompt").prompt(`New ${e.name} value:`,`Updating ${e.name}`).then(i=>{if(null===this.shape)return;const s=e.value;"+"===i[0]||"-"===i[0]?e.value+=parseInt(i,10):e.value=parseInt(i,10),isNaN(e.value)&&(e.value=s),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:t,temporary:!1}),t&&u.layerManager.invalidate()},()=>{})}};d=s.__decorate([o.default({components:{"edit-dialog":r.default}})],d),t.default=d},fcac:function(e,t,i){},fe11:function(e,t,i){},fe80:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=i("0bc6"),n=i("af17"),o=i("8f0a"),r=i("6f92"),a=i("f692"),l=i("9cb7"),c=i("f10f"),u=i("5f86"),d=i("5a5c");s.socket.on("connect",()=>{console.log("Connected")}),s.socket.on("disconnect",()=>{console.log("Disconnected")}),s.socket.on("connect_error",e=>{console.error("Could not connect to game session."),u.router.push("/dashboard")}),s.socket.on("error",e=>{console.error("Game session does not exist."),u.router.push("/dashboard")}),s.socket.on("redirect",e=>{console.log("redirecting"),u.router.push(e)}),s.socket.on("Room.Info.Set",e=>{c.gameStore.setRoomName(e.name),c.gameStore.setRoomCreator(e.creator),c.gameStore.setInvitationCode(e.invitationCode)}),s.socket.on("Username.Set",e=>{c.gameStore.setUsername(e),c.gameStore.setDM(e===window.location.pathname.split("/")[2])}),s.socket.on("Client.Options.Set",e=>{c.gameStore.setGridColour({colour:e.grid_colour,sync:!1}),c.gameStore.setFOWColour({colour:e.fow_colour,sync:!1}),c.gameStore.setRulerColour({colour:e.ruler_colour,sync:!1}),c.gameStore.setPanX(e.pan_x),c.gameStore.setPanY(e.pan_y),c.gameStore.setZoomDisplay(d.zoomDisplay(e.zoom_factor)),e.active_layer&&r.layerManager.selectLayer(e.active_layer,!1),void 0!==r.layerManager.getGridLayer()&&r.layerManager.getGridLayer().invalidate()}),s.socket.on("Location.Set",e=>{void 0!==e.name&&c.gameStore.setLocationName(e.name),void 0!==e.unit_size&&c.gameStore.setUnitSize({unitSize:e.unit_size,sync:!1}),void 0!==e.use_grid&&c.gameStore.setUseGrid({useGrid:e.use_grid,sync:!1}),void 0!==e.full_fow&&c.gameStore.setFullFOW({fullFOW:e.full_fow,sync:!1}),void 0!==e.fow_opacity&&c.gameStore.setFOWOpacity({fowOpacity:e.fow_opacity,sync:!1}),void 0!==e.fow_los&&c.gameStore.setLineOfSight({fowLOS:e.fow_los,sync:!1}),void 0!==e.vision_min_range&&c.gameStore.setVisionRangeMin({value:e.vision_min_range,sync:!1}),void 0!==e.vision_max_range&&c.gameStore.setVisionRangeMax({value:e.vision_max_range,sync:!1}),void 0!==e.vision_mode&&(c.gameStore.setVisionMode({mode:e.vision_mode,sync:!1}),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement())}),s.socket.on("Position.Set",e=>{l.gameManager.setCenterPosition(new o.GlobalPoint(e.x,e.y))}),s.socket.on("Notes.Set",e=>{for(const t of e)c.gameStore.newNote({note:t,sync:!1})}),s.socket.on("Asset.List.Set",e=>{c.gameStore.setAssets(e)}),s.socket.on("Board.Set",e=>{c.gameStore.clear(),c.gameStore.setLocations(e.locations),document.getElementById("layers").innerHTML="",c.gameStore.resetLayerInfo(),r.layerManager.reset();for(const t of e.layers)a.createLayer(t);r.layerManager.selectLayer(r.layerManager.getLayer().name,!1),n.EventBus.$emit("Initiative.Clear"),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement(),c.gameStore.setBoardInitialized(!0)}),s.socket.on("Gridsize.Set",e=>{c.gameStore.setGridSize({gridSize:e,sync:!1})}),s.socket.on("Shape.Add",e=>{l.gameManager.addShape(e)}),s.socket.on("Shape.Remove",e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.getLayer(e.layer);t.removeShape(r.layerManager.UUIDMap.get(e.uuid),!1),t.invalidate(!1)}),s.socket.on("Shape.Order.Set",e=>{if(!r.layerManager.UUIDMap.has(e.shape.uuid))return void console.log("Attempted to move the shape order of an unknown shape");if(!r.layerManager.hasLayer(e.shape.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.shape.layer}`);const t=r.layerManager.UUIDMap.get(e.shape.uuid),i=r.layerManager.getLayer(t.layer);i.moveShapeOrder(t,e.index,!1)}),s.socket.on("Shape.Layer.Change",e=>{const t=r.layerManager.UUIDMap.get(e.uuid);void 0!==t&&t.moveLayer(e.layer,!1)}),s.socket.on("Shape.Update",e=>{l.gameManager.updateShape(e)}),s.socket.on("Temp.Clear",e=>{e.forEach(e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown temporary shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.UUIDMap.get(e.uuid);r.layerManager.getLayer(e.layer).removeShape(t,!1)})}),s.socket.on("Labels.Set",e=>{for(const t of e)c.gameStore.addLabel(t)}),s.socket.on("Label.Visibility.Set",e=>{c.gameStore.setLabelVisibility(e)}),s.socket.on("Label.Add",e=>{c.gameStore.addLabel(e)}),s.socket.on("Label.Delete",e=>{c.gameStore.deleteLabel(e)}),s.socket.on("Labels.Filter.Add",e=>{c.gameStore.labelFilters.push(e),r.layerManager.invalidate()}),s.socket.on("Labels.Filter.Remove",e=>{const t=c.gameStore.labelFilters.indexOf(e);t>=0&&(c.gameStore.labelFilters.splice(t,1),r.layerManager.invalidate())}),s.socket.on("Labels.Filters.Set",e=>{c.gameStore.setLabelFilters(e)})}}); +//# sourceMappingURL=app.41dd580f.js.map \ No newline at end of file diff --git a/server/static/js/app.41dd580f.js.map b/server/static/js/app.41dd580f.js.map new file mode 100644 index 000000000..b68ec85ed --- /dev/null +++ b/server/static/js/app.41dd580f.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/game/shapes/text.ts","webpack:///./src/game/ui/selection/selection_info.vue?cd1b","webpack:///./src/game/ui/selection/shapecontext.vue","webpack:///./src/App.vue?5b85","webpack:///./src/core/components/modals/prompt.vue?d33d","webpack:///./src/core/components/colorpicker.vue?4d88","webpack:///./src/game/game.vue","webpack:///./src/game/api/socket.ts","webpack:///./src/assetManager/manager.vue?5633","webpack:///./src/game/ui/menu/asset_node.vue","webpack:///./src/game/ui/tools/selectcontext.vue?02dc","webpack:///./src/auth/login.vue","webpack:///./src/game/visibility/te/draw.ts","webpack:///./src/core/components/accordion.vue","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/game/ui/annotation.ts","webpack:///./src/game/ui/menu/menu.vue","webpack:///./src/core/components/contextmenu.vue","webpack:///./src/game/ui/note.vue?49b7","webpack:///./src/auth/login.vue?c159","webpack:///./src/game/shapes/utils.ts","webpack:///./src/core/components/modals/confirm.vue?e6fb","webpack:///./src/game/ui/tools/select.vue?aed4","webpack:///./src/game/ui/tools/select.vue?29b9","webpack:///./src/game/shapes/shape.ts","webpack:///./src/core/components/modals/prompt.vue?d457","webpack:///./src/game/ui/note.vue?a34d","webpack:///./src/game/ui/note.vue?23aa","webpack:///./src/core/components/modals/modal.vue?33b9","webpack:///./src/game/ui/tools/select.vue?49f9","webpack:///./src/game/ui/tools/utils.ts","webpack:///./src/game/ui/note.vue?a508","webpack:///./src/game/ui/labels.vue?15af","webpack:///./src/game/api/utils.ts","webpack:///./src/game/ui/menu/asset_node.vue?f519","webpack:///./src/core/components/contextmenu.vue?f03a","webpack:///./src/core/components/contextmenu.vue?7efa","webpack:///./src/assetManager/store.ts","webpack:///./src/core/components/contextmenu.vue?50e1","webpack:///./src/game/ui/selection/shapecontext.vue?1cf6","webpack:///./src/game/ui/tools/map.vue?284a","webpack:///./src/game/layers/grid.ts","webpack:///./src/store.ts","webpack:///./src/core/components/colorpicker.vue","webpack:///./src/auth/login.vue?3521","webpack:///./src/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/game.vue?b3a0","webpack:///./src/game/game.vue?f5c6","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","webpack:///./src/game/ui/menu/menu.vue?002b","webpack:///./src/game/ui/menu/menu.vue?9e9a","webpack:///./src/game/ui/selection/edit_dialog.vue?db09","webpack:///./src/game/ui/selection/edit_dialog.vue?6334","webpack:///./src/game/shapes/circle.ts","webpack:///./src/game/ui/tools/map.vue?a3ab","webpack:///./src/core/components/load.vue","webpack:///./src/game/ui/tools/pan.ts","webpack:///./src/game/ui/tools/selectcontext.vue","webpack:///./src/core/utils.ts","webpack:///./src/assetManager/contextMenu.vue","webpack:///./src/game/visibility/te/triag.ts","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/edit_dialog.vue?1206","webpack:///./src/core/components/modals/modal.vue?44ae","webpack:///./src/assetManager/socket.ts","webpack:///./src/game/ui/tools/filter.vue?ee60","webpack:///./src/core/components/accordion.vue?3e09","webpack:///./src/game/game.vue?5550","webpack:///./src/game/shapes/multiline.ts","webpack:///./src/game/ui/tools/draw.vue","webpack:///./src/game/ui/initiative.vue?497e","webpack:///./src/game/ui/initiative.vue?527e","webpack:///./src/game/utils.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?d0df","webpack:///./src/game/ui/note.vue?f9bd","webpack:///./src/game/ui/tools/draw.vue?b96d","webpack:///./src/game/shapes/line.ts","webpack:///./src/router.ts","webpack:///./src/game/ui/tools/tool.vue?d136","webpack:///./src/game/ui/tools/tools.vue","webpack:///./src/game/ui/tools/tool.vue?8ce3","webpack:///./src/game/shapes/asset.ts","webpack:///./src/game/visibility/te/cdt.ts","webpack:///./src/game/ui/tools/draw.vue?1261","webpack:///./src/game/layers/manager.ts","webpack:///./src/game/ui/initiative.vue?c7e1","webpack:///./src/game/ui/tools/createtoken_modal.vue","webpack:///./src/game/visibility/bvh/node.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?f918","webpack:///./src/game/events/keyboard.ts","webpack:///./src/assetManager/manager.vue?433f","webpack:///./src/game/ui/selection/shapecontext.vue?17f5","webpack:///./src/game/ui/tools/tools.vue?25b2","webpack:///./src/game/ui/selection/selection_info.vue?2310","webpack:///./src/core/components/modals/modal.vue?09d2","webpack:///./src/core/components/contextmenu.vue?a0a2","webpack:///./src/core/components/modals/prompt.vue?4e1b","webpack:///./src/core/components/accordion.vue?3d26","webpack:///./src/core/components/load.vue?4ab2","webpack:///./src/core/components/load.vue?0f87","webpack:///./src/game/ui/menu/menu.vue?8b23","webpack:///./src/game/shapes/boundingrect.ts","webpack:///./src/dashboard/main.vue?5e14","webpack:///./src/dashboard/main.vue?94d1","webpack:///./src/game/geom.ts","webpack:///./src/game/ui/menu/asset_node.vue?c55a","webpack:///./src/game/ui/menu/asset_node.vue?3fe9","webpack:///./src/game/ui/labels.vue?33c0","webpack:///./src/game/game.vue?5592","webpack:///./src/game/units.ts","webpack:///./src/game/ui/menu/menu.vue?ae57","webpack:///./src/core/components/colorpicker.vue?1682","webpack:///./src/game/ui/tools/selectcontext.vue?0020","webpack:///./src/game/ui/tools/selectcontext.vue?758c","webpack:///./src/game/visibility/te/tds.ts","webpack:///./src/game/visibility/bvh/bvh.ts","webpack:///./src/game/manager.ts","webpack:///./src/game/ui/menu/asset_node.vue?0d0e","webpack:///./src/core/components/load.vue?8cd0","webpack:///./src/game/ui/selection/selection_info.vue?7cd0","webpack:///./src/game/ui/selection/selection_info.vue?4f48","webpack:///./src/game/ui/selection/shapecontext.vue?4b66","webpack:///./src/game/ui/selection/shapecontext.vue?0558","webpack:///./src/game/ui/tools/filter.vue?5a71","webpack:///./src/game/ui/tools/filter.vue?0072","webpack:///./src/dashboard/main.vue?3f72","webpack:///./src/core/components/modals/confirm.vue","webpack:///./src/game/ui/tools/tools.vue?c704","webpack:///./src/game/ui/selection/shapecontext.vue?aac0","webpack:///./src/assetManager/contextMenu.vue?c131","webpack:///./src/assetManager/contextMenu.vue?a185","webpack:///./src/game/ui/tools/draw.vue?60f4","webpack:///./src/game/ui/labels.vue?6447","webpack:///./src/game/ui/labels.vue?86fc","webpack:///./src/assetManager/manager.vue?a11e","webpack:///./src/game/event-bus.ts","webpack:///./src/dashboard/main.vue?d5a9","webpack:///./src/game/shapes/rect.ts","webpack:///./src/game/game.vue?b235","webpack:///./src/game/ui/tools/filter.vue?b0f4","webpack:///./src/game/ui/tools/selectcontext.vue?6f66","webpack:///./src/game/layers/fowplayers.ts","webpack:///./src/game/layers/layer.ts","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/tools/filter.vue","webpack:///./src/game/ui/menu/menu.vue?904d","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","webpack:///./src/game/ui/tools/createtoken_modal.vue?6f0b","webpack:///./src/assetManager/manager.vue?765a","webpack:///./src/assetManager/manager.vue?a045","webpack:///./src/game/ui/tools/selectcontext.vue?d61f","webpack:///./src/auth/logout.ts","webpack:///./src/core/store.ts","webpack:///./src/main.ts","webpack:///./src/core/components/contextmenu.vue?f402","webpack:///./src/invitation/invitation.ts","webpack:///./src/core/components/modals/prompt.vue","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/game/ui/tools/map.vue?f96f","webpack:///./src/game/ui/tools/map.vue?7f60","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","webpack:///./src/game/ui/tools/createtoken_modal.vue?e7b2","webpack:///./src/game/ui/tools/createtoken_modal.vue?5fcc","webpack:///./src/game/ui/tools/tool.vue?6323","webpack:///./src/game/ui/tools/tool.vue?f5ba","webpack:///./src/core/components/modals/modal.vue?1854","webpack:///./src/core/components/modals/modal.vue?e329","webpack:///./src/game/game.vue?d01c","webpack:///./src/game/ui/tools/ruler.ts","webpack:///./src/core/components/modals/modal.vue","webpack:///./src/core/components/accordion.vue?4b34","webpack:///./src/game/visibility/te/pa.ts","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/game/ui/selection/edit_dialog.vue?9a84","webpack:///./src/core/components/modals/confirm.vue?f9ee","webpack:///./src/game/ui/initiative.vue?59ac","webpack:///./src/game/ui/tools/map.vue","webpack:///./src/core/components/accordion.vue?c7e6","webpack:///./src/core/components/accordion.vue?6229","webpack:///./src/game/ui/tools/filter.vue?77c9","webpack:///./src/core/components/modals/confirm.vue?e141","webpack:///./src/core/components/modals/confirm.vue?be48","webpack:///./src/assetManager/contextMenu.vue?1b1b","webpack:///./src/game/ui/tools/select.vue?b7fd","webpack:///./src/game/ui/tools/filter.vue?6447","webpack:///./src/game/ui/labels.vue?8d8f","webpack:///./src/game/shapes/polygon.ts","webpack:///./src/game/ui/tools/draw.vue?1866","webpack:///./src/game/ui/tools/draw.vue?03b4","webpack:///./src/core/components/colorpicker.vue?0fbc","webpack:///./src/core/components/colorpicker.vue?fb27","webpack:///./src/assetManager/manager.vue","webpack:///./src/game/ui/tools/tools.vue?fa4a","webpack:///./src/game/ui/tools/tool.vue","webpack:///./src/core/components/modals/prompt.vue?0a11","webpack:///./src/core/components/modals/prompt.vue?36e2","webpack:///./src/game/ui/initiative.vue?36c8","webpack:///./src/game/ui/selection/selection_info.vue","webpack:///./src/game/store.ts","webpack:///./src/core/components/colorpicker.vue?4d99","webpack:///./src/core/components/modals/confirm.vue?a22f","webpack:///./src/game/comm/conversion/aura.ts","webpack:///./src/game/ui/tools/tools.vue?47aa","webpack:///./src/game/ui/tools/tools.vue?e95e","webpack:///./src/assetManager/contextMenu.vue?1e9a","webpack:///./src/game/ui/note.vue","webpack:///./src/game/ui/initiative.vue","webpack:///./src/game/layers/utils.ts","webpack:///./src/game/ui/labels.vue","webpack:///./src/game/ui/selection/edit_dialog.vue?3800","webpack:///./src/auth/login.vue?e4a1","webpack:///./src/auth/login.vue?8f9e","webpack:///./src/game/ui/selection/selection_info.vue?5d62","webpack:///./src/game/api/events.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","app","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","boundingrect_1","shape_1","units_1","Text","Shape","[object Object]","position","text","font","angle","fillColour","strokeColour","uuid","super","this","type","assign","getBaseDict","points","refPoint","x","y","BoundingRect","ctx","draw","fillStyle","save","dest","g2l","translate","rotate","textAlign","getLines","map","line","fillText","restore","point","centerPoint","canvas","getBoundingBox","visibleInCanvas","resizePoint","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_674cf937_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_674cf937_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","__webpack_exports__","_shapecontext_vue_vue_type_template_id_759e5a8a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","__WEBPACK_IMPORT_KEY__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__","component","options","__file","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor2_1","tslib_1","__importDefault","vue_1","vue_class_component_1","vue_color_1","vue_property_decorator_1","ColorPicker","default","display","left","top","transparent","$refs","chromePicker","val","rgba","a","setPosition","disabled","$nextTick","$children","$el","focus","newColor","toRgbString","$emit","color","rect","getBoundingClientRect","right","innerWidth","bottom","innerHeight","__decorate","Prop","String","Boolean","components","chrome-picker","Chrome","_game_vue_vue_type_template_id_05b88da7_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_4__","socket_io_client_1","createConnection","route","socket","io","opts","query","params","creator","room","connect","location","protocol","host","autoConnect","contextMenu_vue_1","confirm_vue_1","prompt_vue_1","socket_1","store_1","utils_1","AssetManager","path","draggingSelection","folders","assetStore","files","selected","idMap","currentFolder","root","parentFolder","parent","undefined","firstSelectedFile","sel","file_hash","nextFolder","pop","clearSelected","emit","prompt","inode","target","includes","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","classList","contains","add","remove","moveInode","upload","document","getElementById","click","fls","CHUNK_SIZE","uuidv4","slices","ceil","size","fr","FileReader","readAsArrayBuffer","min","onload","e","directory","totalSlices","Prompt","ConfirmDialog","AssetContextMenu","to","from","next","disconnect","_asset_node_vue_vue_type_template_id_6d718094_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_login_vue_vue_type_template_id_bc30fc14_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","manager_1","tds_1","triag_1","drawPolygon","polygon","colour","dl","layerManager","getLayer","lineJoin","beginPath","strokeStyle","random","moveTo","g2lx","g2ly","lineTo","closePath","stroke","drawPolygonL","xx","local","yy","I","J","drl","constrained","drawPolygonT","tds","clear","logs","T","clearRect","ei","EdgeIterator","valid","collect","fromP","edge","first","vertices","ccw","second","toP","cw","Infinity","constraints","console","log","pos","triangles","isInfinite","po","arc","PI","fill","DP","DPL","DPT","_accordion_vue_vue_type_template_id_0bf2b7ba_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_accordion_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor","__importStar","circle_1","CircularToken","Circle","center","radius","fromDict","textBaseline","xs","calcFontScale","g2lz","ys","transform","mostReadable","toHexString","visible","gameStore","IS_DM","group","source","has_img","effects","index","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","height","getMaxHeight","w","zoomFactor","h","invalidate","_menu_vue_vue_type_template_id_aaf3f05e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_contextmenu_vue_vue_type_template_id_256dde9c___WEBPACK_IMPORTED_MODULE_0__","_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","asset_1","circulartoken_1","line_1","multiline_1","polygon_1","createShapeFromDict","shape","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","Polygon","v","asset","img","Image","src","startsWith","URL","pathname","Asset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","render","_vm","_h","$createElement","_c","_self","ref","staticRenderFns","aura_1","nameVisible","trackers","auras","labels","_owners","visionObstruction","movementObstruction","isToken","showHighlight","annotation","globalCompositeOperation","Map","_refPoint","delta","idx","entries","abs","prev","fromArray","vec","subtract","mid","multiply","normalize","skipLightUpdate","recalculate","self","obstructionIndex","visionBlockers","update","recalculateVision","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","recalculateMovement","ownedBy","ownedtokens","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","owners","name_visible","is_token","JSON","stringify","aurasFromServer","parse","bbox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","freeze","username","owner","oldValue","newValue","ownerIndex","addOwner","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","note","attrs","mask","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","title","select","staticStyle","font-size","directives","rawName","expression","domProps","change","updateNote","input","composing","$set","style","calcHeight","removeNote","_v","_e","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","selectcontext_vue_1","tool_vue_1","utils_2","utils_3","SelectOperations","SelectTool","showContextMenu","active","Noop","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","getPointIndex","l2gz","getRef","Resize","Drag","localRefPoint","GroupSelect","endPoint","og","direction","ogDelta","calculateDelta","asDict","redraw","temporary","resize","updateCursor","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","open","selectcontext","getPointOrientation","SelectContext","pa_1","done","visionMode","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","UUIDMap","blockerBBox","found","intersectsWithInner","ray","fromPoints","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","centerTriangle","PA_CDT","movement","locate","asArray","lt","triangle","checkTriangle","skip","endpoint","neighbours","_cw","_ccw","ix","intersection","isConstrained","orientation","Sign","LEFT_TURN","ZERO","newDelta","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","sendClientOptions","locationOptions","panX","panY","AssetNode","showImage","keys","filter","el","sort","alphSort","__files","b","toLowerCase","children","imageSource","querySelector","setDragImage","tabindex","blur","_t","vuex_module_decorators_1","AssetStore","VuexModule","Mutation","Module","dynamic","store","rootStore","namespaced","getModule","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","contextmenu_vue_1","event_bus_1","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","EventBus","ContextMenu","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","layer_1","GridLayer","Layer","doClear","drawGrid","gs","gridSize","gridColour","lineWidth","vuex_1","use","Store","_colorpicker_vue_vue_type_template_id_d32461a4_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","id","script","componentNormalizer","mouseleave","wheel","zoom","ready","mousedown","mouseup","mousemove","contextmenu","preventDefault","stopPropagation","dragover","drop","showUI","_l","class","layer-selected","selectedLayer","selectLayer","href","_s","interval","dot-width","dot-height","tooltip-dir","tooltip","formatter","zoomDisplay","toFixed","slider-style","border-radius","bg-style","background-color","box-shadow","process-style","model","callback","$$v","settings_1","te_1","FOWLayer","isVisionLayer","preFogShapes","virtualCanvas","createElement","vCtx","getContext","has","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","bb","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","computeVisibility","drawImage","fowLOS","preShape","ogComposite","getFogColour","fillRect","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","settings","locations","rm-list-dm","_m","enter","rm","transition","settingsClick","overflow-y","overflow-x","assets","createNote","openNote","notes","for","checked","Array","isArray","_i","$$a","$$el","$$c","$$i","modifiers","number","step","fowOpacity","_n","$forceUpdate","unitSize","changeVisionMode","$store","state","game","lazy","visionRangeMin","visionRangeMax","readonly","invitationCode","update:color","fowColour","rulerColour","text-decoration","changeLocation","createLocation","grid-column","owned","updateShape","opacity","grid-column-start","setToken","setVisionBlocker","setMovementBlocker","placeholder","updateOwner","gridColumnStart","removeOwner","tracker","removeTracker","updateAuraColour","updateAuraVisionSource","removeAura","label","category","removeLabel","openLabelManager","updateAnnotation","pow","targetX","targetY","round","diff","sqrt","baserect_1","MapTool","xCount","yCount","startPoint","clone","BaseRect","_load_vue_vue_type_template_id_ff095222___WEBPACK_IMPORTED_MODULE_0__","_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__","PanTool","panStart","distance","increasePanX","increasePanY","_selectcontext_vue_vue_type_template_id_44a31e42_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","main_1","replace","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","appendChild","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_606797b4___WEBPACK_IMPORTED_MODULE_0__","_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","edgeInfo","va","vb","ec","EdgeCirculator","indv","indexV","ri","infinite","vi","orient","COLLINEAR","collinearBetween","q","cPQ","cQR","compare","EQUAL","SMALLER","LARGER","px","py","qx","qy","rx","ry","pqx","pqy","prx","pry","det","determinant","maxX","maxY","aprX","aprY","eps","EPSILON","POSITIVE","NEGATIVE","a00","a01","a10","a11","hasInexactNegativeOrientation","sideOfOrientedCircle","perturb","sideOfOrientedCircleP","Error","p0","p1","p2","os","getOrientedSide","ON_ORIENTED_BOUNDARY","reverse","ON_NEGATIVE_SIDE","xyEqual","xySmaller","xyCompare","qpx","qpy","rpx","rpy","tpx","tpy","tqx","tqy","rqx","rqy","maxx","maxy","arpx","arpy","atqx","atqy","atpx","atpy","arqx","arqy","ON_POSITIVE_SIDE","segSegDoIntersectCrossing","p3","p4","RIGHT_TURN","segSegDoIntersectContained","pa","pb","pc","pd","getIntersectionType","intersectionType","IntersectionType","POINT","NO_INTERSECTION","getLine","doIntersect","l1","l2","info","getIntersectionTypeLine","la","lb","denom","nom1","nom2","A1","A2","B1","B2","nextUp","MAX_VALUE","MIN_VALUE","ulp","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_23de098e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_23de098e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","destination","setRoot","folder","child","set","accordion_vue_1","FilterTool","cat","localeCompare","initalValues","labelFilters","f","categories","toggleUnlabeledFilter","_","accordion","Accordion","initialValues","updateCategory","overall","items","indeterminate","item","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_points","minx","miny","lineCap","_draw_vue_vue_type_template_id_639cd890_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","fakeSetData","updateOrder","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","notAllowed","owns","syncInitiative","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","updateTurn","nextTurn","opposite","zoomValue","exp","colorpicker_vue_1","modal_vue_1","CreateTokenModal","borderColour","updatePreview","Watch","color-picker","computed","mapState","NoteDialog","textarea","scrollHeight","then","DrawTool","brushHelper","ruler","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","_vertices","pushBrushBack","lastPoint","finaliseShape","axios_1","vue_router_1","manager_vue_1","login_vue_1","logout_1","load_vue_1","main_vue_1","game_vue_1","invitation_1","router","base","routes","redirect","meta","auth","template","beforeEach","coreStore","initialized","matched","record","authenticated","response","setAuthenticated","setUsername","setInitialized","catch","error","Tool","detailRight","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","onDeselect","onSelect","_tools_vue_vue_type_template_id_cf33581e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","topleft","CDT","TDS","insert","insertConstraintV","stack","markConstraint","intersectionInfo","findIntersectedFaces","triangulateHole","intersectedFaces","listAB","listBA","edges","triangulateHole2","propagatingFlipE","triangulateHalfHole","fl","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","BoundingBox","dilate","overlaps","removeConstrainedEdge","dimension","indf","locateInfo","iLocate","insertb","li","flipAround","propagatingFlip","depth","isFlipable","maxDepth","ni","flip","e1","e2","uid","eni","eI","edgeSet","lessEdge","indn","ed","tt","ii","u","t1","t2","t3","i3","t4","i4","insertInConstrainedEdge","LocateType","EDGE","insertc","updateConstraintsIncident","VERTEX","clearConstraintsIncident","updateConstraintsOpposite","c1","c2","fc","FaceCirculator","cwi","ccwi","insertFirst","finiteVertex","insertSecond","OUTSIDE_AFFINE_HULL","insertOutsideAffineHull","OUTSIDE_CONVEX_HULL","insertOutsideConvexHull","insertInEdge","FACE","insertInFace","insertDimUp","_infinite","conform","finiteEdge","COUNTERCLOCKWISE","insertOutsideConvexHull2","ccwlist","cwlist","th","marchLocate1D","marchLocate2D","ff","iv","pqt","Triangle","leftFirst","o0","o1","o2","sum","nTurns","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","LayerManager","drawLoop","requestAnimationFrame","addLayer","globalAlpha","getSelection","image","getData","l2gx","l2gy","lm","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_createtoken_modal_vue_vue_type_template_id_73816298_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","BoundingNode","nPrimitives","LeafNode","firstPrimOffset","InteriorNode","union","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","utils_4","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","onKeyDown","keyCode","hasSelection","toggleUI","clipboard","setClipboard","clip","oldTrackers","newTracker","oldAuras","newAura","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","shapecontext_vue_1","createtoken_modal_vue_1","draw_vue_1","filter_vue_1","map_vue_1","pan_1","select_vue_1","manager_2","ruler_1","Tools","currentTool","tools","dmTools","currentToolComponent","visibleTools","tagName","targetTool","button","buttons","annotations","gameManager","annotationManager","setActiveText","select-tool","pan-tool","draw-tool","ruler-tool","RulerTool","map-tool","filter-tool","shape-menu","createtoken-dialog","watch","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","question","answer","resolve","reject","Promise","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_style_index_0_id_0bf2b7ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_style_index_0_id_0bf2b7ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","message","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","botRight","vector","other","xmin","xmax","ymin","ymax","botright","dirIsNeg","txmin","getDiagCorner","txmax","tymin","tymax","tMax","coreVisible","joined","submit","createRoom","newSessionName","tag","getPointDistance","Point","scale","atan2","maxT","toggle","mouseover","hash","mouseout","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_style_index_0_id_4697341e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_labels_vue_vue_type_style_index_0_id_4697341e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","vue_slider_component_1","lodash_1","initiative_vue_1","labels_vue_1","menu_vue_1","note_vue_1","selection_info_vue_1","tools_vue_1","keyboard_1","mouse_1","Game","manager","updateZoom","newZoomDisplay","zoomLocation","addEventListener","resizeWindow","removeEventListener","throttle","scrollZoom","setWidth","setHeight","confirm","dropAsset","tool-bar","selection-info","prompt-dialog","confirm-dialog","menu-bar","initiative-dialog","zoom-slider","note-dialog","label-dialog","obj","z","l2gr","asset_node_vue_1","MenuBar","setUseGrid","setFullFOW","setFOWOpacity","setLineOfSight","setUnitSize","setGridSize","setGridColour","setFOWColour","setRulerColour","setVisionRangeMin","setVisionRangeMax","nextElementSibling","newNote","setVisionMode","asset-node","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","bringPlayers","createToken","showInitiative","_INFINITE_VERTEX","LineFaceState","newPoint","INFINITE","_counter","vertex","A","sign","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","dir","UNDEFINED","_tr","ic","vt","vr","pqr","VERTEX_VERTEX","VERTEX_EDGE","EDGE_VERTEX","EDGE_EDGE","createVertex","addVertex","infiniteVertex","n0","trig","t0","i0","setAdjacency","deleteList","copy","neighbour","lfit","reorient","vCW","vCCW","tri","bl","bli","vv","g","x1","y1","dist","node_1","BoundingVolume","totalNodes","buildData","orderedPrims","nodes","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","localPos","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_6d718094_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_6d718094_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","LoadComponent","openEditDialog","changeValue","maxvalue","getLayers","setLayer","moveToBack","moveToFront","getInitiativeWord","--detailRight","--detailArrow","showArrow","selectionupdate","updateSelection","registerHooks","Dashboard","vm","err","post","$router","_confirm_vue_vue_type_template_id_1883e207_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_cf33581e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_cf33581e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","rename","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","margin","search","selectLabel","lower-opacity","toggleVisibility","deleteLabel","trim","newCategory","newName","addLabel","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_05b88da7_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_05b88da7_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","FOWPlayersLayer","skipPlayerFOW","maxLength","tokenId","_a","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","filterNoLabel","destinationIndex","oldIdx","deltaY","_filter_vue_vue_type_template_id_847e7ec4_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_filter_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","topright","botleft","mx","my","_select_vue_vue_type_template_id_048b3482___WEBPACK_IMPORTED_MODULE_0__","_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_main_vue_vue_type_template_id_61eb1455_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","moveDrag","stopDrag","multiple","hidden","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","inode-selected","cm","startDrag","createtokendialog","Logout","CoreStore","init","App_vue_1","router_1","config","productionTip","devtools","performance","$mount","props","Initiative","code","sessionUrl","_prompt_vue_vue_type_template_id_0602c2e6_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","draw_1","drawt","drawTEContour","Q","rawOutput","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","_edit_dialog_vue_vue_type_template_id_23de098e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","tempFill","Login","password","$route","statusText","span","modal-mask","dialog-mask","dragOver","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","diffsign","xdiff","ydiff","xmid","ymid","_modal_vue_vue_type_template_id_12ed61ba_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_accordion_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","cdt_1","triangulate","partial","cdt","insertConstraint","vision","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","EditDialog","$off","addEmpty","hadAnnotation","an","yes","no","ok","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_af4dc61a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_af4dc61a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_map_vue_vue_type_template_id_2104f147___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","toggleDisplay","toggleCategory","toggleSelection","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_1_id_847e7ec4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_1_id_847e7ec4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","deny","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_filter_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","LabelManager","user","option-selected","max-width","currentTarget","closePicker","z-index","updateColor","_manager_vue_vue_type_template_id_5b0def98___WEBPACK_IMPORTED_MODULE_0__","_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_tool_vue_vue_type_template_id_1e034b42___WEBPACK_IMPORTED_MODULE_0__","_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","keyup","_k","vuedraggable_1","setTurn","getActor","actorId","order","show","option","effectIndex","syncEffect","_selection_info_vue_vue_type_template_id_674cf937_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","bvh_1","GameStore","selectedLayerIndex","boardInitialized","roomName","roomCreator","locationName","vision_mode","filters","updatedLayers","Set","isDM","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","vision_min_range","vision_max_range","full_fow","fow_opacity","fow_los","actualNote","context","commit","Action","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_d32461a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_d32461a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","vision_source","refInFor","tool-selected","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_note_vue_vue_type_template_id_7a3669fd_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_initiative_vue_vue_type_template_id_af4dc61a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","fow_1","fowplayers_1","grid_1","createLayer","layerInfo","zIndex","player_editable","setShapes","_labels_vue_vue_type_template_id_4697341e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_labels_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","focusin","focusout","login","autocomplete","required","visibility","register","edit_dialog_vue_1","SelectionInfo","editDialog","ogValue","isNaN","edit-dialog","setRoomName","setRoomCreator","setInvitationCode","setDM","grid_colour","fow_colour","ruler_colour","setPanX","pan_x","setPanY","pan_y","setZoomDisplay","zoom_factor","active_layer","setLocationName","setCenterPosition","setAssets","locationInfo","setLocations","innerHTML","resetLayerInfo","reset","setBoardInitialized","realShape","setLabelVisibility","setLabelFilters"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAGAe,KAAAhB,GAEA,MAAAO,EAAAC,OACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,EAAA,GAKApB,EAAA,CACAqB,IAAA,GAGAZ,EAAA,GAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA8B,QAGA,IAAAC,EAAAH,EAAA5B,GAAA,CACAK,EAAAL,EACAgC,GAAA,EACAF,QAAA,IAUA,OANAhB,EAAAd,GAAAa,KAAAkB,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAnB,EAGAY,EAAAQ,EAAAN,EAGAF,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AC5B4H,EAAA0J,UAAU2sB,aAAajiC,KAAKgE,GAC5BsM,EAAAO,aAAasG,eAEjBxL,EAAAf,OAAO4U,GAAG,uBAAyBxb,IAC/B,MAAMkX,EAAMtP,EAAA0J,UAAU2sB,aAAa30B,QAAQtJ,GACvCkX,GAAO,IACPtP,EAAA0J,UAAU2sB,aAAajhC,OAAOka,EAAK,GACnC5K,EAAAO,aAAasG,gBAGrBxL,EAAAf,OAAO4U,GAAG,qBAAuBgxC,IAC7B5kD,EAAA0J,UAAUqgD,gBAAgBnF","file":"static/js/app.41dd580f.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2l } from \"@/game/units\";\n\nexport class Text extends Shape {\n type = \"text\";\n text: string;\n font: string;\n angle: number;\n constructor(\n position: GlobalPoint,\n text: string,\n font: string,\n angle?: number,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(position, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n this.angle = angle || 0;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n text: this.text,\n font: this.font,\n angle: this.angle,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(this.refPoint, 5, 5); // TODO: fix this bounding box\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.fillStyle = this.fillColour;\n ctx.save();\n const dest = g2l(this.refPoint);\n ctx.translate(dest.x, dest.y);\n ctx.rotate(this.angle);\n ctx.textAlign = \"center\";\n this.getLines(ctx).map(line => ctx.fillText(line.text, line.x, line.y));\n ctx.restore();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {}\n\n getMaxHeight(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const lineHeight = 30;\n return lineHeight * lines.length;\n }\n\n getMaxWidth(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const widths = lines.map(line => ctx.measureText(line.text).width);\n return Math.max(...widths);\n }\n\n private getLines(ctx: CanvasRenderingContext2D) {\n const lines = this.text.split(\"\\n\");\n const allLines: { text: string; x: number; y: number }[] = [];\n const maxWidth = ctx.canvas.width;\n const lineHeight = 30;\n const x = 0; // this.refPoint.x;\n let y = 0; // this.refPoint.y;\n\n for (const line of lines) {\n let targetLine = \"\";\n const words = line.split(\" \");\n for (const word of words) {\n const testLine = targetLine + word + \" \";\n const metrics = ctx.measureText(testLine);\n const testWidth = metrics.width;\n if (testWidth > maxWidth) {\n ctx.fillText(targetLine, x, y);\n allLines.push({ text: targetLine, x, y });\n targetLine = word + \" \";\n y += lineHeight;\n } else {\n targetLine = testLine;\n }\n }\n allLines.push({ text: targetLine, x, y });\n y += lineHeight;\n }\n return allLines;\n }\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=674cf937&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=674cf937&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"\nimport script from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"759e5a8a\",\n null\n \n)\n\ncomponent.options.__file = \"shapecontext.vue\"\nexport default component.exports","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Chrome } from \"vue-color\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component({\n components: {\n \"chrome-picker\": Chrome,\n },\n})\nexport default class ColorPicker extends Vue {\n @Prop(String) color!: string;\n @Prop(Boolean) disabled!: boolean;\n\n display = false;\n left = 0;\n top = 0;\n transparent = false;\n\n mounted() {\n this.transparent = (this.$refs.chromePicker).val.rgba.a === 0;\n this.setPosition();\n }\n\n open() {\n if (this.display || this.disabled) return; // click on the picker itself\n this.setPosition();\n this.display = true;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n updateColor(value: { rgba: { r: number; g: number; b: number; a: number } }) {\n this.transparent = value.rgba.a === 0;\n const newColor = tinycolor(value.rgba).toRgbString();\n this.$emit(\"update:color\", newColor);\n this.$emit(\"input\", newColor);\n }\n closePicker() {\n this.display = false;\n this.$emit(\"change\", this.color);\n }\n setPosition() {\n const rect = this.$el.getBoundingClientRect();\n // 224 is the width of the picker, 242 the height\n if (rect.right + 224 > window.innerWidth) this.left = rect.left - 224;\n else this.left = rect.right;\n if (rect.bottom + 242 > window.innerHeight) this.top = rect.top - 242;\n else this.top = rect.bottom;\n }\n}\n","import { render, staticRenderFns } from \"./game.vue?vue&type=template&id=05b88da7&scoped=true&\"\nimport script from \"./game.vue?vue&type=script&lang=ts&\"\nexport * from \"./game.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./game.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./game.vue?vue&type=style&index=1&id=05b88da7&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"05b88da7\",\n null\n \n)\n\ncomponent.options.__file = \"game.vue\"\nexport default component.exports","import io from \"socket.io-client\";\nimport { Route } from \"vue-router\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/planarally\", { autoConnect: false });\n\nexport function createConnection(route: Route) {\n socket.io.opts.query = `user=${route.params.creator}&room=${route.params.room}`;\n socket.connect();\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport AssetContextMenu from \"@/assetManager/contextMenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { Asset } from \"@/core/comm/types\";\nimport { uuidv4 } from \"@/core/utils\";\n\n@Component({\n components: {\n Prompt,\n ConfirmDialog,\n AssetContextMenu,\n },\n beforeRouteEnter(to, from, next) {\n socket.connect();\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class AssetManager extends Vue {\n path: number[] = [];\n draggingSelection = false;\n\n get folders(): number[] {\n return assetStore.folders;\n }\n\n get files(): number[] {\n return assetStore.files;\n }\n\n get selected(): number[] {\n return assetStore.selected;\n }\n\n get idMap() {\n return assetStore.idMap;\n }\n\n get currentFolder(): number {\n if (this.path.length) return this.path[this.path.length - 1];\n return assetStore.root;\n }\n get parentFolder(): number {\n let parent = this.path[this.path.length - 2];\n if (parent === undefined) parent = assetStore.root;\n return parent;\n }\n get firstSelectedFile(): Asset | null {\n for (const sel of assetStore.selected) {\n if (assetStore.idMap.get(sel)!.file_hash) {\n return assetStore.idMap.get(sel)!;\n }\n }\n return null;\n }\n changeDirectory(nextFolder: number) {\n if (nextFolder < 0) this.path.pop();\n else this.path.push(nextFolder);\n assetStore.clearSelected();\n socket.emit(\"Folder.Get\", this.currentFolder);\n }\n createDirectory() {\n const name = window.prompt(\"New folder name\");\n if (name !== null) {\n socket.emit(\"Folder.Create\", { name, parent: this.currentFolder });\n }\n }\n moveInode(inode: number, target: number) {\n if (assetStore.files.includes(inode)) assetStore.files.splice(assetStore.files.indexOf(inode), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(inode), 1);\n assetStore.idMap.delete(inode);\n socket.emit(\"Inode.Move\", { inode, target });\n }\n select(event: MouseEvent, inode: number) {\n if (event.shiftKey && assetStore.selected.length > 0) {\n const inodes = [...assetStore.files, ...assetStore.folders];\n const start = inodes.indexOf(assetStore.selected[assetStore.selected.length - 1]);\n const end = inodes.indexOf(inode);\n for (let i = start; i !== end; start < end ? i++ : i--) {\n if (i === start) continue;\n assetStore.selected.push(inodes[i]);\n }\n assetStore.selected.push(inodes[end]);\n } else {\n if (!event.ctrlKey) {\n assetStore.clearSelected();\n }\n assetStore.selected.push(inode);\n }\n }\n startDrag(event: DragEvent, file: number) {\n if (event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"ittyHack\");\n event.dataTransfer.dropEffect = \"move\";\n if (!assetStore.selected.includes(file)) assetStore.selected.push(file);\n this.draggingSelection = true;\n }\n moveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.add(\"inode-selected\");\n }\n leaveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.remove(\"inode-selected\");\n }\n stopDrag(event: DragEvent, target: number) {\n (event.target).classList.remove(\"inode-selected\");\n if (this.draggingSelection) {\n if (\n (target === assetStore.root || assetStore.folders.includes(target)) &&\n !assetStore.selected.includes(target)\n ) {\n for (const inode of assetStore.selected) {\n this.moveInode(inode, target);\n }\n }\n assetStore.clearSelected();\n } else if (event.dataTransfer && event.dataTransfer.files.length > 0) {\n this.upload(event.dataTransfer.files, target);\n }\n this.draggingSelection = false;\n }\n prepareUpload() {\n document.getElementById(\"files\")!.click();\n }\n upload(fls?: FileList, target?: number) {\n const files = (document.getElementById(\"files\")!).files;\n if (fls === undefined) {\n if (files) fls = files;\n else return;\n }\n if (target === undefined) target = this.currentFolder;\n const CHUNK_SIZE = 100000;\n for (const file of fls) {\n const uuid = uuidv4();\n const slices = Math.ceil(file.size / CHUNK_SIZE);\n for (let slice = 0; slice < slices; slice++) {\n const fr = new FileReader();\n fr.readAsArrayBuffer(\n file.slice(\n slice * CHUNK_SIZE,\n slice * CHUNK_SIZE + Math.min(CHUNK_SIZE, file.size - slice * CHUNK_SIZE),\n ),\n );\n fr.onload = e => {\n socket.emit(\"Asset.Upload\", {\n name: file.name,\n directory: target,\n data: fr.result,\n slice,\n totalSlices: slices,\n uuid,\n });\n };\n }\n }\n }\n}\n","import { render, staticRenderFns } from \"./asset_node.vue?vue&type=template&id=6d718094&scoped=true&\"\nimport script from \"./asset_node.vue?vue&type=script&lang=ts&\"\nexport * from \"./asset_node.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./asset_node.vue?vue&type=style&index=0&id=6d718094&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6d718094\",\n null\n \n)\n\ncomponent.options.__file = \"asset_node.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"\nimport script from \"./login.vue?vue&type=script&lang=ts&\"\nexport * from \"./login.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"bc30fc14\",\n null\n \n)\n\ncomponent.options.__file = \"login.vue\"\nexport default component.exports","import { layerManager } from \"@/game/layers/manager\";\nimport { g2lx, g2ly } from \"@/game/units\";\nimport { EdgeIterator, TDS } from \"./tds\";\nimport { ccw, cw } from \"./triag\";\n\nexport function drawPolygon(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) {\n ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nexport function drawPolygonL(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(polygon[0][0], polygon[0][1]);\n for (const point of polygon) {\n ctx.lineTo(point[0], point[1]);\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction x(xx: number, local: boolean) {\n if (local) return xx;\n else return g2lx(xx);\n}\n\nfunction y(yy: number, local: boolean) {\n if (local) return yy;\n else return g2ly(yy);\n}\n\nlet I = 0;\nlet J = 0;\n\nfunction drl(ctx: CanvasRenderingContext2D, from: number[], to: number[], constrained: boolean, local: boolean) {\n // J++;\n // if (constrained) {\n // I++;\n // console.log(\"*\", from, to);\n // } else {\n // console.log(\" \", from, to);\n // }\n ctx.beginPath();\n ctx.strokeStyle = constrained ? \"rgba(255, 0, 0, 0.30)\" : \"rgba(0, 0, 0, 0.30)\";\n ctx.moveTo(x(from[0], local), y(from[1], local));\n ctx.lineTo(x(to[0], local), y(to[1], local));\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction drawPolygonT(tds: TDS, local = true, clear = true, logs: 0 | 1 | 2 = 0) {\n I = 0;\n J = 0;\n let T = 0;\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n if (clear) ctx.clearRect(0, 0, 2000, 1000);\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n const ei = new EdgeIterator(tds);\n while (ei.valid) {\n ei.next();\n ei.collect();\n }\n ei.collect();\n do {\n const fromP = ei.edge.first!.vertices[ccw(ei.edge.second)]!.point!;\n const toP = ei.edge.first!.vertices[cw(ei.edge.second)]!.point!;\n if (logs > 0) {\n if (fromP[0] === -Infinity || toP[0] === -Infinity) {\n ei.next();\n continue;\n }\n J++;\n if (ei.edge.first!.constraints[ei.edge.second]) {\n I++;\n if (logs === 2) console.log(`Edge: (*) ${fromP} > ${toP}`);\n } else if (logs === 2) console.log(`Edge: ${fromP} > ${toP}`);\n }\n do {\n ei.next();\n ei.collect();\n } while (ei.valid);\n } while (ei.pos !== null);\n for (const t of tds.triangles) {\n if (t.isInfinite()) continue;\n T++;\n const po = [];\n ctx.fillStyle = \"red\";\n if (t.vertices[0] !== undefined) {\n po.push(t.vertices[0]!.point);\n ctx.beginPath();\n ctx.arc(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[1] !== undefined) {\n po.push(t.vertices[1]!.point);\n ctx.arc(x(t.vertices[1]!.point![0], local), y(t.vertices[1]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[2] !== undefined) {\n po.push(t.vertices[2]!.point);\n ctx.arc(x(t.vertices[2]!.point![0], local), y(t.vertices[2]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (logs === 2) console.log(\"[T] \", ...po, t.constraints);\n\n ctx.moveTo(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local));\n if (t.vertices[0] !== undefined && t.vertices[1] !== undefined)\n drl(ctx, t.vertices[0]!.point!, t.vertices[1]!.point!, t.constraints[2], local);\n if (t.vertices[1] !== undefined && t.vertices[2] !== undefined)\n drl(ctx, t.vertices[1]!.point!, t.vertices[2]!.point!, t.constraints[0], local);\n if (t.vertices[2] !== undefined && t.vertices[0] !== undefined)\n drl(ctx, t.vertices[2]!.point!, t.vertices[0]!.point!, t.constraints[1], local);\n }\n if (logs > 0) {\n console.log(`Edges: ${I}/${J}`);\n console.log(`Faces: ${T}`);\n }\n}\n\n(window).DP = drawPolygon;\n(window).DPL = drawPolygonL;\n(window).DPT = drawPolygonT;\n","import { render, staticRenderFns } from \"./accordion.vue?vue&type=template&id=0bf2b7ba&scoped=true&\"\nimport script from \"./accordion.vue?vue&type=script&lang=ts&\"\nexport * from \"./accordion.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./accordion.vue?vue&type=style&index=0&id=0bf2b7ba&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0bf2b7ba\",\n null\n \n)\n\ncomponent.options.__file = \"accordion.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"","import * as tinycolor from \"tinycolor2\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerCircularToken } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lz } from \"@/game/units\";\n\nexport class CircularToken extends Circle {\n type = \"circulartoken\";\n text: string;\n font: string;\n constructor(\n center: GlobalPoint,\n r: number,\n text: string,\n font: string,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(center, r, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n }\n asDict(): ServerCircularToken {\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n text: this.text,\n font: this.font,\n });\n }\n fromDict(data: ServerCircularToken) {\n super.fromDict(data);\n this.r = data.radius;\n this.text = data.text;\n this.font = data.font;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.save();\n const dest = g2l(this.center());\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, g2lz(this.r), g2lz(this.r));\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name === \"\" || this.name === \"Unknown shape\" ? this.text : this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\n\nexport class AnnotationManager {\n annotationText: Text;\n annotationRect: Rect;\n layer: Layer | undefined;\n shown: boolean = false;\n\n constructor() {\n const origin = new GlobalPoint(0, 0);\n this.annotationText = new Text(origin, \"\", \"bold 20px serif\", 0, \"rgba(230, 230, 230, 1)\");\n this.annotationRect = new Rect(origin, 0, 0, \"rgba(0, 0, 0, 0.6)\");\n }\n\n setActiveText(text: string) {\n if (this.layer === undefined) {\n if (layerManager.hasLayer(\"draw\")) {\n this.layer = layerManager.getLayer(\"draw\")!;\n this.layer.addShape(this.annotationRect, false);\n this.layer.addShape(this.annotationText, false);\n } else {\n console.warn(\"There is no draw layer to draw annotations on!\");\n return;\n }\n }\n this.shown = text !== \"\";\n this.annotationText.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2, 50));\n this.annotationText.text = text;\n const width = this.shown ? this.annotationText.getMaxWidth(this.layer.ctx) + 10 : 0;\n const height = this.shown ? this.annotationText.getMaxHeight(this.layer.ctx) + 10 : 0;\n this.annotationRect.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2 - width / 2, 30));\n this.annotationRect.w = width / gameStore.zoomFactor;\n this.annotationRect.h = height / gameStore.zoomFactor;\n this.layer.invalidate(true);\n }\n}\n","import { render, staticRenderFns } from \"./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"\nimport script from \"./menu.vue?vue&type=script&lang=ts&\"\nexport * from \"./menu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"aaf3f05e\",\n null\n \n)\n\ncomponent.options.__file = \"menu.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./contextmenu.vue?vue&type=template&id=256dde9c&\"\nimport script from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./contextmenu.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextmenu.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"","import {\n ServerAsset,\n ServerCircle,\n ServerCircularToken,\n ServerLine,\n ServerMultiLine,\n ServerPolygon,\n ServerRect,\n ServerShape,\n ServerText,\n} from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { Text } from \"@/game/shapes/text\";\nimport { Polygon } from \"./polygon\";\n\nexport function createShapeFromDict(shape: ServerShape) {\n let sh: Shape;\n\n // A fromJSON and toJSON on Shape would be cleaner but ts does not allow for static abstracts so yeah.\n\n // Shape Type specifics\n\n const refPoint = new GlobalPoint(shape.x, shape.y);\n if (shape.type_ === \"rect\") {\n const rect = shape;\n sh = new Rect(refPoint, rect.width, rect.height, rect.fill_colour, rect.stroke_colour, rect.uuid);\n } else if (shape.type_ === \"circle\") {\n const circ = shape;\n sh = new Circle(refPoint, circ.radius, circ.fill_colour, circ.stroke_colour, circ.uuid);\n } else if (shape.type_ === \"circulartoken\") {\n const token = shape;\n sh = new CircularToken(\n refPoint,\n token.radius,\n token.text,\n token.font,\n token.fill_colour,\n token.stroke_colour,\n token.uuid,\n );\n } else if (shape.type_ === \"line\") {\n const line = shape;\n sh = new Line(refPoint, new GlobalPoint(line.x2, line.y2), line.line_width, line.stroke_colour, line.uuid);\n } else if (shape.type_ === \"multiline\") {\n const multiline = shape;\n sh = new MultiLine(\n refPoint,\n multiline.points.map(p => new GlobalPoint(p.x, p.y)),\n multiline.line_width,\n multiline.stroke_colour,\n multiline.uuid,\n );\n } else if (shape.type_ === \"polygon\") {\n const polygon = shape;\n sh = new Polygon(\n refPoint,\n polygon.vertices.map(v => new GlobalPoint(v.x, v.y)),\n polygon.fill_colour,\n polygon.stroke_colour,\n polygon.uuid,\n );\n } else if (shape.type_ === \"text\") {\n const text = shape;\n sh = new Text(refPoint, text.text, text.font, text.angle, text.fill_colour, text.stroke_colour, text.uuid);\n } else if (shape.type_ === \"assetrect\") {\n const asset = shape;\n const img = new Image(asset.width, asset.height);\n if (asset.src.startsWith(\"http\")) img.src = new URL(asset.src).pathname;\n else img.src = asset.src;\n sh = new Asset(img, refPoint, asset.width, asset.height, asset.uuid);\n img.onload = () => {\n layerManager.getLayer(shape.layer)!.invalidate(false);\n };\n } else {\n return undefined;\n }\n sh.fromDict(shape);\n return sh;\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SelectContext',{ref:\"selectcontext\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=template&id=048b3482&\"","import tinycolor from \"tinycolor2\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { aurasFromServer, aurasToServer } from \"@/game/comm/conversion/aura\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport abstract class Shape {\n // Used to create class instance from server shape data\n abstract readonly type: string;\n // The unique ID of this shape\n readonly uuid: string;\n // The layer the shape is currently on\n layer!: string;\n\n // A reference point regarding that specific shape's structure\n protected _refPoint: GlobalPoint;\n\n // Fill colour of the shape\n fillColour: string = \"#000\";\n strokeColour: string = \"rgba(0,0,0,0)\";\n // The optional name associated with the shape\n name = \"Unknown shape\";\n nameVisible = true;\n\n // Associated trackers/auras/owners\n trackers: Tracker[] = [];\n auras: Aura[] = [];\n labels: Label[] = [];\n protected _owners: string[] = [];\n\n // Block light sources\n visionObstruction = false;\n // Prevent shapes from overlapping with this shape\n movementObstruction = false;\n // Does this shape represent a playable token\n isToken = false;\n // Show a highlight box\n showHighlight = false;\n\n // Mouseover annotation\n annotation: string = \"\";\n\n // Draw modus to use\n globalCompositeOperation: string = \"source-over\";\n\n // Additional options for specialized uses\n options: Map = new Map();\n\n constructor(refPoint: GlobalPoint, fillColour?: string, strokeColour?: string, uuid?: string) {\n this._refPoint = refPoint;\n this.uuid = uuid || uuidv4();\n if (fillColour !== undefined) this.fillColour = fillColour;\n if (strokeColour !== undefined) this.strokeColour = strokeColour;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n this._refPoint = point;\n }\n\n abstract getBoundingBox(): BoundingRect;\n\n // If inWorldCoord is\n abstract contains(point: GlobalPoint): boolean;\n\n abstract center(): GlobalPoint;\n abstract center(centerPoint: GlobalPoint): void;\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n // for (const aura of this.auras) {\n // if (aura.value > 0) {\n // const auraCircle = new Circle(this.center(), aura.value);\n // if (auraCircle.visibleInCanvas(canvas)) return true;\n // }\n // }\n return false;\n }\n\n // Code to snap a shape to the grid\n // This is shape dependent as the shape refPoints are shape specific in\n abstract snapToGrid(): void;\n abstract resizeToGrid(): void;\n abstract resize(resizePoint: number, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n getPointIndex(p: GlobalPoint, delta = 0): number {\n for (const [idx, point] of this.points.entries()) {\n if (Math.abs(p.x - point[0]) <= delta && Math.abs(p.y - point[1]) <= delta) return idx;\n }\n return -1;\n }\n\n getPointOrientation(i: number): Vector {\n const prev = GlobalPoint.fromArray(this.points[(this.points.length + i - 1) % this.points.length]);\n const point = GlobalPoint.fromArray(this.points[i]);\n const next = GlobalPoint.fromArray(this.points[(i + 1) % this.points.length]);\n const vec = next.subtract(prev);\n const mid = prev.add(vec.multiply(0.5));\n return point.subtract(mid).normalize();\n }\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources(recalculate = true) {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let update = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n update = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateVision();\n\n // Check if the visionsource auras are in the gameManager\n this.auras.forEach(au => {\n const ls = gameStore.visionSources;\n const i = ls.findIndex(o => o.aura === au.uuid);\n if (au.visionSource && i === -1) {\n ls.push({ shape: self.uuid, aura: au.uuid });\n } else if (!au.visionSource && i >= 0) {\n ls.splice(i, 1);\n }\n });\n // Check if anything in the gameManager referencing this shape is in fact still a visionsource\n for (let i = gameStore.visionSources.length - 1; i >= 0; i--) {\n const ls = gameStore.visionSources[i];\n if (ls.shape === self.uuid) {\n if (!self.auras.some(a => a.uuid === ls.aura && a.visionSource)) gameStore.visionSources.splice(i, 1);\n }\n }\n }\n\n setMovementBlock(blocksMovement: boolean, recalculate = true) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n let update = false;\n if (this.movementObstruction && obstructionIndex === -1) {\n gameStore.movementblockers.push(this.uuid);\n update = true;\n } else if (!this.movementObstruction && obstructionIndex >= 0) {\n gameStore.movementblockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateMovement();\n }\n\n setIsToken(isToken: boolean) {\n this.isToken = isToken;\n if (this.ownedBy()) {\n const i = gameStore.ownedtokens.indexOf(this.uuid);\n if (this.isToken && i === -1) gameStore.ownedtokens.push(this.uuid);\n else if (!this.isToken && i >= 0) gameStore.ownedtokens.splice(i, 1);\n }\n }\n\n abstract asDict(): ServerShape;\n getBaseDict(): ServerShape {\n return {\n type_: this.type,\n uuid: this.uuid,\n x: this.refPoint.x,\n y: this.refPoint.y,\n layer: this.layer,\n draw_operator: this.globalCompositeOperation,\n movement_obstruction: this.movementObstruction,\n vision_obstruction: this.visionObstruction,\n auras: aurasToServer(this.auras),\n trackers: this.trackers,\n labels: this.labels,\n owners: this._owners,\n fill_colour: this.fillColour,\n stroke_colour: this.strokeColour,\n name: this.name,\n name_visible: this.nameVisible,\n annotation: this.annotation,\n is_token: this.isToken,\n options: JSON.stringify([...this.options]),\n };\n }\n fromDict(data: ServerShape) {\n this.layer = data.layer;\n this.globalCompositeOperation = data.draw_operator;\n this.movementObstruction = data.movement_obstruction;\n this.visionObstruction = data.vision_obstruction;\n this.auras = aurasFromServer(data.auras);\n this.trackers = data.trackers;\n this.labels = data.labels;\n this._owners = data.owners;\n this.isToken = data.is_token;\n this.nameVisible = data.name_visible;\n if (data.annotation) this.annotation = data.annotation;\n if (data.name) this.name = data.name;\n if (data.options) this.options = new Map(JSON.parse(data.options));\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n if (this.globalCompositeOperation !== undefined) ctx.globalCompositeOperation = this.globalCompositeOperation;\n else ctx.globalCompositeOperation = \"source-over\";\n if (this.showHighlight) {\n const bbox = this.getBoundingBox();\n ctx.strokeStyle = \"red\";\n ctx.strokeRect(g2lx(bbox.topLeft.x) - 5, g2ly(bbox.topLeft.y) - 5, g2lz(bbox.w) + 10, g2lz(bbox.h) + 10);\n }\n }\n\n drawAuras(ctx: CanvasRenderingContext2D) {\n for (const aura of this.auras) {\n if (aura.value === 0 && aura.dim === 0) return;\n ctx.beginPath();\n\n const loc = g2l(this.center());\n const innerRange = g2lr(aura.value + aura.dim);\n\n if (aura.dim === 0) ctx.fillStyle = aura.colour;\n else {\n const gradient = ctx.createRadialGradient(\n loc.x,\n loc.y,\n g2lr(aura.value),\n loc.x,\n loc.y,\n g2lr(aura.value + aura.dim),\n );\n const tc = tinycolor(aura.colour);\n ctx.fillStyle = gradient;\n gradient.addColorStop(0, aura.colour);\n gradient.addColorStop(1, tc.setAlpha(0).toRgbString());\n }\n if (!aura.visionSource || aura.lastPath === undefined) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n } else {\n try {\n ctx.fill(aura.lastPath);\n } catch (e) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n console.warn(e);\n }\n }\n }\n }\n\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n\n moveLayer(layer: string, sync: boolean) {\n const oldLayer = layerManager.getLayer(this.layer);\n const newLayer = layerManager.getLayer(layer);\n if (oldLayer === undefined || newLayer === undefined) return;\n this.layer = layer;\n // Update layer shapes\n oldLayer.shapes.splice(oldLayer.shapes.indexOf(this), 1);\n newLayer.shapes.push(this);\n // Revalidate layers (light should at most be redone once)\n oldLayer.invalidate(true);\n newLayer.invalidate(false);\n // Sync!\n if (sync) socket.emit(\"Shape.Layer.Change\", { uuid: this.uuid, layer });\n }\n\n get owners() {\n return Object.freeze(this._owners.slice());\n }\n\n ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this._owners.includes(username);\n }\n\n addOwner(owner: string) {\n if (!this._owners.includes(owner)) this._owners.push(owner);\n }\n\n updateOwner(oldValue: string, newValue: string) {\n const ownerIndex = this._owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this._owners.splice(ownerIndex, 1, newValue);\n else this.addOwner(newValue);\n }\n\n removeOwner(owner: string) {\n const ownerIndex = this._owners.findIndex(o => o === owner);\n this._owners.splice(ownerIndex, 1);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.note !== null)?_c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('span',{on:{\"click\":function($event){_vm.$refs.title.select()}}},[_c('i',{staticClass:\"fas fa-pencil-alt\",staticStyle:{\"font-size\":\"15px\"}})]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.title),expression:\"note.title\"}],ref:\"title\",domProps:{\"value\":(_vm.note.title)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"title\", $event.target.value)}}}),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.text),expression:\"note.text\"}],ref:\"textarea\",style:({'height': _vm.calcHeight()}),domProps:{\"value\":(_vm.note.text)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"text\", $event.target.value)}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.removeNote}},[_c('i',{staticClass:\"far fa-trash-alt\"}),_vm._v(\" Remove\\n \")])])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"","\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport SelectContext from \"@/game/ui/tools/selectcontext.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\nimport SelectionInfo from \"../selection/selection_info.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint, LocalPoint, Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, l2g, l2gz } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport enum SelectOperations {\n Noop,\n Resize,\n Drag,\n GroupSelect,\n}\n\nconst start = new GlobalPoint(-1000, -1000);\n\n@Component({\n components: {\n SelectContext,\n },\n})\nexport default class SelectTool extends Tool {\n name = \"Select\";\n showContextMenu = false;\n active = false;\n\n mode = SelectOperations.Noop;\n resizePoint = 0;\n deltaChanged = false;\n // Because we never drag from the asset's (0, 0) coord and want a smoother drag experience\n // we keep track of the actual offset within the asset.\n dragRay = new Ray(new LocalPoint(0, 0), new Vector(0, 0));\n selectionStartPoint = start;\n selectionHelper = new Rect(start, 0, 0);\n created() {\n this.selectionHelper.globalCompositeOperation = \"source-over\";\n }\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (!this.selectionHelper.owners.includes(gameStore.username)) {\n this.selectionHelper.addOwner(gameStore.username);\n }\n\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n let hit = false;\n // The selectionStack allows for lower positioned objects that are selected to have precedence during overlap.\n let selectionStack;\n if (!layer.selection.length) selectionStack = layer.shapes;\n else selectionStack = layer.shapes.concat(layer.selection);\n for (let i = selectionStack.length - 1; i >= 0; i--) {\n const shape = selectionStack[i];\n\n this.resizePoint = shape.getPointIndex(globalMouse, l2gz(3));\n\n // Resize case, a corner is selected\n if (this.resizePoint >= 0) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n layer.invalidate(true);\n hit = true;\n break;\n\n // Drag case, a shape is selected\n } else if (shape.contains(globalMouse)) {\n const selection = shape;\n if (layer.selection.indexOf(selection) === -1) {\n layer.selection = [selection];\n getRef(\"selectionInfo\").shape = selection;\n }\n this.mode = SelectOperations.Drag;\n const localRefPoint = g2l(selection.refPoint);\n this.dragRay = new Ray(localRefPoint, mouse.subtract(localRefPoint));\n layer.invalidate(true);\n hit = true;\n break;\n }\n }\n\n // GroupSelect case, draw a selection box to select multiple shapes\n if (!hit) {\n this.mode = SelectOperations.GroupSelect;\n for (const selection of layer.selection) getRef(\"selectionInfo\").shape = selection;\n\n this.selectionStartPoint = globalMouse;\n\n this.selectionHelper.refPoint = this.selectionStartPoint;\n this.selectionHelper.w = 0;\n this.selectionHelper.h = 0;\n\n layer.selection = [this.selectionHelper];\n layer.invalidate(true);\n }\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n // if (!this.active) return; we require mousemove for the resize cursor\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n this.deltaChanged = false;\n\n if (this.mode === SelectOperations.GroupSelect) {\n // Currently draw on active layer\n const endPoint = globalMouse;\n\n this.selectionHelper.w = Math.abs(endPoint.x - this.selectionStartPoint.x);\n this.selectionHelper.h = Math.abs(endPoint.y - this.selectionStartPoint.y);\n this.selectionHelper.refPoint = new GlobalPoint(\n Math.min(this.selectionStartPoint.x, endPoint.x),\n Math.min(this.selectionStartPoint.y, endPoint.y),\n );\n layer.invalidate(true);\n } else if (layer.selection.length) {\n const og = g2l(layer.selection[layer.selection.length - 1].refPoint);\n const origin = og.add(this.dragRay.direction);\n let delta = mouse.subtract(origin).multiply(1 / gameStore.zoomFactor);\n const ogDelta = delta;\n if (this.mode === SelectOperations.Drag) {\n // If we are on the tokens layer do a movement block check.\n if (layer.name === \"tokens\" && !(event.shiftKey && gameStore.IS_DM)) {\n for (const sel of layer.selection) {\n if (!sel.ownedBy()) continue;\n if (sel.uuid === this.selectionHelper.uuid) continue; // the selection helper should not be treated as a real shape.\n delta = calculateDelta(delta, sel);\n if (delta !== ogDelta) this.deltaChanged = true;\n }\n }\n // Actually apply the delta on all shapes\n for (const sel of layer.selection) {\n if (!sel.ownedBy()) continue;\n sel.refPoint = sel.refPoint.add(delta);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n }\n layer.invalidate(false);\n } else if (this.mode === SelectOperations.Resize) {\n for (const sel of layer.selection) {\n if (!sel.ownedBy()) continue;\n sel.resize(this.resizePoint, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n this.updateCursor(layer, globalMouse);\n }\n } else {\n this.updateCursor(layer, globalMouse);\n }\n } else {\n document.body.style.cursor = \"default\";\n }\n }\n onMouseUp(e: MouseEvent): void {\n if (!this.active) return;\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n\n if (this.mode === SelectOperations.GroupSelect) {\n layer.clearSelection();\n layer.shapes.forEach(shape => {\n if (!shape.ownedBy()) return;\n if (shape === this.selectionHelper) return;\n const bbox = shape.getBoundingBox();\n if (!shape.ownedBy()) return;\n if (\n this.selectionHelper!.refPoint.x <= bbox.topRight.x &&\n this.selectionHelper!.refPoint.x + this.selectionHelper!.w >= bbox.topLeft.x &&\n this.selectionHelper!.refPoint.y <= bbox.botLeft.y &&\n this.selectionHelper!.refPoint.y + this.selectionHelper!.h >= bbox.topLeft.y\n ) {\n layer.selection.push(shape);\n }\n });\n\n // Push the selection helper as the last element of the selection\n // This makes sure that it will be the first one to be hit in the hit detection onMouseDown\n if (layer.selection.length > 0) layer.selection.push(this.selectionHelper);\n\n layer.invalidate(true);\n } else if (layer.selection.length) {\n layer.selection.forEach(sel => {\n if (!sel.ownedBy()) return;\n if (this.mode === SelectOperations.Drag) {\n if (\n this.dragRay.origin!.x === g2lx(sel.refPoint.x) &&\n this.dragRay.origin!.y === g2ly(sel.refPoint.y)\n )\n return;\n\n if (gameStore.useGrid && !e.altKey && !this.deltaChanged) {\n sel.snapToGrid();\n }\n\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n if (this.mode === SelectOperations.Resize) {\n if (gameStore.useGrid && !e.altKey) {\n sel.resizeToGrid();\n }\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n });\n }\n this.mode = SelectOperations.Noop;\n this.active = false;\n }\n onContextMenu(event: MouseEvent) {\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n for (const shape of layer.selection) {\n if (shape.contains(globalMouse) && shape !== this.selectionHelper) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n layer.invalidate(true);\n (this.$parent.$refs.shapecontext).open(event, shape);\n return;\n }\n }\n (this.$refs.selectcontext).open(event);\n }\n updateCursor(layer: Layer, globalMouse: GlobalPoint) {\n for (const sel of layer.selection) {\n const resizePoint = sel.getPointIndex(globalMouse, l2gz(3));\n if (resizePoint < 0) document.body.style.cursor = \"default\";\n else {\n let angle = sel.getPointOrientation(resizePoint).angle();\n if (angle < 0) angle += 360;\n const d = 45 / 2;\n if (angle >= 315 + d || angle < d || (angle >= 135 + d && angle < 225 - d))\n document.body.style.cursor = \"ew-resize\";\n if ((angle >= 45 + d && angle < 135 - d) || (angle >= 225 + d && angle < 315 - d))\n document.body.style.cursor = \"ns-resize\";\n if ((angle >= d && angle < 90 - d) || (angle >= 180 + d && angle < 270 - d))\n document.body.style.cursor = \"nwse-resize\";\n if ((angle >= 90 + d && angle < 180 - d) || (angle >= 270 + d && angle < 360 - d))\n document.body.style.cursor = \"nesw-resize\";\n }\n }\n }\n}\n","import { GlobalPoint, Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { PA_CDT } from \"@/game/visibility/te/pa\";\nimport { Point, Sign, Triangle } from \"@/game/visibility/te/tds\";\nimport { ccw, cw, intersection, orientation } from \"@/game/visibility/te/triag\";\n\n// First go through each shape in the selection and see if the delta has to be truncated due to movement blockers\n\n// This is definitely super convoluted and inefficient but I was tired and really wanted the smooth wall sliding collision stuff to work\n// And it does now, so hey ¯\\_(ツ)_/¯\nexport function calculateDelta(delta: Vector, sel: Shape, done?: string[]) {\n if (delta.x === 0 && delta.y === 0) return delta;\n if (gameStore.visionMode === \"bvh\") {\n if (done === undefined) done = [];\n const ogSelBBox = sel.getBoundingBox();\n const newSelBBox = ogSelBBox.offset(delta);\n let refine = false;\n for (const movementBlocker of gameStore.movementblockers) {\n if (done.includes(movementBlocker)) continue;\n const blocker = layerManager.UUIDMap.get(movementBlocker)!;\n const blockerBBox = blocker.getBoundingBox();\n let found = blockerBBox.intersectsWithInner(newSelBBox);\n if (!found) {\n // This is an edge case, precalculating the rays is not worth in this case.\n const ray = Ray.fromPoints(ogSelBBox.topLeft.add(delta.normalize()), newSelBBox.topLeft);\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n found = blockerBBox.intersectP(ray, invDir, dirIsNegative).hit;\n }\n // Check if the bounding box of our destination would intersect with the bounding box of the movementblocker\n if (found) {\n const bCenter = blockerBBox.center();\n const sCenter = ogSelBBox.center();\n\n const d = sCenter.subtract(bCenter);\n const ux = new Vector(1, 0);\n const uy = new Vector(0, 1);\n let dx = d.dot(ux);\n let dy = d.dot(uy);\n if (dx > blockerBBox.w / 2) dx = blockerBBox.w / 2;\n if (dx < -blockerBBox.w / 2) dx = -blockerBBox.w / 2;\n if (dy > blockerBBox.h / 2) dy = blockerBBox.h / 2;\n if (dy < -blockerBBox.h / 2) dy = -blockerBBox.h / 2;\n\n // Closest point / intersection point between the two bboxes. Not the delta intersect!\n const p = bCenter.add(ux.multiply(dx)).add(uy.multiply(dy));\n\n if (p.x === ogSelBBox.topLeft.x || p.x === ogSelBBox.topRight.x) delta = new Vector(0, delta.y);\n else if (p.y === ogSelBBox.topLeft.y || p.y === ogSelBBox.botLeft.y) delta = new Vector(delta.x, 0);\n else {\n if (p.x < ogSelBBox.topLeft.x) delta = new Vector(p.x - ogSelBBox.topLeft.x, delta.y);\n else if (p.x > ogSelBBox.topRight.x) delta = new Vector(p.x - ogSelBBox.topRight.x, delta.y);\n else if (p.y < ogSelBBox.topLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.topLeft.y);\n else if (p.y > ogSelBBox.botLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.botLeft.y);\n }\n refine = true;\n done.push(movementBlocker);\n break;\n }\n }\n if (refine) delta = calculateDelta(delta, sel, done);\n return delta;\n } else {\n const centerTriangle = PA_CDT.movement.locate(sel.center().asArray(), null).loc;\n for (const point of sel.points) {\n const lt = PA_CDT.movement.locate(point, centerTriangle);\n const triangle = lt.loc;\n if (triangle === null) continue;\n delta = checkTriangle(point, triangle, delta);\n }\n return delta;\n }\n}\n\nfunction checkTriangle(point: Point, triangle: Triangle, delta: Vector, skip: Triangle[] = []): Vector {\n const p = new GlobalPoint(point[0], point[1]);\n const endpoint = p.add(delta).asArray();\n if (triangle.contains(endpoint)) return delta;\n skip.push(triangle);\n\n for (let i = 0; i < 3; i++) {\n if (skip.includes(triangle.neighbours[i]!)) continue;\n\n const _cw = triangle.vertices[cw(i)]!.point!;\n const _ccw = triangle.vertices[ccw(i)]!.point!;\n const ix = intersection(point, endpoint, _cw, _ccw);\n\n if (ix === null) continue;\n\n if (!triangle.isConstrained(i)) return checkTriangle(point, triangle.neighbours[i]!, delta, skip);\n\n if (ix[0] === p.x && ix[1] === p.y) {\n const OR = orientation;\n const o = orientation(point, endpoint, _ccw);\n // Remember: canvas y axis is inverted\n if (o === Sign.LEFT_TURN) continue;\n if (o === Sign.ZERO) continue;\n }\n let newDelta = new GlobalPoint(ix[0], ix[1]).subtract(p).multiply(0.8);\n if (newDelta.length() < 1) newDelta = new Vector(0, 0);\n if (newDelta.length() < delta.length()) delta = newDelta;\n }\n return delta;\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=script&lang=ts&\"","import { socket } from \"@/game/api/socket\";\nimport { gameStore } from \"@/game/store\";\n\nexport function sendClientOptions() {\n socket.emit(\"Client.Options.Set\", {\n locationOptions: {\n panX: gameStore.panX,\n panY: gameStore.panY,\n zoomFactor: gameStore.zoomFactor,\n },\n });\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\nimport { AssetFile, AssetList } from \"@/core/comm/types\";\nimport { alphSort } from \"@/core/utils\";\n\n@Component({\n name: \"asset-node\",\n})\nexport default class AssetNode extends Vue {\n @Prop() asset!: AssetList;\n\n showImage = null;\n get folders(): string[] {\n return Object.keys(this.asset)\n .filter(el => ![\"__files\"].includes(el))\n .sort(alphSort);\n }\n\n get files(): AssetFile[] {\n if (this.asset.__files)\n return (this.asset.__files)\n .concat()\n .sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1));\n return [];\n }\n\n toggle(event: { target: HTMLElement }) {\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < event.target.children.length; i++) {\n const el = event.target.children[i];\n el.style.display = el.style.display === \"\" ? \"block\" : \"\";\n }\n }\n\n dragStart(event: DragEvent, imageSource: string) {\n this.showImage = null;\n if (event === null || event.dataTransfer === null) return;\n const img = (event.target).querySelector(\".preview\")!;\n event.dataTransfer.setDragImage(img, 0, 0);\n event.dataTransfer.setData(\"text/plain\", imageSource);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:\"ContextMenu\",style:({left:_vm.left, top:_vm.top}),attrs:{\"tabindex\":\"-1\"},on:{\"blur\":function($event){_vm.$emit('close')}}},[_c('ul',[_vm._t(\"default\")],2)]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=template&id=256dde9c&\"","// import Vuex from \"vuex\";\nimport { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { rootStore } from \"@/store\";\n\nexport interface AssetState {\n root: number;\n files: number[];\n folders: number[];\n idMap: Map;\n selected: number[];\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"assets\", namespaced: true })\nclass AssetStore extends VuexModule {\n root = -1;\n files: number[] = [];\n folders: number[] = [];\n idMap: Map = new Map();\n selected: number[] = [];\n\n @Mutation\n clear() {\n this.folders = [];\n this.files = [];\n }\n\n @Mutation\n clearSelected() {\n console.log(\"Cleared\");\n this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n}\n\nexport const assetStore = getModule(AssetStore);\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class ShapeContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n shape: Shape | null = null;\n get activeLayer(): string {\n const layer = layerManager.getLayer();\n return layer === undefined ? \"\" : layer.name;\n }\n open(event: MouseEvent, shape: Shape) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.shape = shape;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n this.shape = null;\n }\n getLayers() {\n return layerManager.layers.filter(l => l.selectable && (gameStore.IS_DM || l.playerEditable));\n }\n getActiveLayer() {\n return layerManager.getLayer();\n }\n getInitiativeWord() {\n if (this.shape === null) return \"\";\n return getRef(\"initiative\").contains(this.shape.uuid) ? \"Show\" : \"Add\";\n }\n setLayer(newLayer: string) {\n if (this.shape === null) return;\n this.shape.moveLayer(newLayer, true);\n this.close();\n }\n moveToBack() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, 0, true);\n this.close();\n }\n moveToFront() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, layer.shapes.length - 1, true);\n this.close();\n }\n addInitiative() {\n if (this.shape === null) return;\n const initiative = getRef(\"initiative\");\n if (!initiative.contains(this.shape.uuid)) initiative.addInitiative(this.shape.getInitiativeRepr());\n initiative.visible = true;\n this.close();\n }\n openEditDialog() {\n EventBus.$emit(\"EditDialog.Open\", this.shape);\n this.close();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"","import { Layer } from \"@/game/layers/layer\";\nimport { gameStore } from \"@/game/store\";\n\nexport class GridLayer extends Layer {\n invalidate(): void {\n this.valid = false;\n }\n draw(doClear?: boolean): void {\n if (!this.valid) {\n this.drawGrid();\n }\n }\n drawGrid(): void {\n const ctx = this.ctx;\n this.clear();\n ctx.beginPath();\n\n const gs = gameStore.gridSize;\n\n for (let i = 0; i < this.width; i += gs * gameStore.zoomFactor) {\n ctx.moveTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, 0);\n ctx.lineTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, this.height);\n ctx.moveTo(0, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n ctx.lineTo(this.width, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n }\n\n ctx.strokeStyle = gameStore.gridColour;\n ctx.lineWidth = 1;\n ctx.stroke();\n this.valid = true;\n }\n}\n","import Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nimport { AssetState } from \"@/assetManager/store\";\nimport { CoreState } from \"@/core/store\";\nimport { GameState } from \"@/game/store\";\n\nVue.use(Vuex);\n\nexport interface RootState {\n assets: AssetState;\n core: CoreState;\n game: GameState;\n}\n\nexport const rootStore = new Vuex.Store({});\n","import { render, staticRenderFns } from \"./colorpicker.vue?vue&type=template&id=d32461a4&scoped=true&\"\nimport script from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nexport * from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./colorpicker.vue?vue&type=style&index=0&id=d32461a4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d32461a4\",\n null\n \n)\n\ncomponent.options.__file = \"colorpicker.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view',{ref:\"activeComponent\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=196415f0&\"\nvar script = {}\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"App.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"main\"},on:{\"mouseleave\":_vm.mouseleave,\"wheel\":_vm.zoom}},[(_vm.showUI)?_c('menu-bar'):_vm._e(),_c('div',{attrs:{\"id\":\"board\"}},[(_vm.ready.manager)?[_c('tool-bar',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI),expression:\"showUI\"}],ref:\"tools\"})]:_vm._e(),_c('div',{attrs:{\"id\":\"layers\"},on:{\"mousedown\":_vm.mousedown,\"mouseup\":_vm.mouseup,\"mousemove\":_vm.mousemove,\"contextmenu\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.contextmenu($event)},\"dragover\":function($event){$event.preventDefault();},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.drop($event)}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI && _vm.layers.length>1),expression:\"showUI && layers.length>1\"}],attrs:{\"id\":\"layerselect\"}},[_c('ul',_vm._l((_vm.layers),function(layer){return _c('li',{key:layer.name,class:{ 'layer-selected': layer === _vm.selectedLayer },on:{\"mousedown\":function($event){_vm.selectLayer(layer)}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(layer))])])}))])],2),_c('selection-info',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI),expression:\"showUI\"}],ref:\"selectionInfo\"}),_c('initiative-dialog',{ref:\"initiative\",attrs:{\"id\":\"initiativedialog\"}}),_c('note-dialog',{ref:\"note\"}),_c('label-dialog',{ref:\"labels\"}),_c('zoom-slider',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showUI),expression:\"showUI\"}],attrs:{\"id\":\"zoomer\",\"height\":6,\"width\":200,\"min\":0,\"max\":1,\"interval\":0.1,\"dot-width\":8,\"dot-height\":20,\"tooltip-dir\":'bottom',\"tooltip\":'hover',\"formatter\":_vm.zoomDisplay.toFixed(1),\"slider-style\":{'border-radius': '15%'},\"bg-style\":{'background-color': '#fff', 'box-shadow': '0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)'},\"process-style\":{'background-color': '#fff'}},model:{value:(_vm.zoomDisplay),callback:function ($$v) {_vm.zoomDisplay=$$v},expression:\"zoomDisplay\"}}),_c('prompt-dialog',{ref:\"prompt\"}),_c('confirm-dialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=template&id=05b88da7&scoped=true&\"","import { GlobalPoint, Ray } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, getUnitDistance } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n virtualCanvas: HTMLCanvasElement;\n vCtx: CanvasRenderingContext2D;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n super(canvas, name);\n this.virtualCanvas = document.createElement(\"canvas\");\n this.virtualCanvas.width = window.innerWidth;\n this.virtualCanvas.height = window.innerHeight;\n this.vCtx = this.virtualCanvas.getContext(\"2d\")!;\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n super.addShape(shape, sync, temporary, invalidate);\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n this.preFogShapes.push(shape);\n }\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n const idx = this.preFogShapes.findIndex(s => s.uuid === shape.uuid);\n this.preFogShapes.splice(idx, 1);\n }\n super.removeShape(shape, sync, temporary);\n }\n\n draw(): void {\n if (!this.valid) {\n const ctx = this.ctx;\n\n if (Settings.skipLightFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n const originalOperation = ctx.globalCompositeOperation;\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n const dctx = layerManager.getLayer(\"draw\")!.ctx;\n if (Settings.drawAngleLines || Settings.drawFirstLightHit) {\n dctx.clearRect(0, 0, dctx.canvas.width, dctx.canvas.height);\n }\n\n // At all times provide a minimal vision range to prevent losing your tokens in fog.\n if (gameStore.fullFOW && layerManager.hasLayer(\"tokens\")) {\n layerManager.getLayer(\"tokens\")!.shapes.forEach(sh => {\n if (!sh.ownedBy() || !sh.isToken) return;\n const bb = sh.getBoundingBox();\n const lcenter = g2l(sh.center());\n const alm = 0.8 * g2lz(bb.w);\n ctx.beginPath();\n ctx.arc(lcenter.x, lcenter.y, alm, 0, 2 * Math.PI);\n const gradient = ctx.createRadialGradient(lcenter.x, lcenter.y, alm / 2, lcenter.x, lcenter.y, alm);\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n ctx.fill();\n });\n }\n\n this.vCtx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n\n // First cut out all the light sources\n for (const light of gameStore.visionSources) {\n const shape = layerManager.UUIDMap.get(light.shape);\n if (shape === undefined) continue;\n const aura = shape.auras.find(a => a.uuid === light.aura);\n if (aura === undefined) continue;\n\n const auraLength = getUnitDistance(aura.value + aura.dim);\n const center = shape.center();\n const lcenter = g2l(center);\n\n const auraCircle = new Circle(center, auraLength);\n if (!auraCircle.visibleInCanvas(ctx.canvas)) continue;\n\n if (gameStore.visionMode === \"bvh\") {\n let lastArcAngle = -1;\n\n const path = new Path2D();\n path.moveTo(lcenter.x, lcenter.y);\n let firstPoint: GlobalPoint;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 180) * Math.PI) {\n const anglePoint = new GlobalPoint(\n center.x + auraLength * Math.cos(angle),\n center.y + auraLength * Math.sin(angle),\n );\n if (Settings.drawAngleLines) {\n dctx!.beginPath();\n dctx!.moveTo(g2lx(center.x), g2ly(center.y));\n dctx!.lineTo(g2lx(anglePoint.x), g2ly(anglePoint.y));\n dctx!.stroke();\n }\n\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = Ray.fromPoints(center, anglePoint);\n const hitResult = gameStore.BV.intersect(lightRay);\n\n if (angle === 0) firstPoint = hitResult.hit ? hitResult.intersect : anglePoint;\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n // Draw a line from the last non arc location back to the arc\n const dest = g2l(anglePoint);\n ctx.lineTo(dest.x, dest.y);\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, angle);\n lastArcAngle = -1;\n }\n path.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n // Finish the final arc.\n if (lastArcAngle === -1) path.lineTo(g2lx(firstPoint!.x), g2ly(firstPoint!.y));\n else path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, 2 * Math.PI);\n\n if (gameStore.fullFOW) {\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n ctx.fill(path);\n }\n\n aura.lastPath = path;\n } else {\n this.vCtx.globalCompositeOperation = \"source-over\";\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n const polygon = computeVisibility(center, \"vision\");\n this.vCtx.beginPath();\n this.vCtx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) this.vCtx.lineTo(g2lx(point[0]), g2ly(point[1]));\n this.vCtx.closePath();\n this.vCtx.fill();\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = this.vCtx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n this.vCtx.fillStyle = gradient;\n } else {\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n this.vCtx.globalCompositeOperation = \"source-in\";\n this.vCtx.beginPath();\n this.vCtx.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), 0, 2 * Math.PI);\n this.vCtx.fill();\n ctx.drawImage(this.virtualCanvas, 0, 0);\n }\n }\n\n // At the DM Side due to opacity of the two fow layers, it looks strange if we just render them on top of eachother like players.\n if (gameStore.fowLOS) {\n ctx.globalCompositeOperation = \"source-in\";\n ctx.drawImage(layerManager.getLayer(\"fow-players\")!.canvas, 0, 0);\n }\n\n for (const preShape of this.preFogShapes) {\n if (!preShape.visibleInCanvas(this.canvas)) continue;\n const ogComposite = preShape.globalCompositeOperation;\n if (!gameStore.fullFOW) {\n if (preShape.globalCompositeOperation === \"source-over\")\n preShape.globalCompositeOperation = \"destination-out\";\n else if (preShape.globalCompositeOperation === \"destination-out\")\n preShape.globalCompositeOperation = \"source-over\";\n }\n preShape.draw(ctx);\n preShape.globalCompositeOperation = ogComposite;\n }\n\n if (gameStore.fullFOW) {\n ctx.globalCompositeOperation = \"source-out\";\n ctx.fillStyle = getFogColour();\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n super.draw(false);\n\n ctx.globalCompositeOperation = originalOperation;\n }\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"menuContainer\"}},[_c('div',{ref:\"rm\",style:({\n left: _vm.visible.settings ? '200px' : '0',\n top: _vm.visible.locations ? '100px' : '0'\n }),attrs:{\"id\":\"radialmenu\"}},[_c('div',{staticClass:\"rm-wrapper\"},[_c('div',{staticClass:\"rm-toggler\"},[_c('ul',{staticClass:\"rm-list\",class:{ 'rm-list-dm': _vm.IS_DM }},[(_vm.IS_DM)?_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-locations\"},on:{\"click\":function($event){_vm.visible.locations = !_vm.visible.locations}}},[_vm._m(0)]):_vm._e(),_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-settings\"},on:{\"click\":function($event){_vm.visible.settings = !_vm.visible.settings}}},[_vm._m(1)])])]),_vm._m(2)])]),_c('transition',{attrs:{\"name\":\"settings\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'left 500ms'}}},[(_vm.visible.settings)?_c('div',{ref:\"settings\",attrs:{\"id\":\"menu\"},on:{\"click\":_vm.settingsClick}},[_c('div',{staticStyle:{\"width\":\"200px\",\"height\":\"90%\",\"overflow-y\":\"auto\",\"overflow-x\":\"hidden\"}},[(_vm.IS_DM)?[_c('button',{staticClass:\"accordion\"},[_vm._v(\"Assets\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('a',{staticClass:\"actionButton\",attrs:{\"href\":\"/assets\",\"target\":\"blank\",\"title\":\"Open asset manager\"}},[_c('i',{staticClass:\"fas fa-external-link-alt\"})]),_c('div',{staticClass:\"directory\",attrs:{\"id\":\"menu-tokens\"}},[_c('asset-node',{attrs:{\"asset\":_vm.assets}}),(!_vm.assets)?_c('div',[_vm._v(\"No assets\")]):_vm._e()],1)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Notes\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\",attrs:{\"id\":\"menu-notes\"}},[_c('a',{staticClass:\"actionButton\",on:{\"click\":_vm.createNote}},[_c('i',{staticClass:\"far fa-plus-square\"})]),_vm._l((_vm.notes),function(note){return _c('div',{key:note.uuid,staticStyle:{\"cursor\":\"pointer\"},on:{\"click\":function($event){_vm.openNote(note)}}},[_vm._v(_vm._s(note.title || \"[?]\"))])}),(!_vm.notes.length)?_c('div',[_vm._v(\"No notes\")]):_vm._e()],2)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"DM Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"useGridInput\"}},[_vm._v(\"Use grid:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.useGrid),expression:\"useGrid\"}],attrs:{\"id\":\"useGridInput\",\"type\":\"checkbox\",\"checked\":\"checked\"},domProps:{\"checked\":Array.isArray(_vm.useGrid)?_vm._i(_vm.useGrid,null)>-1:(_vm.useGrid)},on:{\"change\":function($event){var $$a=_vm.useGrid,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.useGrid=$$a.concat([$$v]))}else{$$i>-1&&(_vm.useGrid=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.useGrid=$$c}}}}),_c('label',{attrs:{\"for\":\"useFOWInput\"}},[_vm._v(\"Fill entire canvas with FOW:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fullFOW),expression:\"fullFOW\"}],attrs:{\"id\":\"useFOWInput\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fullFOW)?_vm._i(_vm.fullFOW,null)>-1:(_vm.fullFOW)},on:{\"change\":function($event){var $$a=_vm.fullFOW,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fullFOW=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fullFOW=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fullFOW=$$c}}}}),_c('label',{attrs:{\"for\":\"fowOpacity\"}},[_vm._v(\"FOW opacity:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.fowOpacity),expression:\"fowOpacity\",modifiers:{\"number\":true}}],attrs:{\"id\":\"fowOpacity\",\"type\":\"number\",\"min\":\"0\",\"max\":\"1\",\"step\":\"0.1\"},domProps:{\"value\":(_vm.fowOpacity)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.fowOpacity=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"fowLOS\"}},[_vm._v(\"Only show lights in LoS:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fowLOS),expression:\"fowLOS\"}],attrs:{\"id\":\"fowLOS\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fowLOS)?_vm._i(_vm.fowLOS,null)>-1:(_vm.fowLOS)},on:{\"change\":function($event){var $$a=_vm.fowLOS,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fowLOS=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fowLOS=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fowLOS=$$c}}}}),_c('label',{attrs:{\"for\":\"unitSizeInput\"}},[_vm._v(\"Unit Size (in ft.):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.unitSize),expression:\"unitSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"unitSizeInput\",\"type\":\"number\"},domProps:{\"value\":(_vm.unitSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.unitSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"gridSizeInput\"}},[_vm._v(\"Grid Size (in pixels):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.gridSize),expression:\"gridSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"gridSizeInput\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.gridSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.gridSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'bvh'}},[_vm._v(\"BVH\")]),_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'triangle'}},[_vm._v(\"Triangle\")])]),_c('label',{attrs:{\"for\":\"vmininp\"}},[_vm._v(\"Minimal full vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMin),expression:\"visionRangeMin\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmininp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMin)},on:{\"change\":function($event){_vm.visionRangeMin=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"vmaxinp\"}},[_vm._v(\"Maximal vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMax),expression:\"visionRangeMax\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmaxinp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMax)},on:{\"change\":function($event){_vm.visionRangeMax=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"invitation\"}},[_vm._v(\"Invitation Code:\")]),_c('input',{attrs:{\"id\":\"invitation\",\"type\":\"text\",\"readonly\":\"readonly\"},domProps:{\"value\":_vm.invitationCode}})])])]:_vm._e(),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Client Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"gridColour\"}},[_vm._v(\"Grid Colour:\")]),_c('color-picker',{attrs:{\"id\":\"gridColour\",\"color\":_vm.gridColour},on:{\"update:color\":function($event){_vm.gridColour=$event}}}),_c('label',{attrs:{\"for\":\"fowColour\"}},[_vm._v(\"FOW Colour:\")]),_c('color-picker',{attrs:{\"id\":\"fowColour\",\"color\":_vm.fowColour},on:{\"update:color\":function($event){_vm.fowColour=$event}}}),_c('label',{attrs:{\"for\":\"rulerColour\"}},[_vm._v(\"Ruler Colour:\")]),_c('color-picker',{attrs:{\"id\":\"rulerColour\",\"color\":_vm.rulerColour},on:{\"update:color\":function($event){_vm.rulerColour=$event}}})],1)])],2),_c('router-link',{staticClass:\"accordion\",staticStyle:{\"text-decoration\":\"none\",\"display\":\"inline-block\",\"position\":\"absolute\",\"bottom\":\"0\"},attrs:{\"to\":\"/dashboard\"}},[_vm._v(\"Exit\")])],1):_vm._e()]),_c('transition',{attrs:{\"name\":\"locations\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'top 500ms'}}},[(_vm.IS_DM && _vm.visible.locations)?_c('div',{attrs:{\"id\":\"locations-menu\"}},[_c('div',[_vm._l((_vm.locations),function(location){return _c('div',{key:location,on:{\"click\":function($event){_vm.changeLocation(location)}}},[_vm._v(_vm._s(location))])}),_c('div',{on:{\"click\":_vm.createLocation}},[_c('i',{staticClass:\"fas fa-plus\"})])],2)]):_vm._e()]),_c('img',{attrs:{\"id\":\"dragImage\"}})],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"far fa-compass\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"fas fa-cog\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"rm-topper\"},[_c('i',{staticClass:\"icon-share-alt\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Edit asset\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('div',{staticClass:\"grid\"},[_c('label',{attrs:{\"for\":\"shapeselectiondialog-name\"}},[_vm._v(\"Name\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.name),expression:\"shape.name\"}],staticStyle:{\"grid-column\":\"numerator / remove\"},attrs:{\"type\":\"text\",\"id\":\"shapeselectiondialog-name\",\"disabled\":!_vm.owned},domProps:{\"value\":(_vm.shape.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.shape, \"name\", $event.target.value)}}}),_c('div',{style:({opacity: _vm.shape.nameVisible ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.shape.nameVisible = !_vm.shape.nameVisible;_vm.updateShape(false)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('label',{attrs:{\"for\":\"shapeselectiondialog-istoken\"}},[_vm._v(\"Is a token\")]),_c('input',{staticClass:\"styled-checkbox\",staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-istoken\",\"disabled\":!_vm.owned},domProps:{\"checked\":_vm.shape.isToken},on:{\"click\":_vm.setToken}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-visionblocker\"}},[_vm._v(\"Blocks vision/light\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.visionObstruction),expression:\"shape.visionObstruction\"}],staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-visionblocker\",\"disabled\":!_vm.owned},domProps:{\"checked\":Array.isArray(_vm.shape.visionObstruction)?_vm._i(_vm.shape.visionObstruction,null)>-1:(_vm.shape.visionObstruction)},on:{\"change\":[function($event){var $$a=_vm.shape.visionObstruction,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.shape, \"visionObstruction\", $$c)}},_vm.setVisionBlocker]}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-moveblocker\"}},[_vm._v(\"Blocks movement\")]),_c('input',{staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-moveblocker\",\"disabled\":!_vm.owned},domProps:{\"checked\":_vm.shape.movementObstruction},on:{\"click\":_vm.setMovementBlocker}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-strokecolour\"}},[_vm._v(\"Border colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"color\":_vm.shape.strokeColour,\"disabled\":!_vm.owned},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"strokeColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-fillcolour\"}},[_vm._v(\"Fill colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\"},attrs:{\"color\":_vm.shape.fillColour,\"disabled\":!_vm.owned},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"fillColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Access\")]),_vm._l((_vm.shape.owners),function(owner){return [_c('input',{key:owner,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\",\"disabled\":!_vm.owned},domProps:{\"value\":owner},on:{\"change\":function($event){_vm.updateOwner($event, owner)}}}),(owner !== '')?_c('div',{key:'remove-' + owner,style:({opacity: _vm.owned ? 1.0 : 0.3, textAlign: 'center', gridColumnStart: 'remove'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.removeOwner(owner)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Trackers\")]),_vm._l((_vm.shape.trackers),function(tracker){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(tracker.name),expression:\"tracker.name\"}],key:'name-'+tracker.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\",\"disabled\":!_vm.owned},domProps:{\"value\":(tracker.name)},on:{\"change\":function($event){_vm.updateShape(false);},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.value),expression:\"tracker.value\",modifiers:{\"number\":true}}],key:'value-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\",\"disabled\":!_vm.owned},domProps:{\"value\":(tracker.value)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+tracker.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.maxvalue),expression:\"tracker.maxvalue\",modifiers:{\"number\":true}}],key:'maxvalue-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\",\"disabled\":!_vm.owned},domProps:{\"value\":(tracker.maxvalue)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"maxvalue\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'sspan-'+tracker.uuid}),_c('div',{key:'visibility-'+tracker.uuid,style:({opacity: tracker.visible ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){tracker.visible = !tracker.visible;_vm.updateShape(false)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('span',{key:'tspan-'+tracker.uuid}),(tracker.name !== '' || tracker.value !== 0)?_c('div',{key:'remove-'+tracker.uuid,style:({opacity: _vm.owned ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.removeTracker(tracker.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Auras\")]),_vm._l((_vm.shape.auras),function(aura){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(aura.name),expression:\"aura.name\"}],key:'name-'+aura.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\",\"disabled\":!_vm.owned},domProps:{\"value\":(aura.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.value),expression:\"aura.value\",modifiers:{\"number\":true}}],key:'value-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\",\"disabled\":!_vm.owned},domProps:{\"value\":(aura.value)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+aura.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.dim),expression:\"aura.dim\",modifiers:{\"number\":true}}],key:'dimvalue-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Dim value\",\"disabled\":!_vm.owned},domProps:{\"value\":(aura.dim)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"dim\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('color-picker',{key:'colour-'+aura.uuid,attrs:{\"color\":aura.colour,\"disabled\":!_vm.owned},on:{\"update:color\":function($event){_vm.$set(aura, \"colour\", $event)},\"input\":function($event){_vm.updateAuraColour(aura, $event)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{key:'visibility-'+aura.uuid,style:({opacity: aura.visible ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){aura.visible = !aura.visible;_vm.updateShape(true)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{key:'visionsource-'+aura.uuid,style:({opacity: aura.visionSource ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.updateAuraVisionSource(aura)}}},[_c('i',{staticClass:\"fas fa-lightbulb\"})]),(aura.name !== '' || aura.value !== 0)?_c('div',{key:'remove-'+aura.uuid,style:({opacity: _vm.owned ? 1.0 : 0.3, textAlign: 'center'}),attrs:{\"disabled\":!_vm.owned},on:{\"click\":function($event){_vm.removeAura(aura.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Labels\")]),_c('div',{staticClass:\"spanrow\",attrs:{\"id\":\"labels\"}},[_vm._l((_vm.shape.labels),function(label){return _c('div',{key:label.uuid,staticClass:\"label\"},[(label.category)?[_c('div',{staticClass:\"label-user\"},[_vm._v(_vm._s(label.category))]),_c('div',{staticClass:\"label-main\",on:{\"click\":function($event){_vm.removeLabel(label.uuid)}}},[_vm._v(_vm._s(label.name))])]:_vm._e(),(!label.category)?[_c('div',{staticClass:\"label-main\",on:{\"click\":function($event){_vm.removeLabel(label.uuid)}}},[_vm._v(_vm._s(label.name))])]:_vm._e()],2)}),(_vm.owned)?_c('div',{staticClass:\"label\",attrs:{\"id\":\"label-add\"}},[_c('div',{staticClass:\"label-main\",on:{\"click\":_vm.openLabelManager}},[_vm._v(\"+\")])]):_vm._e()],2),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Annotation\")]),_c('textarea',{staticClass:\"spanrow\",attrs:{\"disabled\":!_vm.owned},domProps:{\"value\":_vm.shape.annotation},on:{\"change\":_vm.updateAnnotation}})],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=template&id=23de098e&scoped=true&\"","import { ServerCircle } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Circle extends Shape {\n type = \"circle\";\n r: number;\n constructor(center: GlobalPoint, r: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(center, fillColour, strokeColour, uuid);\n this.r = r || 1;\n }\n asDict(): ServerCircle {\n // const base = this.getBaseDict();\n // base.r = this.r;\n // base.border = this.border;\n // return base;\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n });\n }\n fromDict(data: ServerCircle) {\n super.fromDict(data);\n this.r = data.radius;\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(this.refPoint.x - this.r, this.refPoint.y - this.r),\n this.r * 2,\n this.r * 2,\n );\n }\n\n get points() {\n return this.getBoundingBox().points;\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const loc = g2l(this.refPoint);\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.fill();\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = g2lz(5);\n ctx.strokeStyle = this.strokeColour;\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.stroke();\n }\n }\n contains(point: GlobalPoint): boolean {\n return (point.x - this.refPoint.x) ** 2 + (point.y - this.refPoint.y) ** 2 < this.r ** 2;\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint;\n this.refPoint = centerPoint;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid() {\n const gs = gameStore.gridSize;\n let targetX;\n let targetY;\n if (((2 * this.r) / gs) % 2 === 0) {\n targetX = Math.round(this.refPoint.x / gs) * gs;\n } else {\n targetX = Math.round((this.refPoint.x - gs / 2) / gs) * gs + this.r;\n }\n if (((2 * this.r) / gs) % 2 === 0) {\n targetY = Math.round(this.refPoint.y / gs) * gs;\n } else {\n targetY = Math.round((this.refPoint.y - gs / 2) / gs) * gs + this.r;\n }\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.r = Math.max(Math.round(this.r / gs) * gs, gs / 2);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n const diff = l2g(point).subtract(this.refPoint);\n this.r = Math.sqrt(Math.pow(diff.length(), 2) / 2);\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class MapTool extends Tool {\n name = \"Map\";\n active = false;\n xCount = 3;\n yCount = 3;\n startPoint: GlobalPoint | null = null;\n rect: Rect | null = null;\n\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = true;\n\n this.startPoint = l2g(getMouse(event));\n this.rect = new Rect(this.startPoint.clone(), 0, 0, \"rgba(0,0,0,0)\", \"black\");\n layer.addShape(this.rect, false, false);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.rect === null || this.startPoint === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n const endPoint = l2g(getMouse(event));\n\n this.rect.w = Math.abs(endPoint.x - this.startPoint.x);\n this.rect.h = Math.abs(endPoint.y - this.startPoint.y);\n this.rect.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.rect === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n if (layer.selection.length !== 1) {\n layer.removeShape(this.rect, false, false);\n return;\n }\n\n const w = this.rect.w;\n const h = this.rect.h;\n const sel = layer.selection[0];\n\n if (sel instanceof BaseRect) {\n sel.w *= (this.xCount * gameStore.gridSize) / w;\n sel.h *= (this.yCount * gameStore.gridSize) / h;\n }\n\n layer.removeShape(this.rect, false, false);\n }\n}\n","import { render, staticRenderFns } from \"./load.vue?vue&type=template&id=ff095222&\"\nimport script from \"./load.vue?vue&type=script&lang=ts&\"\nexport * from \"./load.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"load.vue\"\nexport default component.exports","import Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class PanTool extends Tool {\n name = \"Pan\";\n panStart = new LocalPoint(0, 0);\n active = false;\n\n onMouseDown(event: MouseEvent) {\n this.panStart = getMouse(event);\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active) return;\n const mouse = getMouse(event);\n const distance = mouse.subtract(this.panStart).multiply(1 / gameStore.zoomFactor);\n gameStore.increasePanX(Math.round(distance.x));\n gameStore.increasePanY(Math.round(distance.y));\n this.panStart = mouse;\n layerManager.invalidate();\n }\n onMouseUp(event: MouseEvent) {\n this.active = false;\n sendClientOptions();\n }\n}\n","import { render, staticRenderFns } from \"./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"\nimport script from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"44a31e42\",\n null\n \n)\n\ncomponent.options.__file = \"selectcontext.vue\"\nexport default component.exports","import Vue from \"vue\";\n\nimport { app } from \"@/main\";\n\n// Reference: https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\nexport function uuidv4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport function capitalize(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nexport function alphSort(a: string, b: string) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n else return 1;\n}\n\nexport function getHTMLFont(element: HTMLElement) {\n let font = element.style.font;\n while (font === null && element.parentElement !== null) {\n element = element.parentElement;\n font = element.style.font;\n }\n if (font === null) font = window.getComputedStyle(document.body).getPropertyValue(\"font\");\n return font;\n}\n\nexport function getHTMLTextWidth(text: string, font: string): number {\n let fakeElement = document.getElementById(\"emptycanvas\");\n if (fakeElement === null) {\n fakeElement = document.createElement(\"canvas\");\n fakeElement.id = \"emptycanvas\";\n fakeElement.style.display = \"\";\n document.body.appendChild(fakeElement);\n }\n const ctx = fakeElement.getContext(\"2d\")!;\n ctx.font = font;\n return Math.ceil(ctx.measureText(text).width);\n}\n\nexport function partition(arr: T[], predicate: (n: T) => boolean) {\n const ret: T[][] = [[], []];\n arr.forEach(n => (predicate(n) ? ret[1].push(n) : ret[0].push(n)));\n return ret;\n}\n\nexport function calcFontScale(ctx: CanvasRenderingContext2D, text: string, width: number, height: number) {\n const points = Number(ctx.font.split(\"px\")[0]) * 0.2;\n const fontWidth = ctx.measureText(text).width;\n return Math.min(width / fontWidth, height / points);\n}\n\nexport function fixedEncodeURIComponent(str: string) {\n return encodeURIComponent(str).replace(/[!'()*]/g, c => {\n return \"%\" + c.charCodeAt(0).toString(16);\n });\n}\n\nexport class OrderedMap {\n keys: K[] = [];\n values: V[] = [];\n\n get length() {\n return this.keys.length;\n }\n\n get(key: K) {\n return this.values[this.keys.indexOf(key)];\n }\n getIndexValue(idx: number) {\n return this.values[idx];\n }\n getIndexKey(idx: number) {\n return this.keys[idx];\n }\n set(key: K, value: V) {\n this.keys.push(key);\n this.values.push(value);\n }\n has(key: K) {\n return this.indexOf(key) >= 0;\n }\n indexOf(element: K) {\n return this.keys.indexOf(element);\n }\n remove(element: K) {\n const idx = this.indexOf(element);\n this.keys.splice(idx, 1);\n this.values.splice(idx, 1);\n }\n}\n\nexport function getComponent(): T {\n return app.$children[0].$refs.activeComponent;\n}\n\nexport function getRef(ref: string): T {\n const active = app.$children[0].$refs.activeComponent;\n return active.$refs[ref];\n}\n","import { render, staticRenderFns } from \"./contextMenu.vue?vue&type=template&id=606797b4&\"\nimport script from \"./contextMenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextMenu.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextMenu.vue\"\nexport default component.exports","import { EdgeCirculator, Point, Sign, Triangle, Vertex } from \"./tds\";\n\ntype Line = number[];\n\nexport function cw(index: number) {\n return (index + 2) % 3;\n}\n\nexport function ccw(index: number) {\n return (index + 1) % 3;\n}\n\nexport function edgeInfo(va: Vertex, vb: Vertex) {\n const ec = new EdgeCirculator(va, null);\n if (ec.valid) {\n do {\n const indv = 3 - ec.t!.indexV(va) - ec.ri;\n const v = ec.t!.vertices[indv]!;\n if (!v.infinite) {\n if (v === vb) {\n return { includes: true, vi: vb, fr: ec.t!, i: ec.ri };\n } else {\n const orient = orientation(va.point!, vb.point!, v.point!);\n if (orient === Sign.COLLINEAR && collinearBetween(va.point!, v.point!, vb.point!)) {\n return { includes: true, vi: v, fr: ec.t!, i: ec.ri };\n }\n }\n }\n } while (ec.next());\n }\n return { includes: false };\n}\n\nexport function collinearBetween(p: Point, q: Point, r: Point): boolean {\n let cPQ: Sign;\n let cQR: Sign;\n if (compare(0, p, r) === Sign.EQUAL) {\n cPQ = compare(1, p, q);\n cQR = compare(1, q, r);\n } else {\n cPQ = compare(0, p, q);\n cQR = compare(0, q, r);\n }\n return (cPQ === Sign.SMALLER && cQR === Sign.SMALLER) || (cPQ === Sign.LARGER && cQR === Sign.LARGER);\n}\n\nfunction compare(index: number, a: Point, b: Point): Sign {\n if (a[index] < b[index]) return Sign.SMALLER;\n if (a[index] > b[index]) return Sign.LARGER;\n return Sign.EQUAL;\n}\n\nexport function orientation(p: Point, q: Point, r: Point) {\n const px = p[0];\n const py = p[1];\n const qx = q[0];\n const qy = q[1];\n const rx = r[0];\n const ry = r[1];\n const pqx = qx - px;\n const pqy = qy - py;\n const prx = rx - px;\n const pry = ry - py;\n const det = determinant(pqx, pqy, prx, pry);\n let maxX = Math.abs(pqx);\n let maxY = Math.abs(pqy);\n const aprX = Math.abs(prx);\n const aprY = Math.abs(pry);\n if (maxX < aprX) maxX = aprX;\n if (maxY < aprY) maxY = aprY;\n if (maxX > maxY) [maxX, maxY] = [maxY, maxX];\n // underflow proection in eps computation?? Math.sqrt(Number.MIN_VALUE, Number.EPSILON)\n if (maxX < 2e-162 && maxX === 0) {\n return Sign.ZERO;\n }\n // overflow protection in det computation\n if (maxY < 1e153) {\n const eps = Number.EPSILON * maxX * maxY;\n if (det > eps) return Sign.POSITIVE;\n if (det < -eps) return Sign.NEGATIVE;\n }\n return Sign.ZERO;\n}\n\nexport function determinant(a00: number, a01: number, a10: number, a11: number) {\n return a00 * a11 - a01 * a10;\n}\n\nexport function hasInexactNegativeOrientation(p: Point, q: Point, r: Point) {\n return determinant(q[0] - p[0], q[1] - p[1], r[0] - p[0], r[1] - p[1]) < 0;\n}\n\nexport function sideOfOrientedCircle(t: Triangle, p: Point, perturb: boolean): Sign {\n if (!t.isInfinite())\n return sideOfOrientedCircleP(t.vertices[0]!.point!, t.vertices[1]!.point!, t.vertices[2]!.point!, p, perturb);\n throw new Error(\"SSS\");\n}\n\nfunction sideOfOrientedCircleP(p0: Point, p1: Point, p2: Point, p: Point, perturb: boolean): Sign {\n const os = getOrientedSide(p0, p1, p2, p);\n if (os !== Sign.ON_ORIENTED_BOUNDARY || !perturb) return os;\n const points = [p0, p1, p2, p];\n points.sort((a, b) => a[0] - b[0] || a[1] - b[1]);\n for (const point of points.reverse()) {\n if (point === p) return Sign.ON_NEGATIVE_SIDE;\n let o = orientation(p0, p1, p);\n if (point === p2 && o !== Sign.COLLINEAR) return o;\n o = orientation(p0, p, p2);\n if (point === p1 && o !== Sign.COLLINEAR) return o;\n o = orientation(p, p1, p2);\n if (point === p0 && o !== Sign.COLLINEAR) return o;\n }\n return Sign.ON_NEGATIVE_SIDE;\n}\n\nexport function xyEqual(p: Point, q: Point) {\n return p[0] === q[0] && p[1] === q[1];\n}\n\nexport function xySmaller(p: Point, q: Point) {\n return p[0] < q[0] || (p[0] === q[0] && p[1] < q[1]);\n}\n\nexport function xyCompare(p: Point, q: Point) {\n if (xySmaller(p, q)) return Sign.SMALLER;\n if (xyEqual(p, q)) return Sign.EQUAL;\n return Sign.LARGER;\n}\n\nfunction getOrientedSide(p: Point, q: Point, r: Point, t: Point): Sign {\n const qpx = q[0] - p[0];\n const qpy = q[1] - p[1];\n const rpx = r[0] - p[0];\n const rpy = r[1] - p[1];\n const tpx = t[0] - p[0];\n const tpy = t[1] - p[1];\n const tqx = t[0] - q[0];\n const tqy = t[1] - q[1];\n const rqx = r[0] - q[0];\n const rqy = r[1] - q[1];\n\n const det = determinant(qpx * tpy - qpy * tpx, tpx * tqx + tpy * tqy, qpx * rpy - qpy * rpx, rpx * rqx + rpy * rqy);\n let maxx = Math.abs(qpx);\n let maxy = Math.abs(qpy);\n const arpx = Math.abs(rpx);\n const arpy = Math.abs(rpy);\n const atqx = Math.abs(tqx);\n const atqy = Math.abs(tqy);\n const atpx = Math.abs(tpx);\n const atpy = Math.abs(tpy);\n const arqx = Math.abs(rqx);\n const arqy = Math.abs(rqy);\n\n if (maxx < arpx) maxx = arpx;\n if (maxx < atpx) maxx = atpx;\n if (maxx < atqx) maxx = atqx;\n if (maxx < arqx) maxx = arqx;\n\n if (maxy < arpy) maxy = arpy;\n if (maxy < atpy) maxy = atpy;\n if (maxy < atqy) maxy = atqy;\n if (maxy < arqy) maxy = arqy;\n\n if (maxx > maxy) [maxx, maxy] = [maxy, maxx];\n\n if (maxx < 1e-73 && maxx === 0) return Sign.ON_ORIENTED_BOUNDARY;\n // sqrt(sqrt(max_double/16\n else if (maxy < 1e76) {\n const eps = Number.EPSILON * maxx * maxy * (maxy * maxy);\n if (det > eps) return Sign.ON_POSITIVE_SIDE;\n if (det < -eps) return Sign.ON_NEGATIVE_SIDE;\n }\n\n return Sign.ZERO;\n}\n\nfunction segSegDoIntersectCrossing(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p3, p4, p2) !== Sign.RIGHT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p3, p4, p2) !== Sign.LEFT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nfunction segSegDoIntersectContained(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p1, p2, p4) !== Sign.LEFT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p1, p2, p4) !== Sign.RIGHT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nexport function intersection(pa: Point, pb: Point, pc: Point, pd: Point) {\n const i = getIntersectionType(pa, pb, pc, pd);\n switch (i.intersectionType) {\n case IntersectionType.POINT:\n return i.point!;\n case IntersectionType.NO_INTERSECTION:\n return null;\n }\n throw new Error(\"sdfgighowen\");\n}\n\nenum IntersectionType {\n NO_INTERSECTION,\n POINT,\n SEGMENT,\n}\n\nfunction getLine(p0: Point, p1: Point): Line {\n if (p0[0] === p1[0]) return [1, 0, -p0[0]];\n if (p0[1] === p1[1]) return [0, 1, -p0[1]];\n const x = p1[0] - p0[0];\n const y = p1[1] - p0[1];\n return [-y, x, -x * p0[1] + y * p0[0]];\n}\n\nfunction getIntersectionType(pa: Point, pb: Point, pc: Point, pd: Point) {\n if (!doIntersect(pa, pb, pc, pd)) return { intersectionType: IntersectionType.NO_INTERSECTION, point: null };\n const l1 = getLine(pa, pb);\n const l2 = getLine(pc, pd);\n const info = getIntersectionTypeLine(l1, l2);\n switch (info.intersectionType) {\n case IntersectionType.POINT: {\n return info;\n }\n }\n throw new Error(\"gzseuihgpib\");\n}\n\nfunction getIntersectionTypeLine(la: Line, lb: Line) {\n const denom = la[0] * lb[1] - lb[0] * la[1];\n const nom1 = la[1] * lb[2] - lb[1] * la[2];\n const nom2 = lb[0] * la[2] - la[0] * lb[2];\n return {\n intersectionType: IntersectionType.POINT,\n point: [nom1 / denom, nom2 / denom],\n };\n}\n\nfunction doIntersect(A1: Point, A2: Point, B1: Point, B2: Point): boolean {\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A2, B1) || xySmaller(B2, A1)) return false;\n } else {\n if (xySmaller(A2, B2) || xySmaller(B1, A1)) return false;\n }\n } else {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A1, B1) || xySmaller(B2, A2)) return false;\n } else {\n if (xySmaller(A1, B2) || xySmaller(B1, A2)) return false;\n }\n }\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A1, A2);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A1, A2);\n }\n }\n }\n }\n }\n } else {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A2, A1);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A2, A1);\n }\n }\n }\n }\n }\n }\n}\n\nfunction nextUp(x: number) {\n if (x !== x) {\n return x;\n }\n if (x === -1 / 0) {\n return -Number.MAX_VALUE;\n }\n if (x === +1 / 0) {\n return +1 / 0;\n }\n if (x === +Number.MAX_VALUE) {\n return +1 / 0;\n }\n let y = x * (x < 0 ? 1 - Number.EPSILON / 2 : 1 + Number.EPSILON);\n if (y === x) {\n y = Number.MIN_VALUE * Number.EPSILON > 0 ? x + Number.MIN_VALUE * Number.EPSILON : x + Number.MIN_VALUE;\n }\n if (y === +1 / 0) {\n y = +Number.MAX_VALUE;\n }\n const b = x + (y - x) / 2;\n if (x < b && b < y) {\n y = b;\n }\n const c = (y + x) / 2;\n if (x < c && c < y) {\n y = c;\n }\n return y === 0 ? -0 : y;\n}\n\nexport function ulp(x: number) {\n return x < 0 ? nextUp(x) - x : x + nextUp(-x);\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=23de098e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=23de098e&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component\nexport default class Modal extends Vue {\n @Prop(Boolean) visible!: boolean;\n @Prop({ type: Boolean, default: true }) mask!: boolean;\n\n $refs!: {\n container: HTMLElement;\n };\n\n positioned = false;\n offsetX = 0;\n offsetY = 0;\n screenX = 0;\n screenY = 0;\n dragging = false;\n\n // Example of mounted required: opening note\n mounted() {\n this.updatePosition();\n }\n // Example of updated required: opening initiative\n updated() {\n this.updatePosition();\n }\n\n close(event: MouseEvent) {\n this.$emit(\"close\");\n }\n updatePosition() {\n if (!this.positioned) {\n const container = this.$refs.container;\n if (container.offsetWidth === 0 && container.offsetHeight === 0) return;\n this.$refs.container.style.left = (window.innerWidth - container.offsetWidth) / 2 + \"px\";\n this.$refs.container.style.top = (window.innerHeight - container.offsetHeight) / 2 + \"px\";\n this.positioned = true;\n }\n }\n dragStart(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"\");\n // Because the drag event is happening on the header, we have to change the drag image\n // in order to give the impression that the entire modal is dragged.\n event.dataTransfer.setDragImage(this.$refs.container, event.offsetX, event.offsetY);\n this.offsetX = event.offsetX;\n this.offsetY = event.offsetY;\n this.screenX = event.screenX;\n this.screenY = event.screenY;\n this.dragging = true;\n }\n dragEnd(event: DragEvent) {\n this.dragging = false;\n let left = event.clientX - this.offsetX;\n let top = event.clientY - this.offsetY;\n if (event.clientX === 0 && event.clientY === 0 && event.pageX === 0 && event.pageY === 0) {\n left = parseInt(this.$refs.container.style.left!, 10) - (this.screenX - event.screenX);\n top = parseInt(this.$refs.container.style.top!, 10) - (this.screenY - event.screenY);\n }\n if (left < 0) left = 0;\n if (left > window.innerWidth - 100) left = window.innerWidth - 100;\n if (top < 0) top = 0;\n if (top > window.innerHeight - 100) top = window.innerHeight - 100;\n this.$refs.container.style.left = left + \"px\";\n this.$refs.container.style.top = top + \"px\";\n this.$refs.container.style.display = \"block\";\n }\n dragOver(event: DragEvent) {\n if (this.dragging) this.$refs.container.style.display = \"none\";\n }\n}\n","import io from \"socket.io-client\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { assetStore } from \"./store\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\", { autoConnect: false });\n\n// export const socket = io.connect(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\");\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n window.location.href = destination;\n});\nsocket.on(\"Folder.Root.Set\", (root: number) => {\n assetStore.setRoot(root);\n});\nsocket.on(\"Folder.Set\", (folder: Asset) => {\n assetStore.clear();\n if (folder.children) {\n for (const child of folder.children) {\n assetStore.idMap.set(child.id, child);\n if (child.file_hash) {\n assetStore.files.push(child.id);\n } else {\n assetStore.folders.push(child.id);\n }\n }\n }\n});\nsocket.on(\"Folder.Create\", (folder: Asset) => {\n assetStore.folders.push(folder.id);\n assetStore.idMap.set(folder.id, folder);\n});\nsocket.on(\"Asset.Upload.Finish\", (asset: Asset) => {\n assetStore.idMap.set(asset.id, asset);\n assetStore.files.push(asset.id);\n});\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport Accordion from \"@/core/components/accordion.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n accordion: Accordion,\n },\n})\nexport default class FilterTool extends Tool {\n name = \"Filter\";\n active = false;\n\n get labels() {\n const cat: { [category: string]: [string, string][] } = {};\n for (const uuid of Object.keys(gameStore.labels)) {\n const label = gameStore.labels[uuid];\n if (!label.category) cat[\"\"].push([label.uuid, label.name]);\n else {\n if (!(label.category in cat)) cat[label.category] = [];\n cat[label.category].push([label.uuid, label.name]);\n cat[label.category].sort((a, b) => a[1].localeCompare(b[1]));\n }\n }\n return cat;\n }\n\n get initalValues() {\n const values: { [category: string]: string[] } = {};\n for (const cat of Object.keys(this.labels)) {\n values[cat] = gameStore.labelFilters.filter(f => this.labels[cat].map(l => l[0]).includes(f));\n }\n return values;\n }\n\n get categories() {\n return Object.keys(this.labels).sort();\n }\n\n isFilter(uuid: string): boolean {\n return gameStore.labelFilters.includes(uuid);\n }\n\n toggleFilter(uuid: string) {\n const i = gameStore.labelFilters.indexOf(uuid);\n if (i >= 0) gameStore.labelFilters.splice(i, 1);\n else gameStore.labelFilters.push(uuid);\n layerManager.invalidate();\n }\n\n toggleUnlabeled() {\n gameStore.toggleUnlabeledFilter();\n layerManager.invalidate();\n }\n\n updateSelection(data: { title: string; selection: string[] }) {\n if (!(data.title in this.labels)) return;\n for (const [uuid, _] of this.labels[data.title]) {\n const idx = gameStore.labelFilters.indexOf(uuid);\n const selected = data.selection.includes(uuid);\n if (idx >= 0 && !selected) {\n gameStore.labelFilters.splice(idx, 1);\n socket.emit(\"Labels.Filter.Remove\", uuid);\n } else if (idx < 0 && selected) {\n gameStore.labelFilters.push(uuid);\n socket.emit(\"Labels.Filter.Add\", uuid);\n }\n }\n layerManager.invalidate();\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Prop } from \"vue-property-decorator\";\nimport { gameStore } from '../../game/store';\n\n@Component\nexport default class Accordion extends Vue {\n @Prop(String) title!: string;\n @Prop({ default: true, type: Boolean }) showArrow!: boolean;\n @Prop({ default: () => []}) items!: [string, string][];\n @Prop({ default: () => []}) initialValues!: string[];\n\n selected: string[] = [];\n\n active = false;\n\n mounted() {\n this.selected = this.initialValues;\n this.updateCategory();\n }\n\n toggleDisplay(event: MouseEvent) {\n this.active = !this.active;\n }\n\n toggleCategory() {\n const overall = this.$refs.overall as HTMLInputElement;\n if (overall.checked) this.selected = this.items.map((i) => i[0]);\n else this.selected = [];\n this.$emit(\"selectionupdate\", {title: this.title, selection: this.selected});\n }\n\n updateCategory() {\n const overall = this.$refs.overall as HTMLInputElement;\n if (this.selected.length === 0) {\n overall.checked = false;\n overall.indeterminate = false;\n } else if(this.selected.length === this.items.length) {\n overall.checked = true;\n overall.indeterminate = false;\n } else {\n overall.checked = false;\n overall.indeterminate = true;\n }\n }\n\n toggleSelection(item: string) {\n const found = this.selected.indexOf(item);\n if (found === -1) this.selected.push(item);\n else this.selected.splice(found, 1);\n this.updateCategory();\n this.$emit(\"selectionupdate\", {title: this.title, selection: this.selected});\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { ServerMultiLine } from \"../comm/types/shapes\";\n\nexport class MultiLine extends Shape {\n type = \"multiline\";\n _points: GlobalPoint[] = [];\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n points?: GlobalPoint[],\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this._points = points || [];\n this.lineWidth = lineWidth || 3;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._points.length; i++) this._points[i] = this._points[i].add(delta);\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n line_width: this.lineWidth,\n points: this._points.map(p => ({ x: p.x, y: p.y })),\n });\n }\n fromDict(data: ServerMultiLine) {\n super.fromDict(data);\n this._points = data.points.map(p => new GlobalPoint(p.x, p.y));\n }\n get points() {\n return this._points.map(point => [point.x, point.y]);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._points) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n for (const p of this._points) ctx.lineTo(g2lx(p.x), g2ly(p.y));\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = g2lz(this.lineWidth);\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._points[resizePoint - 1] = l2g(point);\n }\n}\n","import { render, staticRenderFns } from \"./draw.vue?vue&type=template&id=639cd890&scoped=true&\"\nimport script from \"./draw.vue?vue&type=script&lang=ts&\"\nexport * from \"./draw.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"639cd890\",\n null\n \n)\n\ncomponent.options.__file = \"draw.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Initiative\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('draggable',{attrs:{\"id\":\"initiative-list\",\"options\":{setData: _vm.fakeSetData, disabled: !_vm.$store.state.game.IS_DM}},on:{\"change\":_vm.updateOrder},model:{value:(_vm.data),callback:function ($$v) {_vm.data=$$v},expression:\"data\"}},[_vm._l((_vm.data),function(actor){return [_c('div',{key:actor.uuid,staticStyle:{\"display\":\"flex\",\"flex-direction\":\"column\",\"align-items\":\"flex-end\"}},[_c('div',{staticClass:\"initiative-actor\",class:{'initiative-selected': _vm.currentActor === actor.uuid},style:({'cursor': _vm.$store.state.game.IS_DM && 'move'}),on:{\"mouseenter\":function($event){_vm.toggleHighlight(actor, true)},\"mouseleave\":function($event){_vm.toggleHighlight(actor, false)}}},[(actor.has_img)?[_c('img',{attrs:{\"src\":actor.source,\"width\":\"30px\",\"height\":\"30px\"}})]:[_c('span',{staticStyle:{\"width\":\"auto\"}},[_vm._v(_vm._s(actor.source))])],_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(actor.initiative),expression:\"actor.initiative\",modifiers:{\"lazy\":true,\"number\":true}}],class:{'notAllowed': !_vm.owns(actor)},attrs:{\"type\":\"text\",\"placeholder\":\"value\",\"disabled\":!_vm.owns(actor)},domProps:{\"value\":(actor.initiative)},on:{\"change\":[function($event){_vm.$set(actor, \"initiative\", _vm._n($event.target.value))},function($event){_vm.syncInitiative(actor)}],\"blur\":function($event){_vm.$forceUpdate()}}}),_c('div',{staticClass:\"initiative-effects-icon\",class:{'notAllowed': !_vm.owns(actor)},staticStyle:{\"opacity\":\"0.6\"},on:{\"click\":function($event){_vm.createEffect(actor, _vm.getDefaultEffect(), true)}}},[_c('i',{staticClass:\"fas fa-stopwatch\"}),(actor.effects)?[_vm._v(_vm._s(actor.effects.length))]:[_vm._v(\"0\")]],2),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.visible ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'visible')}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.group ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'group')}}},[_c('i',{staticClass:\"fas fa-users\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': _vm.owns(actor) ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.removeInitiative(actor.uuid, true, true)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})])],2),(actor.effects)?_c('div',{staticClass:\"initiative-effect\"},_vm._l((actor.effects),function(effect){return _c('div',{key:effect.uuid},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.name),expression:\"effect.name\"}],attrs:{\"type\":\"text\",\"size\":effect.name.length || 1},domProps:{\"value\":(effect.name)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.turns),expression:\"effect.turns\"}],attrs:{\"type\":\"text\",\"size\":effect.turns.toString().length || 1},domProps:{\"value\":(effect.turns)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"turns\", $event.target.value)}}})])})):_vm._e()])]})],2),_c('div',{attrs:{\"id\":\"initiative-bar\"}},[_c('div',{attrs:{\"id\":\"initiative-round\"}},[_vm._v(\"Round \"+_vm._s(_vm.roundCounter))]),_c('div',{staticStyle:{\"display\":\"flex\"}}),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":function($event){_vm.setRound(0, true); _vm.updateTurn(_vm.data[0].uuid, true)}}},[_c('i',{staticClass:\"fas fa-sync-alt\"})]),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":_vm.nextTurn}},[_c('i',{staticClass:\"fas fa-chevron-right\"})])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=template&id=af4dc61a&scoped=true&\"","import tinycolor from \"tinycolor2\";\n\nimport { LocalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function getMouse(e: MouseEvent): LocalPoint {\n return new LocalPoint(e.pageX, e.pageY);\n}\n\nexport function getFogColour(opposite: boolean = false): string {\n const tc = tinycolor(gameStore.fowColour);\n if (gameStore.IS_DM) tc.setAlpha(opposite ? 1 : gameStore.fowOpacity);\n else tc.setAlpha(1);\n return tc.toRgbString();\n}\n\nexport function zoomValue(display: number) {\n // Powercurve 0.2/3/10\n // Based on https://stackoverflow.com/a/17102320\n return 1 / (-5 / 3 + (28 / 15) * Math.exp(1.83 * display));\n}\n\nexport function zoomDisplay(value: number) {\n return Math.log((1 / value + 5 / 3) * (15 / 28)) / 1.83;\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport * as tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { Watch } from \"vue-property-decorator\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n computed: {\n ...mapState(\"game\", [\"unitSize\"]),\n },\n})\nexport default class CreateTokenModal extends Vue {\n x = 0;\n y = 0;\n visible = false;\n text = \"X\";\n fillColour = \"rgba(255, 255, 255, 1)\";\n borderColour = \"rgba(0, 0, 0, 1)\";\n\n mounted() {\n this.updatePreview();\n }\n\n @Watch(\"text\")\n onTextChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"fillColour\")\n onFillChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"borderColour\")\n onBorderChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n\n open(x: number, y: number) {\n this.visible = true;\n this.x = x;\n this.y = y;\n }\n submit() {\n const layer = layerManager.getLayer();\n if (layer === undefined) return;\n const token = new CircularToken(\n l2g(new LocalPoint(this.x, this.y)),\n getUnitDistance(gameStore.unitSize / 2),\n this.text,\n \"10px serif\",\n this.fillColour,\n this.borderColour,\n );\n token.addOwner(gameStore.username);\n layer.addShape(token, true);\n layer.invalidate(false);\n this.visible = false;\n }\n updatePreview() {\n const ctx = (this.$refs.canvas).getContext(\"2d\")!;\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.beginPath();\n const dest = { x: ctx.canvas.width / 2, y: ctx.canvas.height / 2 };\n const r = Math.min(dest.x, dest.y) * 0.9;\n\n ctx.fillStyle = this.fillColour;\n\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.fill();\n if (this.borderColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = 5;\n ctx.strokeStyle = this.borderColour;\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.save();\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, r, r);\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class NoteDialog extends Vue {\n visible = false;\n note: Note | null = null;\n\n open(note: Note) {\n this.visible = true;\n this.note = note;\n }\n calcHeight() {\n if (this.$refs.textarea) {\n const el = this.$refs.textarea;\n el.style.height = \"auto\";\n el.style.height = el.scrollHeight + \"px\";\n // Using the return value without the above did not achieve what I want, so hey /shrug\n return el.scrollHeight + \"px\";\n }\n return \"100px\";\n }\n updateNote() {\n if (this.note) gameStore.updateNote({ note: this.note, sync: true });\n }\n removeNote() {\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result && this.note) {\n gameStore.removeNote({ note: this.note, sync: true });\n this.visible = false;\n }\n },\n () => {},\n );\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport { Watch } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Polygon } from \"@/game/shapes/polygon\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n },\n})\nexport default class DrawTool extends Tool {\n name = \"Draw\";\n active = false;\n\n startPoint: GlobalPoint | null = null;\n shape: Shape | null = null;\n brushHelper: Circle | null = null;\n ruler: Line | null = null;\n\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"draw-polygon\", \"paint-brush\"];\n modeSelect = \"normal\";\n modes = [\"normal\", \"reveal\", \"hide\"];\n\n brushSize = getUnitDistance(gameStore.unitSize);\n\n get helperSize(): number {\n if (this.shapeSelect === \"paint-brush\") return this.brushSize / 2;\n return getUnitDistance(this.unitSize) / 8;\n }\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n\n @Watch(\"fillColour\")\n onFillChange() {\n if (this.brushHelper) this.brushHelper.fillColour = this.fillColour;\n }\n\n @Watch(\"modeSelect\")\n onModeUpdate(newValue: string, oldValue: string) {\n this.onModeChange(newValue, oldValue);\n }\n\n setupBrush() {\n if (this.brushHelper === null) return;\n if (this.modeSelect === \"reveal\" || this.modeSelect === \"hide\") {\n this.brushHelper.options.set(\"preFogShape\", true);\n this.brushHelper.options.set(\"skipDraw\", true);\n this.brushHelper.fillColour = \"rgba(0, 0, 0, 1)\";\n\n if (this.modeSelect === \"reveal\") this.brushHelper.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.brushHelper.globalCompositeOperation = \"destination-out\";\n } else {\n this.brushHelper.options.delete(\"preFogShape\");\n this.brushHelper.options.delete(\"skipDraw\");\n this.brushHelper.globalCompositeOperation = \"source-over\";\n this.brushHelper.fillColour = this.fillColour;\n }\n }\n onModeChange(newValue: string, oldValue: string) {\n if (this.brushHelper === null) return;\n\n const fowLayer = layerManager.getLayer(\"fow\");\n const normalLayer = layerManager.getLayer();\n if (fowLayer === undefined || normalLayer === undefined) return;\n\n this.setupBrush();\n\n if (newValue !== \"normal\" && oldValue === \"normal\") {\n normalLayer.removeShape(this.brushHelper, false);\n fowLayer.addShape(this.brushHelper, false);\n } else if (newValue === \"normal\" && oldValue !== \"normal\") {\n normalLayer.addShape(this.brushHelper, false);\n fowLayer.removeShape(this.brushHelper, false);\n }\n }\n getLayer() {\n if (this.modeSelect === \"normal\") return layerManager.getLayer();\n return layerManager.getLayer(\"fow\");\n }\n onMouseDown(event: MouseEvent) {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (!this.active) {\n this.startPoint = l2g(getMouse(event));\n this.active = true;\n switch (this.shapeSelect) {\n case \"square\": {\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n break;\n }\n case \"circle\": {\n this.shape = new Circle(\n this.startPoint.clone(),\n this.helperSize,\n this.fillColour,\n this.borderColour,\n );\n break;\n }\n case \"paint-brush\": {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n break;\n }\n case \"draw-polygon\": {\n this.shape = new Polygon(this.startPoint.clone(), [], this.fillColour, this.borderColour);\n break;\n }\n default:\n return;\n }\n\n if (this.modeSelect !== \"normal\") {\n this.shape.options.set(\"preFogShape\", true);\n this.shape.options.set(\"skipDraw\", true);\n this.shape.fillColour = \"rgba(0, 0, 0, 1)\";\n }\n if (this.modeSelect === \"reveal\") this.shape.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.shape.globalCompositeOperation = \"destination-out\";\n\n this.shape.addOwner(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n layer.addShape(this.shape, true, false, false);\n\n // Push brushhelper to back\n this.pushBrushBack();\n } else if (this.shape !== null && this.shape instanceof Polygon) {\n // For polygon draw\n this.shape._vertices.push(l2g(getMouse(event)));\n }\n if (this.shape !== null && this.shape instanceof Polygon) {\n const lastPoint = l2g(getMouse(event));\n if (this.ruler === null) {\n this.ruler = new Line(lastPoint, lastPoint, 3, \"black\");\n layer.addShape(this.ruler, false);\n } else {\n this.ruler.refPoint = lastPoint;\n this.ruler.endPoint = lastPoint;\n }\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n layer.invalidate(false);\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n }\n }\n onMouseMove(event: MouseEvent) {\n const endPoint = l2g(getMouse(event));\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (this.brushHelper !== null) {\n this.brushHelper.r = this.helperSize;\n this.brushHelper.refPoint = endPoint;\n if (!this.active) layer.invalidate(false);\n }\n\n if (!this.active || this.startPoint === null || this.shape === null) return;\n\n switch (this.shapeSelect) {\n case \"square\": {\n (this.shape).w = Math.abs(endPoint.x - this.startPoint.x);\n (this.shape).h = Math.abs(endPoint.y - this.startPoint.y);\n this.shape.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n break;\n }\n case \"circle\": {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n break;\n }\n case \"paint-brush\": {\n (this.shape)._points.push(endPoint);\n break;\n }\n case \"draw-polygon\": {\n this.ruler!.endPoint = endPoint;\n break;\n }\n }\n\n if (!(this.shape instanceof Polygon)) {\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n }\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null || this.shape instanceof Polygon) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n this.finaliseShape();\n }\n onContextMenu(event: MouseEvent) {\n if (!this.active || this.shape === null || !(this.shape instanceof Polygon)) return;\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n layer.removeShape(this.ruler!, false);\n this.ruler = null;\n this.finaliseShape();\n }\n\n private finaliseShape() {\n if (this.shape === null) return;\n if (this.shape.visionObstruction) gameStore.recalculateVision();\n if (this.shape.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\n }\n\n onSelect() {\n const layer = this.getLayer();\n if (layer === undefined) return;\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n onDeselect() {\n const layer = this.getLayer();\n if (this.brushHelper !== null && layer !== undefined) layer.removeShape(this.brushHelper, false);\n if (this.active && layer !== undefined && this.shape !== null) {\n layer.removeShape(this.shape, true, false);\n this.shape = null;\n this.active = false;\n layer.invalidate(false);\n }\n }\n\n private pushBrushBack() {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (this.brushHelper !== null) layer.removeShape(this.brushHelper, false);\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, l2g } from \"@/game/units\";\n\nexport class Line extends Shape {\n type = \"line\";\n endPoint: GlobalPoint;\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n endPoint: GlobalPoint,\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this.endPoint = endPoint;\n this.lineWidth = lineWidth === undefined ? 1 : lineWidth;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n x2: this.endPoint.x,\n y2: this.endPoint.y,\n line_width: this.lineWidth,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y], [this.endPoint.x, this.endPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(Math.min(this.refPoint.x, this.endPoint.x), Math.min(this.refPoint.y, this.endPoint.y)),\n Math.abs(this.refPoint.x - this.endPoint.x),\n Math.abs(this.refPoint.y - this.endPoint.y),\n );\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.strokeStyle = this.strokeColour;\n ctx.beginPath();\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n ctx.lineTo(g2lx(this.endPoint.x), g2ly(this.endPoint.y));\n ctx.lineWidth = this.lineWidth;\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this.refPoint = l2g(point);\n else this.endPoint = l2g(point);\n }\n}\n","// import \"./class-component-hooks\";\n\nimport axios, { AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Router from \"vue-router\";\n\nVue.use(Router);\n\nimport AssetManager from \"@/assetManager/manager.vue\";\nimport Login from \"@/auth/login.vue\";\nimport Logout from \"@/auth/logout\";\nimport LoadComponent from \"@/core/components/load.vue\";\nimport Dashboard from \"@/dashboard/main.vue\";\nimport Game from \"@/game/game.vue\";\nimport Invitation from \"@/invitation/invitation\";\n\nimport { coreStore } from \"@/core/store\";\n// import { AssetManager } from \"./assetManager/assets\";\n// const AssetManager = () => import(\"./assetManager/assets\").then(m => m.AssetManager);\n\nexport const router = new Router({\n mode: \"history\",\n base: process.env.BASE_URL,\n routes: [\n {\n path: \"/\",\n redirect: \"/dashboard\",\n },\n {\n path: \"/_load\",\n name: \"load\",\n component: LoadComponent,\n },\n {\n path: \"/assets\",\n component: AssetManager,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/auth\",\n component: { template: \"\" },\n children: [{ path: \"login\", component: Login }, { path: \"logout\", component: Logout }],\n },\n {\n path: \"/invite/:code\",\n component: Invitation,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/dashboard\",\n component: Dashboard,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/game/:creator/:room\",\n component: Game,\n meta: {\n auth: true,\n },\n },\n ],\n});\n\nrouter.beforeEach((to, from, next) => {\n if (!coreStore.initialized && to.path !== \"/_load\") {\n next({ path: \"/_load\" });\n axios\n .get(\"/api/auth\")\n .then((response: AxiosResponse) => {\n if (response.data.auth) {\n coreStore.setAuthenticated(true);\n coreStore.setUsername(response.data.username);\n }\n coreStore.setInitialized(true);\n router.push(to.path);\n })\n .catch(() => {\n console.error(\"Authentication check could not be fulfilled.\");\n });\n } else if (to.matched.some(record => record.meta.auth) && !coreStore.authenticated) {\n next({ path: \"/auth/login\", query: { redirect: to.path } });\n } else {\n next();\n }\n});\n","\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class Tool extends Vue {\n name = \"\";\n selected = false;\n active = false;\n get detailRight(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n\n return `${window.innerWidth - Math.min(window.innerWidth - 25, mid + 75)}px`;\n }\n get detailArrow(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n const right = Math.min(window.innerWidth - 25, mid + 75);\n return `${right - mid - 14}px`; // border width\n }\n created() {\n this.$parent.$on(\"mousedown\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseDown(event);\n });\n this.$parent.$on(\"mouseup\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseUp(event);\n });\n this.$parent.$on(\"mousemove\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseMove(event);\n });\n this.$parent.$on(\"contextmenu\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onContextMenu(event);\n });\n this.$parent.$on(\"tools-select-change\", (newValue: string, oldValue: string) => {\n if (oldValue === this.name) {\n this.selected = false;\n this.onDeselect();\n } else if (newValue === this.name) {\n this.selected = true;\n this.onSelect();\n }\n });\n }\n onSelect() {}\n onDeselect() {}\n onMouseDown(event: MouseEvent) {}\n onMouseUp(event: MouseEvent) {}\n onMouseMove(event: MouseEvent) {}\n onContextMenu(event: MouseEvent) {}\n}\n","import { render, staticRenderFns } from \"./tools.vue?vue&type=template&id=cf33581e&scoped=true&\"\nimport script from \"./tools.vue?vue&type=script&lang=ts&\"\nexport * from \"./tools.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tools.vue?vue&type=style&index=0&id=cf33581e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"cf33581e\",\n null\n \n)\n\ncomponent.options.__file = \"tools.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"","import { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerAsset } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport class Asset extends BaseRect {\n type = \"assetrect\";\n img: HTMLImageElement;\n src: string = \"\";\n constructor(img: HTMLImageElement, topleft: GlobalPoint, w: number, h: number, uuid?: string) {\n super(topleft, w, h, undefined, undefined, uuid);\n this.img = img;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n src: this.src,\n });\n }\n fromDict(data: ServerAsset) {\n super.fromDict(data);\n this.src = data.src;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n try {\n ctx.drawImage(this.img, g2lx(this.refPoint.x), g2ly(this.refPoint.y), g2lz(this.w), g2lz(this.h));\n } catch (error) {\n console.warn(`Shape ${this.uuid} could not load the image ${this.src}`);\n }\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.src,\n has_img: true,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import {\n BoundingBox,\n EdgeCirculator,\n FaceCirculator,\n LineFaceCirculator,\n LocateType,\n Point,\n Sign,\n TDS,\n Triangle,\n Vertex,\n} from \"./tds\";\nimport {\n ccw,\n collinearBetween,\n cw,\n edgeInfo,\n hasInexactNegativeOrientation,\n intersection,\n orientation,\n sideOfOrientedCircle,\n xyEqual,\n} from \"./triag\";\n\nexport type Edge = [Triangle, number];\n\nexport class CDT {\n tds: TDS;\n constructor() {\n this.tds = new TDS();\n }\n insertConstraint(a: Point, b: Point) {\n const va = this.insert(a);\n const vb = this.insert(b);\n if (va !== vb) this.insertConstraintV(va, vb);\n }\n\n insertConstraintV(va: Vertex, vb: Vertex) {\n const stack = [[va, vb]];\n while (stack.length > 0) {\n const v = stack.pop()!;\n const info = edgeInfo(v[0], v[1]);\n if (info.includes) {\n this.markConstraint(info.fr!, info.i!);\n if (info.vi! !== v[1]) {\n stack.push([info.vi!, v[1]]);\n }\n continue;\n }\n const intersectionInfo = this.findIntersectedFaces(v[0], v[1]);\n if (intersectionInfo.found) {\n if (intersectionInfo.vi !== v[0] && intersectionInfo.vi !== v[1]) {\n stack.push([v[0], intersectionInfo.vi]);\n stack.push([intersectionInfo.vi, v[1]]);\n } else {\n stack.push(v);\n }\n continue;\n }\n this.triangulateHole(intersectionInfo.intersectedFaces, intersectionInfo.listAB, intersectionInfo.listBA);\n if (intersectionInfo.vi !== v[1]) {\n stack.push([intersectionInfo.vi, v[1]]);\n }\n }\n }\n\n triangulateHole(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[]) {\n const edges: Edge[] = [];\n this.triangulateHole2(intersectedFaces, listAB, listBA, edges);\n this.propagatingFlipE(edges);\n }\n\n triangulateHole2(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[], edges: Edge[]) {\n if (listAB.length > 0) {\n this.triangulateHalfHole(listAB, edges);\n this.triangulateHalfHole(listBA, edges);\n const fl = listAB[0][0];\n const fr = listBA[0][0];\n fl.neighbours[2] = fr;\n fr.neighbours[2] = fl;\n fl.constraints[2] = true;\n fr.constraints[2] = true;\n\n while (intersectedFaces.length > 0) {\n this.tds.deleteTriangle(intersectedFaces.shift()!);\n }\n }\n }\n\n triangulateHalfHole(conflictBoundaries: Edge[], edges: Edge[]) {\n let iC = 0;\n let iN: number;\n let iT: number;\n const current = () => conflictBoundaries[iC];\n const next = () => conflictBoundaries[iN];\n const tempo = () => conflictBoundaries[iT];\n\n const va = current()[0].vertices[ccw(current()[1])]!;\n iN = iC;\n ++iN;\n\n let n: Triangle;\n let n1: Triangle;\n let n2: Triangle;\n let ind: number;\n let ind1: number;\n let ind2: number;\n do {\n n1 = current()[0];\n ind1 = current()[1];\n if (n1.neighbours[ind1] !== null) {\n n = n1.neighbours[ind1]!;\n ind = cw(n.indexV(n1.vertices[cw(ind1)]!));\n n1 = n.neighbours[ind]!;\n ind1 = this.tds.mirrorIndex(n, ind);\n }\n n2 = next()[0];\n ind2 = next()[1];\n if (n2.neighbours[ind2] !== null) {\n n = n2.neighbours[ind2]!;\n ind = cw(n.indexV(n2.vertices[cw(ind2)]!));\n n2 = n.neighbours[ind]!;\n ind2 = this.tds.mirrorIndex(n, ind);\n }\n const v0 = n1.vertices[ccw(ind1)]!;\n const v1 = n1.vertices[cw(ind1)]!;\n const v2 = n2.vertices[cw(ind2)]!;\n const orient = orientation(v0.point!, v1.point!, v2.point!);\n switch (orient) {\n case Sign.RIGHT_TURN: {\n const newlf = this.tds.createTriangle(v0, v2, v1, null, null, null);\n edges.push([newlf, 2]);\n newlf.neighbours[1] = n1;\n newlf.neighbours[0] = n2;\n n1.neighbours[ind1] = newlf;\n n2.neighbours[ind2] = newlf;\n if (n1.isConstrained(ind1)) newlf.constraints[1] = true;\n if (n2.isConstrained(ind2)) newlf.constraints[0] = true;\n v0.triangle = newlf;\n v1.triangle = newlf;\n v2.triangle = newlf;\n iT = iC + 1;\n conflictBoundaries.splice(iC, 0, [newlf, 2]);\n conflictBoundaries.splice(Math.max(iT, iN), 1);\n conflictBoundaries.splice(Math.min(iT, iN), 1);\n iN = iC;\n if (v0 !== va) --iC;\n else ++iN;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.COLLINEAR: {\n ++iC;\n ++iN;\n break;\n }\n }\n } while (iN < conflictBoundaries.length);\n }\n\n findIntersectedFaces(vaa: Vertex, vbb: Vertex) {\n const aa = vaa.point!;\n const bb = vbb.point!;\n const listAB: Edge[] = [];\n const listBA: Edge[] = [];\n const intersectedFaces: Triangle[] = [];\n const lfc = new LineFaceCirculator(vaa, this, bb);\n let ind = lfc.pos!.indexV(vaa);\n let vi: Vertex;\n if (lfc.pos!.isConstrained(ind)) {\n vi = this.intersect(lfc.pos!, ind, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n }\n let lf = lfc.pos!.neighbours[ccw(ind)]!;\n let rf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n intersectedFaces.unshift(lfc.pos!);\n let previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n let currentVertex = lfc.pos!.vertices[ind]!;\n let done = false;\n while (currentVertex !== vbb && !done) {\n let i1: number;\n let i2: number;\n const orient = orientation(aa, bb, currentVertex.point!);\n switch (orient) {\n case Sign.COLLINEAR: {\n done = true;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.RIGHT_TURN: {\n if (orient === Sign.LEFT_TURN) {\n i1 = ccw(ind);\n i2 = cw(ind);\n } else {\n i1 = cw(ind);\n i2 = ccw(ind);\n }\n if (lfc.pos!.isConstrained(i1)) {\n vi = this.intersect(lfc.pos!, i1, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n } else {\n lf = lfc.pos!.neighbours[i2]!;\n intersectedFaces.unshift(lfc.pos!);\n if (orient === Sign.LEFT_TURN) listAB.push([lf, lf.indexT(lfc.pos!)]);\n else listBA.unshift([lf, lf.indexT(lfc.pos!)]);\n previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n currentVertex = lfc.pos!.vertices[ind]!;\n }\n break;\n }\n }\n }\n vi = currentVertex;\n intersectedFaces.unshift(lfc.pos!);\n lf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n rf = lfc.pos!.neighbours[ccw(ind)]!;\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n return { found: false, vi, listAB, listBA, intersectedFaces };\n }\n\n intersect(t: Triangle, i: number, vaa: Vertex, vbb: Vertex): Vertex {\n const vcc = t.vertices[cw(i)]!;\n const vdd = t.vertices[ccw(i)]!;\n const pa = vaa.point!;\n const pb = vbb.point!;\n const pc = vcc.point!;\n const pd = vdd.point!;\n let pi = intersection(pa, pb, pc, pd);\n if (pi !== pa && pi !== pb && pi !== pc && pi !== pd) {\n const bbox = new BoundingBox(pi!);\n bbox.dilate(4);\n if (bbox.overlaps(new BoundingBox(pa))) pi = pa;\n if (bbox.overlaps(new BoundingBox(pb))) pi = pb;\n if (bbox.overlaps(new BoundingBox(pc))) pi = pc;\n if (bbox.overlaps(new BoundingBox(pd))) pi = pd;\n }\n let vi: Vertex;\n if (pi === null) throw new Error(\"what\");\n else {\n this.removeConstrainedEdge(t, i);\n vi = this.insert(pi, t);\n }\n\n if (vi !== vcc && vi !== vdd) {\n this.insertConstraintV(vcc, vi);\n this.insertConstraintV(vi, vdd);\n } else {\n this.insertConstraintV(vcc, vdd);\n }\n return vi;\n }\n\n removeConstrainedEdge(t: Triangle, i: number) {\n t.constraints[i] = false;\n if (this.tds.dimension === 2) t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = false;\n }\n\n updateConstraintsOpposite(v: Vertex) {\n let t = v.triangle!;\n const start = t;\n let indf: number;\n do {\n indf = t.indexV(v);\n if (t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)]) t.constraints[indf] = true;\n else t.constraints[indf] = false;\n t = t.neighbours[ccw(indf)]!;\n } while (t !== start);\n }\n\n markConstraint(t: Triangle, i: number) {\n if (this.tds.dimension === 1) t.constraints[2] = true;\n else {\n t.constraints[i] = true;\n t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = true;\n }\n }\n\n insert(p: Point, start: Triangle | null = null) {\n const locateInfo = this.locate(p, this.iLocate(p, start));\n const va = this.insertb(p, locateInfo.loc, locateInfo.lt, locateInfo.li);\n this.flipAround(va);\n return va;\n }\n\n flipAround(v: Vertex) {\n if (this.tds.dimension <= 1) return;\n let t = v.triangle!;\n let i: number;\n let next: Triangle;\n const start = t;\n do {\n i = t.indexV(v);\n next = t.neighbours[ccw(i)]!;\n this.propagatingFlip(t, i);\n t = next;\n } while (next !== start);\n }\n\n propagatingFlip(t: Triangle, i: number, depth = 0) {\n if (!this.isFlipable(t, i)) return;\n const maxDepth = 100;\n if (depth === maxDepth) {\n throw new Error(\"maxde\");\n return;\n }\n const ni = t.neighbours[i]!;\n this.flip(t, i);\n this.propagatingFlip(t, i, depth + 1);\n i = ni.indexV(t.vertices[i]!);\n this.propagatingFlip(ni, i, depth + 1);\n }\n\n lessEdge(e1: Edge, e2: Edge) {\n const ind1 = e1[1];\n const ind2 = e2[1];\n return e1[0].uid < e2[0].uid || (e1[0].uid === e2[0].uid && ind1 < ind2);\n }\n\n propagatingFlipE(edges: Edge[]) {\n let eI = 0;\n let t: Triangle;\n let i: number;\n let eni: Edge;\n const edgeSet: Edge[] = [];\n while (eI < edges.length) {\n t = edges[eI][0];\n i = edges[eI][1];\n if (this.isFlipable(t, i)) {\n eni = [t.neighbours[i]!, this.tds.mirrorIndex(t, i)];\n if (this.lessEdge(edges[eI], eni)) edgeSet.push(edges[eI]);\n else edgeSet.push(eni);\n }\n ++eI;\n }\n let indf: number;\n let ni: Triangle;\n let indn: number;\n let ei: Edge;\n const e: (Edge | null)[] = [null, null, null, null];\n while (edgeSet.length > 0) {\n t = edgeSet[0][0];\n indf = edgeSet[0][1];\n ni = t.neighbours[indf]!;\n indn = this.tds.mirrorIndex(t, indf);\n ei = [t, indf];\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === ei[0] && ed[1] === ei[1]), 1);\n e[0] = [t, cw(indf)];\n e[1] = [t, ccw(indf)];\n e[2] = [ni, cw(indn)];\n e[3] = [ni, ccw(indn)];\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni))\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === edge![0] && ed[1] === edge![1]), 1);\n else edgeSet.splice(edgeSet.findIndex(ed => ed[0] === eni[0] && ed[1] === eni[1]), 1);\n }\n\n this.flip(t, indf);\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n if (this.isFlipable(tt, ii)) {\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni)) edgeSet.push(edge!);\n else edgeSet.push(eni);\n }\n }\n }\n }\n\n flip(t: Triangle, i: number) {\n const u = t.neighbours[i]!;\n const j = this.tds.mirrorIndex(t, i);\n const t1 = t.neighbours[cw(i)]!;\n const i1 = this.tds.mirrorIndex(t, cw(i));\n const t2 = t.neighbours[ccw(i)]!;\n const i2 = this.tds.mirrorIndex(t, ccw(i));\n const t3 = u.neighbours[cw(j)]!;\n const i3 = this.tds.mirrorIndex(u, cw(j));\n const t4 = u.neighbours[ccw(j)]!;\n const i4 = this.tds.mirrorIndex(u, ccw(j));\n this.tds.flip(t, i);\n t.constraints[t.indexT(u)] = false;\n u.constraints[u.indexT(t)] = false;\n t1.neighbours[i1]!.constraints[this.tds.mirrorIndex(t1, i1)] = t1.constraints[i1];\n t2.neighbours[i2]!.constraints[this.tds.mirrorIndex(t2, i2)] = t2.constraints[i2];\n t3.neighbours[i3]!.constraints[this.tds.mirrorIndex(t3, i3)] = t3.constraints[i3];\n t4.neighbours[i4]!.constraints[this.tds.mirrorIndex(t4, i4)] = t4.constraints[i4];\n }\n\n isFlipable(t: Triangle, i: number, perturb = true) {\n const ni = t.neighbours[i]!;\n if (t.isInfinite() || ni.isInfinite()) return false;\n if (t.constraints[i]) return false;\n return sideOfOrientedCircle(ni, t.vertices[i]!.point!, perturb) === Sign.ON_POSITIVE_SIDE;\n }\n\n insertb(a: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n let insertInConstrainedEdge = false;\n let v1: Vertex;\n let v2: Vertex;\n if (lt === LocateType.EDGE && loc!.isConstrained(li)) {\n insertInConstrainedEdge = true;\n v1 = loc!.vertices[ccw(li)]!;\n v2 = loc!.vertices[cw(li)]!;\n }\n const va = this.insertc(a, loc, lt, li);\n if (insertInConstrainedEdge) this.updateConstraintsIncident(va, v1!, v2!);\n else if (lt !== LocateType.VERTEX) this.clearConstraintsIncident(va);\n if (this.tds.dimension === 2) this.updateConstraintsOpposite(va);\n return va;\n }\n\n updateConstraintsIncident(va: Vertex, c1: Vertex, c2: Vertex) {\n if (this.tds.dimension === 0) return;\n if (this.tds.dimension === 1) {\n const ec = new EdgeCirculator(va, null);\n do {\n ec.t!.constraints[2] = true;\n } while (ec.next());\n } else {\n const fc = new FaceCirculator(va, null);\n do {\n const indf = fc.t!.indexV(va);\n const cwi = cw(indf);\n const ccwi = ccw(indf);\n if (fc.t!.vertices[cwi] === c1 || fc.t!.vertices[cwi] === c2) {\n fc.t!.constraints[ccwi] = true;\n fc.t!.constraints[cwi] = false;\n } else {\n fc.t!.constraints[ccwi] = false;\n fc.t!.constraints[cwi] = true;\n }\n } while (fc.next());\n }\n }\n\n clearConstraintsIncident(v: Vertex) {\n const ec = new EdgeCirculator(v, null);\n if (ec.valid) {\n do {\n const t = ec.t!;\n const indf = ec.ri;\n t.constraints[indf] = false;\n if (this.tds.dimension === 2) t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)] = false;\n } while (ec.next());\n }\n }\n\n insertc(p: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n if (this.tds.vertices.length === 1) {\n return this.insertFirst(p);\n } else if (this.tds.vertices.length === 2) {\n if (lt === LocateType.VERTEX) return this.tds.finiteVertex;\n else return this.insertSecond(p);\n }\n switch (lt) {\n case LocateType.VERTEX: {\n return loc!.vertices[li]!;\n }\n case LocateType.OUTSIDE_AFFINE_HULL: {\n return this.insertOutsideAffineHull(p);\n }\n case LocateType.OUTSIDE_CONVEX_HULL: {\n return this.insertOutsideConvexHull(p, loc!);\n }\n case LocateType.EDGE: {\n return this.insertInEdge(p, loc!, li);\n }\n case LocateType.FACE: {\n return this.insertInFace(p, loc!);\n }\n }\n throw new Error(\"qwe\");\n return new Vertex();\n }\n\n insertInEdge(p: Point, loc: Triangle, li: number): Vertex {\n const v = this.tds.insertInEdge(loc, li);\n v.point = p;\n return v;\n }\n\n insertInFace(p: Point, loc: Triangle): Vertex {\n const v = this.tds.insertInFace(loc);\n v.point = p;\n return v;\n }\n\n insertFirst(p: Point): Vertex {\n const v = this.tds.insertDimUp();\n v.point = p;\n return v;\n }\n\n insertSecond(p: Point): Vertex {\n const v = this.tds.insertDimUp(this.tds._infinite, true);\n v.point = p;\n return v;\n }\n\n insertOutsideAffineHull(p: Point): Vertex {\n let conform = false;\n if (this.tds.dimension === 1) {\n const t = this.tds.finiteEdge.first!;\n const orient = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n conform = orient === Sign.COUNTERCLOCKWISE;\n }\n const v = this.tds.insertDimUp(this.tds._infinite, conform);\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull(p: Point, t: Triangle): Vertex {\n let v: Vertex;\n if (this.tds.dimension === 1) {\n throw new Error(\"sdfasdasd\");\n } else {\n v = this.insertOutsideConvexHull2(p, t);\n }\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull2(p: Point, t: Triangle): Vertex {\n let li = t.indexV(this.tds._infinite);\n const ccwlist: Triangle[] = [];\n const cwlist: Triangle[] = [];\n let fc = new FaceCirculator(this.tds._infinite, t);\n let done = false;\n while (!done) {\n fc.prev();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) ccwlist.push(fc.t!);\n else done = true;\n }\n fc = new FaceCirculator(this.tds._infinite, t);\n done = false;\n while (!done) {\n fc.next();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) cwlist.push(fc.t!);\n else done = true;\n }\n const v = this.tds.insertInFace(t);\n v.point = p;\n let th;\n while (ccwlist.length > 0) {\n th = ccwlist[0];\n li = ccw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n ccwlist.shift();\n }\n while (cwlist.length > 0) {\n th = cwlist[0];\n li = cw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n cwlist.shift();\n }\n fc = new FaceCirculator(v, null);\n while (!fc.t!.isInfinite()) fc.next();\n this.tds._infinite.triangle = fc.t!;\n return v;\n }\n\n locate(p: Point, start: Triangle | null) {\n let lt = 0;\n let li = 0;\n if (this.tds.dimension < 0) {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 0) {\n if (xyEqual(p, this.tds.finiteVertex.triangle!.vertices[0]!.point!)) {\n lt = LocateType.VERTEX;\n } else {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n }\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 1) {\n return this.marchLocate1D(p);\n }\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)]!;\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)]!;\n }\n return this.marchLocate2D(start, p);\n }\n\n marchLocate1D(p: Point) {\n const ff = this.tds._infinite.triangle!;\n const iv = ff.indexV(this.tds._infinite);\n const t = ff.neighbours[iv]!;\n const pqt = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n if (pqt === Sign.RIGHT_TURN || pqt === Sign.LEFT_TURN) {\n return { loc: new Triangle(), lt: LocateType.OUTSIDE_AFFINE_HULL, li: 4 };\n }\n const i = t.indexT(ff);\n if (collinearBetween(p, t.vertices[1 - i]!.point!, t.vertices[i]!.point!))\n return { loc: ff, lt: LocateType.OUTSIDE_CONVEX_HULL, li: iv };\n\n if (xyEqual(p, t.vertices[1 - i]!.point!)) return { loc: t, lt: LocateType.VERTEX, li: 1 - i };\n throw new Error(\"sdfsdf\");\n }\n\n marchLocate2D(c: Triangle, p: Point) {\n let prev = null;\n let first = true;\n let lt: LocateType | undefined;\n let li: number | undefined;\n while (true) {\n if (c.isInfinite()) {\n return { loc: c, lt: LocateType.OUTSIDE_CONVEX_HULL, li: c.indexV(this.tds._infinite) };\n }\n const leftFirst = 0; // Math.round(Math.random());\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n let o0: Sign;\n let o1: Sign;\n let o2: Sign;\n if (first) {\n prev = c;\n first = false;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (leftFirst) {\n if (c.neighbours[0]! === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1]! === prev) {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1] === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n }\n const sum =\n (o0 === Sign.COLLINEAR ? 1 : 0) + (o1 === Sign.COLLINEAR ? 1 : 0) + (o2 === Sign.COLLINEAR ? 1 : 0);\n switch (sum) {\n case 0: {\n lt = LocateType.FACE;\n li = 4;\n break;\n }\n case 1: {\n lt = LocateType.EDGE;\n li = o0 === Sign.COLLINEAR ? 2 : o1 === Sign.COLLINEAR ? 0 : 1;\n break;\n }\n case 2: {\n lt = LocateType.VERTEX;\n li = o0 !== Sign.COLLINEAR ? 2 : o1 !== Sign.COLLINEAR ? 0 : 1;\n break;\n }\n }\n if (lt === undefined || li === undefined) throw new Error(\"ert\");\n return { loc: c, lt, li };\n }\n }\n\n iLocate(p: Point, start: Triangle | null) {\n if (this.tds.dimension < 2) return start;\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)];\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)];\n }\n let prev = null;\n let c = start!;\n let first = true;\n let nTurns = 2500;\n while (true) {\n if (!nTurns--) return c;\n if (c.isInfinite()) return c;\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n if (first) {\n prev = c;\n first = false;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (c.neighbours[1] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n } else {\n prev = c;\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n }\n }\n break;\n }\n return c;\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy, l2gz } from \"@/game/units\";\n\nclass LayerManager {\n layers: Layer[] = [];\n width = window.innerWidth;\n height = window.innerHeight;\n\n UUIDMap: Map = new Map();\n\n // Refresh interval and redraw setter.\n interval = 30;\n\n constructor() {\n requestAnimationFrame(this.drawLoop);\n }\n\n reset() {\n this.layers = [];\n this.UUIDMap = new Map();\n }\n\n drawLoop = () => {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].draw();\n }\n requestAnimationFrame(this.drawLoop);\n };\n\n setWidth(width: number): void {\n this.width = width;\n for (const layer of this.layers) {\n layer.canvas.width = width;\n layer.width = width;\n }\n }\n\n setHeight(height: number): void {\n this.height = height;\n for (const layer of this.layers) {\n layer.canvas.height = height;\n layer.height = height;\n }\n }\n\n addLayer(layer: Layer): void {\n this.layers.push(layer);\n if (!gameStore.IS_DM && !layer.playerEditable) return;\n if (layer.selectable) gameStore.addLayer(layer.name);\n }\n\n hasLayer(name: string): boolean {\n return this.layers.some(l => l.name === name);\n }\n\n getLayer(name?: string) {\n name = name === undefined ? gameStore.selectedLayer : name;\n for (const layer of this.layers) {\n if (layer.name === name) return layer;\n }\n }\n\n selectLayer(name: string, sync: boolean = true): void {\n let found = false;\n for (const layer of this.layers) {\n if (!layer.selectable) continue;\n if (found && layer.name !== \"fow\") layer.ctx.globalAlpha = 0.3;\n else layer.ctx.globalAlpha = 1.0;\n\n if (name === layer.name) {\n gameStore.selectLayer({ name, sync });\n found = true;\n }\n\n layer.clearSelection();\n layer.invalidate(true);\n }\n }\n\n getGridLayer(): GridLayer | undefined {\n return this.getLayer(\"grid\");\n }\n\n hasSelection() {\n const selection = this.getSelection();\n return selection !== undefined && selection.length > 0;\n }\n\n // THIS INCLUDES POTENTIALLY THE SelectTool.SelectionHelper !!!\n getSelection() {\n const layer = this.getLayer();\n if (layer === undefined) return undefined;\n return layer.selection;\n }\n\n invalidate(): void {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].invalidate(true);\n }\n }\n\n invalidateLight() {\n for (let i = this.layers.length - 1; i >= 0; i--)\n if (this.layers[i].isVisionLayer) this.layers[i].invalidate(true);\n }\n\n dropAsset(event: DragEvent) {\n const layer = this.getLayer();\n if (layer === undefined || event === null || event.dataTransfer === null) return;\n const image = document.createElement(\"img\");\n image.src = event.dataTransfer.getData(\"text/plain\");\n const asset = new Asset(\n image,\n new GlobalPoint(l2gx(event.clientX), l2gy(event.clientY)),\n l2gz(image.width),\n l2gz(image.height),\n );\n asset.src = new URL(image.src).pathname;\n\n if (gameStore.useGrid) {\n const gs = gameStore.gridSize;\n asset.refPoint = new GlobalPoint(\n Math.round(asset.refPoint.x / gs) * gs,\n Math.round(asset.refPoint.y / gs) * gs,\n );\n asset.w = Math.max(Math.round(asset.w / gs) * gs, gs);\n asset.h = Math.max(Math.round(asset.h / gs) * gs, gs);\n }\n\n layer.addShape(asset, true);\n }\n}\n\nexport const layerManager = new LayerManager();\n(window).lm = layerManager;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"\nimport script from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"73816298\",\n null\n \n)\n\ncomponent.options.__file = \"createtoken_modal.vue\"\nexport default component.exports","import { BoundingRect } from \"@/game/shapes/boundingrect\";\n\nexport class BoundingNode {\n bbox: BoundingRect;\n nPrimitives: number;\n children: BoundingNode[] = [];\n constructor(nPrimitives: number, bbox: BoundingRect) {\n this.nPrimitives = nPrimitives;\n this.bbox = bbox;\n }\n}\n\nexport class LeafNode extends BoundingNode {\n firstPrimOffset: number;\n constructor(first: number, n: number, bbox: BoundingRect) {\n super(n, bbox);\n this.firstPrimOffset = first;\n }\n}\n\nexport class InteriorNode extends BoundingNode {\n dimension: number;\n constructor(dimension: number, c1: BoundingNode, c2: BoundingNode) {\n super(0, c1.bbox.union(c2.bbox));\n this.dimension = dimension;\n this.children.push(c1);\n this.children.push(c2);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"","import Tools from \"@/game/ui/tools/tools.vue\";\n\nimport { getRef, uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { ServerAura } from '@/game/comm/types/shapes';\nimport { EventBus } from \"@/game/event-bus\";\nimport { Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\n\nexport function onKeyUp(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n } else {\n if (event.key === \"Delete\" || event.key === \"Del\" || event.key === \"Backspace\") {\n if (layerManager.getLayer === undefined) {\n console.log(\"No active layer selected for delete operation\");\n return;\n }\n const l = layerManager.getLayer()!;\n for (let i = l.selection.length - 1; i >= 0; i--) {\n const sel = l.selection[i];\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) {\n l.selection.splice(i, 1);\n continue;\n }\n l.removeShape(sel, true, false);\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n EventBus.$emit(\"Initiative.Remove\", sel.uuid);\n }\n }\n }\n}\n\nexport function onKeyDown(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n if (event.keyCode === 65 && event.ctrlKey) event.target!.select();\n } else {\n if (event.keyCode >= 37 && event.keyCode <= 40) {\n // todo: this should already be rounded\n const gridSize = Math.round(gameStore.gridSize);\n let offsetX = gridSize * (event.keyCode % 2);\n let offsetY = gridSize * (event.keyCode % 2 ? 0 : 1);\n if (layerManager.hasSelection()) {\n const selection = layerManager.getSelection()!;\n offsetX *= event.keyCode <= 38 ? -1 : 1;\n offsetY *= event.keyCode <= 38 ? -1 : 1;\n let delta = new Vector(offsetX, offsetY);\n if (!event.shiftKey || !gameStore.IS_DM) {\n // First check for collisions. Using the smooth wall slide collision check used on mouse move is overkill here.\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n delta = calculateDelta(delta, sel);\n }\n }\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n sel.refPoint = sel.refPoint.add(delta);\n // todo: Fix again\n // if (sel.refPoint.x % gridSize !== 0 || sel.refPoint.y % gridSize !== 0) sel.snapToGrid();\n socket.emit(\"Shape.Position.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n gameStore.recalculateVision();\n layerManager.getLayer()!.invalidate(false);\n } else {\n // The pan offsets should be in the opposite direction to give the correct feel.\n gameStore.increasePanX(offsetX * (event.keyCode <= 38 ? 1 : -1));\n gameStore.increasePanY(offsetY * (event.keyCode <= 38 ? 1 : -1));\n layerManager.invalidate();\n sendClientOptions();\n }\n } else if (event.keyCode === 68) {\n const layer = layerManager.getLayer();\n if (layer) {\n layer.clearSelection();\n layer.invalidate(true);\n }\n } else if (event.key === \"u\" && event.ctrlKey) {\n event.preventDefault();\n event.stopPropagation();\n gameStore.toggleUI();\n } else if (event.key === \"c\" && event.ctrlKey) {\n const layer = layerManager.getLayer();\n if (!layer) return;\n if (!layer.selection) return;\n const clipboard = [];\n for (const shape of layer.selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === shape.uuid) continue;\n clipboard.push(shape.asDict());\n }\n gameStore.setClipboard(clipboard);\n } else if (event.key === \"v\" && event.ctrlKey) {\n const layer = layerManager.getLayer();\n if (!layer) return;\n if (!gameStore.clipboard) return;\n layer.selection = [];\n for (const clip of gameStore.clipboard) {\n clip.x += 10;\n clip.y += 10;\n clip.uuid = uuidv4();\n const oldTrackers = clip.trackers;\n clip.trackers = [];\n for (const tracker of oldTrackers) {\n const newTracker: Tracker = {\n ...tracker,\n uuid: uuidv4()\n }\n clip.trackers.push(newTracker);\n }\n const oldAuras = clip.auras;\n clip.auras = [];\n for (const aura of oldAuras) {\n const newAura: ServerAura = {\n ...aura,\n uuid: uuidv4()\n }\n clip.auras.push(newAura);\n }\n const shape = createShapeFromDict(clip);\n if (shape === undefined) continue;\n layer.addShape(shape, true);\n layer.selection.push(shape);\n }\n if (layer.selection.length === 1) EventBus.$emit(\"SelectionInfo.Shape.Set\", layer.selection[0]);\n else EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n layer.invalidate(false);\n }\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport ShapeContext from \"@/game/ui/selection/shapecontext.vue\";\nimport CreateTokenModal from \"@/game/ui/tools/createtoken_modal.vue\";\nimport DrawTool from \"@/game/ui/tools/draw.vue\";\nimport FilterTool from \"@/game/ui/tools/filter.vue\";\nimport MapTool from \"@/game/ui/tools/map.vue\";\nimport PanTool from \"@/game/ui/tools/pan\";\nimport SelectTool from \"@/game/ui/tools/select.vue\";\n\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { RulerTool } from \"@/game/ui/tools/ruler\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component({\n components: {\n \"select-tool\": SelectTool,\n \"pan-tool\": PanTool,\n \"draw-tool\": DrawTool,\n \"ruler-tool\": RulerTool,\n \"map-tool\": MapTool,\n \"filter-tool\": FilterTool,\n \"shape-menu\": ShapeContext,\n \"createtoken-dialog\": CreateTokenModal,\n },\n watch: {\n currentTool(newValue, oldValue) {\n this.$emit(\"tools-select-change\", newValue, oldValue);\n },\n },\n})\nexport default class Tools extends Vue {\n $refs!: {\n selectTool: InstanceType;\n };\n\n currentTool = \"Select\";\n tools = [\"Select\", \"Pan\", \"Draw\", \"Ruler\", \"Map\", \"Filter\"];\n dmTools = [\"Map\"];\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get currentToolComponent(): string {\n return `${this.currentTool.toLowerCase()}-tool`;\n }\n\n get visibleTools(): string[] {\n return this.tools.filter(t => (!this.dmTools.includes(t) || this.IS_DM));\n }\n\n mousedown(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mousedown\", event, targetTool);\n }\n mouseup(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mouseup\", event, targetTool);\n }\n mousemove(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if ((event.buttons & 4) !== 0) {\n targetTool = \"Pan\";\n } else if ((event.button & 1) > 1) {\n return;\n }\n\n this.$emit(\"mousemove\", event, targetTool);\n\n // Annotation hover\n let found = false;\n for (const uuid of gameStore.annotations) {\n if (layerManager.UUIDMap.has(uuid) && layerManager.hasLayer(\"draw\")) {\n const shape = layerManager.UUIDMap.get(uuid)!;\n if (shape.contains(l2g(getMouse(event)))) {\n found = true;\n gameManager.annotationManager.setActiveText(shape.annotation);\n }\n }\n }\n if (!found && gameManager.annotationManager.shown) {\n gameManager.annotationManager.setActiveText(\"\");\n }\n }\n mouseleave(event: MouseEvent) {\n // When leaving the window while a mouse is pressed down, act as if it was released\n if ((event.buttons & 1) !== 0) {\n this.$emit(\"mouseup\", event, this.currentTool);\n }\n }\n contextmenu(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n if (event.button !== 2 || (event.target).tagName !== \"CANVAS\") return;\n this.$emit(\"contextmenu\", event, this.currentTool);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class Prompt extends Vue {\n $refs!: {\n answer: HTMLElement;\n };\n\n visible = false;\n question = \"\";\n answer = \"\";\n title = \"\";\n\n resolve = (value: string) => {};\n reject = () => {};\n\n submit() {\n this.resolve(this.answer);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.question = \"\";\n this.answer = \"\";\n this.title = \"\";\n }\n prompt(question: string, title: string): Promise {\n this.question = question;\n this.title = title;\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.answer.focus();\n });\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=style&index=0&id=0bf2b7ba&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=style&index=0&id=0bf2b7ba&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._v(_vm._s(_vm.message))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=template&id=ff095222&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"","import { GlobalPoint, Point, Ray, Vector } from \"@/game/geom\";\nimport { g2lx, g2ly } from \"../units\";\n\nexport class BoundingRect {\n readonly w: number;\n readonly h: number;\n readonly topLeft: GlobalPoint;\n readonly topRight: GlobalPoint;\n readonly botRight: GlobalPoint;\n readonly botLeft: GlobalPoint;\n\n constructor(topleft: GlobalPoint, w: number, h: number) {\n this.w = w;\n this.h = h;\n this.topLeft = topleft;\n this.topRight = new GlobalPoint(topleft.x + w, topleft.y);\n this.botRight = new GlobalPoint(topleft.x + w, topleft.y + h);\n this.botLeft = new GlobalPoint(topleft.x, topleft.y + h);\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.topLeft.x <= point.x &&\n this.topRight.x >= point.x &&\n this.topLeft.y <= point.y &&\n this.botLeft.y >= point.y\n );\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.topLeft.x, this.topLeft.y]];\n return [\n [this.topLeft.x, this.topLeft.y],\n [this.botLeft.x, this.botLeft.y],\n [this.botRight.x, this.botRight.y],\n [this.topRight.x, this.topRight.y],\n ];\n }\n\n offset(vector: Vector): BoundingRect {\n return new BoundingRect(this.topLeft.add(vector), this.w, this.h);\n }\n\n union(other: BoundingRect): BoundingRect {\n const xmin = Math.min(this.topLeft.x, other.topLeft.x);\n const xmax = Math.max(this.topRight.x, other.topRight.x);\n const ymin = Math.min(this.topLeft.y, other.topLeft.y);\n const ymax = Math.max(this.botLeft.y, other.botLeft.y);\n return new BoundingRect(new GlobalPoint(xmin, ymin), xmax - xmin, ymax - ymin);\n }\n\n getDiagCorner(botright: boolean) {\n return botright ? this.botRight : this.topLeft;\n }\n\n intersectsWith(other: BoundingRect): boolean {\n return !(\n other.topLeft.x > this.topRight.x ||\n other.topRight.x < this.topLeft.x ||\n other.topLeft.y > this.botLeft.y ||\n other.botLeft.y < this.topLeft.y\n );\n }\n\n intersectsWithInner(other: BoundingRect): boolean {\n return !(\n other.topLeft.x >= this.topRight.x ||\n other.topRight.x <= this.topLeft.x ||\n other.topLeft.y >= this.botLeft.y ||\n other.botLeft.y <= this.topLeft.y\n );\n }\n\n intersectP(ray: Ray, invDir: Vector, dirIsNeg: boolean[]) {\n let txmin = invDir.x * (this.getDiagCorner(dirIsNeg[0]).x - ray.origin!.x);\n let txmax = invDir.x * (this.getDiagCorner(!dirIsNeg[0]).x - ray.origin!.x);\n const tymin = invDir.y * (this.getDiagCorner(dirIsNeg[1]).y - ray.origin!.y);\n const tymax = invDir.y * (this.getDiagCorner(!dirIsNeg[1]).y - ray.origin!.y);\n if (txmin > tymax || tymin > txmax) return { hit: false, min: txmin, max: txmax };\n if (tymin > txmin) txmin = tymin;\n if (tymax < txmax) txmax = tymax;\n return { hit: txmin < ray.tMax! && txmax > 0, min: txmin, max: txmax };\n }\n\n center(): GlobalPoint {\n return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n const coreVisible = !(\n g2lx(this.topLeft.x) > canvas.width ||\n g2ly(this.topLeft.y) > canvas.height ||\n g2lx(this.topRight.x) < 0 ||\n g2ly(this.botRight.y) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"formcontainer\"}},[(_vm.owned || _vm.joined)?_c('form',[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"Your sessions\")]),_c('div',{staticClass:\"input\"},[_vm._l((_vm.owned),function(room,i){return _c('router-link',{key:'o-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[0]))])}),_vm._l((_vm.joined),function(room,i){return _c('router-link',{key:'j-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[1])+\"/\"+_vm._s(room[0]))])})],2),(_vm.owned.length === 0)?_c('div',{staticClass:\"input\"},[_vm._v(\"No active sessions\")]):_vm._e()])]):_vm._e(),_vm._m(0),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.createRoom($event)}}},[_c('fieldset',[(!_vm.owned && !_vm.joined)?_c('legend',{staticClass:\"legend\"},[_vm._v(\"Create a session\")]):_c('div',{staticClass:\"input\"},[_vm._v(\"Create a new session\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newSessionName),expression:\"newSessionName\"}],attrs:{\"type\":\"text\",\"name\":\"room_name\",\"placeholder\":\"Session Name\"},domProps:{\"value\":(_vm.newSessionName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newSessionName=$event.target.value}}}),_vm._m(1)]),_vm._m(2)])]),_c('div',{attrs:{\"id\":\"account-options\"}},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Account Settings\",\"to\":\"/account\"}},[_c('i',{staticClass:\"fas fa-cog\"})])],1),_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Logout\",\"to\":\"/auth/logout\"}},[_c('i',{staticClass:\"fas fa-sign-out-alt\"})])],1)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h4',[_c('span',[_vm._v(\"OR\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fab fa-d-and-d\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"title\":\"Create\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=template&id=61eb1455&scoped=true&\"","/*\nThis module defines some Point classes.\nA strong focus is made to ensure that at no time a global and a local point are mixed up with each other.\nAt first glance this adds weird looking hacks as ts does not support nominal typing.\n*/\n\nexport function getPointDistance(p1: Point, p2: Point) {\n const a = p1.x - p2.x;\n const b = p1.y - p2.y;\n return Math.sqrt(a * a + b * b);\n}\n\nexport class Point {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n static fromArray(point: number[]) {\n return new Point(point[0], point[1]);\n }\n add(vec: Vector) {\n return new Point(this.x + vec.x, this.y + vec.y);\n }\n subtract(other: Point) {\n return new Vector(this.x - other.x, this.y - other.y);\n }\n clone(): Point {\n return new Point(this.x, this.y);\n }\n get(dimension: 0 | 1) {\n if (dimension === 0) return this.x;\n return this.y;\n }\n asArray(): number[] {\n return [this.x, this.y];\n }\n}\nexport class GlobalPoint extends Point {\n // This is to differentiate with LocalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _GlobalPoint!: string;\n add(vec: Vector): GlobalPoint {\n return super.add(vec);\n }\n subtract(other: GlobalPoint): Vector {\n return super.subtract(other);\n }\n clone(): GlobalPoint {\n return super.clone();\n }\n static fromArray(point: number[]) {\n return new GlobalPoint(point[0], point[1]);\n }\n}\n\nexport class LocalPoint extends Point {\n // This is to differentiate with GlobalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _LocalPoint!: string;\n add(vec: Vector): LocalPoint {\n return super.add(vec);\n }\n subtract(other: LocalPoint): Vector {\n return super.subtract(other);\n }\n clone(): LocalPoint {\n return super.clone();\n }\n}\n\nexport class Vector {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n dot(other: Vector): number {\n return this.x * other.x + this.y * other.y;\n }\n inverse(): Vector {\n return new Vector(this.x === 0 ? 0 : 1 / this.x, this.y === 0 ? 0 : 1 / this.y);\n }\n length(): number {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize(): Vector {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse(): Vector {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number): Vector {\n return new Vector(this.x * scale, this.y * scale);\n }\n angle(): number {\n return (Math.atan2(this.y, this.x) * 180) / Math.PI;\n }\n}\n\nexport class Ray {\n readonly direction: Vector;\n readonly origin: T;\n tMax: number;\n constructor(origin: T, direction: Vector, tMax?: number) {\n this.direction = direction;\n this.origin = origin;\n if (tMax === undefined) tMax = Infinity;\n this.tMax = tMax;\n }\n static fromPoints(p1: T, p2: T): Ray {\n const vec = new Vector(p2.x - p1.x, p2.y - p1.y);\n let maxT;\n if (Math.abs(vec.x) > 0.01) maxT = (p2.x - p1.x) / vec.x;\n else maxT = (p2.y - p1.y) / vec.y;\n return new Ray(p1, vec, maxT);\n }\n get(t: number): T {\n return new Point(this.origin.x + t * this.direction.x, this.origin.y + t * this.direction.y);\n }\n getDistance(t1: number, t2: number) {\n return Math.sqrt(Math.pow(t2 - t1, 2) * (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n getT(t1: number, distance: number) {\n return t1 + Math.sqrt(Math.pow(distance, 2) / (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_vm._l((_vm.folders),function(folder){return _c('li',{key:folder,staticClass:\"folder\",on:{\"click\":function($event){$event.stopPropagation();return _vm.toggle($event)}}},[_vm._v(\"\\n \"+_vm._s(folder)+\"\\n \"),_c('asset-node',{attrs:{\"asset\":_vm.asset[folder]}})],1)}),_vm._l((_vm.files),function(file){return _c('li',{key:file.name,staticClass:\"file draggable token\",attrs:{\"draggable\":\"true\"},on:{\"mouseover\":function($event){_vm.showImage = file.hash},\"mouseout\":function($event){_vm.showImage = null},\"dragstart\":function($event){_vm.dragStart($event, '/static/assets/' + file.hash)}}},[_vm._v(\"\\n \"+_vm._s(file.name)+\"\\n \"),(_vm.showImage == file.hash)?_c('div',{staticClass:\"preview\"},[_c('img',{staticClass:\"asset-preview-image\",attrs:{\"src\":'/static/assets/' + file.hash}})]):_vm._e()])})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=template&id=6d718094&scoped=true&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=style&index=0&id=4697341e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=style&index=0&id=4697341e&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport vueSlider from \"vue-slider-component\";\n\nimport \"@/game/api/events\";\n\nimport { throttle } from \"lodash\";\nimport { mapGetters, mapState } from \"vuex\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\nimport LabelManager from \"@/game/ui/labels.vue\";\nimport MenuBar from \"@/game/ui/menu/menu.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\nimport SelectionInfo from \"@/game/ui/selection/selection_info.vue\";\nimport Tools from \"@/game/ui/tools/tools.vue\";\n\nimport { createConnection, socket } from \"@/game/api/socket\";\nimport { onKeyDown, onKeyUp } from \"@/game/events/keyboard\";\nimport { scrollZoom } from \"@/game/events/mouse\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { LocalPoint } from \"./geom\";\n\n@Component({\n components: {\n \"tool-bar\": Tools,\n \"selection-info\": SelectionInfo,\n \"prompt-dialog\": Prompt,\n \"confirm-dialog\": ConfirmDialog,\n \"menu-bar\": MenuBar,\n \"initiative-dialog\": Initiative,\n \"zoom-slider\": vueSlider,\n \"note-dialog\": NoteDialog,\n \"label-dialog\": LabelManager,\n },\n beforeRouteEnter(to, from, next) {\n createConnection(to);\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class Game extends Vue {\n $refs!: {\n confirm: InstanceType;\n tools: InstanceType;\n };\n\n ready = {\n manager: false,\n tools: false,\n };\n\n get showUI(): boolean {\n return gameStore.showUI;\n }\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get layers(): string[] {\n return gameStore.layers;\n }\n\n get selectedLayer(): string {\n return gameStore.selectedLayer;\n }\n\n get zoomDisplay(): number {\n return gameStore.zoomDisplay;\n }\n\n set zoomDisplay(value: number) {\n gameStore.updateZoom({\n newZoomDisplay: value,\n zoomLocation: l2g(new LocalPoint(window.innerWidth / 2, window.innerHeight / 2)),\n });\n }\n\n mounted() {\n window.addEventListener(\"resize\", this.resizeWindow);\n window.addEventListener(\"keyup\", onKeyUp);\n window.addEventListener(\"keydown\", onKeyDown);\n this.ready.manager = true;\n }\n\n destroyed() {\n window.removeEventListener(\"resize\", this.resizeWindow);\n window.removeEventListener(\"keyup\", onKeyUp);\n window.removeEventListener(\"keydown\", onKeyDown);\n this.ready.manager = false;\n }\n\n // Window events\n\n zoom(event: WheelEvent) {\n throttle(scrollZoom)(event);\n }\n\n resizeWindow() {\n layerManager.setWidth(window.innerWidth);\n layerManager.setHeight(window.innerHeight);\n layerManager.invalidate();\n }\n\n // Mouse events\n\n mousedown(event: MouseEvent) {\n this.$refs.tools.mousedown(event);\n }\n mouseup(event: MouseEvent) {\n this.$refs.tools.mouseup(event);\n }\n mousemove(event: MouseEvent) {\n this.$refs.tools.mousemove(event);\n }\n mouseleave(event: MouseEvent) {\n this.$refs.tools.mouseleave(event);\n }\n contextmenu(event: MouseEvent) {\n this.$refs.tools.contextmenu(event);\n }\n selectLayer(layer: string) {\n layerManager.selectLayer(layer);\n }\n drop(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n if (event.dataTransfer.files.length > 0) {\n this.$refs.confirm\n .open(\"Uploading files should be done through the asset manager.\", \"Ok\", \"\")\n .then(() => {}, () => {});\n } else if (event.dataTransfer.getData(\"text/plain\") === \"\") {\n return;\n } else {\n layerManager.dropAsset(event);\n }\n }\n}\n","import { GlobalPoint, LocalPoint, Ray } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function g2l(obj: GlobalPoint): LocalPoint {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n return new LocalPoint((obj.x + panX) * z, (obj.y + panY) * z);\n}\n\nexport function g2lx(x: number) {\n return g2l(new GlobalPoint(x, 0)).x;\n}\n\nexport function g2ly(y: number) {\n return g2l(new GlobalPoint(0, y)).y;\n}\n\nexport function g2lz(z: number) {\n return z * gameStore.zoomFactor;\n}\n\nexport function getUnitDistance(r: number) {\n return (r / gameStore.unitSize) * gameStore.gridSize;\n}\n\nexport function g2lr(r: number) {\n return g2lz(getUnitDistance(r));\n}\n\nexport function l2g(obj: LocalPoint): GlobalPoint;\nexport function l2g(obj: Ray): Ray;\nexport function l2g(obj: LocalPoint | Ray): GlobalPoint | Ray {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n if (obj instanceof LocalPoint) {\n return new GlobalPoint(obj.x / z - panX, obj.y / z - panY);\n } else {\n return new Ray(l2g(obj.origin), obj.direction.multiply(1 / z), obj.tMax);\n }\n}\n\nexport function l2gx(x: number) {\n return l2g(new LocalPoint(x, 0)).x;\n}\n\nexport function l2gy(y: number) {\n return l2g(new LocalPoint(0, y)).y;\n}\n\nexport function l2gz(z: number) {\n return z / gameStore.zoomFactor;\n}\n\nexport function l2gr(r: number) {\n return l2gz(getUnitDistance(r));\n}\n\n(window).g2lx = g2lx;\n(window).g2ly = g2ly;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport AssetNode from \"@/game/ui/menu/asset_node.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\n\nimport { getRef, uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n \"asset-node\": AssetNode,\n },\n computed: {\n ...mapState(\"game\", [\"invitationCode\", \"IS_DM\", \"locations\", \"assets\", \"notes\"]),\n },\n})\nexport default class MenuBar extends Vue {\n visible = {\n settings: false,\n locations: false,\n };\n\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n set useGrid(value: boolean) {\n gameStore.setUseGrid({ useGrid: value, sync: true });\n }\n get fullFOW(): boolean {\n return gameStore.fullFOW;\n }\n set fullFOW(value: boolean) {\n gameStore.setFullFOW({ fullFOW: value, sync: true });\n }\n get fowOpacity(): number {\n return gameStore.fowOpacity;\n }\n set fowOpacity(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setFOWOpacity({ fowOpacity: value, sync: true });\n }\n get fowLOS(): boolean {\n return gameStore.fowLOS;\n }\n set fowLOS(value: boolean) {\n gameStore.setLineOfSight({ fowLOS: value, sync: true });\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n set unitSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setUnitSize({ unitSize: value, sync: true });\n }\n get gridSize(): number {\n return gameStore.gridSize;\n }\n set gridSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setGridSize({ gridSize: value, sync: true });\n }\n get gridColour(): string {\n return gameStore.gridColour;\n }\n set gridColour(value: string) {\n gameStore.setGridColour({ colour: value, sync: true });\n }\n get fowColour(): string {\n return gameStore.fowColour;\n }\n set fowColour(value: string) {\n gameStore.setFOWColour({ colour: value, sync: true });\n }\n get rulerColour(): string {\n return gameStore.rulerColour;\n }\n set rulerColour(value: string) {\n gameStore.setRulerColour({ colour: value, sync: true });\n }\n get visionRangeMin(): number {\n return gameStore.visionRangeMin;\n }\n set visionRangeMin(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMin({ value, sync: true });\n }\n get visionRangeMax(): number {\n return gameStore.visionRangeMax;\n }\n set visionRangeMax(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMax({ value, sync: true });\n }\n settingsClick(event: { target: HTMLElement }) {\n if (event.target.classList.contains(\"accordion\")) {\n event.target.classList.toggle(\"accordion-active\");\n const next = event.target.nextElementSibling;\n if (next !== null) next.style.display = next.style.display === \"\" ? \"block\" : \"\";\n }\n }\n changeLocation(name: string) {\n socket.emit(\"Location.Change\", name);\n }\n createLocation() {\n getRef(\"prompt\")\n .prompt(`New location name:`, `Create new location`)\n .then(\n (value: string) => {\n socket.emit(\"Location.New\", value);\n },\n () => {},\n );\n }\n createNote() {\n const note = { title: \"New note\", text: \"\", uuid: uuidv4() };\n gameStore.newNote({ note, sync: true });\n this.openNote(note);\n }\n openNote(note: Note) {\n getRef(\"note\").open(note);\n }\n changeVisionMode(event: { target: HTMLSelectElement }) {\n const value = event.target.value.toLowerCase();\n if (value !== \"bvh\" && value !== \"triangle\") return;\n gameStore.setVisionMode({ mode: value, sync: true });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n layerManager.invalidate();\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.IS_DM)?_c('li',{on:{\"click\":_vm.bringPlayers}},[_vm._v(\"Bring players\")]):_vm._e(),_c('li',{on:{\"click\":_vm.createToken}},[_vm._v(\"Create basic token\")]),_c('li',{on:{\"click\":_vm.showInitiative}},[_vm._v(\"Show initiative\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"","import { CDT } from \"./cdt\";\nimport { ccw, cw, orientation, ulp } from \"./triag\";\n\nexport type Point = number[];\n\nexport const INFINITE = -7e310;\n\nlet _INFINITE_VERTEX: Vertex;\n\nexport enum Sign {\n NEGATIVE = -1,\n ZERO = 0,\n POSITIVE = 1,\n\n RIGHT_TURN = -1,\n LEFT_TURN = 1,\n\n SMALLER = -1,\n EQUAL = 0,\n LARGER = 1,\n\n CLOCKWISE = -1,\n COUNTERCLOCKWISE = 1,\n\n COLLINEAR = 0,\n COPLANAR = 0,\n DEGENERATE = 0,\n\n ON_NEGATIVE_SIDE = -1,\n ON_ORIENTED_BOUNDARY = 0,\n ON_POSITIVE_SIDE = 1,\n}\n\nenum LineFaceState {\n UNDEFINED = -1,\n VERTEX_VERTEX = 0,\n VERTEX_EDGE = 1,\n EDGE_VERTEX = 2,\n EDGE_EDGE = 3,\n}\n\nfunction newPoint(): Point {\n return [INFINITE, INFINITE];\n}\n\nexport class Triangle {\n vertices: (Vertex | null)[] = [];\n neighbours: (Triangle | null)[] = [null, null, null];\n constraints = [false, false, false];\n static _counter = 0;\n uid = Triangle._counter++;\n\n constructor(...vertices: (Vertex | null)[]) {\n this.vertices = vertices;\n }\n\n from(t: Triangle): this {\n this.vertices = t.vertices.slice(0, t.vertices.length);\n this.neighbours = t.neighbours.slice(0, t.neighbours.length);\n this.constraints = t.constraints.slice(0, t.constraints.length);\n return this;\n }\n\n get dimension() {\n return this.vertices.length - 1;\n }\n\n addVertex(vertex: Vertex) {\n if (vertex === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(vertex);\n vertex.triangle = this;\n }\n\n isConstrained(index: number): boolean {\n return this.constraints[index];\n }\n\n reorient() {\n // If certain indices do not exist yet thay will append faulty undefined's, thus we slice them\n this.vertices = [this.vertices[1], this.vertices[0], this.vertices[2]].slice(0, this.vertices.length);\n this.neighbours = [this.neighbours[1], this.neighbours[0], this.neighbours[2]];\n this.constraints = [this.constraints[1], this.constraints[0], this.constraints[2]];\n }\n\n indexV(v: Vertex): number {\n return this.vertices.indexOf(v);\n }\n\n indexT(t: Triangle): number {\n return this.neighbours.indexOf(t);\n }\n\n isInfinite(index?: number): boolean {\n if (index === undefined) {\n return this.vertices.includes(_INFINITE_VERTEX);\n } else {\n return this.vertices[ccw(index)]!.infinite || this.vertices[cw(index)]!.infinite;\n }\n }\n\n contains(point: Point) {\n const A =\n -this.vertices[1]!.point![1] * this.vertices[2]!.point![0] +\n this.vertices[0]!.point![1] * (-this.vertices[1]!.point![0] + this.vertices[2]!.point![0]) +\n this.vertices[0]!.point![0] * (this.vertices[1]!.point![1] - this.vertices[2]!.point![1]) +\n this.vertices[1]!.point![0] * this.vertices[2]!.point![1];\n const sign = A < 0 ? -1 : 1;\n const s =\n (this.vertices[0]!.point![1] * this.vertices[2]!.point![0] -\n this.vertices[0]!.point![0] * this.vertices[2]!.point![1] +\n (this.vertices[2]!.point![1] - this.vertices[0]!.point![1]) * point[0] +\n (this.vertices[0]!.point![0] - this.vertices[2]!.point![0]) * point[1]) *\n sign;\n if (s < 0) return false;\n const t =\n (this.vertices[0]!.point![0] * this.vertices[1]!.point![1] -\n this.vertices[0]!.point![1] * this.vertices[1]!.point![0] +\n (this.vertices[0]!.point![1] - this.vertices[1]!.point![1]) * point[0] +\n (this.vertices[1]!.point![0] - this.vertices[0]!.point![0]) * point[1]) *\n sign;\n\n return t > 0 && s + t < A * sign;\n }\n}\n\nexport class Vertex {\n infinite = false;\n private _point: Point | undefined;\n triangle: Triangle | undefined;\n\n constructor(point?: Point) {\n this._point = point;\n }\n\n get point(): Point | undefined {\n return this._point;\n }\n\n set point(point: Point | undefined) {\n this._point = point;\n this.infinite = false;\n }\n}\n\nexport class EdgeCirculator {\n ri: number;\n v: Vertex | null;\n t: Triangle | null;\n _ri: number;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 1) {\n this.ri = 0;\n this.v = null;\n this.t = null;\n } else {\n const i = this.t.indexV(v!);\n if (this.t.dimension === 2) this.ri = ccw(i);\n else this.ri = 2;\n }\n this._ri = this.ri;\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n next(): boolean {\n let i = this.t!.indexV(this.v!);\n if (this.t!.dimension === 1) {\n this.t = this.t!.neighbours[i === 0 ? 1 : 0];\n } else {\n this.t = this.t!.neighbours[ccw(i)];\n i = this.t!.indexV(this.v!);\n this.ri = ccw(i);\n }\n return this.ri !== this._ri || this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class EdgeIterator {\n private i = 0;\n pos: Triangle | null;\n edge: Edge = new Edge();\n tds: TDS;\n _es = 0;\n constructor(tds: TDS) {\n this.tds = tds;\n this.edge.second = 0;\n if (tds.dimension <= 0) {\n this.pos = null;\n return;\n }\n this.pos = tds.triangles[0];\n if (tds.dimension === 1) this.edge.second = 2;\n while (this.pos !== null && !this.associatedEdge()) {\n throw new Error(\"[poi\");\n }\n\n if (tds.dimension === 1) this._es = 2;\n }\n\n get valid(): boolean {\n return (this.pos !== null || this._es !== this.edge.second) && this.pos!.isInfinite(this.edge.second);\n }\n\n next() {\n do {\n this.increment();\n } while (this.pos !== null && !this.associatedEdge());\n }\n\n collect(): Edge {\n this.edge.first = this.pos;\n return this.edge;\n }\n\n associatedEdge(): boolean {\n if (this.tds.dimension === 1) return true;\n return (\n this.tds.triangles.indexOf(this.pos!) < this.tds.triangles.indexOf(this.pos!.neighbours[this.edge.second]!)\n );\n }\n\n increment() {\n if (this.tds.dimension === 1) {\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else if (this.edge.second === 2) {\n this.edge.second = 0;\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else {\n this.edge.second++;\n }\n }\n}\n\nexport class FaceCirculator {\n v: Vertex | null;\n t: Triangle | null;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 2) {\n this.v = null;\n this.t = null;\n }\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n prev() {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[cw(i)];\n }\n\n next(): boolean {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[ccw(i)];\n return this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class LineFaceCirculator {\n private i = 0;\n pos: Triangle | null = null;\n _tr: CDT;\n s: LineFaceState = LineFaceState.UNDEFINED;\n p: Point;\n q: Point;\n\n constructor(v: Vertex, tr: CDT, dir: Point) {\n this._tr = tr;\n this.p = v.point!;\n this.q = dir;\n\n const fc = new FaceCirculator(v, null);\n let ic = fc.t!.indexV(v);\n let vt = fc.t!.vertices[cw(ic)]!;\n while (v === _INFINITE_VERTEX || orientation(this.p, this.q, vt.point!) !== Sign.LEFT_TURN) {\n fc.next();\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n if (!fc.valid) {\n return;\n }\n }\n\n let vr = fc.t!.vertices[ccw(ic)]!;\n let pqr: Sign = Sign.RIGHT_TURN;\n // tslint:disable:no-conditional-assignment\n while (vr !== _INFINITE_VERTEX && (pqr = orientation(this.p, this.q, vr.point!)) === Sign.LEFT_TURN) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n }\n\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n\n if (vr === _INFINITE_VERTEX) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n pqr = orientation(this.p, this.q, vr.point!);\n switch (pqr) {\n case Sign.RIGHT_TURN:\n case Sign.COLLINEAR: {\n fc.next();\n ic = fc.t!.indexV(_INFINITE_VERTEX);\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ic;\n break;\n }\n case Sign.LEFT_TURN: {\n break;\n }\n }\n } else if (pqr === Sign.COLLINEAR) {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(ic);\n } else {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_EDGE;\n this.i = ic;\n }\n }\n\n next() {\n this.increment();\n }\n\n increment() {\n let o: Sign;\n if (this.s === LineFaceState.VERTEX_VERTEX || this.s === LineFaceState.EDGE_VERTEX) {\n do {\n const n = this.pos!.neighbours[cw(this.i)]!;\n this.i = n.indexT(this.pos!);\n this.pos = n;\n if (this.pos!.vertices[this.i] === _INFINITE_VERTEX) {\n o = Sign.COLLINEAR;\n this.i = cw(this.i);\n break;\n }\n o = orientation(this.p, this.q, this.pos!.vertices[this.i]!.point!);\n this.i = cw(this.i);\n } while (o === Sign.LEFT_TURN);\n if (o === Sign.COLLINEAR) {\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(this.i);\n } else {\n this.s = LineFaceState.VERTEX_EDGE;\n }\n } else {\n const n = this.pos!.neighbours[this.i]!;\n const ni = n.indexT(this.pos!);\n this.pos = n;\n o =\n this.pos!.vertices[ni]! === _INFINITE_VERTEX\n ? Sign.COLLINEAR\n : orientation(this.p, this.q, this.pos!.vertices[ni]!.point!);\n switch (o) {\n case Sign.LEFT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = ccw(ni);\n break;\n }\n case Sign.RIGHT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = cw(ni);\n break;\n }\n default: {\n this.s = LineFaceState.EDGE_VERTEX;\n this.i = ni;\n }\n }\n }\n }\n}\n\nclass Edge {\n first: Triangle | null = null;\n second: number = 0;\n}\n\nexport enum LocateType {\n VERTEX,\n EDGE,\n FACE,\n OUTSIDE_CONVEX_HULL,\n OUTSIDE_AFFINE_HULL,\n}\n\nexport class TDS {\n dimension = -1;\n vertices: Vertex[] = [];\n triangles: Triangle[] = [];\n _infinite: Vertex;\n\n constructor() {\n this._infinite = this.createVertex();\n _INFINITE_VERTEX = this._infinite;\n const t = new Triangle();\n t.addVertex(this._infinite);\n this.triangles.push(t);\n }\n\n createVertex(): Vertex {\n const v = this.infiniteVertex;\n if (v === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(v);\n return v;\n }\n\n createTriangle(\n v0: Vertex | null,\n v1: Vertex | null,\n v2: Vertex | null,\n n0: Triangle | null,\n n1: Triangle | null,\n n2: Triangle | null,\n ) {\n const t = new Triangle(v0, v1, v2);\n t.neighbours[0] = n0;\n t.neighbours[1] = n1;\n t.neighbours[2] = n2;\n this.triangles.push(t);\n return t;\n }\n\n deleteTriangle(trig: Triangle) {\n this.triangles = this.triangles.filter(t => t !== trig);\n }\n\n setAdjacency(t0: Triangle, i0: number, t1: Triangle, i1: number) {\n t0.neighbours[i0] = t1;\n t1.neighbours[i1] = t0;\n }\n\n get finiteVertex(): Vertex {\n return this.vertices[1];\n }\n\n get infiniteVertex(): Vertex {\n const v = new Vertex(newPoint());\n v.infinite = true;\n return v;\n }\n\n get finiteEdge(): Edge {\n if (this.dimension < 1) throw new Error(\"aspo\");\n const ei = new EdgeIterator(this);\n while (ei.valid) ei.next();\n return ei.collect();\n }\n\n insertDimUp(w: Vertex = new Vertex(), orient: boolean = true): Vertex {\n const v = this.createVertex();\n this.dimension++;\n let t1: Triangle;\n let t2: Triangle;\n switch (this.dimension) {\n case 0: {\n t1 = this.triangles[0];\n t2 = new Triangle(v);\n this.triangles.push(t2);\n this.setAdjacency(t1, 0, t2, 0);\n v.triangle = t2;\n break;\n }\n case 1:\n case 2: {\n const deleteList: Triangle[] = [];\n const triangles = this.triangles.slice(0, this.triangles.length);\n for (const trig of triangles) {\n const copy = new Triangle().from(trig);\n this.triangles.push(copy);\n trig.vertices[this.dimension] = v;\n copy.vertices[this.dimension] = w;\n this.setAdjacency(trig, this.dimension, copy, this.dimension);\n if (trig.vertices.includes(w)) deleteList.push(copy);\n }\n for (const trig of triangles) {\n const neighbour = trig.neighbours[this.dimension];\n for (let j = 0; j < this.dimension; ++j) {\n neighbour!.neighbours[j] = trig.neighbours[j]!.neighbours[this.dimension];\n }\n }\n\n let lfit = 0;\n if (this.dimension === 1) {\n if (orient) {\n triangles[lfit].reorient();\n lfit++;\n triangles[lfit].neighbours[1]!.reorient();\n } else {\n triangles[lfit].neighbours[1]!.reorient();\n lfit++;\n triangles[lfit].reorient();\n }\n } else {\n for (const trig of triangles) {\n if (orient) trig.neighbours[2]!.reorient();\n else trig.reorient();\n }\n }\n\n for (const trig of deleteList) {\n let j = 1;\n if (trig.vertices[0] === w) j = 0;\n t1 = trig.neighbours[this.dimension]!;\n const i1 = this.mirrorIndex(trig, this.dimension);\n t2 = trig.neighbours[j]!;\n const i2 = this.mirrorIndex(trig, j);\n this.setAdjacency(t1, i1, t2, i2);\n this.deleteTriangle(trig);\n }\n v.triangle = triangles[0];\n break;\n }\n default: {\n throw new Error(\"Dimension unknown\");\n }\n }\n return v;\n }\n\n mirrorIndex(t: Triangle, i: number): number {\n if (t.dimension === 1) {\n const j = t.neighbours[i]!.indexV(t.vertices[i === 0 ? 1 : 0]!);\n return j === 0 ? 1 : 0;\n }\n return ccw(t.neighbours[i]!.indexV(t.vertices[ccw(i)]!));\n }\n\n insertInFace(t: Triangle) {\n const v = this.createVertex();\n const v0 = t.vertices[0]!;\n const v1 = t.vertices[1]!;\n const v2 = t.vertices[2]!;\n const n1 = t.neighbours[1]!;\n const n2 = t.neighbours[2]!;\n const t1 = this.createTriangle(v0, v, v2, t, n1, null);\n const t2 = this.createTriangle(v0, v1, v, t, null, n2);\n this.setAdjacency(t1, 2, t2, 1);\n if (n1 !== null) {\n const i1 = this.mirrorIndex(t, 1);\n n1.neighbours[i1] = t1;\n }\n if (n2 !== null) {\n const i2 = this.mirrorIndex(t, 2);\n n2.neighbours[i2] = t2;\n }\n t.vertices[0] = v;\n t.neighbours[1] = t1;\n t.neighbours[2] = t2;\n if (v0.triangle === t) v0.triangle = t2;\n v.triangle = t;\n return v;\n }\n\n flip(t: Triangle, i: number) {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n const vCW = t.vertices[cw(i)]!;\n const vCCW = t.vertices[ccw(i)]!;\n const tr = t.neighbours[ccw(i)]!;\n const tri = this.mirrorIndex(t, ccw(i));\n const bl = n.neighbours[ccw(ni)]!;\n const bli = this.mirrorIndex(n, ccw(ni));\n\n t.vertices[cw(i)] = n.vertices[ni]!;\n n.vertices[cw(ni)] = t.vertices[i]!;\n\n this.setAdjacency(t, i, bl, bli);\n this.setAdjacency(t, ccw(i), n, ccw(ni));\n this.setAdjacency(n, ni, tr, tri);\n\n if (vCW.triangle! === t) vCW.triangle = n;\n if (vCCW.triangle! === n) vCCW.triangle = t;\n }\n\n insertInEdge(t: Triangle, i: number) {\n let v: Vertex;\n if (this.dimension === 1) {\n v = this.createVertex();\n const ff = t.neighbours[0]!;\n const vv = t.vertices[1]!;\n const g = this.createTriangle(v, vv, null, ff, t, null);\n t.vertices[1] = v;\n t.neighbours[0] = g;\n ff.neighbours[1] = g;\n v.triangle = g;\n vv.triangle = ff;\n } else {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n v = this.insertInFace(t);\n this.flip(n, ni);\n }\n return v;\n }\n}\n\nexport class BoundingBox {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n constructor(p: Point) {\n this.x1 = p[0];\n this.y1 = p[1];\n this.x2 = p[0];\n this.y2 = p[1];\n }\n\n dilate(dist: number) {\n this.x1 -= dist * ulp(this.x1);\n this.y1 -= dist * ulp(this.y1);\n this.x2 += dist * ulp(this.x2);\n this.y2 += dist * ulp(this.y2);\n }\n\n overlaps(other: BoundingBox): boolean {\n if (this.x2 < other.x1 || other.x2 < this.x1) return false;\n if (this.y2 < other.y1 || other.y2 < this.y1) return false;\n return true;\n }\n}\n","import { partition } from \"@/core/utils\";\nimport { GlobalPoint, Ray } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\nimport { BoundingNode, InteriorNode, LeafNode } from \"@/game/visibility/bvh/node\";\n\ninterface BuildInfo {\n index: number;\n bbox: BoundingRect;\n center: BoundingRect;\n}\ninterface LinearBHVNode {\n bbox: BoundingRect;\n nPrimitives: number;\n}\ninterface LinearLeafNode extends LinearBHVNode {\n primitivesOffset: number;\n}\ninterface LinearInternalNode extends LinearBHVNode {\n secondChildOffset: number;\n dimension: number;\n}\n\nexport class BoundingVolume {\n totalNodes = 0;\n buildData: BuildInfo[] = [];\n shapes: string[];\n orderedPrims: string[] = [];\n root: BoundingNode | null;\n nodes: LinearBHVNode[] = [];\n\n offset = 0;\n\n constructor(shapes: string[]) {\n this.shapes = shapes;\n if (this.shapes.length === 0) {\n this.root = null;\n this.nodes = [];\n return;\n }\n for (let i = 0; i < shapes.length; i++) {\n const shape = layerManager.UUIDMap.get(shapes[i])!;\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n }\n this.root = this.recursiveBuild(0, shapes.length);\n this.compact();\n }\n\n draw() {\n const ctx = layerManager.getLayer(\"draw\")!.ctx;\n for (const node of this.nodes) {\n const b = node.bbox;\n ctx.strokeRect(g2lx(b.topLeft.x), g2ly(b.topLeft.y), g2lz(b.w), g2lz(b.h));\n }\n }\n\n recursiveBuild(start: number, end: number): BoundingNode {\n this.totalNodes++;\n let bbox = this.buildData[start].bbox;\n for (let i = start + 1; i < end; i++) bbox = bbox.union(this.buildData[i].bbox);\n const nPrimitives = end - start;\n if (nPrimitives === 1) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n } else {\n let centroidBbox = this.buildData[start].center;\n for (let i = start; i < end; i++) centroidBbox = centroidBbox.union(this.buildData[i].center);\n const dimension = centroidBbox.getMaxExtent();\n if (centroidBbox.botRight.get(dimension) === centroidBbox.topLeft.get(dimension)) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n }\n // Use shitty Middle thingy until an introselect js algo is added\n const pMid = 0.5 * (centroidBbox.topLeft.get(dimension) + centroidBbox.botRight.get(dimension));\n const partitionedData = partition(\n this.buildData.slice(start, end),\n (n: BuildInfo) => n.center.center().get(dimension) < pMid,\n );\n const flattened = ([]).concat.apply([], partitionedData);\n if (partitionedData[0].length === 0 || partitionedData[1].length === 0) console.log(\"EMPTY\");\n this.buildData.splice(start, flattened.length, ...flattened);\n const mid = partitionedData[0].length + start;\n return new InteriorNode(dimension, this.recursiveBuild(start, mid), this.recursiveBuild(mid, end));\n }\n }\n\n intersect(ray: Ray, stopOnFirstHit?: boolean) {\n if (this.nodes.length === 0) return { hit: false, intersect: ray.get(0), tMin: 0, tMax: ray.tMax };\n if (stopOnFirstHit === undefined) stopOnFirstHit = false;\n // Initialize return values\n let hit = false;\n let tMin = 0;\n let tMax = ray.tMax;\n\n // Initialize work variables\n let todoOffset = 0;\n let nodeNum = 0;\n const todo: number[] = [];\n\n // Precalculate intersection vectors\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n\n while (true) {\n const node = this.nodes[nodeNum];\n\n const i = node.bbox.intersectP(ray, invDir, dirIsNegative);\n if (i.hit) {\n if (node.nPrimitives > 0) {\n // TODO: nPrimitives is currently always 1 , this could be generalised\n // for (let i=0; i < node.nPrimitives; i++) {\n // if (this.shapes[(node).primitivesOffset + i])\n // }\n hit = true;\n tMin = ray.tMax = i.min;\n tMax = i.max;\n if (todoOffset === 0 || stopOnFirstHit) break;\n nodeNum = todo[--todoOffset];\n } else {\n if (dirIsNegative[(node).dimension]) {\n todo[todoOffset++] = nodeNum + 1;\n nodeNum = (node).secondChildOffset;\n } else {\n todo[todoOffset++] = (node).secondChildOffset;\n nodeNum++;\n }\n }\n } else {\n if (todoOffset === 0) break;\n nodeNum = todo[--todoOffset];\n }\n }\n return { hit, intersect: ray.get(tMin), tMin, tMax };\n }\n\n private compact() {\n this.offset = 0;\n if (this.root !== null) this.flatten(this.root);\n }\n\n private flatten(node: BoundingNode) {\n const index = this.offset;\n const myOffset = this.offset++;\n if (node.nPrimitives === 0) {\n this.flatten(node.children[0]);\n const secondOffset = this.flatten(node.children[1]);\n this.nodes[index] = {\n bbox: node.bbox,\n dimension: (node).dimension,\n nPrimitives: 0,\n secondChildOffset: secondOffset,\n };\n } else {\n this.nodes[index] = {\n bbox: node.bbox,\n primitivesOffset: (node).firstPrimOffset,\n nPrimitives: node.nPrimitives,\n };\n }\n return myOffset;\n }\n\n private createLeaf(start: number, end: number, nPrimitives: number, bbox: BoundingRect) {\n const size = this.orderedPrims.length;\n for (let i = start; i < end; i++) this.orderedPrims.push(this.shapes[this.buildData[i].index]);\n return new LeafNode(size, nPrimitives, bbox);\n }\n}\n","import Initiative from \"./ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { AnnotationManager } from \"@/game/ui/annotation\";\nimport { g2l } from \"@/game/units\";\n\nexport class GameManager {\n selectedTool: number = 0;\n\n annotationManager = new AnnotationManager();\n\n addShape(shape: ServerShape): void {\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Shape with unknown layer ${shape.layer} could not be added`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n const sh = createShapeFromDict(shape);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${shape.type_} could not be added`);\n return;\n }\n layer.addShape(sh, false);\n layer.invalidate(false);\n }\n\n updateShape(data: { shape: ServerShape; redraw: boolean; move: boolean; temporary: boolean }): void {\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Shape with unknown layer ${data.shape.layer} could not be added`);\n return;\n }\n const sh = createShapeFromDict(data.shape);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${data.shape.type_} could not be added`);\n return;\n }\n const oldShape = layerManager.UUIDMap.get(data.shape.uuid);\n if (oldShape === undefined) {\n console.log(`Shape with unknown id could not be updated`);\n return;\n }\n const redrawInitiative = sh.owners !== oldShape.owners;\n const shape = Object.assign(oldShape, sh);\n shape.checkVisionSources();\n shape.setMovementBlock(shape.movementObstruction);\n shape.setIsToken(shape.isToken);\n if (data.redraw) {\n gameStore.recalculateVision(data.temporary);\n layerManager.getLayer(data.shape.layer)!.invalidate(false);\n if (shape.movementObstruction) gameStore.recalculateMovement(data.temporary);\n }\n if (redrawInitiative) getRef(\"initiative\").$forceUpdate();\n }\n\n setCenterPosition(position: GlobalPoint) {\n const localPos = g2l(position);\n gameStore.increasePanX((window.innerWidth / 2 - localPos.x) / gameStore.zoomFactor);\n gameStore.increasePanY((window.innerHeight / 2 - localPos.y) / gameStore.zoomFactor);\n layerManager.invalidate();\n sendClientOptions();\n }\n}\n\nexport const gameManager = new GameManager();\n(window).gameManager = gameManager;\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=6d718094&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=6d718094&scoped=true&lang=css&\"","\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class LoadComponent extends Vue {\n message = \"Loading...\";\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.shape !== null)?_c('div',[_c('div',{attrs:{\"id\":\"selection-menu\"}},[_c('div',{attrs:{\"id\":\"selection-edit-button\"},on:{\"click\":_vm.openEditDialog}},[_c('i',{staticClass:\"fas fa-edit\"})]),_c('div',{attrs:{\"id\":\"selection-name\"}},[_vm._v(_vm._s(_vm.shape.name))]),_c('div',{attrs:{\"id\":\"selection-trackers\"}},[_vm._l((_vm.shape.trackers),function(tracker){return (tracker.name !== '' || tracker.value !== 0)?[_c('div',{key:'name-' + tracker.uuid},[_vm._v(_vm._s(tracker.name))]),_c('div',{key:'value-' + tracker.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(tracker, false)}}},[(tracker.maxvalue === 0)?[_vm._v(_vm._s(tracker.value))]:[_vm._v(_vm._s(tracker.value)+\" / \"+_vm._s(tracker.maxvalue))]],2)]:_vm._e()})],2),_c('div',{attrs:{\"id\":\"selection-auras\"}},[_vm._l((_vm.shape.auras),function(aura){return (aura.name !== '' || aura.value !== 0)?[_c('div',{key:'name-' + aura.uuid},[_vm._v(_vm._s(aura.name))]),_c('div',{key:'value-' + aura.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(aura, true)}}},[(aura.dim === 0)?[_vm._v(_vm._s(aura.value))]:[_vm._v(_vm._s(aura.value)+\" / \"+_vm._s(aura.dim))]],2)]:_vm._e()})],2)]),_c('edit-dialog',{ref:\"editDialog\",attrs:{\"shape\":_vm.shape}})],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=template&id=674cf937&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.getActiveLayer() !== undefined)?_c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.getLayers().length > 1)?_c('li',[_vm._v(\"Layer\\n \"),_c('ul',_vm._l((_vm.getLayers()),function(layer){return _c('li',{key:layer.name,style:([_vm.getActiveLayer().name === layer.name ? {'background-color':'#82c8a0'}: {}]),on:{\"click\":function($event){_vm.setLayer(layer.name)}}},[_vm._v(_vm._s(layer.name))])}))]):_vm._e(),_c('li',{on:{\"click\":_vm.moveToBack}},[_vm._v(\"Move to back\")]),_c('li',{on:{\"click\":_vm.moveToFront}},[_vm._v(\"Move to front\")]),_c('li',{on:{\"click\":_vm.addInitiative}},[_vm._v(_vm._s(_vm.getInitiativeWord())+\" initiative\")]),_c('li',{on:{\"click\":_vm.openEditDialog}},[_vm._v(\"Show properties\")])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',{attrs:{\"id\":\"accordion-container\"}},_vm._l((_vm.categories),function(category){return _c('accordion',{key:category,attrs:{\"title\":category,\"showArrow\":false,\"items\":_vm.labels[category],\"initialValues\":_vm.initalValues[category]},on:{\"selectionupdate\":_vm.updateSelection}})}))]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=template&id=847e7ec4&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component\nexport default class Dashboard extends Vue {\n owned = [];\n joined = [];\n error = \"\";\n\n newSessionName = \"\";\n\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n axios\n .get(\"/api/rooms\")\n .then((response: AxiosResponse) => {\n next((vm: this) => {\n vm.owned = response.data.owned;\n vm.joined = response.data.joined;\n });\n })\n .catch((err: AxiosError) => {\n next((vm: this) => {\n vm.error = err.message;\n });\n });\n }\n\n createRoom(event: Event) {\n axios\n .post(\"/api/rooms\", {\n name: this.newSessionName,\n })\n .then((response: AxiosResponse) => {\n this.$router.push(`/game/${coreStore.username}/${this.newSessionName}`);\n })\n .catch((err: AxiosError) => {\n this.error = err.message;\n });\n }\n}\n","import { render, staticRenderFns } from \"./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"\nimport script from \"./confirm.vue?vue&type=script&lang=ts&\"\nexport * from \"./confirm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1883e207\",\n null\n \n)\n\ncomponent.options.__file = \"confirm.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=cf33581e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=cf33581e&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.left + 'px',\"top\":_vm.top + 'px'},on:{\"close\":_vm.close}},[_c('li',{on:{\"click\":_vm.rename}},[_vm._v(\"Rename\")]),_c('li',{on:{\"click\":_vm.remove}},[_vm._v(\"Remove\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=template&id=606797b4&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Label manager\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('div',{staticClass:\"grid\"},[_c('div',{staticClass:\"header\"},[_c('abbr',{attrs:{\"title\":\"Category\"}},[_vm._v(\"Cat.\")])]),_c('div',{staticClass:\"header name\"},[_vm._v(\"Name\")]),_c('div',{staticClass:\"header\"},[_c('abbr',{attrs:{\"title\":\"Visible\"}},[_vm._v(\"Vis.\")])]),_c('div',{staticClass:\"header\"},[_c('abbr',{attrs:{\"title\":\"Delete\"}},[_vm._v(\"Del.\")])]),_c('div',{staticClass:\"separator spanrow\",staticStyle:{\"margin\":\"0 0 7px\"}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.search),expression:\"search\"}],ref:\"search\",staticClass:\"spanrow\",attrs:{\"type\":\"text\",\"placeholder\":\"search\"},domProps:{\"value\":(_vm.search)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.search=$event.target.value}}})]),_c('div',{staticClass:\"grid scroll\"},[_vm._l((_vm.categories),function(category){return [_vm._l((_vm.labels[category]),function(label){return [_c('div',{key:'row-'+label.uuid,staticClass:\"row\",on:{\"click\":function($event){_vm.selectLabel(label.uuid)}}},[(label.category)?[_c('div',{key:'cat-'+label.uuid},[_vm._v(_vm._s(label.category))]),_c('div',{key:'name-'+label.uuid,staticClass:\"name\"},[_vm._v(_vm._s(label.name))])]:_vm._e(),(!label.category)?[_c('div',{key:'cat-'+label.uuid}),_c('div',{key:'name-'+label.uuid,staticClass:\"name\"},[_vm._v(_vm._s(label.name))])]:_vm._e(),_c('div',{key:'visible-'+label.uuid,class:{'lower-opacity': !label.visible},style:({textAlign: 'center'}),on:{\"click\":function($event){$event.stopPropagation();_vm.toggleVisibility(label)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{key:'delete-'+label.uuid,on:{\"click\":function($event){$event.stopPropagation();_vm.deleteLabel(label.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})])],2)]})]}),(_vm.labels.length === 0)?[_c('div',{attrs:{\"id\":\"no-labels\"}},[_vm._v(\"No labels exist yet\")])]:_vm._e()],2),_c('div',{staticClass:\"grid\"},[_c('div',{staticClass:\"separator spanrow\"}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.newCategory),expression:\"newCategory\",modifiers:{\"trim\":true}}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.newCategory)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newCategory=$event.target.value.trim()},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.newName),expression:\"newName\",modifiers:{\"trim\":true}}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.newName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newName=$event.target.value.trim()},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('button',{attrs:{\"id\":\"addLabelButton\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.addLabel($event)}}},[_vm._v(\"Add\")])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./labels.vue?vue&type=template&id=4697341e&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"","import Vue from \"vue\";\nexport const EventBus = new Vue();\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Rect extends BaseRect {\n type = \"rect\";\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, w, h, fillColour, strokeColour, uuid);\n }\n asDict() {\n return super.getBaseDict();\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const z = gameStore.zoomFactor;\n const loc = g2l(this.refPoint);\n ctx.fillRect(loc.x, loc.y, this.w * z, this.h * z);\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = 5;\n ctx.strokeRect(loc.x, loc.y, this.w * z, this.h * z);\n }\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=05b88da7&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=05b88da7&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"","import { Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly } from \"@/game/units\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWPlayersLayer extends Layer {\n isVisionLayer: boolean = true;\n\n draw(): void {\n if (!this.valid) {\n // console.time(\"VI\");\n const ctx = this.ctx;\n\n if (!gameStore.fowLOS || Settings.skipPlayerFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n const originalOperation = ctx.globalCompositeOperation;\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n // For the DM this is done at the end of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (!gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n // Then cut out all the player vision auras\n const maxLength = ctx.canvas.width + ctx.canvas.height;\n\n for (const tokenId of gameStore.ownedtokens) {\n const token = layerManager.UUIDMap.get(tokenId);\n if (token === undefined) continue;\n const center = token.center();\n const lcenter = g2l(center);\n if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 2 / 180) * Math.PI) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = new Ray(center, new Vector(cos, sin));\n const hitResult = gameStore.BV.intersect(lightRay);\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Draw a line from the last non arc location back to the arc\n ctx.lineTo(lcenter.x + maxLength * cos, lcenter.y + maxLength * sin);\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, angle);\n lastArcAngle = -1;\n }\n ctx.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n\n // Finish the final arc.\n if (lastArcAngle !== -1) ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, 2 * Math.PI);\n else ctx.closePath();\n ctx.fill();\n } else {\n if (true) {\n // Add a gradient vision dropoff\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMin),\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMax),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n try {\n const polygon = computeVisibility(token.center(), \"vision\");\n ctx.beginPath();\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n ctx.closePath();\n ctx.fill();\n } catch {}\n }\n }\n\n // For the players this is done at the beginning of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n ctx.globalCompositeOperation = originalOperation;\n // console.timeEnd(\"VI\");\n }\n }\n}\n","import { socket } from \"@/game/api/socket\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly } from \"@/game/units\";\n\nexport class Layer {\n name: string;\n width: number;\n height: number;\n canvas: HTMLCanvasElement;\n ctx: CanvasRenderingContext2D;\n\n selectable: boolean = false;\n playerEditable: boolean = false;\n isVisionLayer: boolean = false;\n\n // When set to false, the layer will be redrawn on the next tick\n valid: boolean = false;\n // The collection of shapes that this layer contains.\n // These are ordered on a depth basis.\n shapes: Shape[] = [];\n\n // Collection of shapes that are currently selected\n selection: Shape[] = [];\n\n // Extra selection highlighting settings\n selectionColor = \"#CC0000\";\n selectionWidth = 2;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n this.canvas = canvas;\n this.name = name;\n this.width = canvas.width;\n this.height = canvas.height;\n this.ctx = canvas.getContext(\"2d\")!;\n }\n\n invalidate(skipLightUpdate: boolean): void {\n this.valid = false;\n if (!skipLightUpdate) {\n layerManager.invalidateLight();\n }\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n if (temporary === undefined) temporary = false;\n shape.layer = this.name;\n this.shapes.push(shape);\n layerManager.UUIDMap.set(shape.uuid, shape);\n shape.checkVisionSources(invalidate);\n shape.setMovementBlock(shape.movementObstruction, invalidate);\n if (shape.ownedBy(gameStore.username) && shape.isToken) gameStore.ownedtokens.push(shape.uuid);\n if (shape.annotation.length) gameStore.annotations.push(shape.uuid);\n if (sync) socket.emit(\"Shape.Add\", { shape: shape.asDict(), temporary });\n if (invalidate) this.invalidate(!sync);\n }\n\n setShapes(shapes: ServerShape[]): void {\n for (const serverShape of shapes) {\n const shape = createShapeFromDict(serverShape);\n if (shape === undefined) {\n console.log(`Shape with unknown type ${serverShape.type_} could not be added`);\n return;\n }\n this.addShape(shape, false, false, false);\n }\n this.clearSelection(); // TODO: Fix keeping selection on those items that are not moved.\n this.invalidate(false);\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (temporary === undefined) temporary = false;\n this.shapes.splice(this.shapes.indexOf(shape), 1);\n\n if (sync) socket.emit(\"Shape.Remove\", { shape: shape.asDict(), temporary });\n const lsI = gameStore.visionSources.findIndex(ls => ls.shape === shape.uuid);\n const lbI = gameStore.visionBlockers.findIndex(ls => ls === shape.uuid);\n\n const mbI = gameStore.movementblockers.findIndex(ls => ls === shape.uuid);\n const anI = gameStore.annotations.findIndex(ls => ls === shape.uuid);\n if (lsI >= 0) gameStore.visionSources.splice(lsI, 1);\n if (lbI >= 0) gameStore.visionBlockers.splice(lbI, 1);\n if (mbI >= 0) gameStore.movementblockers.splice(mbI, 1);\n if (anI >= 0) gameStore.annotations.splice(anI, 1);\n\n const annotationIndex = gameStore.annotations.indexOf(shape.uuid);\n if (annotationIndex >= 0) gameStore.annotations.splice(annotationIndex, 1);\n\n const ownedIndex = gameStore.ownedtokens.indexOf(shape.uuid);\n if (ownedIndex >= 0) gameStore.ownedtokens.splice(ownedIndex, 1);\n\n layerManager.UUIDMap.delete(shape.uuid);\n\n const index = this.selection.indexOf(shape);\n if (index >= 0) this.selection.splice(index, 1);\n if (lbI >= 0) gameStore.recalculateVision();\n if (mbI >= 0) gameStore.recalculateMovement();\n this.invalidate(!sync);\n }\n\n clear(): void {\n this.ctx.clearRect(0, 0, this.width, this.height);\n }\n\n clearSelection(): void {\n this.selection = [];\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n }\n\n draw(doClear?: boolean): void {\n if (!this.valid) {\n const ctx = this.ctx;\n const ogOP = ctx.globalCompositeOperation;\n doClear = doClear === undefined ? true : doClear;\n\n if (doClear) this.clear();\n\n const state = this;\n\n // We iteratre twice over all shapes\n // First to draw the auras and a second time to draw the shapes themselves\n // Otherwise auras from one shape could be overlapping another shape itself.\n\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.drawAuras(ctx);\n });\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (shape.labels.length === 0 && gameStore.filterNoLabel) return;\n if (\n shape.labels.length &&\n gameStore.labelFilters.length &&\n !shape.labels.some(l => gameStore.labelFilters.includes(l.uuid))\n )\n return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.draw(ctx);\n });\n\n if (this.selection != null) {\n ctx.fillStyle = this.selectionColor;\n ctx.strokeStyle = this.selectionColor;\n ctx.lineWidth = this.selectionWidth;\n const z = gameStore.zoomFactor;\n this.selection.forEach(sel => {\n ctx.globalCompositeOperation = sel.globalCompositeOperation;\n const bb = sel.getBoundingBox();\n // TODO: REFACTOR THIS TO Shape.drawSelection(ctx);\n ctx.strokeRect(g2lx(bb.topLeft.x), g2ly(bb.topLeft.y), bb.w * z, bb.h * z);\n\n for (const p of sel.points) {\n ctx.beginPath();\n ctx.arc(g2lx(p[0]), g2ly(p[1]), 3, 0, 2 * Math.PI);\n ctx.fill();\n }\n ctx.beginPath();\n ctx.moveTo(g2lx(sel.points[0][0]), g2ly(sel.points[0][1]));\n for (let i = 1; i <= sel.points.length; i++) {\n const vertex = sel.points[i % sel.points.length];\n ctx.lineTo(g2lx(vertex[0]), g2ly(vertex[1]));\n }\n ctx.stroke();\n });\n }\n ctx.globalCompositeOperation = ogOP;\n this.valid = true;\n }\n }\n\n moveShapeOrder(shape: Shape, destinationIndex: number, sync: boolean): void {\n const oldIdx = this.shapes.indexOf(shape);\n if (oldIdx === destinationIndex) return;\n this.shapes.splice(oldIdx, 1);\n this.shapes.splice(destinationIndex, 0, shape);\n if (sync) socket.emit(\"Shape.Order.Set\", { shape: shape.asDict(), index: destinationIndex });\n this.invalidate(true);\n }\n}\n","import { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport function scrollZoom(e: WheelEvent) {\n if (!e.target || !(e.target).tagName || (e.target).tagName !== \"CANVAS\") return;\n let delta: number;\n delta = Math.sign(e.deltaY) * -1;\n gameStore.updateZoom({ newZoomDisplay: gameStore.zoomDisplay - 0.1 * delta, zoomLocation: l2g(getMouse(e)) });\n}\n","import { render, staticRenderFns } from \"./filter.vue?vue&type=template&id=847e7ec4&scoped=true&\"\nimport script from \"./filter.vue?vue&type=script&lang=ts&\"\nexport * from \"./filter.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./filter.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./filter.vue?vue&type=style&index=1&id=847e7ec4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"847e7ec4\",\n null\n \n)\n\ncomponent.options.__file = \"filter.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"","import { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2lx, g2ly, l2g, l2gx, l2gy } from \"@/game/units\";\n\nexport abstract class BaseRect extends Shape {\n w: number;\n h: number;\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, fillColour, strokeColour, uuid);\n this.w = w;\n this.h = h;\n }\n getBaseDict() {\n return Object.assign(super.getBaseDict(), {\n width: this.w,\n height: this.h,\n });\n }\n getBoundingBox() {\n return new BoundingRect(this.refPoint, this.w, this.h);\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.refPoint.x, this.refPoint.y]];\n // note to self: topright and botleft are swapped because I'm retarded.\n const topright = this.refPoint.add(new Vector(0, this.h));\n const botright = this.refPoint.add(new Vector(this.w, this.h));\n const botleft = this.refPoint.add(new Vector(this.w, 0));\n return [\n [this.refPoint.x, this.refPoint.y],\n [topright.x, topright.y],\n [botright.x, botright.y],\n [botleft.x, botleft.y],\n ];\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.refPoint.x <= point.x &&\n this.refPoint.x + this.w >= point.x &&\n this.refPoint.y <= point.y &&\n this.refPoint.y + this.h >= point.y\n );\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint.add(new Vector(this.w / 2, this.h / 2));\n this.refPoint = new GlobalPoint(centerPoint.x - this.w / 2, centerPoint.y - this.h / 2);\n }\n\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n if (super.visibleInCanvas(canvas)) return true;\n const coreVisible = !(\n g2lx(this.refPoint.x) > canvas.width ||\n g2ly(this.refPoint.y) > canvas.height ||\n g2lx(this.refPoint.x + this.w) < 0 ||\n g2ly(this.refPoint.y + this.h) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n snapToGrid() {\n const gs = gameStore.gridSize;\n const center = this.center();\n const mx = center.x;\n const my = center.y;\n\n let targetX;\n let targetY;\n\n if ((this.w / gs) % 2 === 0) {\n targetX = Math.round(mx / gs) * gs - this.w / 2;\n } else {\n targetX = (Math.round((mx + gs / 2) / gs) - 1 / 2) * gs - this.w / 2;\n }\n if ((this.h / gs) % 2 === 0) {\n targetY = Math.round(my / gs) * gs - this.h / 2;\n } else {\n targetY = (Math.round((my + gs / 2) / gs) - 1 / 2) * gs - this.h / 2;\n }\n\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.refPoint = new GlobalPoint(Math.round(this.refPoint.x / gs) * gs, Math.round(this.refPoint.y / gs) * gs);\n this.w = Math.max(Math.round(this.w / gs) * gs, gs);\n this.h = Math.max(Math.round(this.h / gs) * gs, gs);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n switch (resizePoint) {\n case 0: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = l2g(point);\n break;\n }\n case 1: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint = new GlobalPoint(l2gx(point.x), this.refPoint.y);\n break;\n }\n case 2: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n break;\n }\n case 3: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = new GlobalPoint(this.refPoint.x, l2gy(point.y));\n break;\n }\n }\n\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint = this.refPoint.add(new Vector(this.w, 0));\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint = this.refPoint.add(new Vector(0, this.h));\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=048b3482&\"\nimport script from \"./select.vue?vue&type=script&lang=ts&\"\nexport * from \"./select.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"select.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./main.vue?vue&type=template&id=61eb1455&scoped=true&\"\nimport script from \"./main.vue?vue&type=script&lang=ts&\"\nexport * from \"./main.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"61eb1455\",\n null\n \n)\n\ncomponent.options.__file = \"main.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"AssetManager\"}},[_c('div',{attrs:{\"id\":\"titlebar\"}},[_vm._v(\"Asset Manager\")]),_c('div',{attrs:{\"id\":\"main\"}},[_c('div',{attrs:{\"id\":\"assets\"},on:{\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.currentFolder)}}},[_c('div',{attrs:{\"id\":\"breadcrumbs\"}},[_c('div',[_vm._v(\"/\")]),_vm._l((_vm.path),function(dir){return _c('div',{key:dir},[_vm._v(_vm._s(_vm.idMap.get(dir).name))])})],2),_c('div',{attrs:{\"id\":\"actionbar\"}},[_c('input',{attrs:{\"id\":\"files\",\"type\":\"file\",\"multiple\":\"\",\"hidden\":\"\"},on:{\"change\":function($event){_vm.upload()}}}),_c('div',{attrs:{\"title\":\"Create folder\"},on:{\"click\":_vm.createDirectory}},[_c('i',{staticClass:\"fas fa-plus-square\"})]),_c('div',{attrs:{\"title\":\"Upload files\"},on:{\"click\":_vm.prepareUpload}},[_c('i',{staticClass:\"fas fa-upload\"})])]),_c('div',{attrs:{\"id\":\"explorer\"}},[(_vm.path.length)?_c('div',{staticClass:\"inode folder\",on:{\"dblclick\":function($event){_vm.changeDirectory(-1)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.parentFolder)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(\"..\")])]):_vm._e(),_vm._l((_vm.folders),function(key){return _c('div',{key:key,staticClass:\"inode folder\",class:{'inode-selected': _vm.selected.includes(key)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, key)},\"dblclick\":function($event){_vm.changeDirectory(key)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, key)},\"dragstart\":function($event){_vm.startDrag($event, key)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, key)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(key).name))])])}),_vm._l((_vm.files),function(file){return _c('div',{key:file,staticClass:\"inode file\",class:{'inode-selected': _vm.selected.includes(file)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, file)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, file)},\"dragstart\":function($event){_vm.startDrag($event, file)}}},[_c('img',{attrs:{\"src\":'/static/assets/' + _vm.idMap.get(file).file_hash,\"width\":\"50\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(file).name))])])})],2)]),(_vm.firstSelectedFile)?_c('div',{attrs:{\"id\":\"asset-details\"}},[_c('div',{attrs:{\"id\":\"asset-detail-title\"}},[_vm._v(_vm._s(_vm.firstSelectedFile.name))]),_c('img',{attrs:{\"src\":'/static/assets/' + _vm.firstSelectedFile.file_hash}})]):_vm._e()]),_c('AssetContextMenu',{ref:\"cm\"}),_c('Prompt',{ref:\"prompt\"}),_c('ConfirmDialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=template&id=5b0def98&\"","\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy } from \"@/game/units\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class SelectContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n open(event: MouseEvent) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n }\n bringPlayers() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Players.Bring\", { x: l2gx(this.x), y: l2gy(this.y) });\n this.close();\n }\n createToken() {\n (this.$parent.$parent.$refs.createtokendialog).open(this.x, this.y);\n this.close();\n }\n showInitiative() {\n EventBus.$emit(\"Initiative.Show\");\n this.close();\n }\n}\n","import Axios from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component({})\nexport default class Logout extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/logout\").then(() => {\n coreStore.setAuthenticated(false);\n coreStore.setUsername(\"\");\n next({ path: \"/auth/login\" });\n });\n }\n}\n","import { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { rootStore } from \"@/store\";\n\nexport interface CoreState {\n authenticated: boolean;\n initialized: boolean;\n username: string;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule implements CoreState {\n authenticated = false;\n initialized = false;\n username = \"\";\n\n @Mutation\n setAuthenticated(auth: boolean) {\n this.authenticated = auth;\n }\n\n @Mutation\n setInitialized(init: boolean) {\n this.initialized = init;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n}\n\nexport const coreStore = getModule(CoreStore);\n","import Vue from \"vue\";\n\nimport App from \"@/App.vue\";\nimport { router } from \"@/router\";\nimport { rootStore } from \"@/store\";\n\nVue.config.productionTip = false;\nVue.config.devtools = true;\nVue.config.performance = true;\n\nexport const app = new Vue({\n router,\n store: rootStore,\n render: h => h(App),\n}).$mount(\"#app\");\n\n(window).app = app;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component({\n props: [\"visible\", \"left\", \"top\"],\n})\nexport default class ContextMenu extends Vue {}\n","import Axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\n@Component({ template: \"\" })\nexport default class Initiative extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/invite\", {\n code: to.params.code,\n })\n .then((response: AxiosResponse) => {\n next({ path: response.data.sessionUrl });\n })\n .catch((error: AxiosError) => {\n console.error(\"Invitation code could not be redeemed\");\n next({ path: \"/dashboard\" });\n });\n }\n}\n","import { render, staticRenderFns } from \"./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"\nimport script from \"./prompt.vue?vue&type=script&lang=ts&\"\nexport * from \"./prompt.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0602c2e6\",\n null\n \n)\n\ncomponent.options.__file = \"prompt.vue\"\nexport default component.exports","import { GlobalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nimport { Edge } from \"./cdt\";\nimport { drawPolygon } from \"./draw\";\nimport { PA_CDT } from \"./pa\";\nimport { Point, Sign, Triangle } from \"./tds\";\nimport { ccw, cw, orientation } from \"./triag\";\n\nexport function computeVisibility(q: GlobalPoint, target: \"vision\" | \"movement\", drawt?: boolean): number[][] {\n if (drawt === undefined) drawt = gameStore.drawTEContour;\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT[target].locate(Q, null).loc;\n if (triangle === null) {\n console.error(\"Triangle not found\");\n return [];\n }\n // triangle.fill();\n rawOutput.push(triangle.vertices[1]!.point!);\n if (!triangle.isConstrained(0))\n expandEdge(Q, triangle.vertices[2]!.point!, triangle.vertices[1]!.point!, triangle, 0, rawOutput);\n rawOutput.push(triangle.vertices[2]!.point!);\n if (!triangle.isConstrained(1))\n expandEdge(Q, triangle.vertices[0]!.point!, triangle.vertices[2]!.point!, triangle, 1, rawOutput);\n rawOutput.push(triangle.vertices[0]!.point!);\n if (!triangle.isConstrained(2))\n expandEdge(Q, triangle.vertices[1]!.point!, triangle.vertices[0]!.point!, triangle, 2, rawOutput);\n // console.timeEnd(\"CV\");\n\n if (drawt) drawPolygon(rawOutput, \"red\");\n\n return rawOutput;\n}\n\nfunction expandEdge(\n q: Point,\n left: number[],\n right: number[],\n fh: Triangle,\n index: number,\n rawOutput: number[][],\n): void {\n // fh.edge(index).draw();\n const nfh = fh.neighbours[index]!;\n // nfh.fill(\"rgba(255, 0, 0, 0.25)\");\n const nIndex = nfh.indexT(fh);\n const rIndex = ccw(nIndex);\n const lIndex = cw(nIndex);\n const nvh = nfh.vertices[nIndex]!;\n const rvh = nfh.vertices[lIndex]!;\n const lvh = nfh.vertices[rIndex]!;\n\n const re: Edge = [nfh, rIndex];\n const le: Edge = [nfh, lIndex];\n\n const ro = orientation(q, right, nvh.point!);\n const lo = orientation(q, left, nvh.point!);\n\n // const ctx = layerManager.getLayer(\"draw\")!.ctx;\n // ctx.beginPath();\n // ctx.strokeStyle = \"red\";\n // ctx.lineJoin = \"round\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(left[0]), g2ly(left[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.strokeStyle = \"blue\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(right[0]), g2ly(right[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.closePath();\n // ctx.stroke();\n\n // Right edge is seen if the new vertex is ccw of the right ray\n if (ro === Sign.COUNTERCLOCKWISE) {\n if (re[0].isConstrained(re[1])) {\n // See if current right ray is rvh\n if (right !== rvh.point!) rawOutput.push(raySegIntersection(q, right, nvh.point!, rvh.point!));\n if (lo === Sign.COUNTERCLOCKWISE) rawOutput.push(raySegIntersection(q, left, nvh.point!, rvh.point!));\n } else {\n if (lo === Sign.COUNTERCLOCKWISE) return expandEdge(q, left, right, nfh, rIndex, rawOutput);\n else expandEdge(q, nvh.point!, right, nfh, rIndex, rawOutput);\n }\n }\n\n if (ro !== Sign.CLOCKWISE && lo !== Sign.COUNTERCLOCKWISE) {\n rawOutput.push(nvh.point!);\n }\n\n if (lo === Sign.CLOCKWISE) {\n if (le[0].isConstrained(le[1])) {\n if (ro === Sign.CLOCKWISE) {\n rawOutput.push(raySegIntersection(q, right, nvh.point!, lvh.point!));\n }\n if (left !== lvh.point!) {\n rawOutput.push(raySegIntersection(q, left, nvh.point!, lvh.point!));\n }\n return;\n } else {\n if (ro === Sign.CLOCKWISE) {\n return expandEdge(q, left, right, nfh, lIndex, rawOutput);\n } else {\n return expandEdge(q, left, nvh.point!, nfh, lIndex, rawOutput);\n }\n }\n }\n}\n\nfunction raySegIntersection(q: Point, b: Point, s: Point, t: Point) {\n const denominator = (t[1] - s[1]) * (b[0] - q[0]) - (t[0] - s[0]) * (b[1] - q[1]);\n const ua = ((t[0] - s[0]) * (q[1] - s[1]) - (t[1] - s[1]) * (q[0] - s[0])) / denominator;\n // const ub = ((b[0] - q.x) * (q.y - s[1]) - (b[1] - q.y) * (q.x - s[0])) / denominator;\n const x = q[0] + ua * (b[0] - q[0]);\n const y = q[1] + ua * (b[1] - q[1]);\n\n return [x, y];\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',[_vm._v(\"#X\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.xCount),expression:\"xCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.xCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.xCount=$event.target.value}}}),_c('div',[_vm._v(\"#Y\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.yCount),expression:\"yCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.yCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.yCount=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=template&id=2104f147&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=23de098e&scoped=true&\"\nimport script from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./edit_dialog.vue?vue&type=style&index=0&id=23de098e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23de098e\",\n null\n \n)\n\ncomponent.options.__file = \"edit_dialog.vue\"\nexport default component.exports","export class Settings {\n static angleSteps = 4;\n static drawAngleLines = false;\n static drawFirstLightHit = false;\n static skipPlayerFOW = false;\n static skipLightFOW = false;\n\n static tempFill: string = \"fog\";\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { coreStore } from \"@/core/store\";\n\n@Component\nexport default class Login extends Vue {\n username = \"\";\n password = \"\";\n error = \"\";\n\n login() {\n axios\n .post(\"/api/login\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n register() {\n axios\n .post(\"/api/register\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n focusin(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"0\";\n }\n }\n\n focusout(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"1\";\n }\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(\"Create basic token\")])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('label',{attrs:{\"for\":\"createtokendialog-text\"}},[_vm._v(\"Text\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.text),expression:\"text\"}],attrs:{\"type\":\"text\",\"id\":\"createtokendialog-name\"},domProps:{\"value\":(_vm.text)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.text=$event.target.value}}}),_c('label',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"colours\"},[_c('span',[_vm._v(\"Fill:\")]),_c('color-picker',{attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('span',[_vm._v(\"Border:\")]),_c('color-picker',{attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('canvas',{ref:\"canvas\",attrs:{\"width\":\"100px\",\"height\":\"100px\"}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(\"div\")}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=template&id=1e034b42&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{\"name\":\"modal\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.visible),expression:\"visible\"}],staticClass:\"mask\",class:{'modal-mask': _vm.mask, 'dialog-mask': !_vm.mask},on:{\"click\":_vm.close,\"dragover\":function($event){$event.preventDefault();return _vm.dragOver($event)}}},[_c('div',{ref:\"container\",staticClass:\"modal-container\",on:{\"click\":function($event){$event.stopPropagation();}}},[_vm._t(\"header\",null,{dragStart:_vm.dragStart,dragEnd:_vm.dragEnd}),_vm._t(\"default\")],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"","import Component from \"vue-class-component\";\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Line } from \"@/game/shapes/line\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component\nexport class RulerTool extends Tool {\n name = \"Ruler\";\n active = false;\n startPoint: GlobalPoint | null = null;\n ruler: Line | null = null;\n text: Text | null = null;\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n this.active = true;\n this.startPoint = l2g(getMouse(event));\n this.ruler = new Line(this.startPoint, this.startPoint, 3, gameStore.rulerColour);\n this.text = new Text(this.startPoint.clone(), \"\", \"bold 20px serif\");\n this.ruler.addOwner(gameStore.username);\n this.text.addOwner(gameStore.username);\n layer.addShape(this.ruler, true, true);\n layer.addShape(this.text, true, true);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n const endPoint = l2g(getMouse(event));\n\n this.ruler.endPoint = endPoint;\n socket.emit(\"Shape.Update\", { shape: this.ruler!.asDict(), redraw: true, temporary: true });\n\n const diffsign = Math.sign(endPoint.x - this.startPoint.x) * Math.sign(endPoint.y - this.startPoint.y);\n const xdiff = Math.abs(endPoint.x - this.startPoint.x);\n const ydiff = Math.abs(endPoint.y - this.startPoint.y);\n const label =\n Math.round((Math.sqrt(xdiff ** 2 + ydiff ** 2) * gameStore.unitSize) / gameStore.gridSize) + \" ft\";\n const angle = Math.atan2(diffsign * ydiff, xdiff);\n const xmid = Math.min(this.startPoint.x, endPoint.x) + xdiff / 2;\n const ymid = Math.min(this.startPoint.y, endPoint.y) + ydiff / 2;\n this.text.refPoint = new GlobalPoint(xmid, ymid);\n this.text.text = label;\n this.text.angle = angle;\n socket.emit(\"Shape.Update\", { shape: this.text.asDict(), redraw: true, temporary: true });\n layer.invalidate(true);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n layer.removeShape(this.ruler, true, true);\n layer.removeShape(this.text, true, true);\n layer.invalidate(true);\n this.ruler = this.startPoint = this.text = null;\n }\n}\n","import { render, staticRenderFns } from \"./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"\nimport script from \"./modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"12ed61ba\",\n null\n \n)\n\ncomponent.options.__file = \"modal.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=script&lang=ts&\"","import { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nimport { CDT } from \"./cdt\";\n\nexport let PA_CDT = {\n vision: new CDT(),\n movement: new CDT(),\n};\n\nexport function triangulate(target: \"vision\" | \"movement\", partial: boolean = false) {\n const cdt = new CDT();\n\n let shapes;\n if (target === \"vision\") shapes = gameStore.visionBlockers;\n else shapes = gameStore.movementblockers;\n\n for (const sh of shapes) {\n const shape = layerManager.UUIDMap.get(sh)!;\n if (partial && !shape.visibleInCanvas(layerManager.getLayer()!.canvas)) continue;\n for (let i = 0; i < shape.points.length; i++) {\n cdt.insertConstraint(shape.points[i], shape.points[(i + 1) % shape.points.length]);\n }\n }\n // LEFT WALL\n cdt.insertConstraint([-1e8, -1e8], [-1e8, 1e8]);\n cdt.insertConstraint([-1e8, 1e8], [-1e11, 1e8]);\n cdt.insertConstraint([-1e11, 1e8], [-1e11, -1e8]);\n cdt.insertConstraint([-1e11, -1e8], [-1e8, -1e8]);\n // TOP WALL\n cdt.insertConstraint([-1e8, -1e8], [1e8, -1e8]);\n cdt.insertConstraint([1e8, -1e8], [1e8, -1e11]);\n cdt.insertConstraint([1e8, -1e11], [-1e8, -1e11]);\n cdt.insertConstraint([-1e8, -1e11], [-1e8, -1e8]);\n // RIGHT WALL\n cdt.insertConstraint([1e8, -1e8], [1e8, 1e8]);\n cdt.insertConstraint([1e8, 1e8], [1e11, 1e8]);\n cdt.insertConstraint([1e11, 1e8], [1e11, -1e8]);\n cdt.insertConstraint([1e11, -1e8], [1e8, -1e8]);\n // BOT WALL\n cdt.insertConstraint([-1e8, 1e8], [1e8, 1e8]);\n cdt.insertConstraint([1e8, 1e8], [1e8, 1e11]);\n cdt.insertConstraint([1e8, 1e11], [-1e8, 1e11]);\n cdt.insertConstraint([-1e8, 1e11], [-1e8, 1e8]);\n PA_CDT[target] = cdt;\n (window).CDT = PA_CDT;\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Prop } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n})\nexport default class EditDialog extends Vue {\n @Prop() shape!: Shape;\n\n visible = false;\n\n get owned(): boolean {\n return this.shape.ownedBy();\n }\n\n mounted() {\n EventBus.$on(\"EditDialog.Open\", (shape: Shape) => {\n this.shape = shape;\n this.visible = true;\n });\n EventBus.$on(\"EditDialog.AddLabel\", (label: string) => {\n if (this.visible) {\n this.shape.labels.push(gameStore.labels[label]);\n this.updateShape(true);\n }\n });\n }\n\n beforeDestroy() {\n EventBus.$off(\"EditDialog.Open\");\n EventBus.$off(\"EditDialog.AddLabel\");\n }\n\n updated() {\n this.addEmpty();\n }\n\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.addOwner(\"\");\n if (\n !this.shape.trackers.length ||\n this.shape.trackers[this.shape.trackers.length - 1].name !== \"\" ||\n this.shape.trackers[this.shape.trackers.length - 1].value !== 0\n )\n this.shape.trackers.push({ uuid: uuidv4(), name: \"\", value: 0, maxvalue: 0, visible: false });\n if (\n !this.shape.auras.length ||\n this.shape.auras[this.shape.auras.length - 1].name !== \"\" ||\n this.shape.auras[this.shape.auras.length - 1].value !== 0\n )\n this.shape.auras.push({\n uuid: uuidv4(),\n name: \"\",\n value: 0,\n dim: 0,\n visionSource: false,\n colour: \"rgba(0,0,0,0)\",\n visible: false,\n });\n }\n updateShape(redraw: boolean, temporary = false) {\n if (!this.owned) return;\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary });\n if (redraw) layerManager.invalidate();\n this.addEmpty();\n }\n setToken(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n this.shape.setIsToken(event.target.checked);\n this.updateShape(true);\n }\n setVisionBlocker(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n setMovementBlocker(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n this.shape.setMovementBlock(event.target.checked);\n this.updateShape(false);\n }\n updateAnnotation(event: { target: HTMLInputElement }) {\n if (!this.owned) return;\n const hadAnnotation = this.shape.annotation !== \"\";\n this.shape.annotation = event.target.value;\n if (this.shape.annotation !== \"\" && !hadAnnotation) {\n gameStore.annotations.push(this.shape.uuid);\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n } else if (this.shape.annotation === \"\" && hadAnnotation) {\n gameStore.annotations.splice(gameStore.annotations.findIndex(an => an === this.shape.uuid));\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n }\n this.updateShape(false);\n }\n updateOwner(event: { target: HTMLInputElement }, oldValue: string) {\n if (!this.owned) return;\n this.shape.updateOwner(oldValue, event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n if (!this.owned) return;\n this.shape.removeOwner(value);\n this.updateShape(gameStore.fowLOS);\n }\n removeTracker(uuid: string) {\n if (!this.owned) return;\n this.shape.trackers = this.shape.trackers.filter(tr => tr.uuid !== uuid);\n this.updateShape(false);\n }\n removeAura(uuid: string) {\n if (!this.owned) return;\n this.shape.auras = this.shape.auras.filter(au => au.uuid !== uuid);\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n updateAuraVisionSource(aura: Aura) {\n if (!this.owned) return;\n aura.visionSource = !aura.visionSource;\n const i = gameStore.visionSources.findIndex(ls => ls.aura === aura.uuid);\n if (aura.visionSource && i === -1) gameStore.visionSources.push({ shape: this.shape.uuid, aura: aura.uuid });\n else if (!aura.visionSource && i >= 0) gameStore.visionSources.splice(i, 1);\n this.updateShape(true);\n }\n updateAuraColour(aura: Aura, colour: string) {\n if (!this.owned) return;\n const layer = layerManager.getLayer(this.shape.layer);\n if (layer === undefined) return;\n layer.invalidate(!aura.visionSource);\n }\n openLabelManager() {\n EventBus.$emit(\"LabelManager.Open\");\n }\n removeLabel(uuid: string) {\n if(!this.owned) return;\n this.shape.labels = this.shape.labels.filter(l => l.uuid !== uuid);\n this.updateShape(true);\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class ConfirmDialog extends Vue {\n $refs!: {\n confirm: HTMLButtonElement;\n };\n\n visible = false;\n yes = \"Yes\";\n no = \"No\";\n title = \"\";\n\n resolve = (ok: boolean) => {};\n reject = () => {};\n\n confirm() {\n this.resolve(true);\n this.close();\n }\n deny() {\n this.resolve(false);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.title = \"\";\n }\n open(title: string, yes = \"yes\", no = \"no\"): Promise {\n this.yes = yes;\n this.no = no;\n this.title = title;\n\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.confirm.focus();\n });\n\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=af4dc61a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=af4dc61a&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./map.vue?vue&type=template&id=2104f147&\"\nimport script from \"./map.vue?vue&type=script&lang=ts&\"\nexport * from \"./map.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"map.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"accordion\"},[_c('div',{attrs:{\"id\":\"header\"},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleDisplay($event)}}},[_c('input',{ref:\"overall\",attrs:{\"type\":\"checkbox\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.toggleCategory($event)}}}),_c('strong',[_vm._v(_vm._s(_vm.title))]),(_vm.showArrow)?[_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showArrow && !_vm.active),expression:\"showArrow && !active\"}],staticClass:\"down-Arrow\"},[_vm._v(\"▼\")]),_c('span',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showArrow && _vm.active),expression:\"showArrow && active\"}],staticClass:\"up-Arrow\"},[_vm._v(\"▲\")])]:_vm._e()],2),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.active),expression:\"active\"}],attrs:{\"id\":\"body\"}},_vm._l((_vm.items),function(item){return _c('div',{key:item[0],staticClass:\"item\",on:{\"click\":function($event){_vm.toggleSelection(item[0])}}},[_c('input',{attrs:{\"type\":\"checkbox\"},domProps:{\"checked\":_vm.selected.includes(item[0])},on:{\"click\":function($event){$event.preventDefault();}}}),_vm._v(\" \"+_vm._s(item[1])+\"\\n \")])}))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./accordion.vue?vue&type=template&id=0bf2b7ba&scoped=true&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=1&id=847e7ec4&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=1&id=847e7ec4&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('button',{ref:\"confirm\",on:{\"click\":_vm.confirm}},[_vm._v(_vm._s(_vm.yes))]),(!!_vm.no)?_c('button',{on:{\"click\":_vm.deny}},[_vm._v(_vm._s(_vm.no))]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"","\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { getComponent, getRef } from \"@/core/utils\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class AssetContextMenu extends Vue {\n visible = false;\n left = 0;\n top = 0;\n open(event: MouseEvent, inode: number) {\n if (!assetStore.selected.includes(inode)) getComponent().select(event, inode);\n\n this.visible = true;\n this.left = event.pageX;\n this.top = event.pageY;\n this.$nextTick(() => {\n this.$children[0].$el.focus();\n });\n }\n close() {\n this.visible = false;\n }\n rename() {\n if (assetStore.selected.length !== 1) return;\n const asset = assetStore.idMap.get(assetStore.selected[0])!;\n\n getRef(\"prompt\")\n .prompt(\"New name:\", `Renaming ${asset.name}`)\n .then(\n (name: string) => {\n socket.emit(\"Asset.Rename\", {\n asset: asset.id,\n name,\n });\n asset.name = name;\n getComponent().$forceUpdate();\n },\n () => {},\n );\n this.close();\n }\n remove() {\n if (assetStore.selected.length === 0) return;\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result) {\n for (const sel of assetStore.selected) {\n socket.emit(\"Asset.Remove\", sel);\n if (assetStore.files.includes(sel))\n assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.clearSelected();\n }\n },\n () => {},\n );\n this.close();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./filter.vue?vue&type=style&index=0&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class LabelManager extends Vue {\n visible = false;\n newCategory = \"\";\n newName = \"\";\n search = \"\";\n\n mounted() {\n EventBus.$on(\"LabelManager.Open\", () => {\n this.visible = true;\n this.newCategory = \"\";\n this.newName = \"\";\n this.$nextTick(() => (this.$refs.search).focus());\n });\n }\n\n beforeDestroy() {\n EventBus.$off(\"LabelManager.Open\");\n }\n\n get labels() {\n const cat: {[category: string]: Label[]} = {};\n for (const uuid of Object.keys(gameStore.labels)) {\n const label = gameStore.labels[uuid];\n if (this.search.length && `${label.category.toLowerCase()}${label.name.toLowerCase()}`.search(this.search.toLowerCase()) < 0) continue;\n if (label.user !== gameStore.username) continue;\n if (!label.category) cat[''].push(label);\n else {\n if (!(label.category in cat)) cat[label.category] = [];\n cat[label.category].push(label);\n cat[label.category].sort((a, b) => a.name.localeCompare(b.name));\n }\n }\n return cat;\n }\n\n get categories() {\n return Object.keys(this.labels).sort();\n }\n\n selectLabel(label: string) {\n EventBus.$emit(\"EditDialog.AddLabel\", label);\n this.visible = false;\n }\n\n toggleVisibility(label: Label) {\n label.visible = !label.visible;\n socket.emit(\"Label.Visibility.Set\", { uuid: label.uuid, visible: label.visible });\n }\n\n addLabel() {\n if (this.newName === \"\") return;\n const label = {\n uuid: uuidv4(),\n category: this.newCategory,\n name: this.newName,\n visible: false,\n user: gameStore.username,\n };\n gameStore.addLabel(label);\n socket.emit(\"Label.Add\", label);\n this.newCategory = \"\";\n this.newName = \"\";\n }\n\n deleteLabel(uuid: string) {\n gameStore.deleteLabel({ uuid, user: gameStore.username });\n socket.emit(\"Label.Delete\", uuid);\n }\n}\n","import { ServerPolygon } from \"../comm/types/shapes\";\nimport { GlobalPoint, LocalPoint } from \"../geom\";\nimport { g2lx, g2ly, g2lz, l2g } from \"../units\";\nimport { getFogColour } from \"../utils\";\nimport { BoundingRect } from \"./boundingrect\";\nimport { Shape } from \"./shape\";\n\nexport class Polygon extends Shape {\n type = \"polygon\";\n _vertices: GlobalPoint[] = [];\n\n constructor(\n startPoint: GlobalPoint,\n vertices: GlobalPoint[] = [],\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, fillColour, strokeColour, uuid);\n this._vertices = vertices;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._vertices.length; i++) this._vertices[i] = this._vertices[i].add(delta);\n }\n\n get vertices() {\n return [this._refPoint, ...this._vertices];\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n vertices: this._vertices.map(p => ({ x: p.x, y: p.y })),\n });\n }\n\n fromDict(data: ServerPolygon) {\n super.fromDict(data);\n this._vertices = data.vertices.map(v => new GlobalPoint(v.x, v.y));\n }\n\n get points() {\n return this.vertices.map(point => [point.x, point.y]);\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else if (this.vertices.length === 2) ctx.strokeStyle = this.fillColour;\n else ctx.strokeStyle = this.strokeColour;\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n ctx.lineWidth = g2lz(2);\n\n ctx.beginPath();\n ctx.moveTo(g2lx(this.vertices[0].x), g2ly(this.vertices[0].y));\n for (let i = 1; i <= this.vertices.length; i++) {\n const vertex = this.vertices[i % this.vertices.length];\n ctx.lineTo(g2lx(vertex.x), g2ly(vertex.y));\n }\n ctx.fill();\n ctx.stroke();\n }\n\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._vertices[resizePoint - 1] = l2g(point);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._vertices) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}]},[_vm._v(\"Mode\")]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}],staticClass:\"selectgroup\"},_vm._l((_vm.modes),function(mode){return _c('div',{key:mode,staticClass:\"option\",class:{'option-selected': _vm.modeSelect === mode},on:{\"click\":function($event){_vm.modeSelect = mode}}},[_vm._v(_vm._s(mode))])})),_c('div',[_vm._v(\"Shape\")]),_c('div',{staticClass:\"selectgroup\"},_vm._l((_vm.shapes),function(shape){return _c('div',{key:shape,staticClass:\"option\",class:{'option-selected': _vm.shapeSelect === shape},on:{\"click\":function($event){_vm.shapeSelect = shape}}},[_c('i',{staticClass:\"fas\",class:'fa-' + shape})])})),_c('div',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"selectgroup\"},[_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}]},[_vm._v(\"Brush size\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.brushSize),expression:\"brushSize\"},{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}],staticStyle:{\"max-width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.brushSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.brushSize=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=template&id=639cd890&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"outer\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}},[_c('div',{staticClass:\"current-color\",style:(_vm.transparent ? 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)' : 'background-color:' + _vm.color),on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],staticClass:\"mask\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.closePicker($event)}}}),_c('chrome-picker',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],ref:\"chromePicker\",style:({position: 'fixed', left:_vm.left + 'px', top:_vm.top + 'px', 'z-index': 9999}),attrs:{\"value\":_vm.color,\"tabindex\":\"-1\"},on:{\"input\":_vm.updateColor}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=template&id=d32461a4&scoped=true&\"","import { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=5b0def98&\"\nimport script from \"./manager.vue?vue&type=script&lang=ts&\"\nexport * from \"./manager.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./manager.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"manager.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./tool.vue?vue&type=template&id=1e034b42&\"\nimport script from \"./tool.vue?vue&type=script&lang=ts&\"\nexport * from \"./tool.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tool.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"tool.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_vm._v(\"\\n \"+_vm._s(_vm.question)+\"\\n \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.answer),expression:\"answer\"}],ref:\"answer\",attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.answer)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.submit($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.answer=$event.target.value}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport draggable from \"vuedraggable\";\nVue.component(\"draggable\", draggable);\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { InitiativeData, InitiativeEffect } from \"@/game/comm/types/general\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n draggable,\n },\n})\nexport default class Initiative extends Vue {\n visible = false;\n data: InitiativeData[] = [];\n currentActor: string | null = null;\n roundCounter = 0;\n\n mounted() {\n EventBus.$on(\"Initiative.Clear\", this.clear);\n EventBus.$on(\"Initiative.Remove\", (data: string) => this.removeInitiative(data));\n EventBus.$on(\"Initiative.Show\", () => (this.visible = true));\n\n socket.on(\"Initiative.Set\", (data: InitiativeData[]) => {\n this.data = data;\n });\n socket.on(\"Initiative.Turn.Set\", (data: string) => this.setTurn(data));\n socket.on(\"Initiative.Turn.Update\", (data: string) => this.updateTurn(data, false));\n socket.on(\"Initiative.Round.Update\", (data: number) => this.setRound(data, false));\n socket.on(\"Initiative.Effect.New\", (data: { actor: string; effect: InitiativeEffect }) => {\n const actor = this.getActor(data.actor);\n if (actor === undefined) return;\n this.createEffect(actor, data.effect, false);\n });\n socket.on(\"Initiative.Effect.Update\", (data: { actor: string; effect: InitiativeEffect }) =>\n this.updateEffect(data.actor, data.effect, false),\n );\n }\n\n beforeDestroy() {\n EventBus.$off(\"Initiative.Clear\");\n EventBus.$off(\"Initiative.Remove\");\n EventBus.$off(\"Initiative.Show\");\n }\n\n // Utilities\n clear() {\n this.data = [];\n this.currentActor = null;\n }\n getActor(actorId: string) {\n return this.data.find(a => a.uuid === actorId);\n }\n contains(uuid: string) {\n return this.data.some(d => d.uuid === uuid);\n }\n owns(actor: InitiativeData): boolean {\n if (gameStore.IS_DM) return true;\n const shape = layerManager.UUIDMap.get(actor.uuid);\n // Shapes that are unknown to this client are hidden from this client but owned by other clients\n if (shape === undefined) return false;\n return shape.owners.includes(gameStore.username);\n }\n getDefaultEffect() {\n return { uuid: uuidv4(), name: \"New Effect\", turns: 10 };\n }\n fakeSetData(dataTransfer: DataTransfer) {\n dataTransfer.setData(\"Hack\", \"\");\n }\n syncInitiative(data: InitiativeData | { uuid: string }) {\n socket.emit(\"Initiative.Update\", data);\n }\n // Events\n addInitiative(data: InitiativeData) {\n const d = this.data.findIndex(a => a.uuid === data.uuid);\n if (d >= 0) return;\n if (data.initiative === undefined) data.initiative = 0;\n this.syncInitiative(data);\n }\n removeInitiative(uuid: string) {\n const d = this.data.findIndex(a => a.uuid === uuid);\n if (d < 0 || this.data[d].group) return;\n this.syncInitiative({ uuid });\n // Remove highlight\n const shape = layerManager.UUIDMap.get(uuid);\n if (shape === undefined) return;\n if (shape.showHighlight) {\n shape.showHighlight = false;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n }\n updateOrder() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Initiative.Set\", this.data.map(d => d.uuid));\n }\n updateTurn(actorId: string | null, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.currentActor = actorId;\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n if (actor.effects) {\n for (let e = actor.effects.length - 1; e >= 0; e--) {\n if (actor.effects[e].turns <= 0) actor.effects.splice(e, 1);\n else actor.effects[e].turns--;\n }\n }\n if (sync) socket.emit(\"Initiative.Turn.Update\", actorId);\n }\n setRound(round: number, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.roundCounter = round;\n if (sync) socket.emit(\"Initiative.Round.Update\", round);\n }\n setTurn(actorId: string | null) {\n this.currentActor = actorId;\n }\n nextTurn() {\n if (!gameStore.IS_DM) return;\n const order = this.data;\n const next = order[(order.findIndex(a => a.uuid === this.currentActor) + 1) % order.length];\n if (this.data[0].uuid === next.uuid) this.setRound(this.roundCounter + 1, true);\n this.updateTurn(next.uuid, true);\n }\n toggleHighlight(actor: InitiativeData, show: boolean) {\n const shape = layerManager.UUIDMap.get(actor.uuid);\n if (shape === undefined) return;\n shape.showHighlight = show;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n toggleOption(actor: InitiativeData, option: \"visible\" | \"group\") {\n if (!this.owns(actor)) return;\n actor[option] = !actor[option];\n this.syncInitiative(actor);\n }\n createEffect(actor: InitiativeData, effect: InitiativeEffect, sync: boolean) {\n if (!this.owns(actor)) return;\n actor.effects.push(effect);\n if (sync) socket.emit(\"Initiative.Effect.New\", { actor: actor.uuid, effect });\n }\n syncEffect(actor: InitiativeData, effect: InitiativeEffect) {\n if (!this.owns(actor)) return;\n socket.emit(\"Initiative.Effect.Update\", { actor: actor.uuid, effect });\n }\n updateEffect(actorId: string, effect: InitiativeEffect, sync: boolean) {\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n const effectIndex = actor.effects.findIndex(e => e.uuid === effect.uuid);\n if (effectIndex === undefined) return;\n actor.effects[effectIndex] = effect;\n if (sync) this.syncEffect(actor, effect);\n else this.$forceUpdate();\n }\n}\n","import { render, staticRenderFns } from \"./selection_info.vue?vue&type=template&id=674cf937&scoped=true&\"\nimport script from \"./selection_info.vue?vue&type=script&lang=ts&\"\nexport * from \"./selection_info.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selection_info.vue?vue&type=style&index=0&id=674cf937&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"674cf937\",\n null\n \n)\n\ncomponent.options.__file = \"selection_info.vue\"\nexport default component.exports","import Vue from 'vue';\n\nimport { Action, getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { g2l, l2g } from \"@/game/units\";\nimport { zoomValue } from \"@/game/utils\";\nimport { BoundingVolume } from \"@/game/visibility/bvh/bvh\";\nimport { triangulate } from \"@/game/visibility/te/pa\";\nimport { rootStore } from \"@/store\";\n\nexport interface GameState {\n boardInitialized: boolean;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"game\", namespaced: true })\nclass GameStore extends VuexModule implements GameState {\n // This is a limited view of selectable layers that is used to generate the layer selection UI and ability to switch layers\n // See the layerManager for proper layer management tools\n layers: string[] = [];\n selectedLayerIndex = -1;\n boardInitialized = false;\n\n locations: string[] = [];\n\n assets: AssetList = {};\n\n notes: Note[] = [];\n\n IS_DM = false;\n gridSize = 50;\n username = \"\";\n roomName = \"\";\n roomCreator = \"\";\n invitationCode = \"\";\n\n gridColour = \"rgba(0, 0, 0, 1)\";\n fowColour = \"rgba(0, 0, 0, 1)\";\n rulerColour = \"rgba(255, 0, 0, 1)\";\n panX = 0;\n panY = 0;\n\n zoomDisplay = 0.5;\n // zoomFactor = 1;\n\n unitSize = 5;\n useGrid = true;\n fullFOW = false;\n fowOpacity = 0.3;\n fowLOS = false;\n locationName = \"\";\n\n visionSources: { shape: string; aura: string }[] = [];\n visionBlockers: string[] = [];\n annotations: string[] = [];\n movementblockers: string[] = [];\n ownedtokens: string[] = [];\n\n BV = Object.freeze(new BoundingVolume([]));\n\n visionMode: \"bvh\" | \"triangle\" = \"bvh\";\n drawTEContour = false;\n visionRangeMin = 1640;\n visionRangeMax = 3281;\n\n clipboard: ServerShape[] = [];\n\n // Maps are not yet supported in Vue untill 3.X, so for now we're using a plain old object\n labels: {[uuid: string]: Label} = {};\n\n filterNoLabel = false;\n labelFilters: string[] = [];\n\n showUI = true;\n\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n get zoomFactor() {\n return zoomValue(this.zoomDisplay);\n }\n\n @Mutation\n setZoomDisplay(zoom: number) {\n if (zoom === this.zoomDisplay) return;\n if (zoom < 0) zoom = 0;\n if (zoom > 1) zoom = 1;\n this.zoomDisplay = zoom;\n layerManager.invalidate();\n }\n\n @Mutation\n setVisionMode(data: { mode: \"bvh\" | \"triangle\"; sync: boolean }) {\n this.visionMode = data.mode;\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_mode: data.mode });\n }\n\n @Mutation\n setBoardInitialized(boardInitialized: boolean) {\n this.boardInitialized = boardInitialized;\n }\n\n @Mutation\n toggleUnlabeledFilter() {\n this.filterNoLabel = !this.filterNoLabel;\n }\n\n @Mutation\n addLabel(label: Label) {\n Vue.set(this.labels, label.uuid, label);\n }\n\n @Mutation\n setLabelFilters(filters: string[]) {\n this.labelFilters = filters;\n }\n\n @Mutation\n setLabelVisibility(data: { user: string; uuid: string; visible: boolean }) {\n if (!(data.uuid in this.labels)) return;\n this.labels[data.uuid].visible = data.visible;\n }\n\n @Mutation\n deleteLabel(data: { uuid: string; user: string }) {\n if (!(data.uuid in this.labels)) return;\n const label = this.labels[data.uuid];\n const updatedLayers: Set = new Set();\n for (const shape of layerManager.UUIDMap.values()) {\n const i = shape.labels.indexOf(label);\n if (i >= 0) {\n shape.labels.splice(i, 1);\n updatedLayers.add(shape.layer);\n }\n }\n for (const layer of updatedLayers)\n layerManager.getLayer(layer)!.invalidate(false);\n Vue.delete(this.labels, data.uuid);\n }\n\n @Mutation\n setDM(isDM: boolean) {\n this.IS_DM = isDM;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n\n @Mutation\n setRoomName(name: string) {\n this.roomName = name;\n }\n\n @Mutation\n setRoomCreator(name: string) {\n this.roomCreator = name;\n }\n\n @Mutation\n setInvitationCode(code: string) {\n this.invitationCode = code;\n }\n\n @Mutation\n addLayer(name: string) {\n this.layers.push(name);\n if (this.selectedLayerIndex === -1) this.selectedLayerIndex = this.layers.indexOf(name);\n }\n\n @Mutation\n selectLayer(data: { name: string; sync: boolean }) {\n const index = this.layers.indexOf(data.name);\n if (index >= 0) this.selectedLayerIndex = index;\n if (data.sync) socket.emit(\"Client.ActiveLayer.Set\", data.name);\n }\n\n @Mutation\n newNote(data: { note: Note; sync: boolean }) {\n this.notes.push(data.note);\n if (data.sync) socket.emit(\"Note.New\", data.note);\n }\n\n @Mutation\n setAssets(assets: AssetList) {\n this.assets = assets;\n }\n\n @Mutation\n setLocations(locations: string[]) {\n this.locations = locations;\n }\n\n @Mutation\n resetLayerInfo() {\n this.layers = [];\n this.selectedLayerIndex = -1;\n }\n\n @Mutation\n recalculateVision(partial = false) {\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(\"vision\", partial);\n else this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n }\n }\n\n @Mutation\n recalculateMovement(partial = false) {\n if (this.boardInitialized && this.visionMode === \"triangle\") triangulate(\"movement\", partial);\n }\n\n @Mutation\n updateZoom(data: { newZoomDisplay: number; zoomLocation: GlobalPoint }) {\n if (data.newZoomDisplay === this.zoomDisplay) return;\n if (data.newZoomDisplay < 0) data.newZoomDisplay = 0;\n if (data.newZoomDisplay > 1) data.newZoomDisplay = 1;\n const oldLoc = g2l(data.zoomLocation);\n this.zoomDisplay = data.newZoomDisplay;\n const newLoc = l2g(oldLoc);\n // Change the pan settings to keep the zoomLocation in the same exact location before and after the zoom.\n const diff = newLoc.subtract(data.zoomLocation);\n this.panX += diff.x;\n this.panY += diff.y;\n layerManager.invalidate();\n sendClientOptions();\n }\n\n @Mutation\n setGridColour(data: { colour: string; sync: boolean }) {\n this.gridColour = data.colour;\n layerManager.getGridLayer()!.drawGrid();\n if (data.sync) socket.emit(\"Client.Options.Set\", { gridColour: data.colour });\n }\n\n @Mutation\n setFOWColour(data: { colour: string; sync: boolean }) {\n this.fowColour = data.colour;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Client.Options.Set\", { fowColour: data.colour });\n }\n\n @Mutation\n setRulerColour(data: { colour: string; sync: boolean }) {\n this.rulerColour = data.colour;\n if (data.sync) socket.emit(\"Client.Options.Set\", { rulerColour: data.colour });\n }\n\n @Mutation\n setPanX(x: number) {\n this.panX = x;\n }\n\n @Mutation\n setPanY(y: number) {\n this.panY = y;\n }\n\n @Mutation\n increasePanX(increase: number) {\n this.panX += increase;\n }\n\n @Mutation\n increasePanY(increase: number) {\n this.panY += increase;\n }\n\n @Mutation\n setUnitSize(data: { unitSize: number; sync: boolean }) {\n if (this.unitSize !== data.unitSize && data.unitSize > 0 && data.unitSize < Infinity) {\n this.unitSize = data.unitSize;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { unit_size: data.unitSize });\n }\n }\n\n @Mutation\n setUseGrid(data: { useGrid: boolean; sync: boolean }) {\n if (this.useGrid !== data.useGrid) {\n this.useGrid = data.useGrid;\n const gridLayer = layerManager.getGridLayer()!;\n if (data.useGrid) gridLayer.canvas.style.display = \"block\";\n else gridLayer.canvas.style.display = \"none\";\n if (data.sync) socket.emit(\"Location.Options.Set\", { use_grid: data.useGrid });\n }\n }\n\n @Mutation\n setGridSize(data: { gridSize: number; sync: boolean }): void {\n if (this.gridSize !== data.gridSize && data.gridSize > 0) {\n this.gridSize = data.gridSize;\n const gridLayer = layerManager.getGridLayer();\n if (gridLayer !== undefined) gridLayer.drawGrid();\n if (data.sync) socket.emit(\"Gridsize.Set\", data.gridSize);\n }\n }\n\n @Mutation\n setVisionRangeMin(data: { value: number; sync: boolean }): void {\n this.visionRangeMin = data.value;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_min_range: data.value });\n }\n\n @Mutation\n setVisionRangeMax(data: { value: number; sync: boolean }): void {\n this.visionRangeMax = Math.max(data.value, this.visionRangeMin);\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_max_range: this.visionRangeMax });\n }\n\n @Mutation\n setFullFOW(data: { fullFOW: boolean; sync: boolean }) {\n if (this.fullFOW !== data.fullFOW) {\n this.fullFOW = data.fullFOW;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { full_fow: data.fullFOW });\n }\n }\n\n @Mutation\n setFOWOpacity(data: { fowOpacity: number; sync: boolean }) {\n this.fowOpacity = data.fowOpacity;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_opacity: data.fowOpacity });\n }\n\n @Mutation\n setLineOfSight(data: { fowLOS: boolean; sync: boolean }) {\n if (this.fowLOS !== data.fowLOS) {\n this.fowLOS = data.fowLOS;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_los: data.fowLOS });\n }\n }\n\n @Mutation\n setLocationName(name: string) {\n this.locationName = name;\n }\n\n @Mutation\n updateNote(data: { note: Note; sync: boolean }) {\n const actualNote = this.notes.find(n => n.uuid === data.note.uuid);\n if (actualNote === undefined) return;\n actualNote.title = data.note.title;\n actualNote.text = data.note.text;\n if (data.sync) socket.emit(\"Note.Update\", actualNote);\n }\n\n @Mutation\n removeNote(data: { note: Note; sync: boolean }) {\n this.notes = this.notes.filter(n => n.uuid !== data.note.uuid);\n if (data.sync) socket.emit(\"Note.Remove\", data.note.uuid);\n }\n\n @Mutation\n toggleUI() {\n this.showUI = !this.showUI;\n }\n\n @Mutation\n setClipboard(clipboard: ServerShape[]) {\n this.clipboard = clipboard;\n }\n\n @Action\n clear() {\n (this.context.state).visionSources = [];\n (this.context.state).visionBlockers = [];\n (this.context.state).ownedtokens = [];\n (this.context.state).annotations = [];\n (this.context.state).movementblockers = [];\n (this.context.state).notes = [];\n this.context.commit(\"recalculateVision\");\n this.context.commit(\"recalculateMovement\");\n }\n}\n\nexport const gameStore = getModule(GameStore);\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=d32461a4&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=d32461a4&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"","import { ServerAura } from \"@/game/comm/types/shapes\";\n\nexport const aurasFromServer = (auras: ServerAura[]): Aura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n visionSource: aura.vision_source,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n\nexport const aurasToServer = (auras: Aura[]): ServerAura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n vision_source: aura.visionSource,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{attrs:{\"id\":\"toolselect\"}},[_c('ul',_vm._l((_vm.visibleTools),function(tool){return _c('li',{key:tool,ref:tool + '-selector',refInFor:true,class:{'tool-selected': _vm.currentTool === tool},on:{\"mousedown\":function($event){_vm.currentTool = tool}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(tool))])])}))]),_c('div',[[_c('select-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Select'),expression:\"currentTool === 'Select'\"}],ref:\"selectTool\"}),_c('pan-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Pan'),expression:\"currentTool === 'Pan'\"}]}),_c('keep-alive',[_c('draw-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Draw'),expression:\"currentTool === 'Draw'\"}]})],1),_c('ruler-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Ruler'),expression:\"currentTool === 'Ruler'\"}]}),_c('map-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Map'),expression:\"currentTool === 'Map'\"}]}),_c('filter-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Filter'),expression:\"currentTool === 'Filter'\"}]}),_c('shape-menu',{ref:\"shapecontext\"}),_c('createtoken-dialog',{ref:\"createtokendialog\"})]],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=template&id=cf33581e&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"\nimport script from \"./note.vue?vue&type=script&lang=ts&\"\nexport * from \"./note.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7a3669fd\",\n null\n \n)\n\ncomponent.options.__file = \"note.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./initiative.vue?vue&type=template&id=af4dc61a&scoped=true&\"\nimport script from \"./initiative.vue?vue&type=script&lang=ts&\"\nexport * from \"./initiative.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./initiative.vue?vue&type=style&index=0&id=af4dc61a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"af4dc61a\",\n null\n \n)\n\ncomponent.options.__file = \"initiative.vue\"\nexport default component.exports","import { ServerLayer } from \"@/game/comm/types/general\";\nimport { FOWLayer } from \"@/game/layers/fow\";\nimport { FOWPlayersLayer } from \"@/game/layers/fowplayers\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nexport function createLayer(layerInfo: ServerLayer) {\n // Create canvas element\n const canvas = document.createElement(\"canvas\");\n canvas.style.zIndex = layerManager.layers.length.toString();\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n\n // Create the Layer instance\n let layer: Layer;\n if (layerInfo.type_ === \"grid\") layer = new GridLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow\") layer = new FOWLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow-players\") layer = new FOWPlayersLayer(canvas, layerInfo.name);\n else layer = new Layer(canvas, layerInfo.name);\n layer.selectable = layerInfo.selectable;\n layer.playerEditable = layerInfo.player_editable;\n layerManager.addLayer(layer);\n\n // Add the element to the DOM\n const layers = document.getElementById(\"layers\");\n if (layers === null) {\n console.warn(\"Layers div is missing, this will prevent the main game board from loading!\");\n return;\n }\n if (layerInfo.name !== \"fow-players\") layers.appendChild(canvas);\n\n if (layerInfo.type_ === \"grid\" && layerInfo.size) gameStore.setGridSize({ gridSize: layerInfo.size, sync: false });\n // Load layer shapes\n layer.setShapes(layerInfo.shapes);\n}\n","import { render, staticRenderFns } from \"./labels.vue?vue&type=template&id=4697341e&scoped=true&\"\nimport script from \"./labels.vue?vue&type=script&lang=ts&\"\nexport * from \"./labels.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./labels.vue?vue&type=style&index=0&id=4697341e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4697341e\",\n null\n \n)\n\ncomponent.options.__file = \"labels.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{on:{\"focusin\":_vm.focusin,\"focusout\":_vm.focusout,\"submit\":function($event){$event.preventDefault();return _vm.login($event)}}},[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"PlanarAlly\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.username),expression:\"username\"}],attrs:{\"type\":\"text\",\"name\":\"username\",\"placeholder\":\"Username\",\"autocomplete\":\"username\",\"required\":\"\"},domProps:{\"value\":(_vm.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.username=$event.target.value}}}),_vm._m(0)]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"type\":\"password\",\"name\":\"password\",\"placeholder\":\"Password\",\"autocomplete\":\"current-password\",\"required\":\"\"},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.password=$event.target.value}}}),_vm._m(1)]),_c('div',{staticStyle:{\"display\":\"flex\"}},[_c('button',{staticStyle:{\"visibility\":\"hidden\",\"display\":\"none\"},attrs:{\"type\":\"submit\",\"name\":\"login\"}}),_c('button',{staticClass:\"submit\",attrs:{\"type\":\"button\",\"name\":\"register\",\"title\":\"Register\"},on:{\"click\":_vm.register}},[_c('i',{staticClass:\"fas fa-plus\"})]),_vm._m(2)])]),(_vm.error)?_c('div',{staticClass:\"feedback\"},[_c('p',{staticClass:\"error\"},[_c('strong',[_vm._v(\"Error:\")]),_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \")])]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-user-circle\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-lock\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"name\":\"login\",\"title\":\"Login\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport EditDialog from \"@/game/ui/selection/edit_dialog.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\n\n@Component({\n components: {\n \"edit-dialog\": EditDialog,\n },\n})\nexport default class SelectionInfo extends Vue {\n shape: Shape | null = null;\n\n mounted() {\n EventBus.$on(\"SelectionInfo.Shape.Set\", (shape: Shape | null) => {\n this.shape = shape;\n });\n }\n\n beforeDestroy() {\n EventBus.$off(\"SelectionInfo.Shape.Set\");\n }\n\n openEditDialog() {\n (this.$refs.editDialog).visible = true;\n }\n changeValue(object: Tracker | Aura, redraw: boolean) {\n if (this.shape === null) return;\n getRef(\"prompt\")\n .prompt(`New ${object.name} value:`, `Updating ${object.name}`)\n .then(\n (value: string) => {\n if (this.shape === null) return;\n const ogValue = object.value;\n if (value[0] === \"+\" || value[0] === \"-\") object.value += parseInt(value, 10);\n else object.value = parseInt(value, 10);\n if (isNaN(object.value)) object.value = ogValue;\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\n if (redraw) layerManager.invalidate();\n },\n () => {},\n );\n }\n}\n","import { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { BoardInfo, Note, ServerClient, ServerLocation } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createLayer } from \"@/game/layers/utils\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { router } from \"@/router\";\nimport { zoomDisplay } from \"../utils\";\n\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"connect_error\", (error: any) => {\n console.error(\"Could not connect to game session.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"error\", (error: any) => {\n console.error(\"Game session does not exist.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n router.push(destination);\n});\nsocket.on(\"Room.Info.Set\", (data: { name: string; creator: string; invitationCode: string }) => {\n gameStore.setRoomName(data.name);\n gameStore.setRoomCreator(data.creator);\n gameStore.setInvitationCode(data.invitationCode);\n});\nsocket.on(\"Username.Set\", (username: string) => {\n gameStore.setUsername(username);\n gameStore.setDM(username === window.location.pathname.split(\"/\")[2]);\n});\nsocket.on(\"Client.Options.Set\", (options: ServerClient) => {\n gameStore.setGridColour({ colour: options.grid_colour, sync: false });\n gameStore.setFOWColour({ colour: options.fow_colour, sync: false });\n gameStore.setRulerColour({ colour: options.ruler_colour, sync: false });\n gameStore.setPanX(options.pan_x);\n gameStore.setPanY(options.pan_y);\n gameStore.setZoomDisplay(zoomDisplay(options.zoom_factor));\n // gameStore.setZoomDisplay(0.5);\n if (options.active_layer) layerManager.selectLayer(options.active_layer, false);\n if (layerManager.getGridLayer() !== undefined) layerManager.getGridLayer()!.invalidate();\n});\nsocket.on(\"Location.Set\", (data: Partial) => {\n if (data.name !== undefined) gameStore.setLocationName(data.name);\n if (data.unit_size !== undefined) gameStore.setUnitSize({ unitSize: data.unit_size, sync: false });\n if (data.use_grid !== undefined) gameStore.setUseGrid({ useGrid: data.use_grid, sync: false });\n if (data.full_fow !== undefined) gameStore.setFullFOW({ fullFOW: data.full_fow, sync: false });\n if (data.fow_opacity !== undefined) gameStore.setFOWOpacity({ fowOpacity: data.fow_opacity, sync: false });\n if (data.fow_los !== undefined) gameStore.setLineOfSight({ fowLOS: data.fow_los, sync: false });\n if (data.vision_min_range !== undefined) gameStore.setVisionRangeMin({ value: data.vision_min_range, sync: false });\n if (data.vision_max_range !== undefined) gameStore.setVisionRangeMax({ value: data.vision_max_range, sync: false });\n if (data.vision_mode !== undefined) {\n gameStore.setVisionMode({ mode: data.vision_mode, sync: false });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n }\n});\nsocket.on(\"Position.Set\", (data: { x: number; y: number }) => {\n gameManager.setCenterPosition(new GlobalPoint(data.x, data.y));\n});\nsocket.on(\"Notes.Set\", (notes: Note[]) => {\n for (const note of notes) gameStore.newNote({ note, sync: false });\n});\nsocket.on(\"Asset.List.Set\", (assets: AssetList) => {\n gameStore.setAssets(assets);\n});\nsocket.on(\"Board.Set\", (locationInfo: BoardInfo) => {\n gameStore.clear();\n gameStore.setLocations(locationInfo.locations);\n document.getElementById(\"layers\")!.innerHTML = \"\";\n gameStore.resetLayerInfo();\n layerManager.reset();\n for (const layer of locationInfo.layers) createLayer(layer);\n // Force the correct opacity render on other layers.\n layerManager.selectLayer(layerManager.getLayer()!.name, false);\n EventBus.$emit(\"Initiative.Clear\");\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n gameStore.setBoardInitialized(true);\n});\nsocket.on(\"Gridsize.Set\", (gridSize: number) => {\n gameStore.setGridSize({ gridSize, sync: false });\n});\nsocket.on(\"Shape.Add\", (shape: ServerShape) => {\n gameManager.addShape(shape);\n});\nsocket.on(\"Shape.Remove\", (shape: ServerShape) => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(`Attempted to remove an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n layer.removeShape(layerManager.UUIDMap.get(shape.uuid)!, false);\n layer.invalidate(false);\n});\nsocket.on(\"Shape.Order.Set\", (data: { shape: ServerShape; index: number }) => {\n if (!layerManager.UUIDMap.has(data.shape.uuid)) {\n console.log(`Attempted to move the shape order of an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${data.shape.layer}`);\n return;\n }\n const shape = layerManager.UUIDMap.get(data.shape.uuid)!;\n const layer = layerManager.getLayer(shape.layer)!;\n layer.moveShapeOrder(shape, data.index, false);\n});\nsocket.on(\"Shape.Layer.Change\", (data: { uuid: string; layer: string }) => {\n const shape = layerManager.UUIDMap.get(data.uuid);\n if (shape === undefined) return;\n shape.moveLayer(data.layer, false);\n});\nsocket.on(\"Shape.Update\", (data: { shape: ServerShape; redraw: boolean; move: boolean, temporary: boolean }) => {\n gameManager.updateShape(data);\n});\nsocket.on(\"Temp.Clear\", (shapes: ServerShape[]) => {\n shapes.forEach(shape => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(\"Attempted to remove an unknown temporary shape\");\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const realShape = layerManager.UUIDMap.get(shape.uuid)!;\n layerManager.getLayer(shape.layer)!.removeShape(realShape, false);\n });\n});\nsocket.on(\"Labels.Set\", (labels: Label[]) => {\n for (const label of labels) gameStore.addLabel(label);\n});\nsocket.on(\"Label.Visibility.Set\", (data: { user: string; uuid: string; visible: boolean }) => {\n gameStore.setLabelVisibility(data);\n});\nsocket.on(\"Label.Add\", (data: Label) => {\n gameStore.addLabel(data);\n});\nsocket.on(\"Label.Delete\", (data: { user: string; uuid: string }) => {\n gameStore.deleteLabel(data);\n});\nsocket.on(\"Labels.Filter.Add\", (uuid: string) => {\n gameStore.labelFilters.push(uuid);\n layerManager.invalidate();\n})\nsocket.on(\"Labels.Filter.Remove\", (uuid: string) => {\n const idx = gameStore.labelFilters.indexOf(uuid);\n if (idx >= 0) {\n gameStore.labelFilters.splice(idx, 1);\n layerManager.invalidate();\n }\n})\nsocket.on(\"Labels.Filters.Set\", (filters: string[]) => {\n gameStore.setLabelFilters(filters);\n})\n"],"sourceRoot":""} \ No newline at end of file diff --git a/server/static/js/app.f228bc3b.js b/server/static/js/app.f228bc3b.js deleted file mode 100644 index ea6ea4ac7..000000000 --- a/server/static/js/app.f228bc3b.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var n,r,a=t[0],l=t[1],c=t[2],d=0,h=[];de.fillText(t.text,t.x,t.y)),e.restore()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){}getMaxHeight(e){const t=this.getLines(e),i=30;return i*t.length}getMaxWidth(e){const t=this.getLines(e),i=t.map(t=>e.measureText(t.text).width);return Math.max(...i)}getLines(e){const t=this.text.split("\n"),i=[],n=e.canvas.width,s=30,o=0;let r=0;for(const a of t){let t="";const l=a.split(" ");for(const a of l){const l=t+a+" ",c=e.measureText(l),u=c.width;u>n?(e.fillText(t,o,r),i.push({text:t,x:o,y:r}),t=a+" ",r+=s):t=l}i.push({text:t,x:o,y:r}),r+=s}return i}}t.Text=r},"033f":function(e,t,i){"use strict";i.r(t);var n=i("a1f4"),s=i("a68b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("7997");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"759e5a8a",null);a.options.__file="shapecontext.vue",t["default"]=a.exports},"034f":function(e,t,i){"use strict";var n=i("64a9"),s=i.n(n);s.a},"0584":function(e,t,i){"use strict";var n=i("de21"),s=i.n(n);s.a},"0634":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("66cb")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("c345a"),l=i("60a3");let c=class extends o.default{constructor(){super(...arguments),this.display=!1,this.left=0,this.top=0,this.transparent=!1}mounted(){this.transparent=0===this.$refs.chromePicker.val.rgba.a,this.setPosition()}open(){this.display||(this.setPosition(),this.display=!0,this.$nextTick(()=>this.$children[0].$el.focus()))}updateColor(e){this.transparent=0===e.rgba.a;const t=s.default(e.rgba).toRgbString();this.$emit("update:color",t),this.$emit("input",t)}closePicker(){this.display=!1,this.$emit("change",this.color)}setPosition(){const e=this.$el.getBoundingClientRect();e.right+224>window.innerWidth?this.left=e.left-224:this.left=e.right,e.bottom+242>window.innerHeight?this.top=e.top-242:this.top=e.bottom}};n.__decorate([l.Prop(String)],c.prototype,"color",void 0),c=n.__decorate([r.default({components:{"chrome-picker":a.Chrome}})],c),t.default=c},"07f5":function(e,t,i){"use strict";i.r(t);var n=i("dbba"),s=i("d588");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("561b"),i("a21d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"6d744362",null);a.options.__file="game.vue",t["default"]=a.exports},"0a75":function(e,t,i){},"0ad6":function(e,t,i){},"0bc6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("8055"));function o(e){t.socket.io.opts.query=`user=${e.params.creator}&room=${e.params.room}`,t.socket.connect()}t.socket=s.default(location.protocol+"//"+location.host+"/planarally",{autoConnect:!1}),t.createConnection=o},"0cf7":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("4aec")),a=n.__importDefault(i("a535")),l=n.__importDefault(i("cec2")),c=i("5338"),u=i("2d5b"),d=i("4a5b");let h=class extends s.default{constructor(){super(...arguments),this.path=[],this.draggingSelection=!1}get folders(){return u.assetStore.folders}get files(){return u.assetStore.files}get selected(){return u.assetStore.selected}get idMap(){return u.assetStore.idMap}get currentFolder(){return this.path.length?this.path[this.path.length-1]:u.assetStore.root}get parentFolder(){let e=this.path[this.path.length-2];return void 0===e&&(e=u.assetStore.root),e}get firstSelectedFile(){for(const e of u.assetStore.selected)if(u.assetStore.idMap.get(e).file_hash)return u.assetStore.idMap.get(e);return null}changeDirectory(e){e<0?this.path.pop():this.path.push(e),u.assetStore.clearSelected(),c.socket.emit("Folder.Get",this.currentFolder)}createDirectory(){const e=window.prompt("New folder name");null!==e&&c.socket.emit("Folder.Create",{name:e,parent:this.currentFolder})}moveInode(e,t){u.assetStore.files.includes(e)?u.assetStore.files.splice(u.assetStore.files.indexOf(e),1):u.assetStore.folders.splice(u.assetStore.folders.indexOf(e),1),u.assetStore.idMap.delete(e),c.socket.emit("Inode.Move",{inode:e,target:t})}select(e,t){if(e.shiftKey&&u.assetStore.selected.length>0){const e=[...u.assetStore.files,...u.assetStore.folders],i=e.indexOf(u.assetStore.selected[u.assetStore.selected.length-1]),n=e.indexOf(t);for(let t=i;t!==n;i0&&this.upload(e.dataTransfer.files,t);this.draggingSelection=!1}prepareUpload(){document.getElementById("files").click()}upload(e,t){const i=document.getElementById("files").files;if(void 0===e){if(!i)return;e=i}void 0===t&&(t=this.currentFolder);const n=1e5;for(const s of e){const e=d.uuidv4(),i=Math.ceil(s.size/n);for(let o=0;o{c.socket.emit("Asset.Upload",{name:s.name,directory:t,data:r.result,slice:o,totalSlices:i,uuid:e})})}}}};h=n.__decorate([o.default({components:{Prompt:l.default,ConfirmDialog:a.default,AssetContextMenu:r.default},beforeRouteEnter(e,t,i){c.socket.connect(),i()},beforeRouteLeave(e,t,i){c.socket.disconnect(),i()}})],h),t.default=h},"0ddd":function(e,t,i){"use strict";i.r(t);var n=i("8577"),s=i("4bc3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("befe");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"62c91cd3",null);a.options.__file="asset_node.vue",t["default"]=a.exports},1:function(e,t){},"104d":function(e,t,i){"use strict";var n=i("5722"),s=i.n(n);s.a},1077:function(e,t,i){"use strict";i.r(t);var n=i("f994"),s=i("1eee");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("3cd3");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"bc30fc14",null);a.options.__file="login.vue",t["default"]=a.exports},1216:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("6f92"),s=i("92b1"),o=i("98ef"),r=i("4aee");function a(e,t){const i=n.layerManager.getLayer("draw");if(void 0===i)return;const o=i.ctx;o.lineJoin="round",o.lineJoin="round",o.beginPath(),o.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,o.moveTo(s.g2lx(e[0][0]),s.g2ly(e[0][1]));for(const n of e)o.lineTo(s.g2lx(n[0]),s.g2ly(n[1]));o.closePath(),o.stroke()}function l(e,t){const i=n.layerManager.getLayer("draw");if(void 0===i)return;const s=i.ctx;s.lineJoin="round",s.lineJoin="round",s.beginPath(),s.strokeStyle=void 0===t?`rgb(${255*Math.random()}, ${255*Math.random()}, ${255*Math.random()})`:t,s.moveTo(e[0][0],e[0][1]);for(const n of e)s.lineTo(n[0],n[1]);s.closePath(),s.stroke()}function c(e,t){return t?e:s.g2lx(e)}function u(e,t){return t?e:s.g2ly(e)}t.drawPolygon=a,t.drawPolygonL=l;let d=0,h=0;function f(e,t,i,n,s){e.beginPath(),e.strokeStyle=n?"rgba(255, 0, 0, 0.30)":"rgba(0, 0, 0, 0.30)",e.moveTo(c(t[0],s),u(t[1],s)),e.lineTo(c(i[0],s),u(i[1],s)),e.closePath(),e.stroke()}function p(e,t=!0,i=!0,s=0){d=0,h=0;let a=0;const l=n.layerManager.getLayer("draw");if(void 0===l)return;const p=l.ctx;i&&p.clearRect(0,0,2e3,1e3),p.lineJoin="round",p.lineJoin="round";const g=new o.EdgeIterator(e);while(g.valid)g.next(),g.collect();g.collect();do{const e=g.edge.first.vertices[r.ccw(g.edge.second)].point,t=g.edge.first.vertices[r.cw(g.edge.second)].point;if(s>0){if(e[0]===-1/0||t[0]===-1/0){g.next();continue}h++,g.edge.first.constraints[g.edge.second]?(d++,2===s&&console.log(`Edge: (*) ${e} > ${t}`)):2===s&&console.log(`Edge: ${e} > ${t}`)}do{g.next(),g.collect()}while(g.valid)}while(null!==g.pos);for(const n of e.triangles){if(n.isInfinite())continue;a++;const e=[];p.fillStyle="red",void 0!==n.vertices[0]&&(e.push(n.vertices[0].point),p.beginPath(),p.arc(c(n.vertices[0].point[0],t),u(n.vertices[0].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==n.vertices[1]&&(e.push(n.vertices[1].point),p.arc(c(n.vertices[1].point[0],t),u(n.vertices[1].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),void 0!==n.vertices[2]&&(e.push(n.vertices[2].point),p.arc(c(n.vertices[2].point[0],t),u(n.vertices[2].point[1],t),5,0,2*Math.PI),p.closePath(),p.fill()),2===s&&console.log("[T] ",...e,n.constraints),p.moveTo(c(n.vertices[0].point[0],t),u(n.vertices[0].point[1],t)),void 0!==n.vertices[0]&&void 0!==n.vertices[1]&&f(p,n.vertices[0].point,n.vertices[1].point,n.constraints[2],t),void 0!==n.vertices[1]&&void 0!==n.vertices[2]&&f(p,n.vertices[1].point,n.vertices[2].point,n.constraints[0],t),void 0!==n.vertices[2]&&void 0!==n.vertices[0]&&f(p,n.vertices[2].point,n.vertices[0].point,n.constraints[1],t)}s>0&&(console.log(`Edges: ${d}/${h}`),console.log(`Faces: ${a}`))}window.DP=a,window.DPL=l,window.DPT=p},"12d3":function(e,t,i){"use strict";var n=i("a260"),s=i.n(n);s.a},1327:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importStar(i("66cb")),o=i("4a5b"),r=i("4709"),a=i("f10f"),l=i("92b1");class c extends r.Circle{constructor(e,t,i,n,s,o,r){super(e,t,s,o,r),this.type="circulartoken",this.text=i,this.font=n}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r,text:this.text,font:this.font})}fromDict(e){super.fromDict(e),this.r=e.radius,this.text=e.text,this.font=e.font}draw(e){super.draw(e),e.font=this.font,e.save();const t=l.g2l(this.center());e.textAlign="center",e.textBaseline="middle";const i=o.calcFontScale(e,this.text,l.g2lz(this.r),l.g2lz(this.r)),n=0;e.transform(i,n,-n,i,t.x,t.y),e.fillStyle=s.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}getInitiativeRepr(){return{uuid:this.uuid,visible:!a.gameStore.IS_DM,group:!1,source:""===this.name||"Unknown shape"===this.name?this.text:this.name,has_img:!1,effects:[],index:1/0}}}t.CircularToken=c},1625:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6f92"),o=i("b2ed"),r=i("0180"),a=i("f10f"),l=i("92b1");class c{constructor(){this.shown=!1;const e=new n.GlobalPoint(0,0);this.annotationText=new r.Text(e,"","bold 20px serif",0,"rgba(230, 230, 230, 1)"),this.annotationRect=new o.Rect(e,0,0,"rgba(0, 0, 0, 0.6)")}setActiveText(e){if(void 0===this.layer){if(!s.layerManager.hasLayer("draw"))return void console.warn("There is no draw layer to draw annotations on!");this.layer=s.layerManager.getLayer("draw"),this.layer.addShape(this.annotationRect,!1),this.layer.addShape(this.annotationText,!1)}this.shown=""!==e,this.annotationText.refPoint=l.l2g(new n.LocalPoint(this.layer.canvas.width/2,50)),this.annotationText.text=e;const t=this.shown?this.annotationText.getMaxWidth(this.layer.ctx)+10:0,i=this.shown?this.annotationText.getMaxHeight(this.layer.ctx)+10:0;this.annotationRect.refPoint=l.l2g(new n.LocalPoint(this.layer.canvas.width/2-t/2,30)),this.annotationRect.w=t/a.gameStore.zoomFactor,this.annotationRect.h=i/a.gameStore.zoomFactor,this.layer.invalidate(!0)}}t.AnnotationManager=c},"165c":function(e,t,i){"use strict";var n=i("aaee"),s=i.n(n);s.a},"19f9":function(e,t,i){"use strict";i.r(t);var n=i("45bf"),s=i("8cd4");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("c242");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"aaf3f05e",null);a.options.__file="menu.vue",t["default"]=a.exports},"1c76":function(e,t,i){"use strict";i.r(t);var n=i("2c88"),s=i("300e");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("7f1e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="contextmenu.vue",t["default"]=a.exports},"1dd6":function(e,t,i){"use strict";i.r(t);var n=i("5ae5"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"1eee":function(e,t,i){"use strict";i.r(t);var n=i("d30b"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"1f71":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("SelectContext",{ref:"selectcontext"})},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"206a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6f92"),o=i("6c30"),r=i("4709"),a=i("1327"),l=i("5e7c"),c=i("574e"),u=i("b2ed"),d=i("0180"),h=i("e4ea");function f(e,t){if(void 0===t&&(t=!1),!t&&s.layerManager.UUIDMap.has(e.uuid))return s.layerManager.UUIDMap.get(e.uuid);let i;const f=new n.GlobalPoint(e.x,e.y);if("rect"===e.type_){const t=e;i=new u.Rect(f,t.width,t.height,t.fill_colour,t.stroke_colour,t.uuid)}else if("circle"===e.type_){const t=e;i=new r.Circle(f,t.radius,t.fill_colour,t.stroke_colour,t.uuid)}else if("circulartoken"===e.type_){const t=e;i=new a.CircularToken(f,t.radius,t.text,t.font,t.fill_colour,t.stroke_colour,t.uuid)}else if("line"===e.type_){const t=e;i=new l.Line(f,new n.GlobalPoint(t.x2,t.y2),t.line_width,t.stroke_colour,t.uuid)}else if("multiline"===e.type_){const t=e;i=new c.MultiLine(f,t.points.map(e=>new n.GlobalPoint(e.x,e.y)),t.line_width,t.stroke_colour,t.uuid)}else if("polygon"===e.type_){const t=e;i=new h.Polygon(f,t.vertices.map(e=>new n.GlobalPoint(e.x,e.y)),t.fill_colour,t.stroke_colour,t.uuid)}else if("text"===e.type_){const t=e;i=new d.Text(f,t.text,t.font,t.angle,t.fill_colour,t.stroke_colour,t.uuid)}else{if("assetrect"!==e.type_)return;{const t=e,n=new Image(t.width,t.height);t.src.startsWith("http")?n.src=new URL(t.src).pathname:n.src=t.src,i=new o.Asset(n,f,t.width,t.height,t.uuid),n.onload=(()=>{s.layerManager.getLayer(e.layer).invalidate(!1)})}}return i.fromDict(e),i}t.createShapeFromDict=f},"223d":function(e,t,i){"use strict";var n=i("e756"),s=i.n(n);s.a},2469:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("66cb")),o=i("4a5b"),r=i("0bc6"),a=i("f312"),l=i("8f0a"),c=i("6f92"),u=i("f10f"),d=i("92b1");class h{constructor(e,t,i,n){this.fillColour="#000",this.strokeColour="rgba(0,0,0,0)",this.name="Unknown shape",this.trackers=[],this.auras=[],this._owners=[],this.visionObstruction=!1,this.movementObstruction=!1,this.isToken=!1,this.showHighlight=!1,this.annotation="",this.globalCompositeOperation="source-over",this.options=new Map,this._refPoint=e,this.uuid=n||o.uuidv4(),void 0!==t&&(this.fillColour=t),void 0!==i&&(this.strokeColour=i)}get refPoint(){return this._refPoint}set refPoint(e){this._refPoint=e}visibleInCanvas(e){return!1}getPointIndex(e,t=0){for(const[i,n]of this.points.entries())if(Math.abs(e.x-n[0])<=t&&Math.abs(e.y-n[1])<=t)return i;return-1}getPointOrientation(e){const t=l.GlobalPoint.fromArray(this.points[(this.points.length+e-1)%this.points.length]),i=l.GlobalPoint.fromArray(this.points[e]),n=l.GlobalPoint.fromArray(this.points[(e+1)%this.points.length]),s=n.subtract(t),o=t.add(s.multiply(.5));return i.subtract(o).normalize()}invalidate(e){const t=c.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(e=!0){const t=this,i=u.gameStore.visionBlockers.indexOf(this.uuid);let n=!1;this.visionObstruction&&-1===i?(u.gameStore.visionBlockers.push(this.uuid),n=!0):!this.visionObstruction&&i>=0&&(u.gameStore.visionBlockers.splice(i,1),n=!0),n&&e&&u.gameStore.recalculateVision(),this.auras.forEach(e=>{const i=u.gameStore.visionSources,n=i.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===n?i.push({shape:t.uuid,aura:e.uuid}):!e.visionSource&&n>=0&&i.splice(n,1)});for(let s=u.gameStore.visionSources.length-1;s>=0;s--){const e=u.gameStore.visionSources[s];e.shape===t.uuid&&(t.auras.some(t=>t.uuid===e.aura&&t.visionSource)||u.gameStore.visionSources.splice(s,1))}}setMovementBlock(e,t=!0){this.movementObstruction=e||!1;const i=u.gameStore.movementblockers.indexOf(this.uuid);let n=!1;this.movementObstruction&&-1===i?(u.gameStore.movementblockers.push(this.uuid),n=!0):!this.movementObstruction&&i>=0&&(u.gameStore.movementblockers.splice(i,1),n=!0),n&&t&&u.gameStore.recalculateMovement()}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=u.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?u.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&u.gameStore.ownedtokens.splice(e,1)}}getBaseDict(){return{type_:this.type,uuid:this.uuid,x:this.refPoint.x,y:this.refPoint.y,layer:this.layer,draw_operator:this.globalCompositeOperation,movement_obstruction:this.movementObstruction,vision_obstruction:this.visionObstruction,auras:a.aurasToServer(this.auras),trackers:this.trackers,owners:this._owners,fill_colour:this.fillColour,stroke_colour:this.strokeColour,name:this.name,annotation:this.annotation,is_token:this.isToken,options:JSON.stringify([...this.options])}}fromDict(e){this.layer=e.layer,this.globalCompositeOperation=e.draw_operator,this.movementObstruction=e.movement_obstruction,this.visionObstruction=e.vision_obstruction,this.auras=a.aurasFromServer(e.auras),this.trackers=e.trackers,this._owners=e.owners,this.isToken=e.is_token,e.annotation&&(this.annotation=e.annotation),e.name&&(this.name=e.name),e.options&&(this.options=new Map(JSON.parse(e.options)))}draw(e){if(void 0!==this.globalCompositeOperation?e.globalCompositeOperation=this.globalCompositeOperation:e.globalCompositeOperation="source-over",this.showHighlight){const t=this.getBoundingBox();e.strokeStyle="red",e.strokeRect(d.g2lx(t.topLeft.x)-5,d.g2ly(t.topLeft.y)-5,d.g2lz(t.w)+10,d.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const n=d.g2l(this.center()),o=d.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(n.x,n.y,d.g2lr(i.value),n.x,n.y,d.g2lr(i.value+i.dim)),o=s.default(i.colour);e.fillStyle=t,t.addColorStop(0,i.colour),t.addColorStop(1,o.setAlpha(0).toRgbString())}if(i.visionSource&&void 0!==i.lastPath)try{e.fill(i.lastPath)}catch(t){e.arc(n.x,n.y,o,0,2*Math.PI),e.fill(),console.warn(t)}else e.arc(n.x,n.y,o,0,2*Math.PI),e.fill()}}getInitiativeRepr(){return{uuid:this.uuid,visible:!u.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=c.layerManager.getLayer(this.layer),n=c.layerManager.getLayer(e);void 0!==i&&void 0!==n&&(this.layer=e,i.shapes.splice(i.shapes.indexOf(this),1),n.shapes.push(this),i.invalidate(!0),n.invalidate(!1),t&&r.socket.emit("Shape.Layer.Change",{uuid:this.uuid,layer:e}))}get owners(){return Object.freeze(this._owners.slice())}ownedBy(e){return void 0===e&&(e=u.gameStore.username),u.gameStore.IS_DM||this._owners.includes(e)}addOwner(e){this._owners.includes(e)||this._owners.push(e)}updateOwner(e,t){const i=this._owners.findIndex(t=>t===e);i>=0?this._owners.splice(i,1,t):this.addOwner(t)}removeOwner(e){const t=this._owners.findIndex(t=>t===e);this._owners.splice(t,1)}}t.Shape=h},"255e":function(e,t,i){"use strict";i.r(t);var n=i("851c"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},2686:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!==e.note?i("modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("span",{on:{click:function(t){e.$refs.title.select()}}},[i("i",{staticClass:"fas fa-pencil-alt",staticStyle:{"font-size":"15px"}})]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.note.title,expression:"note.title"}],ref:"title",domProps:{value:e.note.title},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"title",t.target.value)}}}),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.note.text,expression:"note.text"}],ref:"textarea",style:{height:e.calcHeight()},domProps:{value:e.note.text},on:{change:e.updateNote,input:function(t){t.target.composing||e.$set(e.note,"text",t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.removeNote}},[i("i",{staticClass:"far fa-trash-alt"}),e._v(" Remove\n ")])])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"26a5":function(e,t,i){"use strict";var n=i("f2d0"),s=i.n(n);s.a},2756:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("65d9")),o=n.__importDefault(i("496c")),r=n.__importDefault(i("ea6a")),a=i("4a5b"),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("b2ed"),h=i("f10f"),f=i("2838"),p=i("92b1"),g=i("5a5c");var v;(function(e){e[e["Noop"]=0]="Noop",e[e["Resize"]=1]="Resize",e[e["Drag"]=2]="Drag",e[e["GroupSelect"]=3]="GroupSelect"})(v=t.SelectOperations||(t.SelectOperations={}));const m=new c.GlobalPoint(-1e3,-1e3);let y=class extends r.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizePoint=0,this.deltaChanged=!1,this.dragRay=new c.Ray(new c.LocalPoint(0,0),new c.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new d.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(h.gameStore.username)||this.selectionHelper.addOwner(h.gameStore.username);const i=g.getMouse(e),n=p.l2g(i);let s,o=!1;s=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let r=s.length-1;r>=0;r--){const e=s[r];if(e.ownedBy()){if(this.resizePoint=e.getPointIndex(n,p.l2gz(3)),this.resizePoint>=0){t.selection=[e],a.getRef("selectionInfo").shape=e,this.mode=v.Resize,t.invalidate(!0),o=!0;break}if(e.contains(n)){const n=e;-1===t.selection.indexOf(n)&&(t.selection=[n],a.getRef("selectionInfo").shape=n),this.mode=v.Drag;const s=p.g2l(n.refPoint);this.dragRay=new c.Ray(s,i.subtract(s)),t.invalidate(!0),o=!0;break}}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)a.getRef("selectionInfo").shape=e;this.selectionStartPoint=n,this.selectionHelper.refPoint=this.selectionStartPoint,this.selectionHelper.w=0,this.selectionHelper.h=0,t.selection=[this.selectionHelper],t.invalidate(!0)}this.active=!0}onMouseMove(e){const t=u.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=g.getMouse(e),n=p.l2g(i);if(this.deltaChanged=!1,this.mode===v.GroupSelect){const e=n;this.selectionHelper.w=Math.abs(e.x-this.selectionStartPoint.x),this.selectionHelper.h=Math.abs(e.y-this.selectionStartPoint.y),this.selectionHelper.refPoint=new c.GlobalPoint(Math.min(this.selectionStartPoint.x,e.x),Math.min(this.selectionStartPoint.y,e.y)),t.invalidate(!0)}else if(t.selection.length){const s=p.g2l(t.selection[t.selection.length-1].refPoint),o=s.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/h.gameStore.zoomFactor);const a=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!h.gameStore.IS_DM))for(const e of t.selection)e.uuid!==this.selectionHelper.uuid&&(r=f.calculateDelta(r,e),r!==a&&(this.deltaChanged=!0));for(const e of t.selection)e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0}));t.invalidate(!1)}else if(this.mode===v.Resize)for(const e of t.selection)e.resize(this.resizePoint,i),e!==this.selectionHelper&&(e.visionObstruction&&h.gameStore.recalculateVision(!0),l.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1),this.updateCursor(t,n);else this.updateCursor(t,n)}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer();this.mode===v.GroupSelect?(t.clearSelection(),t.shapes.forEach(e=>{if(e===this.selectionHelper)return;const i=e.getBoundingBox();e.ownedBy()&&this.selectionHelper.refPoint.x<=i.topRight.x&&this.selectionHelper.refPoint.x+this.selectionHelper.w>=i.topLeft.x&&this.selectionHelper.refPoint.y<=i.botLeft.y&&this.selectionHelper.refPoint.y+this.selectionHelper.h>=i.topLeft.y&&t.selection.push(e)}),t.selection.length>0&&t.selection.push(this.selectionHelper),t.invalidate(!0)):t.selection.length&&t.selection.forEach(i=>{if(this.mode===v.Drag){if(this.dragRay.origin.x===p.g2lx(i.refPoint.x)&&this.dragRay.origin.y===p.g2ly(i.refPoint.y))return;!h.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(h.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&h.gameStore.recalculateVision(),i.movementObstruction&&h.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1))}),this.mode=v.Noop,this.active=!1}onContextMenu(e){if(void 0===u.layerManager.getLayer())return void console.log("No active layer!");const t=u.layerManager.getLayer(),i=g.getMouse(e),n=p.l2g(i);for(const s of t.selection)if(s.contains(n)&&s!==this.selectionHelper)return t.selection=[s],a.getRef("selectionInfo").shape=s,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,s);this.$refs.selectcontext.open(e)}updateCursor(e,t){for(const i of e.selection){const e=i.getPointIndex(t,p.l2gz(3));if(e<0)document.body.style.cursor="default";else{let t=i.getPointOrientation(e).angle();t<0&&(t+=360);const n=22.5;(t>=315+n||t=135+n&&t<225-n)&&(document.body.style.cursor="ew-resize"),(t>=45+n&&t<135-n||t>=225+n&&t<315-n)&&(document.body.style.cursor="ns-resize"),(t>=n&&t<90-n||t>=180+n&&t<270-n)&&(document.body.style.cursor="nwse-resize"),(t>=90+n&&t<180-n||t>=270+n&&t<360-n)&&(document.body.style.cursor="nesw-resize")}}}};y=n.__decorate([s.default({components:{SelectContext:o.default}})],y),t.default=y},2838:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6f92"),o=i("f10f"),r=i("d6be"),a=i("98ef"),l=i("4aee");function c(e,t,i){if(0===e.x&&0===e.y)return e;if("bvh"===o.gameStore.visionMode){void 0===i&&(i=[]);const r=t.getBoundingBox(),a=r.offset(e);let l=!1;for(const t of o.gameStore.movementblockers){if(i.includes(t))continue;const o=s.layerManager.UUIDMap.get(t),c=o.getBoundingBox();let u=c.intersectsWithInner(a);if(!u){const t=n.Ray.fromPoints(r.topLeft.add(e.normalize()),a.topLeft),i=t.direction.inverse(),s=[i.x<0,i.y<0];u=c.intersectP(t,i,s).hit}if(u){const s=c.center(),o=r.center(),a=o.subtract(s),u=new n.Vector(1,0),d=new n.Vector(0,1);let h=a.dot(u),f=a.dot(d);h>c.w/2&&(h=c.w/2),h<-c.w/2&&(h=-c.w/2),f>c.h/2&&(f=c.h/2),f<-c.h/2&&(f=-c.h/2);const p=s.add(u.multiply(h)).add(d.multiply(f));p.x===r.topLeft.x||p.x===r.topRight.x?e=new n.Vector(0,e.y):p.y===r.topLeft.y||p.y===r.botLeft.y?e=new n.Vector(e.x,0):p.xr.topRight.x?e=new n.Vector(p.x-r.topRight.x,e.y):p.yr.botLeft.y&&(e=new n.Vector(e.x,p.y-r.botLeft.y)),l=!0,i.push(t);break}}return l&&(e=c(e,t,i)),e}{const i=r.PA_CDT.movement.locate(t.center().asArray(),null).loc;for(const n of t.points){const t=r.PA_CDT.movement.locate(n,i),s=t.loc;null!==s&&(e=u(n,s,e))}return e}}function u(e,t,i,s=[]){const o=new n.GlobalPoint(e[0],e[1]),r=o.add(i).asArray();if(t.contains(r))return i;s.push(t);for(let c=0;c<3;c++){if(s.includes(t.neighbours[c]))continue;const d=t.vertices[l.cw(c)].point,h=t.vertices[l.ccw(c)].point,f=l.intersection(e,r,d,h);if(null===f)continue;if(!t.isConstrained(c))return u(e,t.neighbours[c],i,s);if(f[0]===o.x&&f[1]===o.y){l.orientation;const t=l.orientation(e,r,h);if(t===a.Sign.LEFT_TURN)continue;if(t===a.Sign.ZERO)continue}let p=new n.GlobalPoint(f[0],f[1]).subtract(o).multiply(.8);p.length()<1&&(p=new n.Vector(0,0)),p.length()!["__files"].includes(e)).sort(a.alphSort)}get files(){return this.asset.__files?this.asset.__files.concat().sort((e,t)=>e.name.toLowerCase()>t.name.toLowerCase()?1:-1):[]}toggle(e){for(let t=0;tthis.$children[0].$el.focus())}close(){this.visible=!1,this.shape=null}getLayers(){return c.layerManager.layers.filter(e=>e.selectable&&(u.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return c.layerManager.getLayer()}getInitiativeWord(){return null===this.shape?"":a.getRef("initiative").contains(this.shape.uuid)?"Show":"Add"}setLayer(e){null!==this.shape&&(this.shape.moveLayer(e,!0),this.close())}moveToBack(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,0,!0),this.close()}moveToFront(){if(null===this.shape)return;const e=this.getActiveLayer();e.moveShapeOrder(this.shape,e.shapes.length-1,!0),this.close()}addInitiative(){if(null===this.shape)return;const e=a.getRef("initiative");e.contains(this.shape.uuid)||e.addInitiative(this.shape.getInitiativeRepr()),e.visible=!0,this.close()}openEditDialog(){l.EventBus.$emit("EditDialog.Open",this.shape),this.close()}};d=n.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},3427:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!==e.shape?i("div",[i("div",{attrs:{id:"selection-menu"}},[i("div",{attrs:{id:"selection-edit-button"},on:{click:e.openEditDialog}},[i("i",{staticClass:"fas fa-edit"})]),i("div",{attrs:{id:"selection-name"}},[e._v(e._s(e.shape.name))]),i("div",{attrs:{id:"selection-trackers"}},[e._l(e.shape.trackers,function(t){return""!==t.name||0!==t.value?[i("div",{key:"name-"+t.uuid},[e._v(e._s(t.name))]),i("div",{key:"value-"+t.uuid,staticClass:"selection-tracker-value",on:{click:function(i){e.changeValue(t,!1)}}},[0===t.maxvalue?[e._v(e._s(t.value))]:[e._v(e._s(t.value)+" / "+e._s(t.maxvalue))]],2)]:e._e()})],2),i("div",{attrs:{id:"selection-auras"}},[e._l(e.shape.auras,function(t){return""!==t.name||0!==t.value?[i("div",{key:"name-"+t.uuid},[e._v(e._s(t.name))]),i("div",{key:"value-"+t.uuid,staticClass:"selection-tracker-value",on:{click:function(i){e.changeValue(t,!0)}}},[0===t.dim?[e._v(e._s(t.value))]:[e._v(e._s(t.value)+" / "+e._s(t.dim))]],2)]:e._e()})],2)]),i("edit-dialog",{ref:"editDialog",attrs:{shape:e.shape}})],1):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},3481:function(e,t,i){"use strict";i.r(t);var n=i("47e6"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"38c9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("bab4"),s=i("f10f");class o extends n.Layer{invalidate(){this.valid=!1}draw(e){this.valid||this.drawGrid()}drawGrid(){const e=this.ctx;this.clear(),e.beginPath();const t=s.gameStore.gridSize;for(let i=0;it.uuid===e.uuid);this.preFogShapes.splice(t,1)}super.removeShape(e,t,i)}draw(){if(!this.valid){const e=this.ctx;if(r.Settings.skipLightFOW)return e.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);const t=e.globalCompositeOperation;e.clearRect(0,0,this.canvas.width,this.canvas.height),e.fillStyle="rgba(0, 0, 0, 1)";const i=o.layerManager.getLayer("draw").ctx;(r.Settings.drawAngleLines||r.Settings.drawFirstLightHit)&&i.clearRect(0,0,i.canvas.width,i.canvas.height),l.gameStore.fullFOW&&o.layerManager.hasLayer("tokens")&&o.layerManager.getLayer("tokens").shapes.forEach(t=>{if(!t.ownedBy()||!t.isToken)return;const i=t.getBoundingBox(),n=c.g2l(t.center()),s=.8*c.g2lz(i.w);e.beginPath(),e.arc(n.x,n.y,s,0,2*Math.PI);const o=e.createRadialGradient(n.x,n.y,s/2,n.x,n.y,s);o.addColorStop(0,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=o,e.fill()}),this.vCtx.clearRect(0,0,window.innerWidth,window.innerHeight);for(const s of l.gameStore.visionSources){const t=o.layerManager.UUIDMap.get(s.shape);if(void 0===t)continue;const u=t.auras.find(e=>e.uuid===s.aura);if(void 0===u)continue;const h=c.getUnitDistance(u.value+u.dim),f=t.center(),p=c.g2l(f),g=new a.Circle(f,h);if(g.visibleInCanvas(e.canvas))if("bvh"===l.gameStore.visionMode){let t=-1;const s=new Path2D;let o;s.moveTo(p.x,p.y);for(let a=0;a<2*Math.PI;a+=r.Settings.angleSteps/180*Math.PI){const d=new n.GlobalPoint(f.x+h*Math.cos(a),f.y+h*Math.sin(a));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(f.x),c.g2ly(f.y)),i.lineTo(c.g2lx(d.x),c.g2ly(d.y)),i.stroke());const g=n.Ray.fromPoints(f,d),v=l.gameStore.BV.intersect(g);if(0===a&&(o=v.hit?v.intersect:d),v.hit)-1!==t&&(s.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,a),t=-1),s.lineTo(c.g2lx(v.intersect.x),c.g2ly(v.intersect.y));else if(-1===t){t=a;const i=c.g2l(d);e.lineTo(i.x,i.y)}}if(-1===t?s.lineTo(c.g2lx(o.x),c.g2ly(o.y)):s.arc(p.x,p.y,c.g2lr(u.value+u.dim),t,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));t.addColorStop(0,"rgba(0, 0, 0, 1)"),t.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=t}else e.fillStyle="rgba(0, 0, 0, 1)";e.fill(s)}u.lastPath=s}else{this.vCtx.globalCompositeOperation="source-over",this.vCtx.fillStyle="rgba(0, 0, 0, 1)";const t=d.computeVisibility(f,"vision");this.vCtx.beginPath(),this.vCtx.moveTo(c.g2lx(t[0][0]),c.g2ly(t[0][1]));for(const e of t)this.vCtx.lineTo(c.g2lx(e[0]),c.g2ly(e[1]));if(this.vCtx.closePath(),this.vCtx.fill(),u.dim>0){const e=this.vCtx.createRadialGradient(p.x,p.y,c.g2lr(u.value),p.x,p.y,c.g2lr(u.value+u.dim));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),this.vCtx.fillStyle=e}else this.vCtx.fillStyle="rgba(0, 0, 0, 1)";this.vCtx.globalCompositeOperation="source-in",this.vCtx.beginPath(),this.vCtx.arc(p.x,p.y,c.g2lr(u.value+u.dim),0,2*Math.PI),this.vCtx.fill(),e.drawImage(this.virtualCanvas,0,0)}}l.gameStore.fowLOS&&(e.globalCompositeOperation="source-in",e.drawImage(o.layerManager.getLayer("fow-players").canvas,0,0));for(const n of this.preFogShapes){if(!n.visibleInCanvas(this.canvas))continue;const t=n.globalCompositeOperation;l.gameStore.fullFOW||("source-over"===n.globalCompositeOperation?n.globalCompositeOperation="destination-out":"destination-out"===n.globalCompositeOperation&&(n.globalCompositeOperation="source-over")),n.draw(e),n.globalCompositeOperation=t}l.gameStore.fullFOW&&(e.globalCompositeOperation="source-out",e.fillStyle=u.getFogColour(),e.fillRect(0,0,e.canvas.width,e.canvas.height)),super.draw(!1),e.globalCompositeOperation=t}}}t.FOWLayer=h},4486:function(e,t,i){"use strict";i.r(t);var n=i("a097"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"45bf":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"menuContainer"}},[i("div",{ref:"rm",style:{left:e.visible.settings?"200px":"0",top:e.visible.locations?"100px":"0"},attrs:{id:"radialmenu"}},[i("div",{staticClass:"rm-wrapper"},[i("div",{staticClass:"rm-toggler"},[i("ul",{staticClass:"rm-list",class:{"rm-list-dm":e.IS_DM}},[e.IS_DM?i("li",{staticClass:"rm-item",attrs:{id:"rm-locations"},on:{click:function(t){e.visible.locations=!e.visible.locations}}},[e._m(0)]):e._e(),i("li",{staticClass:"rm-item",attrs:{id:"rm-settings"},on:{click:function(t){e.visible.settings=!e.visible.settings}}},[e._m(1)])])]),e._m(2)])]),i("transition",{attrs:{name:"settings"},on:{enter:function(t){e.$refs.rm.style.transition="left 500ms"}}},[e.visible.settings?i("div",{ref:"settings",attrs:{id:"menu"},on:{click:e.settingsClick}},[i("div",{staticStyle:{width:"200px",height:"90%","overflow-y":"auto","overflow-x":"hidden"}},[e.IS_DM?[i("button",{staticClass:"accordion"},[e._v("Assets")]),i("div",{staticClass:"accordion-panel"},[i("a",{staticClass:"actionButton",attrs:{href:"/assets",target:"blank",title:"Open asset manager"}},[i("i",{staticClass:"fas fa-external-link-alt"})]),i("div",{staticClass:"directory",attrs:{id:"menu-tokens"}},[i("asset-node",{attrs:{asset:e.assets}}),e.assets?e._e():i("div",[e._v("No assets")])],1)]),i("button",{staticClass:"accordion"},[e._v("Notes")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel",attrs:{id:"menu-notes"}},[i("a",{staticClass:"actionButton",on:{click:e.createNote}},[i("i",{staticClass:"far fa-plus-square"})]),e._l(e.notes,function(t){return i("div",{key:t.uuid,staticStyle:{cursor:"pointer"},on:{click:function(i){e.openNote(t)}}},[e._v(e._s(t.title||"[?]"))])}),e.notes.length?e._e():i("div",[e._v("No notes")])],2)]),i("button",{staticClass:"accordion"},[e._v("DM Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"useGridInput"}},[e._v("Use grid:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.useGrid,expression:"useGrid"}],attrs:{id:"useGridInput",type:"checkbox",checked:"checked"},domProps:{checked:Array.isArray(e.useGrid)?e._i(e.useGrid,null)>-1:e.useGrid},on:{change:function(t){var i=e.useGrid,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&(e.useGrid=i.concat([o])):r>-1&&(e.useGrid=i.slice(0,r).concat(i.slice(r+1)))}else e.useGrid=s}}}),i("label",{attrs:{for:"useFOWInput"}},[e._v("Fill entire canvas with FOW:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fullFOW,expression:"fullFOW"}],attrs:{id:"useFOWInput",type:"checkbox"},domProps:{checked:Array.isArray(e.fullFOW)?e._i(e.fullFOW,null)>-1:e.fullFOW},on:{change:function(t){var i=e.fullFOW,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&(e.fullFOW=i.concat([o])):r>-1&&(e.fullFOW=i.slice(0,r).concat(i.slice(r+1)))}else e.fullFOW=s}}}),i("label",{attrs:{for:"fowOpacity"}},[e._v("FOW opacity:")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.fowOpacity,expression:"fowOpacity",modifiers:{number:!0}}],attrs:{id:"fowOpacity",type:"number",min:"0",max:"1",step:"0.1"},domProps:{value:e.fowOpacity},on:{input:function(t){t.target.composing||(e.fowOpacity=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"fowLOS"}},[e._v("Only show lights in LoS:")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.fowLOS,expression:"fowLOS"}],attrs:{id:"fowLOS",type:"checkbox"},domProps:{checked:Array.isArray(e.fowLOS)?e._i(e.fowLOS,null)>-1:e.fowLOS},on:{change:function(t){var i=e.fowLOS,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&(e.fowLOS=i.concat([o])):r>-1&&(e.fowLOS=i.slice(0,r).concat(i.slice(r+1)))}else e.fowLOS=s}}}),i("label",{attrs:{for:"unitSizeInput"}},[e._v("Unit Size (in ft.):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.unitSize,expression:"unitSize",modifiers:{number:!0}}],attrs:{id:"unitSizeInput",type:"number"},domProps:{value:e.unitSize},on:{input:function(t){t.target.composing||(e.unitSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"gridSizeInput"}},[e._v("Grid Size (in pixels):")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridSize,expression:"gridSize",modifiers:{number:!0}}],attrs:{id:"gridSizeInput",type:"number",min:"0"},domProps:{value:e.gridSize},on:{input:function(t){t.target.composing||(e.gridSize=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",{domProps:{selected:"bvh"===e.$store.state.game.visionMode}},[e._v("BVH")]),i("option",{domProps:{selected:"triangle"===e.$store.state.game.visionMode}},[e._v("Triangle")])]),i("label",{attrs:{for:"vmininp"}},[e._v("Minimal full vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMin,expression:"visionRangeMin",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmininp",type:"number",min:"0"},domProps:{value:e.visionRangeMin},on:{change:function(t){e.visionRangeMin=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"vmaxinp"}},[e._v("Maximal vision (ft):")]),i("input",{directives:[{name:"model",rawName:"v-model.lazy.number",value:e.visionRangeMax,expression:"visionRangeMax",modifiers:{lazy:!0,number:!0}}],attrs:{id:"vmaxinp",type:"number",min:"0"},domProps:{value:e.visionRangeMax},on:{change:function(t){e.visionRangeMax=e._n(t.target.value)},blur:function(t){e.$forceUpdate()}}}),i("label",{attrs:{for:"invitation"}},[e._v("Invitation Code:")]),i("input",{attrs:{id:"invitation",type:"text",readonly:"readonly"},domProps:{value:e.invitationCode}})])])]:e._e(),i("button",{staticClass:"accordion"},[e._v("Client Options")]),i("div",{staticClass:"accordion-panel"},[i("div",{staticClass:"accordion-subpanel"},[i("label",{attrs:{for:"gridColour"}},[e._v("Grid Colour:")]),i("color-picker",{attrs:{id:"gridColour",color:e.gridColour},on:{"update:color":function(t){e.gridColour=t}}}),i("label",{attrs:{for:"fowColour"}},[e._v("FOW Colour:")]),i("color-picker",{attrs:{id:"fowColour",color:e.fowColour},on:{"update:color":function(t){e.fowColour=t}}}),i("label",{attrs:{for:"rulerColour"}},[e._v("Ruler Colour:")]),i("color-picker",{attrs:{id:"rulerColour",color:e.rulerColour},on:{"update:color":function(t){e.rulerColour=t}}})],1)])],2),i("router-link",{staticClass:"accordion",staticStyle:{"text-decoration":"none",display:"inline-block",position:"absolute",bottom:"0"},attrs:{to:"/dashboard"}},[e._v("Exit")])],1):e._e()]),i("transition",{attrs:{name:"locations"},on:{enter:function(t){e.$refs.rm.style.transition="top 500ms"}}},[e.IS_DM&&e.visible.locations?i("div",{attrs:{id:"locations-menu"}},[i("div",[e._l(e.locations,function(t){return i("div",{key:t,on:{click:function(i){e.changeLocation(t)}}},[e._v(e._s(t))])}),i("div",{on:{click:e.createLocation}},[i("i",{staticClass:"fas fa-plus"})])],2)]):e._e()]),i("img",{attrs:{id:"dragImage"}})],1)},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"far fa-compass"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("a",{attrs:{href:"#"}},[i("i",{staticClass:"fas fa-cog"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",{staticClass:"rm-topper"},[i("i",{staticClass:"icon-share-alt"})])}];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},4709:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1"),c=i("5a5c");class u extends o.Shape{constructor(e,t,i,n,s){super(e,i,n,s),this.type="circle",this.r=t||1}asDict(){return Object.assign(this.getBaseDict(),{radius:this.r})}fromDict(e){super.fromDict(e),this.r=e.radius}getBoundingBox(){return new s.BoundingRect(new n.GlobalPoint(this.refPoint.x-this.r,this.refPoint.y-this.r),2*this.r,2*this.r)}get points(){return this.getBoundingBox().points}draw(e){super.draw(e),e.beginPath(),"fog"===this.fillColour?e.fillStyle=c.getFogColour():e.fillStyle=this.fillColour;const t=l.g2l(this.refPoint);e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.beginPath(),e.lineWidth=l.g2lz(5),e.strokeStyle=this.strokeColour,e.arc(t.x,t.y,l.g2lz(this.r),0,2*Math.PI),e.stroke())}contains(e){return Math.pow(e.x-this.refPoint.x,2)+Math.pow(e.y-this.refPoint.y,2){const t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t){return e.toLowerCase()t(e)?i[1].push(e):i[0].push(e)),i}function u(e,t,i,n){const s=.2*Number(e.font.split("px")[0]),o=e.measureText(t).width;return Math.min(i/o,n/s)}function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,e=>{return"%"+e.charCodeAt(0).toString(16)})}t.uuidv4=s,t.capitalize=o,t.alphSort=r,t.getHTMLFont=a,t.getHTMLTextWidth=l,t.partition=c,t.calcFontScale=u,t.fixedEncodeURIComponent=d;class h{constructor(){this.keys=[],this.values=[]}get length(){return this.keys.length}get(e){return this.values[this.keys.indexOf(e)]}getIndexValue(e){return this.values[e]}getIndexKey(e){return this.keys[e]}set(e,t){this.keys.push(e),this.values.push(t)}has(e){return this.indexOf(e)>=0}indexOf(e){return this.keys.indexOf(e)}remove(e){const t=this.indexOf(e);this.keys.splice(t,1),this.values.splice(t,1)}}function f(){return n.app.$children[0].$refs.activeComponent}function p(e){const t=n.app.$children[0].$refs.activeComponent;return t.$refs[e]}t.OrderedMap=h,t.getComponent=f,t.getRef=p},"4aec":function(e,t,i){"use strict";i.r(t);var n=i("a755"),s=i("f51a");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="contextMenu.vue",t["default"]=a.exports},"4aee":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("98ef");function s(e){return(e+2)%3}function o(e){return(e+1)%3}function r(e,t){const i=new n.EdgeCirculator(e,null);if(i.valid)do{const s=3-i.t.indexV(e)-i.ri,o=i.t.vertices[s];if(!o.infinite){if(o===t)return{includes:!0,vi:t,fr:i.t,i:i.ri};{const s=c(e.point,t.point,o.point);if(s===n.Sign.COLLINEAR&&a(e.point,o.point,t.point))return{includes:!0,vi:o,fr:i.t,i:i.ri}}}}while(i.next());return{includes:!1}}function a(e,t,i){let s,o;return l(0,e,i)===n.Sign.EQUAL?(s=l(1,e,t),o=l(1,t,i)):(s=l(0,e,t),o=l(0,t,i)),s===n.Sign.SMALLER&&o===n.Sign.SMALLER||s===n.Sign.LARGER&&o===n.Sign.LARGER}function l(e,t,i){return t[e]i[e]?n.Sign.LARGER:n.Sign.EQUAL}function c(e,t,i){const s=e[0],o=e[1],r=t[0],a=t[1],l=i[0],c=i[1],d=r-s,h=a-o,f=l-s,p=c-o,g=u(d,h,f,p);let v=Math.abs(d),m=Math.abs(h);const y=Math.abs(f),b=Math.abs(p);if(vm&&([v,m]=[m,v]),v<2e-162&&0===v)return n.Sign.ZERO;if(m<1e153){const e=Number.EPSILON*v*m;if(g>e)return n.Sign.POSITIVE;if(g<-e)return n.Sign.NEGATIVE}return n.Sign.ZERO}function u(e,t,i,n){return e*n-t*i}function d(e,t,i){return u(t[0]-e[0],t[1]-e[1],i[0]-e[0],i[1]-e[1])<0}function h(e,t,i){if(!e.isInfinite())return f(e.vertices[0].point,e.vertices[1].point,e.vertices[2].point,t,i);throw new Error("SSS")}function f(e,t,i,s,o){const r=m(e,t,i,s);if(r!==n.Sign.ON_ORIENTED_BOUNDARY||!o)return r;const a=[e,t,i,s];a.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);for(const l of a.reverse()){if(l===s)return n.Sign.ON_NEGATIVE_SIDE;let o=c(e,t,s);if(l===i&&o!==n.Sign.COLLINEAR)return o;if(o=c(e,s,i),l===t&&o!==n.Sign.COLLINEAR)return o;if(o=c(s,t,i),l===e&&o!==n.Sign.COLLINEAR)return o}return n.Sign.ON_NEGATIVE_SIDE}function p(e,t){return e[0]===t[0]&&e[1]===t[1]}function g(e,t){return e[0]y&&([m,y]=[y,m]),m<1e-73&&0===m)return n.Sign.ON_ORIENTED_BOUNDARY;if(y<1e76){const e=Number.EPSILON*m*y*(y*y);if(v>e)return n.Sign.ON_POSITIVE_SIDE;if(v<-e)return n.Sign.ON_NEGATIVE_SIDE}return n.Sign.ZERO}function y(e,t,i,s){switch(c(e,t,i)){case n.Sign.LEFT_TURN:return c(i,s,t)!==n.Sign.RIGHT_TURN;case n.Sign.RIGHT_TURN:return c(i,s,t)!==n.Sign.LEFT_TURN;case n.Sign.COLLINEAR:return!0}}function b(e,t,i,s){switch(c(e,t,i)){case n.Sign.LEFT_TURN:return c(e,t,s)!==n.Sign.LEFT_TURN;case n.Sign.RIGHT_TURN:return c(e,t,s)!==n.Sign.RIGHT_TURN;case n.Sign.COLLINEAR:return!0}}function _(e,t,i,n){const s=x(e,t,i,n);switch(s.intersectionType){case S.POINT:return s.point;case S.NO_INTERSECTION:return null}throw new Error("sdfgighowen")}var S;function w(e,t){if(e[0]===t[0])return[1,0,-e[0]];if(e[1]===t[1])return[0,1,-e[1]];const i=t[0]-e[0],n=t[1]-e[1];return[-n,i,-i*e[1]+n*e[0]]}function x(e,t,i,n){if(!C(e,t,i,n))return{intersectionType:S.NO_INTERSECTION,point:null};const s=w(e,t),o=w(i,n),r=M(s,o);switch(r.intersectionType){case S.POINT:return r}throw new Error("gzseuihgpib")}function M(e,t){const i=e[0]*t[1]-t[0]*e[1],n=e[1]*t[2]-t[1]*e[2],s=t[0]*e[2]-e[0]*t[2];return{intersectionType:S.POINT,point:[n/i,s/i]}}function C(e,t,i,s){if(g(e,t)){if(g(i,s)){if(g(t,i)||g(s,e))return!1}else if(g(t,s)||g(i,e))return!1}else if(g(i,s)){if(g(e,i)||g(s,t))return!1}else if(g(e,s)||g(i,t))return!1;if(g(e,t))if(g(i,s))switch(v(e,i)){case n.Sign.SMALLER:switch(v(t,i)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(t,s)){case n.Sign.SMALLER:return y(e,t,i,s);case n.Sign.EQUAL:return!0;default:return b(e,t,i,s)}}case n.Sign.EQUAL:return!0;default:switch(v(s,e)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(s,t)){case n.Sign.SMALLER:return y(i,s,e,t);case n.Sign.EQUAL:return!0;default:return b(i,s,e,t)}}}else switch(v(e,s)){case n.Sign.SMALLER:switch(v(t,s)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(t,i)){case n.Sign.SMALLER:return y(e,t,s,i);case n.Sign.EQUAL:return!0;default:return b(e,t,s,i)}}case n.Sign.EQUAL:return!0;default:switch(v(i,e)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(i,t)){case n.Sign.SMALLER:return y(s,i,e,t);case n.Sign.EQUAL:return!0;default:return b(s,i,e,t)}}}else if(g(i,s))switch(v(t,i)){case n.Sign.SMALLER:switch(v(e,i)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(e,s)){case n.Sign.SMALLER:return y(t,e,i,s);case n.Sign.EQUAL:return!0;default:return b(t,e,i,s)}}case n.Sign.EQUAL:return!0;default:switch(v(s,t)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(s,e)){case n.Sign.SMALLER:return y(i,s,t,e);case n.Sign.EQUAL:return!0;default:return b(i,s,t,e)}}}else switch(v(t,s)){case n.Sign.SMALLER:switch(v(e,s)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(e,i)){case n.Sign.SMALLER:return y(t,e,s,i);case n.Sign.EQUAL:return!0;default:return b(t,e,s,i)}}case n.Sign.EQUAL:return!0;default:switch(v(i,t)){case n.Sign.SMALLER:return!1;case n.Sign.EQUAL:return!0;default:switch(v(i,e)){case n.Sign.SMALLER:return y(s,i,t,e);case n.Sign.EQUAL:return!0;default:return b(s,i,t,e)}}}}function L(e){if(e!==e)return e;if(e===-1/0)return-Number.MAX_VALUE;if(e===1/0)return 1/0;if(e===+Number.MAX_VALUE)return 1/0;let t=e*(e<0?1-Number.EPSILON/2:1+Number.EPSILON);t===e&&(t=Number.MIN_VALUE*Number.EPSILON>0?e+Number.MIN_VALUE*Number.EPSILON:e+Number.MIN_VALUE),t===1/0&&(t=+Number.MAX_VALUE);const i=e+(t-e)/2;ewindow.innerWidth-100&&(t=window.innerWidth-100),i<0&&(i=0),i>window.innerHeight-100&&(i=window.innerHeight-100),this.$refs.container.style.left=t+"px",this.$refs.container.style.top=i+"px",this.$refs.container.style.display="block"}dragOver(e){this.dragging&&(this.$refs.container.style.display="none")}};n.__decorate([r.Prop(Boolean)],a.prototype,"visible",void 0),n.__decorate([r.Prop({type:Boolean,default:!0})],a.prototype,"mask",void 0),a=n.__decorate([o.default],a),t.default=a},5338:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("8055")),o=i("2d5b");t.socket=s.default(location.protocol+"//"+location.host+"/pa_assetmgmt",{autoConnect:!1}),t.socket.on("connect",()=>{console.log("Connected")}),t.socket.on("disconnect",()=>{console.log("Disconnected")}),t.socket.on("redirect",e=>{console.log("redirecting"),window.location.href=e}),t.socket.on("Folder.Root.Set",e=>{o.assetStore.setRoot(e)}),t.socket.on("Folder.Set",e=>{if(o.assetStore.clear(),e.children)for(const t of e.children)o.assetStore.idMap.set(t.id,t),t.file_hash?o.assetStore.files.push(t.id):o.assetStore.folders.push(t.id)}),t.socket.on("Folder.Create",e=>{o.assetStore.folders.push(e.id),o.assetStore.idMap.set(e.id,e)}),t.socket.on("Asset.Upload.Finish",e=>{o.assetStore.idMap.set(e.id,e),o.assetStore.files.push(e.id)})},"550a":function(e,t,i){"use strict";var n=i("f8a4"),s=i.n(n);s.a},"561b":function(e,t,i){"use strict";var n=i("a450"),s=i.n(n);s.a},5722:function(e,t,i){},"574e":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("92b1"),a=i("5a5c");class l extends o.Shape{constructor(e,t,i,n,s){super(e,"rgba(0, 0, 0, 0)",n||"#000",s),this.type="multiline",this._points=[],this._points=t||[],this.lineWidth=i||3}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._points=e.points.map(e=>new n.GlobalPoint(e.x,e.y))}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,o=this.refPoint.y;for(const n of this._points)n.xt&&(t=n.x),n.yo&&(o=n.y);return new s.BoundingRect(new n.GlobalPoint(e,i),t-e,o-i)}draw(e){super.draw(e),e.beginPath(),e.lineCap="round",e.lineJoin="round",e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y));for(const t of this._points)e.lineTo(r.g2lx(t.x),r.g2ly(t.y));"fog"===this.strokeColour?e.strokeStyle=a.getFogColour():e.strokeStyle=this.strokeColour,e.lineWidth=r.g2lz(this.lineWidth),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=r.l2g(t):this._points[e-1]=r.l2g(t)}}t.MultiLine=l},"58c7":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"outer",on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}},[i("div",{staticClass:"current-color",style:e.transparent?"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)":"background-color:"+e.color,on:{click:function(t){return t.target!==t.currentTarget?null:e.open(t)}}}),i("div",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],staticClass:"mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.closePicker(t)}}}),i("chrome-picker",{directives:[{name:"show",rawName:"v-show",value:e.display,expression:"display"}],ref:"chromePicker",style:{position:"fixed",left:e.left+"px",top:e.top+"px","z-index":9999},attrs:{value:e.color,tabindex:"-1"},on:{input:e.updateColor}})],1)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"59d8":function(e,t,i){"use strict";i.r(t);var n=i("e5ca"),s=i("6f8d");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("a7b3");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"639cd890",null);a.options.__file="draw.vue",t["default"]=a.exports},"5a5c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("66cb")),o=i("8f0a"),r=i("f10f");function a(e){return new o.LocalPoint(e.pageX,e.pageY)}function l(e=!1){const t=s.default(r.gameStore.fowColour);return r.gameStore.IS_DM?t.setAlpha(e?1:r.gameStore.fowOpacity):t.setAlpha(1),t.toRgbString()}t.getMouse=a,t.getFogColour=l},"5a81":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importStar(i("66cb")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("2f62"),l=n.__importDefault(i("3b36")),c=n.__importDefault(i("d65f")),u=i("4a5b"),d=i("8f0a"),h=i("6f92"),f=i("1327"),p=i("f10f"),g=i("92b1"),v=i("60a3");let m=class extends o.default{constructor(){super(...arguments),this.x=0,this.y=0,this.visible=!1,this.text="X",this.fillColour="rgba(255, 255, 255, 1)",this.borderColour="rgba(0, 0, 0, 1)"}mounted(){this.updatePreview()}onTextChange(e,t){this.updatePreview()}onFillChange(e,t){this.updatePreview()}onBorderChange(e,t){this.updatePreview()}open(e,t){this.visible=!0,this.x=e,this.y=t}submit(){const e=h.layerManager.getLayer();if(void 0===e)return;const t=new f.CircularToken(g.l2g(new d.LocalPoint(this.x,this.y)),g.getUnitDistance(p.gameStore.unitSize/2),this.text,"10px serif",this.fillColour,this.borderColour);t.addOwner(p.gameStore.username),e.addShape(t,!0),e.invalidate(!1),this.visible=!1}updatePreview(){const e=this.$refs.canvas.getContext("2d");e.clearRect(0,0,e.canvas.width,e.canvas.height),e.beginPath();const t={x:e.canvas.width/2,y:e.canvas.height/2},i=.9*Math.min(t.x,t.y);e.fillStyle=this.fillColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.fill(),"rgba(0, 0, 0, 0)"!==this.borderColour&&(e.beginPath(),e.lineWidth=5,e.strokeStyle=this.borderColour,e.arc(t.x,t.y,i,0,2*Math.PI),e.stroke()),e.save(),e.textAlign="center",e.textBaseline="middle";const n=u.calcFontScale(e,this.text,i,i),o=0;e.transform(n,o,-o,n,t.x,t.y),e.fillStyle=s.mostReadable(this.fillColour,["#000","#fff"]).toHexString(),e.fillText(this.text,0,0),e.restore()}};n.__decorate([v.Watch("text")],m.prototype,"onTextChange",null),n.__decorate([v.Watch("fillColour")],m.prototype,"onFillChange",null),n.__decorate([v.Watch("borderColour")],m.prototype,"onBorderChange",null),m=n.__decorate([r.default({components:{Modal:c.default,"color-picker":l.default},computed:Object.assign({},a.mapState("game",["unitSize"]))})],m),t.default=m},"5ae5":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d65f")),a=i("4a5b"),l=i("f10f");let c=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.note=null}open(e){this.visible=!0,this.note=e}calcHeight(){if(this.$refs.textarea){const e=this.$refs.textarea;return e.style.height="auto",e.style.height=e.scrollHeight+"px",e.scrollHeight+"px"}return"100px"}updateNote(){this.note&&l.gameStore.updateNote({note:this.note,sync:!0})}removeNote(){a.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{e&&this.note&&(l.gameStore.removeNote({note:this.note,sync:!0}),this.visible=!1)},()=>{})}};c=n.__decorate([o.default({components:{Modal:r.default}})],c),t.default=c},"5b4c":function(e,t,i){"use strict";var n=i("c6fe"),s=i.n(n);s.a},"5b69":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("65d9")),o=i("60a3"),r=n.__importDefault(i("3b36")),a=n.__importDefault(i("ea6a")),l=i("0bc6"),c=i("8f0a"),u=i("6f92"),d=i("4709"),h=i("5e7c"),f=i("574e"),p=i("e4ea"),g=i("b2ed"),v=i("f10f"),m=i("92b1"),y=i("5a5c");let b=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.ruler=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","draw-polygon","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=m.getUnitDistance(v.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:m.getUnitDistance(this.unitSize)/8}get IS_DM(){return v.gameStore.IS_DM}get unitSize(){return v.gameStore.unitSize}get useGrid(){return v.gameStore.useGrid}onFillChange(){this.brushHelper&&(this.brushHelper.fillColour=this.fillColour)}onModeUpdate(e,t){this.onModeChange(e,t)}setupBrush(){null!==this.brushHelper&&("reveal"===this.modeSelect||"hide"===this.modeSelect?(this.brushHelper.options.set("preFogShape",!0),this.brushHelper.options.set("skipDraw",!0),this.brushHelper.fillColour="rgba(0, 0, 0, 1)","reveal"===this.modeSelect?this.brushHelper.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.brushHelper.globalCompositeOperation="destination-out")):(this.brushHelper.options.delete("preFogShape"),this.brushHelper.options.delete("skipDraw"),this.brushHelper.globalCompositeOperation="source-over",this.brushHelper.fillColour=this.fillColour))}onModeChange(e,t){if(null===this.brushHelper)return;const i=u.layerManager.getLayer("fow"),n=u.layerManager.getLayer();void 0!==i&&void 0!==n&&(this.setupBrush(),"normal"!==e&&"normal"===t?(n.removeShape(this.brushHelper,!1),i.addShape(this.brushHelper,!1)):"normal"===e&&"normal"!==t&&(n.addShape(this.brushHelper,!1),i.removeShape(this.brushHelper,!1)))}getLayer(){return"normal"===this.modeSelect?u.layerManager.getLayer():u.layerManager.getLayer("fow")}onMouseDown(e){const t=this.getLayer();if(void 0!==t){if(this.active)null!==this.shape&&this.shape instanceof p.Polygon&&this.shape._vertices.push(m.l2g(y.getMouse(e)));else{switch(this.startPoint=m.l2g(y.getMouse(e)),this.active=!0,this.shapeSelect){case"square":this.shape=new g.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);break;case"circle":this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);break;case"paint-brush":this.shape=new f.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour;break;case"draw-polygon":this.shape=new p.Polygon(this.startPoint.clone(),[],this.fillColour,this.borderColour);break;default:return}"normal"!==this.modeSelect&&(this.shape.options.set("preFogShape",!0),this.shape.options.set("skipDraw",!0),this.shape.fillColour="rgba(0, 0, 0, 1)"),"reveal"===this.modeSelect?this.shape.globalCompositeOperation="source-over":"hide"===this.modeSelect&&(this.shape.globalCompositeOperation="destination-out"),this.shape.addOwner(v.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),t.addShape(this.shape,!0,!1,!1),this.pushBrushBack()}if(null!==this.shape&&this.shape instanceof p.Polygon){const i=m.l2g(y.getMouse(e));null===this.ruler?(this.ruler=new h.Line(i,i,3,"black"),t.addShape(this.ruler,!1)):(this.ruler.refPoint=i,this.ruler.endPoint=i),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0),t.invalidate(!1),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0})}}else console.log("No active layer!")}onMouseMove(e){const t=m.l2g(y.getMouse(e)),i=this.getLayer();if(void 0!==i){if(null!==this.brushHelper&&(this.brushHelper.r=this.helperSize,this.brushHelper.refPoint=t,this.active||i.invalidate(!1)),this.active&&null!==this.startPoint&&null!==this.shape){switch(this.shapeSelect){case"square":this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint=new c.GlobalPoint(Math.min(this.startPoint.x,t.x),Math.min(this.startPoint.y,t.y));break;case"circle":this.shape.r=t.subtract(this.startPoint).length();break;case"paint-brush":this.shape._points.push(t);break;case"draw-polygon":this.ruler.endPoint=t;break}this.shape instanceof p.Polygon||(l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&v.gameStore.recalculateVision(!0)),i.invalidate(!1)}}else console.log("No active layer!")}onMouseUp(e){!this.active||null===this.shape||this.shape instanceof p.Polygon||(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.finaliseShape())}onContextMenu(e){if(!this.active||null===this.shape||!(this.shape instanceof p.Polygon))return;const t=this.getLayer();void 0!==t?(t.removeShape(this.ruler,!1),this.ruler=null,this.finaliseShape()):console.log("No active layer!")}finaliseShape(){null!==this.shape&&(this.shape.visionObstruction&&v.gameStore.recalculateVision(),this.shape.movementObstruction&&v.gameStore.recalculateMovement(),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!1}),this.active=!1)}onSelect(){const e=this.getLayer();void 0!==e&&(this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1))}onDeselect(){const e=this.getLayer();null!==this.brushHelper&&void 0!==e&&e.removeShape(this.brushHelper,!1),this.active&&void 0!==e&&null!==this.shape&&(e.removeShape(this.shape,!0,!1),this.shape=null,this.active=!1,e.invalidate(!1))}pushBrushBack(){const e=this.getLayer();void 0!==e?(null!==this.brushHelper&&e.removeShape(this.brushHelper,!1),this.brushHelper=new d.Circle(new c.GlobalPoint(-1e3,-1e3),this.brushSize/2,this.fillColour),this.setupBrush(),e.addShape(this.brushHelper,!1)):console.log("No active layer!")}};n.__decorate([o.Watch("fillColour")],b.prototype,"onFillChange",null),n.__decorate([o.Watch("modeSelect")],b.prototype,"onModeUpdate",null),b=n.__decorate([s.default({components:{"color-picker":r.default}})],b),t.default=b},"5e7c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("92b1");class a extends o.Shape{constructor(e,t,i,n,s){super(e,"rgba(0, 0, 0, 0)",n||"#000",s),this.type="line",this.endPoint=t,this.lineWidth=void 0===i?1:i}asDict(){return Object.assign(this.getBaseDict(),{x2:this.endPoint.x,y2:this.endPoint.y,line_width:this.lineWidth})}get points(){return[[this.refPoint.x,this.refPoint.y],[this.endPoint.x,this.endPoint.y]]}getBoundingBox(){return new s.BoundingRect(new n.GlobalPoint(Math.min(this.refPoint.x,this.endPoint.x),Math.min(this.refPoint.y,this.endPoint.y)),Math.abs(this.refPoint.x-this.endPoint.x),Math.abs(this.refPoint.y-this.endPoint.y))}draw(e){super.draw(e),e.strokeStyle=this.strokeColour,e.beginPath(),e.moveTo(r.g2lx(this.refPoint.x),r.g2ly(this.refPoint.y)),e.lineTo(r.g2lx(this.endPoint.x),r.g2ly(this.endPoint.y)),e.lineWidth=this.lineWidth,e.stroke()}contains(e){return!1}center(e){}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this.refPoint=r.l2g(t):this.endPoint=r.l2g(t)}}t.Line=a},"5f86":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("8c4f"));o.default.use(r.default);const a=n.__importDefault(i("e914")),l=n.__importDefault(i("1077")),c=n.__importDefault(i("cad7")),u=n.__importDefault(i("47f7")),d=n.__importDefault(i("c6b4")),h=n.__importDefault(i("07f5")),f=n.__importDefault(i("ce87")),p=i("cc67");t.router=new r.default({mode:"history",base:"/",routes:[{path:"/",redirect:"/dashboard"},{path:"/_load",name:"load",component:u.default},{path:"/assets",component:a.default,meta:{auth:!0}},{path:"/auth",component:{template:""},children:[{path:"login",component:l.default},{path:"logout",component:c.default}]},{path:"/invite/:code",component:f.default,meta:{auth:!0}},{path:"/dashboard",component:d.default,meta:{auth:!0}},{path:"/game/:creator/:room",component:h.default,meta:{auth:!0}}]}),t.router.beforeEach((e,i,n)=>{p.coreStore.initialized||"/_load"===e.path?e.matched.some(e=>e.meta.auth)&&!p.coreStore.authenticated?n({path:"/auth/login",query:{redirect:e.path}}):n():(n({path:"/_load"}),s.default.get("/api/auth").then(i=>{i.data.auth&&(p.coreStore.setAuthenticated(!0),p.coreStore.setUsername(i.data.username)),p.coreStore.setInitialized(!0),t.router.push(e.path)}).catch(()=>{console.error("Authentication check could not be fulfilled.")}))})},"5fa9":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9"));let r=class extends s.default{constructor(){super(...arguments),this.name="",this.selected=!1,this.active=!1}get detailRight(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2;return`${window.innerWidth-Math.min(window.innerWidth-25,t+75)}px`}get detailArrow(){const e=this.$parent.$refs[this.name+"-selector"][0].getBoundingClientRect(),t=e.left+e.width/2,i=Math.min(window.innerWidth-25,t+75);return`${i-t-14}px`}created(){this.$parent.$on("mousedown",(e,t)=>{t===this.name&&this.onMouseDown(e)}),this.$parent.$on("mouseup",(e,t)=>{t===this.name&&this.onMouseUp(e)}),this.$parent.$on("mousemove",(e,t)=>{t===this.name&&this.onMouseMove(e)}),this.$parent.$on("contextmenu",(e,t)=>{t===this.name&&this.onContextMenu(e)}),this.$parent.$on("tools-select-change",(e,t)=>{t===this.name?(this.selected=!1,this.onDeselect()):e===this.name&&(this.selected=!0,this.onSelect())})}onSelect(){}onDeselect(){}onMouseDown(e){}onMouseUp(e){}onMouseMove(e){}onContextMenu(e){}};r=n.__decorate([o.default],r),t.default=r},6100:function(e,t,i){"use strict";i.r(t);var n=i("8a30"),s=i("e94f");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("550a");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"1fee50f5",null);a.options.__file="tools.vue",t["default"]=a.exports},6465:function(e,t,i){"use strict";i.r(t);var n=i("5fa9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"64a9":function(e,t,i){},6542:function(e,t,i){},"6c30":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("c266"),s=i("f10f"),o=i("92b1");class r extends n.BaseRect{constructor(e,t,i,n,s){super(t,i,n,void 0,void 0,s),this.type="assetrect",this.src="",this.img=e}asDict(){return Object.assign(this.getBaseDict(),{src:this.src})}fromDict(e){super.fromDict(e),this.src=e.src}draw(e){super.draw(e);try{e.drawImage(this.img,o.g2lx(this.refPoint.x),o.g2ly(this.refPoint.y),o.g2lz(this.w),o.g2lz(this.h))}catch(t){console.warn(`Shape ${this.uuid} could not load the image ${this.src}`)}}getInitiativeRepr(){return{uuid:this.uuid,visible:!s.gameStore.IS_DM,group:!1,source:this.src,has_img:!0,effects:[],index:1/0}}}t.Asset=r},"6e4a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("98ef"),s=i("4aee");class o{constructor(){this.tds=new n.TDS}insertConstraint(e,t){const i=this.insert(e),n=this.insert(t);i!==n&&this.insertConstraintV(i,n)}insertConstraintV(e,t){const i=[[e,t]];while(i.length>0){const e=i.pop(),t=s.edgeInfo(e[0],e[1]);if(t.includes){this.markConstraint(t.fr,t.i),t.vi!==e[1]&&i.push([t.vi,e[1]]);continue}const n=this.findIntersectedFaces(e[0],e[1]);n.found?n.vi!==e[0]&&n.vi!==e[1]?(i.push([e[0],n.vi]),i.push([n.vi,e[1]])):i.push(e):(this.triangulateHole(n.intersectedFaces,n.listAB,n.listBA),n.vi!==e[1]&&i.push([n.vi,e[1]]))}}triangulateHole(e,t,i){const n=[];this.triangulateHole2(e,t,i,n),this.propagatingFlipE(n)}triangulateHole2(e,t,i,n){if(t.length>0){this.triangulateHalfHole(t,n),this.triangulateHalfHole(i,n);const s=t[0][0],o=i[0][0];s.neighbours[2]=o,o.neighbours[2]=s,s.constraints[2]=!0,o.constraints[2]=!0;while(e.length>0)this.tds.deleteTriangle(e.shift())}}triangulateHalfHole(e,t){let i,o,r=0;const a=()=>e[r],l=()=>e[i],c=a()[0].vertices[s.ccw(a()[1])];let u,d,h,f,p,g;i=r,++i;do{d=a()[0],p=a()[1],null!==d.neighbours[p]&&(u=d.neighbours[p],f=s.cw(u.indexV(d.vertices[s.cw(p)])),d=u.neighbours[f],p=this.tds.mirrorIndex(u,f)),h=l()[0],g=l()[1],null!==h.neighbours[g]&&(u=h.neighbours[g],f=s.cw(u.indexV(h.vertices[s.cw(g)])),h=u.neighbours[f],g=this.tds.mirrorIndex(u,f));const v=d.vertices[s.ccw(p)],m=d.vertices[s.cw(p)],y=h.vertices[s.cw(g)],b=s.orientation(v.point,m.point,y.point);switch(b){case n.Sign.RIGHT_TURN:{const n=this.tds.createTriangle(v,y,m,null,null,null);t.push([n,2]),n.neighbours[1]=d,n.neighbours[0]=h,d.neighbours[p]=n,h.neighbours[g]=n,d.isConstrained(p)&&(n.constraints[1]=!0),h.isConstrained(g)&&(n.constraints[0]=!0),v.triangle=n,m.triangle=n,y.triangle=n,o=r+1,e.splice(r,0,[n,2]),e.splice(Math.max(o,i),1),e.splice(Math.min(o,i),1),i=r,v!==c?--r:++i;break}case n.Sign.LEFT_TURN:case n.Sign.COLLINEAR:++r,++i;break}}while(i0){t=r[0][0],a=r[0][1],l=t.neighbours[a],c=this.tds.mirrorIndex(t,a),u=[t,a],r.splice(r.findIndex(e=>e[0]===u[0]&&e[1]===u[1]),1),d[0]=[t,s.cw(a)],d[1]=[t,s.ccw(a)],d[2]=[l,s.cw(c)],d[3]=[l,s.ccw(c)];for(const e of d){const t=e[0],i=e[1];n=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,n)?r.splice(r.findIndex(t=>t[0]===e[0]&&t[1]===e[1]),1):r.splice(r.findIndex(e=>e[0]===n[0]&&e[1]===n[1]),1)}this.flip(t,a);for(const e of d){const t=e[0],i=e[1];this.isFlipable(t,i)&&(n=[t.neighbours[i],this.tds.mirrorIndex(t,i)],this.lessEdge(e,n)?r.push(e):r.push(n))}}}flip(e,t){const i=e.neighbours[t],n=this.tds.mirrorIndex(e,t),o=e.neighbours[s.cw(t)],r=this.tds.mirrorIndex(e,s.cw(t)),a=e.neighbours[s.ccw(t)],l=this.tds.mirrorIndex(e,s.ccw(t)),c=i.neighbours[s.cw(n)],u=this.tds.mirrorIndex(i,s.cw(n)),d=i.neighbours[s.ccw(n)],h=this.tds.mirrorIndex(i,s.ccw(n));this.tds.flip(e,t),e.constraints[e.indexT(i)]=!1,i.constraints[i.indexT(e)]=!1,o.neighbours[r].constraints[this.tds.mirrorIndex(o,r)]=o.constraints[r],a.neighbours[l].constraints[this.tds.mirrorIndex(a,l)]=a.constraints[l],c.neighbours[u].constraints[this.tds.mirrorIndex(c,u)]=c.constraints[u],d.neighbours[h].constraints[this.tds.mirrorIndex(d,h)]=d.constraints[h]}isFlipable(e,t,i=!0){const o=e.neighbours[t];return!e.isInfinite()&&!o.isInfinite()&&(!e.constraints[t]&&s.sideOfOrientedCircle(o,e.vertices[t].point,i)===n.Sign.ON_POSITIVE_SIDE)}insertb(e,t,i,o){let r,a,l=!1;i===n.LocateType.EDGE&&t.isConstrained(o)&&(l=!0,r=t.vertices[s.ccw(o)],a=t.vertices[s.cw(o)]);const c=this.insertc(e,t,i,o);return l?this.updateConstraintsIncident(c,r,a):i!==n.LocateType.VERTEX&&this.clearConstraintsIncident(c),2===this.tds.dimension&&this.updateConstraintsOpposite(c),c}updateConstraintsIncident(e,t,i){if(0!==this.tds.dimension)if(1===this.tds.dimension){const t=new n.EdgeCirculator(e,null);do{t.t.constraints[2]=!0}while(t.next())}else{const o=new n.FaceCirculator(e,null);do{const n=o.t.indexV(e),r=s.cw(n),a=s.ccw(n);o.t.vertices[r]===t||o.t.vertices[r]===i?(o.t.constraints[a]=!0,o.t.constraints[r]=!1):(o.t.constraints[a]=!1,o.t.constraints[r]=!0)}while(o.next())}}clearConstraintsIncident(e){const t=new n.EdgeCirculator(e,null);if(t.valid)do{const e=t.t,i=t.ri;e.constraints[i]=!1,2===this.tds.dimension&&(e.neighbours[i].constraints[this.tds.mirrorIndex(e,i)]=!1)}while(t.next())}insertc(e,t,i,s){if(1===this.tds.vertices.length)return this.insertFirst(e);if(2===this.tds.vertices.length)return i===n.LocateType.VERTEX?this.tds.finiteVertex:this.insertSecond(e);switch(i){case n.LocateType.VERTEX:return t.vertices[s];case n.LocateType.OUTSIDE_AFFINE_HULL:return this.insertOutsideAffineHull(e);case n.LocateType.OUTSIDE_CONVEX_HULL:return this.insertOutsideConvexHull(e,t);case n.LocateType.EDGE:return this.insertInEdge(e,t,s);case n.LocateType.FACE:return this.insertInFace(e,t)}throw new Error("qwe")}insertInEdge(e,t,i){const n=this.tds.insertInEdge(t,i);return n.point=e,n}insertInFace(e,t){const i=this.tds.insertInFace(t);return i.point=e,i}insertFirst(e){const t=this.tds.insertDimUp();return t.point=e,t}insertSecond(e){const t=this.tds.insertDimUp(this.tds._infinite,!0);return t.point=e,t}insertOutsideAffineHull(e){let t=!1;if(1===this.tds.dimension){const i=this.tds.finiteEdge.first,o=s.orientation(i.vertices[0].point,i.vertices[1].point,e);t=o===n.Sign.COUNTERCLOCKWISE}const i=this.tds.insertDimUp(this.tds._infinite,t);return i.point=e,i}insertOutsideConvexHull(e,t){let i;if(1===this.tds.dimension)throw new Error("sdfasdasd");return i=this.insertOutsideConvexHull2(e,t),i.point=e,i}insertOutsideConvexHull2(e,t){let i=t.indexV(this.tds._infinite);const o=[],r=[];let a=new n.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.prev(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[s.ccw(i)].point,r=a.t.vertices[s.cw(i)].point;s.orientation(e,t,r)===n.Sign.LEFT_TURN?o.push(a.t):l=!0}a=new n.FaceCirculator(this.tds._infinite,t),l=!1;while(!l){a.next(),i=a.t.indexV(this.tds._infinite);const t=a.t.vertices[s.ccw(i)].point,o=a.t.vertices[s.cw(i)].point;s.orientation(e,t,o)===n.Sign.LEFT_TURN?r.push(a.t):l=!0}const c=this.tds.insertInFace(t);let u;c.point=e;while(o.length>0)u=o[0],i=s.ccw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),o.shift();while(r.length>0)u=r[0],i=s.cw(u.indexV(this.tds._infinite)),this.tds.flip(u,i),r.shift();a=new n.FaceCirculator(c,null);while(!a.t.isInfinite())a.next();return this.tds._infinite.triangle=a.t,c}locate(e,t){let i=0,o=0;if(this.tds.dimension<0)return i=n.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(0===this.tds.dimension)return i=s.xyEqual(e,this.tds.finiteVertex.triangle.vertices[0].point)?n.LocateType.VERTEX:n.LocateType.OUTSIDE_AFFINE_HULL,o=4,{loc:null,lt:i,li:o};if(1===this.tds.dimension)return this.marchLocate1D(e);if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);return this.marchLocate2D(t,e)}marchLocate1D(e){const t=this.tds._infinite.triangle,i=t.indexV(this.tds._infinite),o=t.neighbours[i],r=s.orientation(o.vertices[0].point,o.vertices[1].point,e);if(r===n.Sign.RIGHT_TURN||r===n.Sign.LEFT_TURN)return{loc:new n.Triangle,lt:n.LocateType.OUTSIDE_AFFINE_HULL,li:4};const a=o.indexT(t);if(s.collinearBetween(e,o.vertices[1-a].point,o.vertices[a].point))return{loc:t,lt:n.LocateType.OUTSIDE_CONVEX_HULL,li:i};if(s.xyEqual(e,o.vertices[1-a].point))return{loc:o,lt:n.LocateType.VERTEX,li:1-a};throw new Error("sdfsdf")}marchLocate2D(e,t){let i,o,r=null,a=!0;while(1){if(e.isInfinite())return{loc:e,lt:n.LocateType.OUTSIDE_CONVEX_HULL,li:e.indexV(this.tds._infinite)};const l=0,c=e.vertices[0].point,u=e.vertices[1].point,d=e.vertices[2].point;let h,f,p;if(a){if(r=e,a=!1,h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}}else if(l)if(e.neighbours[0]===r){if(r=e,h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}if(p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}f=n.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}if(h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}p=n.Sign.POSITIVE}else{if(r=e,p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}if(f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}h=n.Sign.POSITIVE}else if(e.neighbours[0]===r){if(r=e,p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}if(h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}f=n.Sign.POSITIVE}else if(e.neighbours[1]===r){if(r=e,h=s.orientation(c,u,t),h===n.Sign.NEGATIVE){e=e.neighbours[2];continue}if(f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}p=n.Sign.POSITIVE}else{if(r=e,f=s.orientation(u,d,t),f===n.Sign.NEGATIVE){e=e.neighbours[0];continue}if(p=s.orientation(d,c,t),p===n.Sign.NEGATIVE){e=e.neighbours[1];continue}h=n.Sign.POSITIVE}const g=(h===n.Sign.COLLINEAR?1:0)+(f===n.Sign.COLLINEAR?1:0)+(p===n.Sign.COLLINEAR?1:0);switch(g){case 0:i=n.LocateType.FACE,o=4;break;case 1:i=n.LocateType.EDGE,o=h===n.Sign.COLLINEAR?2:f===n.Sign.COLLINEAR?0:1;break;case 2:i=n.LocateType.VERTEX,o=h!==n.Sign.COLLINEAR?2:f!==n.Sign.COLLINEAR?0:1;break}if(void 0===i||void 0===o)throw new Error("ert");return{loc:e,lt:i,li:o}}}iLocate(e,t){if(this.tds.dimension<2)return t;if(null===t){const e=this.tds._infinite.triangle;t=e.neighbours[e.indexV(this.tds._infinite)]}else t.isInfinite()&&(t=t.neighbours[t.indexV(this.tds._infinite)]);let i=null,n=t,o=!0,r=2500;while(1){if(!r--)return n;if(n.isInfinite())return n;const t=n.vertices[0].point,a=n.vertices[1].point,l=n.vertices[2].point;if(o){if(i=n,o=!1,s.hasInexactNegativeOrientation(t,a,e)){n=n.neighbours[2];continue}if(s.hasInexactNegativeOrientation(a,l,e)){n=n.neighbours[0];continue}if(s.hasInexactNegativeOrientation(l,t,e)){n=n.neighbours[1];continue}}else if(n.neighbours[0]===i){if(i=n,s.hasInexactNegativeOrientation(t,a,e)){n=n.neighbours[2];continue}if(s.hasInexactNegativeOrientation(l,t,e)){n=n.neighbours[1];continue}}else if(n.neighbours[1]===i){if(i=n,s.hasInexactNegativeOrientation(t,a,e)){n=n.neighbours[2];continue}if(s.hasInexactNegativeOrientation(a,l,e)){n=n.neighbours[0];continue}}else{if(i=n,s.hasInexactNegativeOrientation(l,t,e)){n=n.neighbours[1];continue}if(s.hasInexactNegativeOrientation(a,l,e)){n=n.neighbours[0];continue}}break}return n}}t.CDT=o},"6f8d":function(e,t,i){"use strict";i.r(t);var n=i("5b69"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"6f92":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("6c30"),o=i("f10f"),r=i("92b1");class a{constructor(){this.layers=[],this.width=window.innerWidth,this.height=window.innerHeight,this.UUIDMap=new Map,this.interval=30,this.drawLoop=(()=>{for(let e=this.layers.length-1;e>=0;e--)this.layers[e].draw();requestAnimationFrame(this.drawLoop)}),requestAnimationFrame(this.drawLoop)}reset(){this.layers=[],this.UUIDMap=new Map}setWidth(e){this.width=e;for(const t of this.layers)t.canvas.width=e,t.width=e}setHeight(e){this.height=e;for(const t of this.layers)t.canvas.height=e,t.height=e}addLayer(e){this.layers.push(e),(o.gameStore.IS_DM||e.playerEditable)&&e.selectable&&o.gameStore.addLayer(e.name)}hasLayer(e){return this.layers.some(t=>t.name===e)}getLayer(e){e=void 0===e?o.gameStore.selectedLayer:e;for(const t of this.layers)if(t.name===e)return t}selectLayer(e,t=!0){let i=!1;for(const n of this.layers)n.selectable&&(i&&"fow"!==n.name?n.ctx.globalAlpha=.3:n.ctx.globalAlpha=1,e===n.name&&(o.gameStore.selectLayer({name:e,sync:t}),i=!0),n.clearSelection(),n.invalidate(!0))}getGridLayer(){return this.getLayer("grid")}hasSelection(){const e=this.getSelection();return void 0!==e&&e.length>0}getSelection(){const e=this.getLayer();if(void 0!==e)return e.selection}invalidate(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].invalidate(!0)}invalidateLight(){for(let e=this.layers.length-1;e>=0;e--)this.layers[e].isVisionLayer&&this.layers[e].invalidate(!0)}dropAsset(e){const t=this.getLayer();if(void 0===t||null===e||null===e.dataTransfer)return;const i=document.createElement("img");i.src=e.dataTransfer.getData("text/plain");const a=new s.Asset(i,new n.GlobalPoint(r.l2gx(e.clientX),r.l2gy(e.clientY)),r.l2gz(i.width),r.l2gz(i.height));if(a.src=new URL(i.src).pathname,o.gameStore.useGrid){const e=o.gameStore.gridSize;a.refPoint=new n.GlobalPoint(Math.round(a.refPoint.x/e)*e,Math.round(a.refPoint.y/e)*e),a.w=Math.max(Math.round(a.w/e)*e,e),a.h=Math.max(Math.round(a.h/e)*e,e)}t.addShape(a,!0)}}t.layerManager=new a,window.lm=t.layerManager},7018:function(e,t,i){"use strict";i.r(t);var n=i("ebb9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},7019:function(e,t,i){},7420:function(e,t,i){"use strict";i.r(t);var n=i("d320"),s=i("778b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("c969");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"73816298",null);a.options.__file="createtoken_modal.vue",t["default"]=a.exports},"76b3":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t){this.children=[],this.nPrimitives=e,this.bbox=t}}t.BoundingNode=n;class s extends n{constructor(e,t,i){super(t,i),this.firstPrimOffset=e}}t.LeafNode=s;class o extends n{constructor(e,t,i){super(0,t.bbox.union(i.bbox)),this.dimension=e,this.children.push(t),this.children.push(i)}}t.InteriorNode=o},"778b":function(e,t,i){"use strict";i.r(t);var n=i("5a81"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"77a6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("4a5b"),s=i("0bc6"),o=i("2b48"),r=i("af17"),a=i("8f0a"),l=i("6f92"),c=i("f10f"),u=i("2838");function d(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement);else if("Delete"===e.key||"Del"===e.key||"Backspace"===e.key){if(void 0===l.layerManager.getLayer)return void console.log("No active layer selected for delete operation");const e=l.layerManager.getLayer();for(let t=e.selection.length-1;t>=0;t--){const i=e.selection[t];n.getRef("tools").$refs.selectTool.selectionHelper.uuid!==i.uuid?(e.removeShape(i,!0,!1),r.EventBus.$emit("SelectionInfo.Shape.Set",null),r.EventBus.$emit("Initiative.Remove",i.uuid)):e.selection.splice(t,1)}}}function h(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)65===e.keyCode&&e.ctrlKey&&e.target.select();else if(e.keyCode>=37&&e.keyCode<=40){const t=Math.round(c.gameStore.gridSize);let i=t*(e.keyCode%2),r=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const t=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,r*=e.keyCode<=38?-1:1;let o=new a.Vector(i,r);if(!e.shiftKey||!c.gameStore.IS_DM)for(const e of t)n.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(o=u.calculateDelta(o,e));for(const e of t)n.getRef("tools").$refs.selectTool.selectionHelper.uuid!==e.uuid&&(e.refPoint=e.refPoint.add(o),s.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1}));c.gameStore.recalculateVision(),l.layerManager.getLayer().invalidate(!1)}else c.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),c.gameStore.increasePanY(r*(e.keyCode<=38?1:-1)),l.layerManager.invalidate(),o.sendClientOptions()}else if(68===e.keyCode){const e=l.layerManager.getLayer();e&&(e.clearSelection(),e.invalidate(!0))}}t.onKeyUp=d,t.onKeyDown=h},"78c7":function(e,t,i){"use strict";var n=i("9227"),s=i.n(n);s.a},7997:function(e,t,i){"use strict";var n=i("39a7"),s=i.n(n);s.a},"7aaa":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("033f")),r=n.__importDefault(i("7420")),a=n.__importDefault(i("59d8")),l=n.__importDefault(i("dec1")),c=n.__importDefault(i("4899")),u=n.__importDefault(i("c277")),d=i("6f92"),h=i("9cb7"),f=i("f10f"),p=i("d5df"),g=i("92b1"),v=i("5a5c"),m=n.__importDefault(i("65d9"));let y=class extends s.default{constructor(){super(...arguments),this.currentTool="Select",this.tools=["Select","Pan","Draw","Ruler","Map"],this.dmTools=["Map"]}get IS_DM(){return f.gameStore.IS_DM}get currentToolComponent(){return`${this.currentTool.toLowerCase()}-tool`}mousedown(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mousedown",e,t)}mouseup(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(1===e.button)t="Pan";else if(0!==e.button)return;this.$emit("mouseup",e,t)}mousemove(e){if("CANVAS"!==e.target.tagName)return;let t=this.currentTool;if(0!==(4&e.buttons))t="Pan";else if((1&e.button)>1)return;this.$emit("mousemove",e,t);let i=!1;for(const n of f.gameStore.annotations)if(d.layerManager.UUIDMap.has(n)&&d.layerManager.hasLayer("draw")){const t=d.layerManager.UUIDMap.get(n);t.contains(g.l2g(v.getMouse(e)))&&(i=!0,h.gameManager.annotationManager.setActiveText(t.annotation))}!i&&h.gameManager.annotationManager.shown&&h.gameManager.annotationManager.setActiveText("")}mouseleave(e){0!==(1&e.buttons)&&this.$emit("mouseup",e,this.currentTool)}contextmenu(e){"CANVAS"===e.target.tagName&&2===e.button&&"CANVAS"===e.target.tagName&&this.$emit("contextmenu",e,this.currentTool)}};y=n.__decorate([m.default({components:{"select-tool":u.default,"pan-tool":c.default,"draw-tool":a.default,"ruler-tool":p.RulerTool,"map-tool":l.default,"shape-menu":o.default,"createtoken-dialog":r.default},watch:{currentTool(e,t){this.$emit("tools-select-change",e,t)}}})],y),t.default=y},"7ba5":function(e,t,i){"use strict";i.r(t);var n=i("fbdd"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"7e15":function(e,t,i){"use strict";i.r(t);var n=i("52a8"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"7f1e":function(e,t,i){"use strict";var n=i("fe11"),s=i.n(n);s.a},"831f":function(e,t,i){"use strict";var n=i("8d53"),s=i.n(n);s.a},"851c":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d65f"));let a=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.question="",this.answer="",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}submit(){this.resolve(this.answer),this.close()}close(){this.reject(),this.visible=!1,this.question="",this.answer="",this.title=""}prompt(e,t){return this.question=e,this.title=t,this.visible=!0,this.$nextTick(()=>{this.$refs.answer.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=n.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},8577:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ul",[e._l(e.folders,function(t){return i("li",{key:t,staticClass:"folder",on:{click:function(t){return t.stopPropagation(),e.toggle(t)}}},[e._v("\n "+e._s(t)+"\n "),i("asset-node",{attrs:{asset:e.asset[t]}})],1)}),e._l(e.files,function(t){return i("li",{key:t.name,staticClass:"file draggable token",attrs:{draggable:"true"},on:{mouseover:function(i){e.showImage=t.hash},mouseout:function(t){e.showImage=null},dragstart:function(i){e.dragStart(i,"/static/assets/"+t.hash)}}},[e._v("\n "+e._s(t.name)+"\n "),e.showImage==t.hash?i("div",{staticClass:"preview"},[i("img",{staticClass:"asset-preview-image",attrs:{src:"/static/assets/"+t.hash}})]):e._e()])})],2)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"88af":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e._v(e._s(e.message))])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"8a30":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{attrs:{id:"toolselect"}},[i("ul",e._l(e.tools,function(t){return!e.dmTools.includes(t)||e.IS_DM?i("li",{key:t,ref:t+"-selector",refInFor:!0,class:{"tool-selected":e.currentTool===t},on:{click:function(i){e.currentTool=t}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])]):e._e()}))]),i("div",[[i("select-tool",{directives:[{name:"show",rawName:"v-show",value:"Select"===e.currentTool,expression:"currentTool === 'Select'"}],ref:"selectTool"}),i("pan-tool",{directives:[{name:"show",rawName:"v-show",value:"Pan"===e.currentTool,expression:"currentTool === 'Pan'"}]}),i("keep-alive",[i("draw-tool",{directives:[{name:"show",rawName:"v-show",value:"Draw"===e.currentTool,expression:"currentTool === 'Draw'"}]})],1),i("ruler-tool",{directives:[{name:"show",rawName:"v-show",value:"Ruler"===e.currentTool,expression:"currentTool === 'Ruler'"}]}),i("map-tool",{directives:[{name:"show",rawName:"v-show",value:"Map"===e.currentTool,expression:"currentTool === 'Map'"}]}),i("shape-menu",{ref:"shapecontext"}),i("createtoken-dialog",{ref:"createtokendialog"})]],2)])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"8cd4":function(e,t,i){"use strict";i.r(t);var n=i("9587"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},"8d53":function(e,t,i){},"8db6":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("92b1");class o{constructor(e,t,i){this.w=t,this.h=i,this.topLeft=e,this.topRight=new n.GlobalPoint(e.x+t,e.y),this.botRight=new n.GlobalPoint(e.x+t,e.y+i),this.botLeft=new n.GlobalPoint(e.x,e.y+i)}contains(e){return this.topLeft.x<=e.x&&this.topRight.x>=e.x&&this.topLeft.y<=e.y&&this.botLeft.y>=e.y}get points(){return 0===this.w||0===this.h?[[this.topLeft.x,this.topLeft.y]]:[[this.topLeft.x,this.topLeft.y],[this.botLeft.x,this.botLeft.y],[this.botRight.x,this.botRight.y],[this.topRight.x,this.topRight.y]]}offset(e){return new o(this.topLeft.add(e),this.w,this.h)}union(e){const t=Math.min(this.topLeft.x,e.topLeft.x),i=Math.max(this.topRight.x,e.topRight.x),s=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new o(new n.GlobalPoint(t,s),i-t,r-s)}getDiagCorner(e){return e?this.botRight:this.topLeft}intersectsWith(e){return!(e.topLeft.x>this.topRight.x||e.topRight.xthis.botLeft.y||e.botLeft.y=this.topRight.x||e.topRight.x<=this.topLeft.x||e.topLeft.y>=this.botLeft.y||e.botLeft.y<=this.topLeft.y)}intersectP(e,t,i){let n=t.x*(this.getDiagCorner(i[0]).x-e.origin.x),s=t.x*(this.getDiagCorner(!i[0]).x-e.origin.x);const o=t.y*(this.getDiagCorner(i[1]).y-e.origin.y),r=t.y*(this.getDiagCorner(!i[1]).y-e.origin.y);return n>r||o>s?{hit:!1,min:n,max:s}:(o>n&&(n=o),r0,min:n,max:s})}center(){return this.topLeft.add(new n.Vector(this.w/2,this.h/2))}getMaxExtent(){return this.w>this.h?0:1}visibleInCanvas(e){const t=!(s.g2lx(this.topLeft.x)>e.width||s.g2ly(this.topLeft.y)>e.height||s.g2lx(this.topRight.x)<0||s.g2ly(this.botRight.y)<0);return!!t}}t.BoundingRect=o},"8e60":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"formcontainer"}},[e.owned||e.joined?i("form",[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("Your sessions")]),i("div",{staticClass:"input"},[e._l(e.owned,function(t,n){return i("router-link",{key:"o-"+n,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[0]))])}),e._l(e.joined,function(t,n){return i("router-link",{key:"j-"+n,attrs:{to:"/game/"+t[1]+"/"+t[0]}},[e._v(e._s(t[1])+"/"+e._s(t[0]))])})],2),0===e.owned.length?i("div",{staticClass:"input"},[e._v("No active sessions")]):e._e()])]):e._e(),e._m(0),i("form",{on:{submit:function(t){return t.preventDefault(),e.createRoom(t)}}},[i("fieldset",[e.owned||e.joined?i("div",{staticClass:"input"},[e._v("Create a new session")]):i("legend",{staticClass:"legend"},[e._v("Create a session")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.newSessionName,expression:"newSessionName"}],attrs:{type:"text",name:"room_name",placeholder:"Session Name"},domProps:{value:e.newSessionName},on:{input:function(t){t.target.composing||(e.newSessionName=t.target.value)}}}),e._m(1)]),e._m(2)])]),i("div",{attrs:{id:"account-options"}},[i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Account Settings",to:"/account"}},[i("i",{staticClass:"fas fa-cog"})])],1),i("form",{on:{submit:function(e){e.preventDefault()}}},[i("router-link",{staticClass:"submit",attrs:{tag:"button",title:"Logout",to:"/auth/logout"}},[i("i",{staticClass:"fas fa-sign-out-alt"})])],1)])])},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("h4",[i("span",[e._v("OR")])])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fab fa-d-and-d"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",title:"Create"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"8f0a":function(e,t,i){"use strict";function n(e,t){const i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getPointDistance=n;class s{constructor(e,t){this.x=e,this.y=t}static fromArray(e){return new s(e[0],e[1])}add(e){return new s(this.x+e.x,this.y+e.y)}subtract(e){return new a(this.x-e.x,this.y-e.y)}clone(){return new s(this.x,this.y)}get(e){return 0===e?this.x:this.y}asArray(){return[this.x,this.y]}}t.Point=s;class o extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}static fromArray(e){return new o(e[0],e[1])}}t.GlobalPoint=o;class r extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}t.LocalPoint=r;class a{constructor(e,t){this.x=e,this.y=t}dot(e){return this.x*e.x+this.y*e.y}inverse(){return new a(0===this.x?0:1/this.x,0===this.y?0:1/this.y)}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}normalize(){const e=this.length();return new a(this.x/e,this.y/e)}reverse(){return new a(-this.x,-this.y)}multiply(e){return new a(this.x*e,this.y*e)}angle(){return 180*Math.atan2(this.y,this.x)/Math.PI}}t.Vector=a;class l{constructor(e,t,i){this.direction=t,this.origin=e,void 0===i&&(i=1/0),this.tMax=i}static fromPoints(e,t){const i=new a(t.x-e.x,t.y-e.y);let n;return n=Math.abs(i.x)>.01?(t.x-e.x)/i.x:(t.y-e.y)/i.y,new l(e,i,n)}get(e){return new s(this.origin.x+e*this.direction.x,this.origin.y+e*this.direction.y)}getDistance(e,t){return Math.sqrt(Math.pow(t-e,2)*(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}getT(e,t){return e+Math.sqrt(Math.pow(t,2)/(Math.pow(this.direction.x,2)+Math.pow(this.direction.y,2)))}}t.Ray=l},"91df":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("6f79"));i("fe80");const a=i("2ef0"),l=n.__importDefault(i("a535")),c=n.__importDefault(i("cec2")),u=n.__importDefault(i("f5fe")),d=n.__importDefault(i("19f9")),h=n.__importDefault(i("f551")),f=n.__importDefault(i("f086")),p=n.__importDefault(i("6100")),g=i("0bc6"),v=i("77a6"),m=i("bb17"),y=i("6f92"),b=i("f10f"),_=i("92b1"),S=i("8f0a");let w=class extends s.default{constructor(){super(...arguments),this.ready={manager:!1,tools:!1}}get IS_DM(){return b.gameStore.IS_DM}get layers(){return b.gameStore.layers}get selectedLayer(){return b.gameStore.selectedLayer}get zoomFactor(){return b.gameStore.zoomFactor}set zoomFactor(e){b.gameStore.updateZoom({newZoomValue:e,zoomLocation:_.l2g(new S.LocalPoint(window.innerWidth/2,window.innerHeight/2))})}mounted(){window.addEventListener("resize",()=>{y.layerManager.setWidth(window.innerWidth),y.layerManager.setHeight(window.innerHeight),y.layerManager.invalidate()}),window.addEventListener("wheel",a.throttle(m.scrollZoom)),window.addEventListener("keyup",v.onKeyUp),window.addEventListener("keydown",v.onKeyDown),window.addEventListener("selectstart",e=>{return e.preventDefault(),!1}),this.ready.manager=!0}mousedown(e){this.$refs.tools.mousedown(e)}mouseup(e){this.$refs.tools.mouseup(e)}mousemove(e){this.$refs.tools.mousemove(e)}mouseleave(e){this.$refs.tools.mouseleave(e)}contextmenu(e){this.$refs.tools.contextmenu(e)}selectLayer(e){y.layerManager.selectLayer(e)}drop(e){if(null!==e&&null!==e.dataTransfer)if(e.dataTransfer.files.length>0)this.$refs.confirm.open("Uploading files should be done through the asset manager.","Ok","").then(()=>{},()=>{});else{if(""===e.dataTransfer.getData("text/plain"))return;y.layerManager.dropAsset(e)}}};w=n.__decorate([o.default({components:{"tool-bar":p.default,"selection-info":f.default,"prompt-dialog":c.default,"confirm-dialog":l.default,"menu-bar":d.default,"initiative-dialog":u.default,"zoom-slider":r.default,"note-dialog":h.default},beforeRouteEnter(e,t,i){g.createConnection(e),i()},beforeRouteLeave(e,t,i){g.socket.disconnect(),i()}})],w),t.default=w},9227:function(e,t,i){},"92b1":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("f10f");function o(e){const t=s.gameStore.zoomFactor,i=s.gameStore.panX,o=s.gameStore.panY;return new n.LocalPoint((e.x+i)*t,(e.y+o)*t)}function r(e){return o(new n.GlobalPoint(e,0)).x}function a(e){return o(new n.GlobalPoint(0,e)).y}function l(e){return e*s.gameStore.zoomFactor}function c(e){return e/s.gameStore.unitSize*s.gameStore.gridSize}function u(e){return l(c(e))}function d(e){const t=s.gameStore.zoomFactor,i=s.gameStore.panX,o=s.gameStore.panY;return e instanceof n.LocalPoint?new n.GlobalPoint(e.x/t-i,e.y/t-o):new n.Ray(d(e.origin),e.direction.multiply(1/t),e.tMax)}function h(e){return d(new n.LocalPoint(e,0)).x}function f(e){return d(new n.LocalPoint(0,e)).y}function p(e){return e/s.gameStore.zoomFactor}function g(e){return p(c(e))}t.g2l=o,t.g2lx=r,t.g2ly=a,t.g2lz=l,t.getUnitDistance=c,t.g2lr=u,t.l2g=d,t.l2gx=h,t.l2gy=f,t.l2gz=p,t.l2gr=g,window.g2lx=r,window.g2ly=a},9587:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=i("2f62"),a=n.__importDefault(i("3b36")),l=n.__importDefault(i("0ddd")),c=i("4a5b"),u=i("0bc6"),d=i("6f92"),h=i("f10f");let f=class extends s.default{constructor(){super(...arguments),this.visible={settings:!1,locations:!1}}get useGrid(){return h.gameStore.useGrid}set useGrid(e){h.gameStore.setUseGrid({useGrid:e,sync:!0})}get fullFOW(){return h.gameStore.fullFOW}set fullFOW(e){h.gameStore.setFullFOW({fullFOW:e,sync:!0})}get fowOpacity(){return h.gameStore.fowOpacity}set fowOpacity(e){"number"===typeof e&&h.gameStore.setFOWOpacity({fowOpacity:e,sync:!0})}get fowLOS(){return h.gameStore.fowLOS}set fowLOS(e){h.gameStore.setLineOfSight({fowLOS:e,sync:!0})}get unitSize(){return h.gameStore.unitSize}set unitSize(e){"number"===typeof e&&h.gameStore.setUnitSize({unitSize:e,sync:!0})}get gridSize(){return h.gameStore.gridSize}set gridSize(e){"number"===typeof e&&h.gameStore.setGridSize({gridSize:e,sync:!0})}get gridColour(){return h.gameStore.gridColour}set gridColour(e){h.gameStore.setGridColour({colour:e,sync:!0})}get fowColour(){return h.gameStore.fowColour}set fowColour(e){h.gameStore.setFOWColour({colour:e,sync:!0})}get rulerColour(){return h.gameStore.rulerColour}set rulerColour(e){h.gameStore.setRulerColour({colour:e,sync:!0})}get visionRangeMin(){return h.gameStore.visionRangeMin}set visionRangeMin(e){"number"===typeof e&&h.gameStore.setVisionRangeMin({value:e,sync:!0})}get visionRangeMax(){return h.gameStore.visionRangeMax}set visionRangeMax(e){"number"===typeof e&&h.gameStore.setVisionRangeMax({value:e,sync:!0})}settingsClick(e){if(e.target.classList.contains("accordion")){e.target.classList.toggle("accordion-active");const t=e.target.nextElementSibling;null!==t&&(t.style.display=""===t.style.display?"block":"")}}changeLocation(e){u.socket.emit("Location.Change",e)}createLocation(){c.getRef("prompt").prompt("New location name:","Create new location").then(e=>{u.socket.emit("Location.New",e)},()=>{})}createNote(){const e={title:"New note",text:"",uuid:c.uuidv4()};h.gameStore.newNote({note:e,sync:!0}),this.openNote(e)}openNote(e){c.getRef("note").open(e)}changeVisionMode(e){const t=e.target.value.toLowerCase();"bvh"!==t&&"triangle"!==t||(h.gameStore.setVisionMode({mode:t,sync:!0}),h.gameStore.recalculateVision(),h.gameStore.recalculateMovement(),d.layerManager.invalidate())}};f=n.__decorate([o.default({components:{"color-picker":a.default,"asset-node":l.default},computed:Object.assign({},r.mapState("game",["invitationCode","IS_DM","locations","assets","notes"]))})],f),t.default=f},"979e":function(e,t,i){"use strict";i.r(t);var n=i("0634"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},9845:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.IS_DM?i("li",{on:{click:e.bringPlayers}},[e._v("Bring players")]):e._e(),i("li",{on:{click:e.createToken}},[e._v("Create basic token")]),i("li",{on:{click:e.showInitiative}},[e._v("Show initiative")])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"98ef":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("4aee");let s;var o,r;function a(){return[t.INFINITE,t.INFINITE]}t.INFINITE=-Infinity,function(e){e[e["NEGATIVE"]=-1]="NEGATIVE",e[e["ZERO"]=0]="ZERO",e[e["POSITIVE"]=1]="POSITIVE",e[e["RIGHT_TURN"]=-1]="RIGHT_TURN",e[e["LEFT_TURN"]=1]="LEFT_TURN",e[e["SMALLER"]=-1]="SMALLER",e[e["EQUAL"]=0]="EQUAL",e[e["LARGER"]=1]="LARGER",e[e["CLOCKWISE"]=-1]="CLOCKWISE",e[e["COUNTERCLOCKWISE"]=1]="COUNTERCLOCKWISE",e[e["COLLINEAR"]=0]="COLLINEAR",e[e["COPLANAR"]=0]="COPLANAR",e[e["DEGENERATE"]=0]="DEGENERATE",e[e["ON_NEGATIVE_SIDE"]=-1]="ON_NEGATIVE_SIDE",e[e["ON_ORIENTED_BOUNDARY"]=0]="ON_ORIENTED_BOUNDARY",e[e["ON_POSITIVE_SIDE"]=1]="ON_POSITIVE_SIDE"}(o=t.Sign||(t.Sign={})),function(e){e[e["UNDEFINED"]=-1]="UNDEFINED",e[e["VERTEX_VERTEX"]=0]="VERTEX_VERTEX",e[e["VERTEX_EDGE"]=1]="VERTEX_EDGE",e[e["EDGE_VERTEX"]=2]="EDGE_VERTEX",e[e["EDGE_EDGE"]=3]="EDGE_EDGE"}(r||(r={}));class l{constructor(...e){this.vertices=[],this.neighbours=[null,null,null],this.constraints=[!1,!1,!1],this.uid=l._counter++,this.vertices=e}from(e){return this.vertices=e.vertices.slice(0,e.vertices.length),this.neighbours=e.neighbours.slice(0,e.neighbours.length),this.constraints=e.constraints.slice(0,e.constraints.length),this}get dimension(){return this.vertices.length-1}addVertex(e){void 0===e&&console.log("UNDEFINED HIERE"),this.vertices.push(e),e.triangle=this}isConstrained(e){return this.constraints[e]}reorient(){this.vertices=[this.vertices[1],this.vertices[0],this.vertices[2]].slice(0,this.vertices.length),this.neighbours=[this.neighbours[1],this.neighbours[0],this.neighbours[2]],this.constraints=[this.constraints[1],this.constraints[0],this.constraints[2]]}indexV(e){return this.vertices.indexOf(e)}indexT(e){return this.neighbours.indexOf(e)}isInfinite(e){return void 0===e?this.vertices.includes(s):this.vertices[n.ccw(e)].infinite||this.vertices[n.cw(e)].infinite}contains(e){const t=-this.vertices[1].point[1]*this.vertices[2].point[0]+this.vertices[0].point[1]*(-this.vertices[1].point[0]+this.vertices[2].point[0])+this.vertices[0].point[0]*(this.vertices[1].point[1]-this.vertices[2].point[1])+this.vertices[1].point[0]*this.vertices[2].point[1],i=t<0?-1:1,n=(this.vertices[0].point[1]*this.vertices[2].point[0]-this.vertices[0].point[0]*this.vertices[2].point[1]+(this.vertices[2].point[1]-this.vertices[0].point[1])*e[0]+(this.vertices[0].point[0]-this.vertices[2].point[0])*e[1])*i;if(n<0)return!1;const s=(this.vertices[0].point[0]*this.vertices[1].point[1]-this.vertices[0].point[1]*this.vertices[1].point[0]+(this.vertices[0].point[1]-this.vertices[1].point[1])*e[0]+(this.vertices[1].point[0]-this.vertices[0].point[0])*e[1])*i;return s>0&&n+st!==e)}setAdjacency(e,t,i,n){e.neighbours[t]=i,i.neighbours[n]=e}get finiteVertex(){return this.vertices[1]}get infiniteVertex(){const e=new c(a());return e.infinite=!0,e}get finiteEdge(){if(this.dimension<1)throw new Error("aspo");const e=new d(this);while(e.valid)e.next();return e.collect()}insertDimUp(e=new c,t=!0){const i=this.createVertex();let n,s;switch(this.dimension++,this.dimension){case 0:n=this.triangles[0],s=new l(i),this.triangles.push(s),this.setAdjacency(n,0,s,0),i.triangle=s;break;case 1:case 2:{const o=[],r=this.triangles.slice(0,this.triangles.length);for(const t of r){const n=(new l).from(t);this.triangles.push(n),t.vertices[this.dimension]=i,n.vertices[this.dimension]=e,this.setAdjacency(t,this.dimension,n,this.dimension),t.vertices.includes(e)&&o.push(n)}for(const e of r){const t=e.neighbours[this.dimension];for(let i=0;ie.center.center().get(r)0){if(i=!0,n=e.tMax=d.min,s=d.max,0===o||t)break;r=a[--o]}else c[u.dimension]?(a[o++]=r+1,r=u.secondChildOffset):(a[o++]=u.secondChildOffset,r++);else{if(0===o)break;r=a[--o]}}return{hit:i,intersect:e.get(n),tMin:n,tMax:s}}compact(){this.offset=0,null!==this.root&&this.flatten(this.root)}flatten(e){const t=this.offset,i=this.offset++;if(0===e.nPrimitives){this.flatten(e.children[0]);const i=this.flatten(e.children[1]);this.nodes[t]={bbox:e.bbox,dimension:e.dimension,nPrimitives:0,secondChildOffset:i}}else this.nodes[t]={bbox:e.bbox,primitivesOffset:e.firstPrimOffset,nPrimitives:e.nPrimitives};return i}createLeaf(e,t,i,n){const s=this.orderedPrims.length;for(let o=e;o1?i("li",[e._v("Layer\n "),i("ul",e._l(e.getLayers(),function(t){return i("li",{key:t.name,style:[e.getActiveLayer().name===t.name?{"background-color":"#82c8a0"}:{}],on:{click:function(i){e.setLayer(t.name)}}},[e._v(e._s(t.name))])}))]):e._e(),i("li",{on:{click:e.moveToBack}},[e._v("Move to back")]),i("li",{on:{click:e.moveToFront}},[e._v("Move to front")]),i("li",{on:{click:e.addInitiative}},[e._v(e._s(e.getInitiativeWord())+" initiative")]),i("li",{on:{click:e.openEditDialog}},[e._v("Show properties")])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},a21d:function(e,t,i){"use strict";var n=i("7019"),s=i.n(n);s.a},a260:function(e,t,i){},a450:function(e,t,i){},a474:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{constructor(){super(...arguments),this.owned=[],this.joined=[],this.error="",this.newSessionName=""}beforeRouteEnter(e,t,i){s.default.get("/api/rooms").then(e=>{i(t=>{t.owned=e.data.owned,t.joined=e.data.joined})}).catch(e=>{i(t=>{t.error=e.message})})}createRoom(e){s.default.post("/api/rooms",{name:this.newSessionName}).then(e=>{this.$router.push(`/game/${a.coreStore.username}/${this.newSessionName}`)}).catch(e=>{this.error=e.message})}};l=n.__decorate([r.default],l),t.default=l},a535:function(e,t,i){"use strict";i.r(t);var n=i("e06e"),s=i("f30c");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("223d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"1883e207",null);a.options.__file="confirm.vue",t["default"]=a.exports},a68b:function(e,t,i){"use strict";i.r(t);var n=i("308b"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},a755:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ContextMenu",{attrs:{visible:e.visible,left:e.left+"px",top:e.top+"px"},on:{close:e.close}},[i("li",{on:{click:e.rename}},[e._v("Rename")]),i("li",{on:{click:e.remove}},[e._v("Remove")])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},a7b3:function(e,t,i){"use strict";var n=i("6542"),s=i.n(n);s.a},aa69:function(e,t,i){"use strict";i.r(t);var n=i("0cf7"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},aaee:function(e,t,i){},abef:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible,mask:!1},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[i("div",[e._v("Edit asset")]),i("div",{staticClass:"header-close",on:{click:function(t){e.visible=!1}}},[i("i",{staticClass:"far fa-window-close"})])])}}])},[i("div",{staticClass:"modal-body"},[i("label",{attrs:{for:"shapeselectiondialog-name"}},[e._v("Name")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.name,expression:"shape.name"}],staticStyle:{"grid-column":"numerator / end"},attrs:{type:"text",id:"shapeselectiondialog-name"},domProps:{value:e.shape.name},on:{change:function(t){e.updateShape(!1)},input:function(t){t.target.composing||e.$set(e.shape,"name",t.target.value)}}}),i("label",{attrs:{for:"shapeselectiondialog-istoken"}},[e._v("Is a token")]),i("input",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{type:"checkbox",id:"shapeselectiondialog-istoken"},domProps:{checked:e.shape.isToken},on:{click:e.setToken}}),i("label",{attrs:{for:"shapeselectiondialog-visionblocker"}},[e._v("Blocks vision/light")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.shape.visionObstruction,expression:"shape.visionObstruction"}],staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{type:"checkbox",id:"shapeselectiondialog-visionblocker"},domProps:{checked:Array.isArray(e.shape.visionObstruction)?e._i(e.shape.visionObstruction,null)>-1:e.shape.visionObstruction},on:{change:[function(t){var i=e.shape.visionObstruction,n=t.target,s=!!n.checked;if(Array.isArray(i)){var o=null,r=e._i(i,o);n.checked?r<0&&e.$set(e.shape,"visionObstruction",i.concat([o])):r>-1&&e.$set(e.shape,"visionObstruction",i.slice(0,r).concat(i.slice(r+1)))}else e.$set(e.shape,"visionObstruction",s)},e.setVisionBlocker]}}),i("label",{attrs:{for:"shapeselectiondialog-moveblocker"}},[e._v("Blocks movement")]),i("input",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{type:"checkbox",id:"shapeselectiondialog-moveblocker"},domProps:{checked:e.shape.movementObstruction},on:{click:e.setMovementBlocker}}),i("label",{attrs:{for:"shapeselectiondialog-strokecolour"}},[e._v("Border colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{color:e.shape.strokeColour},on:{"update:color":function(t){e.$set(e.shape,"strokeColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("label",{attrs:{for:"shapeselectiondialog-fillcolour"}},[e._v("Fill colour")]),i("color-picker",{staticStyle:{"grid-column-start":"remove",width:"15px",height:"15px"},attrs:{color:e.shape.fillColour},on:{"update:color":function(t){e.$set(e.shape,"fillColour",t)},input:function(t){e.updateShape(!0,!0)},change:function(t){e.updateShape(!0)}}}),i("div",{staticClass:"spanrow header"},[e._v("Access")]),e._l(e.shape.owners,function(t){return[i("input",{key:t,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name"},domProps:{value:t},on:{change:function(i){e.updateOwner(i,t)}}}),""!==t?i("div",{key:"remove-"+t,staticStyle:{"grid-column-start":"remove"},on:{click:function(i){e.removeOwner(t)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Trackers")]),e._l(e.shape.trackers,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"tracker.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name"},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"tracker.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value"},domProps:{value:t.value},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.maxvalue,expression:"tracker.maxvalue",modifiers:{number:!0}}],key:"maxvalue-"+t.uuid,attrs:{type:"text",title:"Current value"},domProps:{value:t.maxvalue},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"maxvalue",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"sspan-"+t.uuid}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3},on:{click:function(i){t.visible=!t.visible,e.updateShape(!1)}}},[i("i",{staticClass:"fas fa-eye"})]),i("span",{key:"tspan-"+t.uuid}),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,on:{click:function(i){e.removeTracker(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Auras")]),e._l(e.shape.auras,function(t){return[i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"aura.name"}],key:"name-"+t.uuid,staticStyle:{"grid-column-start":"name"},attrs:{type:"text",placeholder:"name"},domProps:{value:t.name},on:{change:function(t){e.updateShape(!1)},input:function(i){i.target.composing||e.$set(t,"name",i.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.value,expression:"aura.value",modifiers:{number:!0}}],key:"value-"+t.uuid,attrs:{type:"text",title:"Current value"},domProps:{value:t.value},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"value",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("span",{key:"fspan-"+t.uuid},[e._v("/")]),i("input",{directives:[{name:"model",rawName:"v-model.number",value:t.dim,expression:"aura.dim",modifiers:{number:!0}}],key:"dimvalue-"+t.uuid,attrs:{type:"text",title:"Dim value"},domProps:{value:t.dim},on:{change:function(t){e.updateShape(!0)},input:function(i){i.target.composing||e.$set(t,"dim",e._n(i.target.value))},blur:function(t){e.$forceUpdate()}}}),i("color-picker",{key:"colour-"+t.uuid,attrs:{color:t.colour},on:{"update:color":function(i){e.$set(t,"colour",i)},input:function(i){e.updateAuraColour(t,i)},change:function(t){e.updateShape(!0)}}}),i("div",{key:"visibility-"+t.uuid,style:{opacity:t.visible?1:.3},on:{click:function(i){t.visible=!t.visible,e.updateShape(!0)}}},[i("i",{staticClass:"fas fa-eye"})]),i("div",{key:"visionsource-"+t.uuid,style:{opacity:t.visionSource?1:.3},on:{click:function(i){e.updateAuraVisionSource(t)}}},[i("i",{staticClass:"fas fa-lightbulb"})]),""!==t.name||0!==t.value?i("div",{key:"remove-"+t.uuid,on:{click:function(i){e.removeAura(t.uuid)}}},[i("i",{staticClass:"fas fa-trash-alt"})]):e._e()]}),i("div",{staticClass:"spanrow header"},[e._v("Annotation")]),i("textarea",{staticClass:"spanrow",domProps:{value:e.shape.annotation},on:{change:e.updateAnnotation}})],2)])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},af17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026"));t.EventBus=new s.default},b0ac:function(e,t,i){"use strict";i.r(t);var n=i("a474"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},b0c0:function(e,t,i){},b2ed:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("c266"),s=i("f10f"),o=i("92b1"),r=i("5a5c");class a extends n.BaseRect{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.type="rect"}asDict(){return super.getBaseDict()}draw(e){super.draw(e),"fog"===this.fillColour?e.fillStyle=r.getFogColour():e.fillStyle=this.fillColour;const t=s.gameStore.zoomFactor,i=o.g2l(this.refPoint);e.fillRect(i.x,i.y,this.w*t,this.h*t),"rgba(0, 0, 0, 0)"!==this.strokeColour&&(e.strokeStyle=this.strokeColour,e.lineWidth=5,e.strokeRect(i.x,i.y,this.w*t,this.h*t))}}t.Rect=a},b809:function(e,t,i){"use strict";i.r(t);var n=i("ca56"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},b906:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("bab4"),o=i("6f92"),r=i("d1ec"),a=i("f10f"),l=i("92b1"),c=i("cee3");class u extends s.Layer{constructor(){super(...arguments),this.isVisionLayer=!0}draw(){if(!this.valid){const t=this.ctx;if(!a.gameStore.fowLOS||r.Settings.skipPlayerFOW)return t.clearRect(0,0,this.canvas.width,this.canvas.height),void(this.valid=!0);t.clearRect(0,0,this.canvas.width,this.canvas.height);const i=o.layerManager.getLayer("draw").ctx;i.clearRect(0,0,window.innerWidth,window.innerHeight);const s=t.globalCompositeOperation;t.fillStyle="rgba(0, 0, 0, 1)",a.gameStore.IS_DM||super.draw(!a.gameStore.fullFOW);const u=t.canvas.width+t.canvas.height;for(const d of a.gameStore.ownedtokens){const i=o.layerManager.UUIDMap.get(d);if(void 0===i)continue;const s=i.center(),h=l.g2l(s);if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const o=Math.cos(i),r=Math.sin(i),c=new n.Ray(s,new n.Vector(o,r)),d=a.gameStore.BV.intersect(c);d.hit?(-1!==e&&(t.arc(h.x,h.y,u,e,i),e=-1),t.lineTo(l.g2lx(d.intersect.x),l.g2ly(d.intersect.y))):-1===e&&(t.lineTo(h.x+u*o,h.y+u*r),e=i)}-1!==e?t.arc(h.x,h.y,u,e,2*Math.PI):t.closePath(),t.fill()}else{{const e=t.createRadialGradient(h.x,h.y,l.g2lr(a.gameStore.visionRangeMin),h.x,h.y,l.g2lr(a.gameStore.visionRangeMax));e.addColorStop(0,"rgba(0, 0, 0, 1)"),e.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=e}try{const n=c.computeVisibility(i.center(),"vision");t.beginPath(),t.moveTo(l.g2lx(n[0][0]),l.g2ly(n[0][1]));for(const e of n)t.lineTo(l.g2lx(e[0]),l.g2ly(e[1]));t.closePath(),t.fill()}catch(e){}}}a.gameStore.IS_DM&&super.draw(!a.gameStore.fullFOW),t.globalCompositeOperation=s}}}t.FOWPlayersLayer=u},bab4:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("af17"),o=i("6f92"),r=i("206a"),a=i("f10f"),l=i("92b1");class c{constructor(e,t){this.selectable=!1,this.playerEditable=!1,this.isVisionLayer=!1,this.valid=!1,this.shapes=[],this.selection=[],this.selectionColor="#CC0000",this.selectionWidth=2,this.canvas=e,this.name=t,this.width=e.width,this.height=e.height,this.ctx=e.getContext("2d")}invalidate(e){this.valid=!1,e||o.layerManager.invalidateLight()}addShape(e,t,i,s=!0){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(s),e.setMovementBlock(e.movementObstruction,s),e.ownedBy(a.gameStore.username)&&e.isToken&&a.gameStore.ownedtokens.push(e.uuid),e.annotation.length&&a.gameStore.annotations.push(e.uuid),t&&n.socket.emit("Shape.Add",{shape:e.asDict(),temporary:i}),s&&this.invalidate(!t)}setShapes(e){for(const t of e){const e=r.createShapeFromDict(t);if(void 0===e)return void console.log(`Shape with unknown type ${t.type_} could not be added`);this.addShape(e,!1,!1,!1)}this.clearSelection(),this.invalidate(!1)}removeShape(e,t,i){void 0===i&&(i=!1),this.shapes.splice(this.shapes.indexOf(e),1),t&&n.socket.emit("Shape.Remove",{shape:e,temporary:i});const s=a.gameStore.visionSources.findIndex(t=>t.shape===e.uuid),r=a.gameStore.visionBlockers.findIndex(t=>t===e.uuid),l=a.gameStore.movementblockers.findIndex(t=>t===e.uuid),c=a.gameStore.annotations.findIndex(t=>t===e.uuid);s>=0&&a.gameStore.visionSources.splice(s,1),r>=0&&a.gameStore.visionBlockers.splice(r,1),l>=0&&a.gameStore.movementblockers.splice(l,1),c>=0&&a.gameStore.annotations.splice(c,1);const u=a.gameStore.annotations.indexOf(e.uuid);u>=0&&a.gameStore.annotations.splice(u,1);const d=a.gameStore.ownedtokens.indexOf(e.uuid);d>=0&&a.gameStore.ownedtokens.splice(d,1),o.layerManager.UUIDMap.delete(e.uuid);const h=this.selection.indexOf(e);h>=0&&this.selection.splice(h,1),r>=0&&a.gameStore.recalculateVision(),l>=0&&a.gameStore.recalculateMovement(),this.invalidate(!t)}clear(){this.ctx.clearRect(0,0,this.width,this.height)}clearSelection(){this.selection=[],s.EventBus.$emit("SelectionInfo.Shape.Set",null)}draw(e){if(!this.valid){const t=this.ctx,i=t.globalCompositeOperation;e=void 0===e||e,e&&this.clear();const n=this;if(this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(n.canvas)&&("fow"===n.name&&e.visionObstruction&&o.layerManager.getLayer().name!==n.name||e.drawAuras(t))}),this.shapes.forEach(e=>{e.options.has("skipDraw")&&e.options.get("skipDraw")||void 0!==o.layerManager.getLayer()&&e.visibleInCanvas(n.canvas)&&("fow"===n.name&&e.visionObstruction&&o.layerManager.getLayer().name!==n.name||e.draw(t))}),null!=this.selection){t.fillStyle=this.selectionColor,t.strokeStyle=this.selectionColor,t.lineWidth=this.selectionWidth;const e=a.gameStore.zoomFactor;this.selection.forEach(i=>{t.globalCompositeOperation=i.globalCompositeOperation;const n=i.getBoundingBox();t.strokeRect(l.g2lx(n.topLeft.x),l.g2ly(n.topLeft.y),n.w*e,n.h*e);for(const e of i.points)t.beginPath(),t.arc(l.g2lx(e[0]),l.g2ly(e[1]),3,0,2*Math.PI),t.fill();t.beginPath(),t.moveTo(l.g2lx(i.points[0][0]),l.g2ly(i.points[0][1]));for(let e=1;e<=i.points.length;e++){const n=i.points[e%i.points.length];t.lineTo(l.g2lx(n[0]),l.g2ly(n[1]))}t.stroke()})}t.globalCompositeOperation=i,this.valid=!0}}moveShapeOrder(e,t,i){const s=this.shapes.indexOf(e);s!==t&&(this.shapes.splice(s,1),this.shapes.splice(t,0,e),i&&n.socket.emit("Shape.Order.Set",{shape:e.asDict(),index:t}),this.invalidate(!0))}}t.Layer=c},bb17:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("f10f"),s=i("92b1"),o=i("5a5c");function r(e){if(!e.target||!e.target.tagName||"CANVAS"!==e.target.tagName)return;let t;t=-1*Math.sign(e.deltaY),n.gameStore.updateZoom({newZoomValue:n.gameStore.zoomFactor+.1*t,zoomLocation:s.l2g(o.getMouse(e))})}t.scrollZoom=r},befe:function(e,t,i){"use strict";var n=i("e0ac"),s=i.n(n);s.a},bf44:function(e,t,i){},c242:function(e,t,i){"use strict";var n=i("bf44"),s=i.n(n);s.a},c266:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("8db6"),o=i("2469"),r=i("f10f"),a=i("2838"),l=i("92b1");class c extends o.Shape{constructor(e,t,i,n,s,o){super(e,n,s,o),this.w=t,this.h=i}getBaseDict(){return Object.assign(super.getBaseDict(),{width:this.w,height:this.h})}getBoundingBox(){return new s.BoundingRect(this.refPoint,this.w,this.h)}get points(){if(0===this.w||0===this.h)return[[this.refPoint.x,this.refPoint.y]];const e=this.refPoint.add(new n.Vector(0,this.h)),t=this.refPoint.add(new n.Vector(this.w,this.h)),i=this.refPoint.add(new n.Vector(this.w,0));return[[this.refPoint.x,this.refPoint.y],[e.x,e.y],[t.x,t.y],[i.x,i.y]]}contains(e){return this.refPoint.x<=e.x&&this.refPoint.x+this.w>=e.x&&this.refPoint.y<=e.y&&this.refPoint.y+this.h>=e.y}center(e){if(void 0===e)return this.refPoint.add(new n.Vector(this.w/2,this.h/2));this.refPoint=new n.GlobalPoint(e.x-this.w/2,e.y-this.h/2)}visibleInCanvas(e){if(super.visibleInCanvas(e))return!0;const t=!(l.g2lx(this.refPoint.x)>e.width||l.g2ly(this.refPoint.y)>e.height||l.g2lx(this.refPoint.x+this.w)<0||l.g2ly(this.refPoint.y+this.h)<0);return!!t}snapToGrid(){const e=r.gameStore.gridSize,t=this.center(),i=t.x,s=t.y;let o,l;o=this.w/e%2===0?Math.round(i/e)*e-this.w/2:(Math.round((i+e/2)/e)-.5)*e-this.w/2,l=this.h/e%2===0?Math.round(s/e)*e-this.h/2:(Math.round((s+e/2)/e)-.5)*e-this.h/2;const c=a.calculateDelta(new n.Vector(o-this.refPoint.x,l-this.refPoint.y),this);this.refPoint=this.refPoint.add(c),this.invalidate(!1)}resizeToGrid(){const e=r.gameStore.gridSize;this.refPoint=new n.GlobalPoint(Math.round(this.refPoint.x/e)*e,Math.round(this.refPoint.y/e)*e),this.w=Math.max(Math.round(this.w/e)*e,e),this.h=Math.max(Math.round(this.h/e)*e,e),this.invalidate(!1)}resize(e,t){const i=r.gameStore.zoomFactor;switch(e){case 0:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=l.l2g(t);break;case 1:this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint=new n.GlobalPoint(l.l2gx(t.x),this.refPoint.y);break;case 2:this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y);break;case 3:this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint=new n.GlobalPoint(this.refPoint.x,l.l2gy(t.y));break}this.w/=i,this.h/=i,this.w<0&&(this.refPoint=this.refPoint.add(new n.Vector(this.w,0)),this.w=Math.abs(this.w)),this.h<0&&(this.refPoint=this.refPoint.add(new n.Vector(0,this.h)),this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var n=i("1f71"),s=i("e27a");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="select.vue",t["default"]=a.exports},c6b4:function(e,t,i){"use strict";i.r(t);var n=i("8e60"),s=i("b0ac");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("d767");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"61eb1455",null);a.options.__file="main.vue",t["default"]=a.exports},c6fe:function(e,t,i){},c969:function(e,t,i){"use strict";var n=i("3a20"),s=i.n(n);s.a},c9a2:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"AssetManager"}},[i("div",{attrs:{id:"titlebar"}},[e._v("Asset Manager")]),i("div",{attrs:{id:"main"}},[i("div",{attrs:{id:"assets"},on:{dragover:function(t){return t.preventDefault(),e.moveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.currentFolder)}}},[i("div",{attrs:{id:"breadcrumbs"}},[i("div",[e._v("/")]),e._l(e.path,function(t){return i("div",{key:t},[e._v(e._s(e.idMap.get(t).name))])})],2),i("div",{attrs:{id:"actionbar"}},[i("input",{attrs:{id:"files",type:"file",multiple:"",hidden:""},on:{change:function(t){e.upload()}}}),i("div",{attrs:{title:"Create folder"},on:{click:e.createDirectory}},[i("i",{staticClass:"fas fa-plus-square"})]),i("div",{attrs:{title:"Upload files"},on:{click:e.prepareUpload}},[i("i",{staticClass:"fas fa-upload"})])]),i("div",{attrs:{id:"explorer"}},[e.path.length?i("div",{staticClass:"inode folder",on:{dblclick:function(t){e.changeDirectory(-1)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(t){t.preventDefault(),t.stopPropagation(),e.stopDrag(t,e.parentFolder)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v("..")])]):e._e(),e._l(e.folders,function(t){return i("div",{key:t,staticClass:"inode folder",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},dblclick:function(i){e.changeDirectory(t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)},dragover:function(t){return t.preventDefault(),e.moveDrag(t)},dragleave:function(t){return t.preventDefault(),e.leaveDrag(t)},drop:function(i){i.preventDefault(),i.stopPropagation(),e.stopDrag(i,t)}}},[i("i",{staticClass:"fas fa-folder",staticStyle:{"font-size":"50px"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])}),e._l(e.files,function(t){return i("div",{key:t,staticClass:"inode file",class:{"inode-selected":e.selected.includes(t)},attrs:{draggable:"true"},on:{click:function(i){e.select(i,t)},contextmenu:function(i){i.preventDefault(),e.$refs.cm.open(i,t)},dragstart:function(i){e.startDrag(i,t)}}},[i("img",{attrs:{src:"/static/assets/"+e.idMap.get(t).file_hash,width:"50"}}),i("div",{staticClass:"title"},[e._v(e._s(e.idMap.get(t).name))])])})],2)]),e.firstSelectedFile?i("div",{attrs:{id:"asset-details"}},[i("div",{attrs:{id:"asset-detail-title"}},[e._v(e._s(e.firstSelectedFile.name))]),i("img",{attrs:{src:"/static/assets/"+e.firstSelectedFile.file_hash}})]):e._e()]),i("AssetContextMenu",{ref:"cm"}),i("Prompt",{ref:"prompt"}),i("ConfirmDialog",{ref:"confirm"})],1)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},ca56:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("1c76")),a=i("0bc6"),l=i("af17"),c=i("f10f"),u=i("92b1");let d=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.x=0,this.y=0}get IS_DM(){return c.gameStore.IS_DM}open(e){this.visible=!0,this.x=e.pageX,this.y=e.pageY,this.$nextTick(()=>this.$children[0].$el.focus())}close(){this.visible=!1}bringPlayers(){c.gameStore.IS_DM&&(a.socket.emit("Players.Bring",{x:u.l2gx(this.x),y:u.l2gy(this.y)}),this.close())}createToken(){this.$parent.$parent.$refs.createtokendialog.open(this.x,this.y),this.close()}showInitiative(){l.EventBus.$emit("Initiative.Show"),this.close()}};d=n.__decorate([o.default({components:{ContextMenu:r.default}})],d),t.default=d},cad7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("cc67");r.default.registerHooks(["beforeRouteEnter"]);let l=class extends o.default{beforeRouteEnter(e,t,i){s.default.post("/api/logout").then(()=>{a.coreStore.setAuthenticated(!1),a.coreStore.setUsername(""),i({path:"/auth/login"})})}};l=n.__decorate([r.default({})],l),t.default=l},cc67:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=i("6fc5"),o=i("3a0b");let r=class extends s.VuexModule{constructor(){super(...arguments),this.authenticated=!1,this.initialized=!1,this.username=""}setAuthenticated(e){this.authenticated=e}setInitialized(e){this.initialized=e}setUsername(e){this.username=e}};n.__decorate([s.Mutation],r.prototype,"setAuthenticated",null),n.__decorate([s.Mutation],r.prototype,"setInitialized",null),n.__decorate([s.Mutation],r.prototype,"setUsername",null),r=n.__decorate([s.Module({dynamic:!0,store:o.rootStore,name:"core"})],r),t.coreStore=s.getModule(r)},cd49:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("3dfd")),r=i("5f86"),a=i("3a0b");s.default.config.productionTip=!1,s.default.config.devtools=!0,s.default.config.performance=!0,t.app=new s.default({router:r.router,store:a.rootStore,render:e=>e(o.default)}).$mount("#app"),window.app=t.app},cde6:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9"));let r=class extends s.default{};r=n.__decorate([o.default({props:["visible","left","top"]})],r),t.default=r},ce87:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9"));let a=class extends o.default{beforeRouteEnter(e,t,i){s.default.post("/api/invite",{code:e.params.code}).then(e=>{i({path:e.data.sessionUrl})}).catch(e=>{console.error("Invitation code could not be redeemed"),i({path:"/dashboard"})})}};a=n.__decorate([r.default({template:""})],a),t.default=a},cec2:function(e,t,i){"use strict";i.r(t);var n=i("eb57"),s=i("255e");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("0584");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"0602c2e6",null);a.options.__file="prompt.vue",t["default"]=a.exports},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("f10f"),s=i("1216"),o=i("d6be"),r=i("98ef"),a=i("4aee");function l(e,t,i){void 0===i&&(i=n.gameStore.drawTEContour);const r=[e.x,e.y],a=[],l=o.PA_CDT[t].locate(r,null).loc;return null===l?(console.error("Triangle not found"),[]):(a.push(l.vertices[1].point),l.isConstrained(0)||c(r,l.vertices[2].point,l.vertices[1].point,l,0,a),a.push(l.vertices[2].point),l.isConstrained(1)||c(r,l.vertices[0].point,l.vertices[2].point,l,1,a),a.push(l.vertices[0].point),l.isConstrained(2)||c(r,l.vertices[1].point,l.vertices[0].point,l,2,a),i&&s.drawPolygon(a,"red"),a)}function c(e,t,i,n,s,o){const l=n.neighbours[s],d=l.indexT(n),h=a.ccw(d),f=a.cw(d),p=l.vertices[d],g=l.vertices[f],v=l.vertices[h],m=[l,h],y=[l,f],b=a.orientation(e,i,p.point),_=a.orientation(e,t,p.point);if(b===r.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&o.push(u(e,i,p.point,g.point)),_===r.Sign.COUNTERCLOCKWISE&&o.push(u(e,t,p.point,g.point));else{if(_===r.Sign.COUNTERCLOCKWISE)return c(e,t,i,l,h,o);c(e,p.point,i,l,h,o)}if(b!==r.Sign.CLOCKWISE&&_!==r.Sign.COUNTERCLOCKWISE&&o.push(p.point),_===r.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===r.Sign.CLOCKWISE&&o.push(u(e,i,p.point,v.point)),void(t!==v.point&&o.push(u(e,t,p.point,v.point)))):b===r.Sign.CLOCKWISE?c(e,t,i,l,f,o):c(e,t,p.point,l,f,o)}function u(e,t,i,n){const s=(n[1]-i[1])*(t[0]-e[0])-(n[0]-i[0])*(t[1]-e[1]),o=((n[0]-i[0])*(e[1]-i[1])-(n[1]-i[1])*(e[0]-i[0]))/s,r=e[0]+o*(t[0]-e[0]),a=e[1]+o*(t[1]-e[1]);return[r,a]}t.computeVisibility=l},cf8f:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",[e._v("#X")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.xCount,expression:"xCount"}],attrs:{type:"text"},domProps:{value:e.xCount},on:{input:function(t){t.target.composing||(e.xCount=t.target.value)}}}),i("div",[e._v("#Y")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.yCount,expression:"yCount"}],attrs:{type:"text"},domProps:{value:e.yCount},on:{input:function(t){t.target.composing||(e.yCount=t.target.value)}}})]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d065:function(e,t,i){"use strict";i.r(t);var n=i("abef"),s=i("f8b3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("506b");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7c80ae3a",null);a.options.__file="edit_dialog.vue",t["default"]=a.exports},d1ec:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{}n.angleSteps=4,n.drawAngleLines=!1,n.drawFirstLightHit=!1,n.skipPlayerFOW=!1,n.skipLightFOW=!1,n.tempFill="fog",t.Settings=n},d30b:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("bc3a")),o=n.__importDefault(i("a026")),r=n.__importDefault(i("65d9")),a=i("cc67");let l=class extends o.default{constructor(){super(...arguments),this.username="",this.password="",this.error=""}login(){s.default.post("/api/login",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}register(){s.default.post("/api/register",{username:this.username,password:this.password}).then(e=>{a.coreStore.setUsername(this.username),a.coreStore.setAuthenticated(!0),this.$router.push(this.$route.query.redirect||"/")}).catch(e=>{e.response?this.error=e.response.statusText:this.error="Unknown error occured"})}focusin(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="0"}}focusout(e){if(e.target&&e.target.nextElementSibling){const t=e.target.nextElementSibling;t.style.opacity="1"}}};l=n.__decorate([r.default],l),t.default=l},d320:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:function(t){e.visible=!1}},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v("Create basic token")])}}])},[i("div",{staticClass:"modal-body"},[i("label",{attrs:{for:"createtokendialog-text"}},[e._v("Text")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.text,expression:"text"}],attrs:{type:"text",id:"createtokendialog-name"},domProps:{value:e.text},on:{input:function(t){t.target.composing||(e.text=t.target.value)}}}),i("label",[e._v("Colours")]),i("div",{staticClass:"colours"},[i("span",[e._v("Fill:")]),i("color-picker",{attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("span",[e._v("Border:")]),i("color-picker",{attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("canvas",{ref:"canvas",attrs:{width:"100px",height:"100px"}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d323:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div")},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d445:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{name:"modal"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"mask",class:{"modal-mask":e.mask,"dialog-mask":!e.mask},on:{click:e.close,dragover:function(t){return t.preventDefault(),e.dragOver(t)}}},[i("div",{ref:"container",staticClass:"modal-container",on:{click:function(e){e.stopPropagation()}}},[e._t("header",null,{dragStart:e.dragStart,dragEnd:e.dragEnd}),e._t("default")],2)])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},d588:function(e,t,i){"use strict";i.r(t);var n=i("91df"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},d5df:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("65d9")),o=n.__importDefault(i("ea6a")),r=i("0bc6"),a=i("8f0a"),l=i("6f92"),c=i("5e7c"),u=i("0180"),d=i("f10f"),h=i("92b1"),f=i("5a5c");let p=class extends o.default{constructor(){super(...arguments),this.name="Ruler",this.active=!1,this.startPoint=null,this.ruler=null,this.text=null}onMouseDown(e){const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=h.l2g(f.getMouse(e)),this.ruler=new c.Line(this.startPoint,this.startPoint,3,d.gameStore.rulerColour),this.text=new u.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.addOwner(d.gameStore.username),this.text.addOwner(d.gameStore.username),t.addShape(this.ruler,!0,!0),t.addShape(this.text,!0,!0)):console.log("No draw layer!")}onMouseMove(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=h.l2g(f.getMouse(e));this.ruler.endPoint=i,r.socket.emit("Shape.Update",{shape:this.ruler.asDict(),redraw:!0,temporary:!0});const n=Math.sign(i.x-this.startPoint.x)*Math.sign(i.y-this.startPoint.y),s=Math.abs(i.x-this.startPoint.x),o=Math.abs(i.y-this.startPoint.y),c=Math.round(Math.sqrt(Math.pow(s,2)+Math.pow(o,2))*d.gameStore.unitSize/d.gameStore.gridSize)+" ft",u=Math.atan2(n*o,s),p=Math.min(this.startPoint.x,i.x)+s/2,g=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint=new a.GlobalPoint(p,g),this.text.text=c,this.text.angle=u,r.socket.emit("Shape.Update",{shape:this.text.asDict(),redraw:!0,temporary:!0}),t.invalidate(!0)}onMouseUp(e){if(!this.active||null===this.ruler||null===this.startPoint||null===this.text)return;const t=l.layerManager.getLayer("draw");void 0!==t?(this.active=!1,t.removeShape(this.ruler,!0,!0),t.removeShape(this.text,!0,!0),t.invalidate(!0),this.ruler=this.startPoint=this.text=null):console.log("No active layer!")}};p=n.__decorate([s.default],p),t.RulerTool=p},d65f:function(e,t,i){"use strict";i.r(t);var n=i("d445"),s=i("7e15");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("26a5");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"12ed61ba",null);a.options.__file="modal.vue",t["default"]=a.exports},d6be:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("6f92"),s=i("f10f"),o=i("6e4a");function r(e,i=!1){const r=new o.CDT;let a;a="vision"===e?s.gameStore.visionBlockers:s.gameStore.movementblockers;for(const t of a){const e=n.layerManager.UUIDMap.get(t);if(!i||e.visibleInCanvas(n.layerManager.getLayer().canvas))for(let t=0;t{this.shape=e,this.visible=!0})}beforeDestroy(){d.EventBus.$off()}updated(){this.addEmpty()}addEmpty(){""!==this.shape.owners[this.shape.owners.length-1]&&this.shape.addOwner(""),this.shape.trackers.length&&""===this.shape.trackers[this.shape.trackers.length-1].name&&0===this.shape.trackers[this.shape.trackers.length-1].value||this.shape.trackers.push({uuid:c.uuidv4(),name:"",value:0,maxvalue:0,visible:!1}),this.shape.auras.length&&""===this.shape.auras[this.shape.auras.length-1].name&&0===this.shape.auras[this.shape.auras.length-1].value||this.shape.auras.push({uuid:c.uuidv4(),name:"",value:0,dim:0,visionSource:!1,colour:"rgba(0,0,0,0)",visible:!1})}updateShape(e,t=!1){u.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:e,temporary:t}),e&&h.layerManager.invalidate(),this.addEmpty()}setToken(e){this.shape.setIsToken(e.target.checked),this.updateShape(!0)}setVisionBlocker(e){this.shape.checkVisionSources(),this.updateShape(!0)}setMovementBlocker(e){this.shape.setMovementBlock(e.target.checked),this.updateShape(!1)}updateAnnotation(e){const t=""!==this.shape.annotation;this.shape.annotation=e.target.value,""===this.shape.annotation||t?""===this.shape.annotation&&t&&(f.gameStore.annotations.splice(f.gameStore.annotations.findIndex(e=>e===this.shape.uuid)),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)):(f.gameStore.annotations.push(this.shape.uuid),h.layerManager.hasLayer("draw")&&h.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){this.shape.updateOwner(t,e.target.value),this.updateShape(f.gameStore.fowLOS)}removeOwner(e){this.shape.removeOwner(e),this.updateShape(f.gameStore.fowLOS)}removeTracker(e){this.shape.trackers=this.shape.trackers.filter(t=>t.uuid!==e),this.updateShape(!1)}removeAura(e){this.shape.auras=this.shape.auras.filter(t=>t.uuid!==e),this.shape.checkVisionSources(),this.updateShape(!0)}updateAuraVisionSource(e){e.visionSource=!e.visionSource;const t=f.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?f.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&f.gameStore.visionSources.splice(t,1),h.layerManager.invalidateLight(),this.updateShape(!0)}updateAuraColour(e,t){const i=h.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}};n.__decorate([r.Prop()],p.prototype,"shape",void 0),p=n.__decorate([o.default({components:{Modal:l.default,"color-picker":a.default}})],p),t.default=p},dbba:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"main"},on:{mouseleave:e.mouseleave}},[i("menu-bar"),i("div",{attrs:{id:"board"}},[e.ready.manager?[i("tool-bar",{ref:"tools"})]:e._e(),i("div",{attrs:{id:"layers"},on:{mousedown:e.mousedown,mouseup:e.mouseup,mousemove:e.mousemove,contextmenu:function(t){return t.preventDefault(),t.stopPropagation(),e.contextmenu(t)},dragover:function(e){e.preventDefault()},drop:e.drop}}),e.layers.length>1?i("div",{attrs:{id:"layerselect"}},[i("ul",e._l(e.layers,function(t){return i("li",{key:t.name,class:{"layer-selected":t===e.selectedLayer},on:{click:function(i){e.selectLayer(t)}}},[i("a",{attrs:{href:"#"}},[e._v(e._s(t))])])}))]):e._e()],2),i("selection-info",{ref:"selectionInfo"}),i("initiative-dialog",{ref:"initiative",attrs:{id:"initiativedialog"}}),i("note-dialog",{ref:"note"}),i("zoom-slider",{attrs:{id:"zoomer",height:6,width:200,min:.01,max:5,interval:.1,"dot-width":8,"dot-height":20,"tooltip-dir":"bottom",tooltip:"hover",formatter:e.zoomFactor.toFixed(1),"slider-style":{"border-radius":"15%"},"bg-style":{"background-color":"#fff","box-shadow":"0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)"},"process-style":{"background-color":"#fff"}},model:{value:e.zoomFactor,callback:function(t){e.zoomFactor=t},expression:"zoomFactor"}}),i("prompt-dialog",{ref:"prompt"}),i("confirm-dialog",{ref:"confirm"})],1)},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},dc37:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d65f"));let a=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.yes="Yes",this.no="No",this.title="",this.resolve=(e=>{}),this.reject=(()=>{})}confirm(){this.resolve(!0),this.close()}deny(){this.resolve(!1),this.close()}close(){this.reject(),this.visible=!1,this.title=""}open(e,t="yes",i="no"){return this.yes=t,this.no=i,this.title=e,this.visible=!0,this.$nextTick(()=>{this.$refs.confirm.focus()}),new Promise((e,t)=>{this.resolve=e,this.reject=t})}};a=n.__decorate([o.default({components:{Modal:r.default}})],a),t.default=a},de21:function(e,t,i){},dec1:function(e,t,i){"use strict";i.r(t);var n=i("cf8f"),s=i("3481");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="map.vue",t["default"]=a.exports},e06e:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[i("button",{ref:"confirm",on:{click:e.confirm}},[e._v(e._s(e.yes))]),e.no?i("button",{on:{click:e.deny}},[e._v(e._s(e.no))]):e._e()])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},e0ac:function(e,t,i){},e0e9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("1c76")),a=i("5338"),l=i("2d5b"),c=i("4a5b");let u=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.left=0,this.top=0}open(e,t){l.assetStore.selected.includes(t)||c.getComponent().select(e,t),this.visible=!0,this.left=e.pageX,this.top=e.pageY,this.$nextTick(()=>{this.$children[0].$el.focus()})}close(){this.visible=!1}rename(){if(1!==l.assetStore.selected.length)return;const e=l.assetStore.idMap.get(l.assetStore.selected[0]);c.getRef("prompt").prompt("New name:",`Renaming ${e.name}`).then(t=>{a.socket.emit("Asset.Rename",{asset:e.id,name:t}),e.name=t,c.getComponent().$forceUpdate()},()=>{}),this.close()}remove(){0!==l.assetStore.selected.length&&(c.getRef("confirm").open("Are you sure you wish to remove this?").then(e=>{if(e){for(const e of l.assetStore.selected)a.socket.emit("Asset.Remove",e),l.assetStore.files.includes(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.clearSelected()}},()=>{}),this.close())}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e27a:function(e,t,i){"use strict";i.r(t);var n=i("2756"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},e4ea:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("8f0a"),s=i("92b1"),o=i("5a5c"),r=i("8db6"),a=i("2469");class l extends a.Shape{constructor(e,t=[],i,n,s){super(e,i,n,s),this.type="polygon",this._vertices=[],this._vertices=t}get refPoint(){return this._refPoint}set refPoint(e){const t=e.subtract(this._refPoint);this._refPoint=e;for(let i=0;i({x:e.x,y:e.y}))})}fromDict(e){super.fromDict(e),this._vertices=e.vertices.map(e=>new n.GlobalPoint(e.x,e.y))}get points(){return this.vertices.map(e=>[e.x,e.y])}draw(e){super.draw(e),e.lineCap="round",e.lineJoin="round","fog"===this.strokeColour?e.strokeStyle=o.getFogColour():2===this.vertices.length?e.strokeStyle=this.fillColour:e.strokeStyle=this.strokeColour,"fog"===this.fillColour?e.fillStyle=o.getFogColour():e.fillStyle=this.fillColour,e.lineWidth=s.g2lz(2),e.beginPath(),e.moveTo(s.g2lx(this.vertices[0].x),s.g2ly(this.vertices[0].y));for(let t=1;t<=this.vertices.length;t++){const i=this.vertices[t%this.vertices.length];e.lineTo(s.g2lx(i.x),s.g2ly(i.y))}e.fill(),e.stroke()}contains(e){return this.getBoundingBox().contains(e)}center(e){return this.getBoundingBox().center()}visibleInCanvas(e){return this.getBoundingBox().visibleInCanvas(e)}snapToGrid(){}resizeToGrid(){}resize(e,t){0===e?this._refPoint=s.l2g(t):this._vertices[e-1]=s.l2g(t)}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.x,i=this.refPoint.y,s=this.refPoint.y;for(const n of this._vertices)n.xt&&(t=n.x),n.ys&&(s=n.y);return new r.BoundingRect(new n.GlobalPoint(e,i),t-e,s-i)}}t.Polygon=l},e5ca:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.selected?i("div",{staticClass:"tool-detail",style:{"--detailRight":e.detailRight,"--detailArrow":e.detailArrow}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}]},[e._v("Mode")]),i("div",{directives:[{name:"show",rawName:"v-show",value:e.IS_DM,expression:"IS_DM"}],staticClass:"selectgroup"},e._l(e.modes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.modeSelect===t},on:{click:function(i){e.modeSelect=t}}},[e._v(e._s(t))])})),i("div",[e._v("Shape")]),i("div",{staticClass:"selectgroup"},e._l(e.shapes,function(t){return i("div",{key:t,staticClass:"option",class:{"option-selected":e.shapeSelect===t},on:{click:function(i){e.shapeSelect=t}}},[i("i",{staticClass:"fas",class:"fa-"+t})])})),i("div",[e._v("Colours")]),i("div",{staticClass:"selectgroup"},[i("color-picker",{staticClass:"option",attrs:{color:e.fillColour},on:{"update:color":function(t){e.fillColour=t}}}),i("color-picker",{staticClass:"option",attrs:{color:e.borderColour},on:{"update:color":function(t){e.borderColour=t}}})],1),i("div",{directives:[{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}]},[e._v("Brush size")]),i("input",{directives:[{name:"model",rawName:"v-model",value:e.brushSize,expression:"brushSize"},{name:"show",rawName:"v-show",value:"paint-brush"===e.shapeSelect,expression:"shapeSelect === 'paint-brush'"}],staticStyle:{"max-width":"100px"},attrs:{type:"text"},domProps:{value:e.brushSize},on:{input:function(t){t.target.composing||(e.brushSize=t.target.value)}}})]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},e756:function(e,t,i){},e914:function(e,t,i){"use strict";i.r(t);var n=i("c9a2"),s=i("aa69");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("78c7");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="manager.vue",t["default"]=a.exports},e94f:function(e,t,i){"use strict";i.r(t);var n=i("7aaa"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},ea6a:function(e,t,i){"use strict";i.r(t);var n=i("d323"),s=i("6465");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("12d3");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,null,null);a.options.__file="tool.vue",t["default"]=a.exports},eb57:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{visible:e.visible},on:{close:e.close},scopedSlots:e._u([{key:"header",fn:function(t){return i("div",{staticClass:"modal-header",attrs:{draggable:"true"},on:{dragstart:t.dragStart,dragend:t.dragEnd}},[e._v(e._s(e.title))])}}])},[i("div",{staticClass:"modal-body"},[e._v("\n "+e._s(e.question)+"\n "),i("input",{directives:[{name:"model",rawName:"v-model",value:e.answer,expression:"answer"}],ref:"answer",attrs:{type:"text"},domProps:{value:e.answer},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.submit(t):null},input:function(t){t.target.composing||(e.answer=t.target.value)}}})]),i("div",{staticClass:"modal-footer"},[i("button",{on:{click:e.submit}},[e._v("Submit")])])])},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},ebb9:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("1516"));s.default.component("draggable",r.default);const a=n.__importDefault(i("d65f")),l=i("4a5b"),c=i("0bc6"),u=i("af17"),d=i("6f92"),h=i("f10f");let f=class extends s.default{constructor(){super(...arguments),this.visible=!1,this.data=[],this.currentActor=null,this.roundCounter=0}mounted(){u.EventBus.$on("Initiative.Clear",this.clear),u.EventBus.$on("Initiative.Remove",e=>this.removeInitiative(e)),u.EventBus.$on("Initiative.Show",()=>this.visible=!0),c.socket.on("Initiative.Set",e=>{this.data=e}),c.socket.on("Initiative.Turn.Update",e=>this.setTurn(e,!1)),c.socket.on("Initiative.Round.Update",e=>this.setRound(e,!1)),c.socket.on("Initiative.Effect.New",e=>{const t=this.getActor(e.actor);void 0!==t&&this.createEffect(t,e.effect,!1)}),c.socket.on("Initiative.Effect.Update",e=>this.updateEffect(e.actor,e.effect,!1))}beforeDestroy(){u.EventBus.$off()}clear(){this.data=[],this.currentActor=null}getActor(e){return this.data.find(t=>t.uuid===e)}contains(e){return this.data.some(t=>t.uuid===e)}owns(e){if(h.gameStore.IS_DM)return!0;const t=d.layerManager.UUIDMap.get(e.uuid);return void 0!==t&&t.owners.includes(h.gameStore.username)}getDefaultEffect(){return{uuid:l.uuidv4(),name:"New Effect",turns:10}}fakeSetData(e){e.setData("Hack","")}syncInitiative(e){c.socket.emit("Initiative.Update",e)}addInitiative(e){const t=this.data.findIndex(t=>t.uuid===e.uuid);t>=0||(void 0===e.initiative&&(e.initiative=0),this.syncInitiative(e))}removeInitiative(e){const t=this.data.findIndex(t=>t.uuid===e);if(t<0||this.data[t].group)return;this.syncInitiative({uuid:e});const i=d.layerManager.UUIDMap.get(e);void 0!==i&&i.showHighlight&&(i.showHighlight=!1,d.layerManager.getLayer(i.layer).invalidate(!0))}updateOrder(){h.gameStore.IS_DM&&c.socket.emit("Initiative.Set",this.data.map(e=>e.uuid))}setTurn(e,t){if(!h.gameStore.IS_DM&&t)return;this.currentActor=e;const i=this.data.find(t=>t.uuid===e);if(void 0!==i){if(i.effects)for(let e=i.effects.length-1;e>=0;e--)i.effects[e].turns<=0?i.effects.splice(e,1):i.effects[e].turns--;t&&c.socket.emit("Initiative.Turn.Update",e)}}setRound(e,t){!h.gameStore.IS_DM&&t||(this.roundCounter=e,t&&c.socket.emit("Initiative.Round.Update",e))}nextTurn(){if(!h.gameStore.IS_DM)return;const e=this.data,t=e[(e.findIndex(e=>e.uuid===this.currentActor)+1)%e.length];this.data[0].uuid===t.uuid&&this.setRound(this.roundCounter+1,!0),this.setTurn(t.uuid,!0)}toggleHighlight(e,t){const i=d.layerManager.UUIDMap.get(e.uuid);void 0!==i&&(i.showHighlight=t,d.layerManager.getLayer(i.layer).invalidate(!0))}toggleOption(e,t){this.owns(e)&&(e[t]=!e[t],this.syncInitiative(e))}createEffect(e,t,i){this.owns(e)&&(e.effects.push(t),i&&c.socket.emit("Initiative.Effect.New",{actor:e.uuid,effect:t}))}syncEffect(e,t){this.owns(e)&&c.socket.emit("Initiative.Effect.Update",{actor:e.uuid,effect:t})}updateEffect(e,t,i){const n=this.data.find(t=>t.uuid===e);if(void 0===n)return;const s=n.effects.findIndex(e=>e.uuid===t.uuid);void 0!==s&&(n.effects[s]=t,i?this.syncEffect(n,t):this.$forceUpdate())}};f=n.__decorate([o.default({components:{Modal:a.default,draggable:r.default}})],f),t.default=f},ee96:function(e,t,i){},f086:function(e,t,i){"use strict";i.r(t);var n=i("3427"),s=i("7ba5");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("831f");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"32cec914",null);a.options.__file="selection_info.vue",t["default"]=a.exports},f10f:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=i("6fc5"),o=i("0bc6"),r=i("2b48"),a=i("6f92"),l=i("92b1"),c=i("99e3"),u=i("3a0b"),d=i("d6be");let h=class extends s.VuexModule{constructor(){super(...arguments),this.layers=[],this.selectedLayerIndex=-1,this.boardInitialized=!1,this.locations=[],this.assets={},this.notes=[],this.IS_DM=!1,this.gridSize=50,this.username="",this.roomName="",this.roomCreator="",this.invitationCode="",this.gridColour="rgba(0, 0, 0, 1)",this.fowColour="rgba(0, 0, 0, 1)",this.rulerColour="rgba(255, 0, 0, 1)",this.panX=0,this.panY=0,this.zoomFactor=1,this.unitSize=5,this.useGrid=!0,this.fullFOW=!1,this.fowOpacity=.3,this.fowLOS=!1,this.locationName="",this.visionSources=[],this.visionBlockers=[],this.annotations=[],this.movementblockers=[],this.ownedtokens=[],this.BV=Object.freeze(new c.BoundingVolume([])),this.visionMode="bvh",this.drawTEContour=!1,this.visionRangeMin=1640,this.visionRangeMax=3281}get selectedLayer(){return this.layers[this.selectedLayerIndex]}setVisionMode(e){this.visionMode=e.mode,e.sync&&o.socket.emit("Location.Options.Set",{vision_mode:e.mode})}setBoardInitialized(e){this.boardInitialized=e}setDM(e){this.IS_DM=e}setUsername(e){this.username=e}setRoomName(e){this.roomName=e}setRoomCreator(e){this.roomCreator=e}setInvitationCode(e){this.invitationCode=e}addLayer(e){this.layers.push(e),-1===this.selectedLayerIndex&&(this.selectedLayerIndex=this.layers.indexOf(e))}selectLayer(e){const t=this.layers.indexOf(e.name);t>=0&&(this.selectedLayerIndex=t),e.sync&&o.socket.emit("Client.ActiveLayer.Set",e.name)}newNote(e){this.notes.push(e.note),e.sync&&o.socket.emit("Note.New",e.note)}setAssets(e){this.assets=e}setLocations(e){this.locations=e}resetLayerInfo(){this.layers=[],this.selectedLayerIndex=-1}recalculateVision(e=!1){this.boardInitialized&&("triangle"===this.visionMode?d.triangulate("vision",e):this.BV=Object.freeze(new c.BoundingVolume(this.visionBlockers)))}recalculateMovement(e=!1){this.boardInitialized&&"triangle"===this.visionMode&&d.triangulate("movement",e)}updateZoom(e){if(e.newZoomValue===this.zoomFactor)return;e.newZoomValue<.1&&(e.newZoomValue=.01),e.newZoomValue>5&&(e.newZoomValue=5);const t=l.g2l(e.zoomLocation);this.zoomFactor=e.newZoomValue;const i=l.l2g(t),n=i.subtract(e.zoomLocation);this.panX+=n.x,this.panY+=n.y,a.layerManager.invalidate(),r.sendClientOptions()}setGridColour(e){this.gridColour=e.colour,a.layerManager.getGridLayer().drawGrid(),e.sync&&o.socket.emit("Client.Options.Set",{gridColour:e.colour})}setFOWColour(e){this.fowColour=e.colour,a.layerManager.invalidate(),e.sync&&o.socket.emit("Client.Options.Set",{fowColour:e.colour})}setRulerColour(e){this.rulerColour=e.colour,e.sync&&o.socket.emit("Client.Options.Set",{rulerColour:e.colour})}setPanX(e){this.panX=e}setPanY(e){this.panY=e}setZoomFactor(e){this.zoomFactor=e}increasePanX(e){this.panX+=e}increasePanY(e){this.panY+=e}setUnitSize(e){this.unitSize!==e.unitSize&&e.unitSize>0&&e.unitSize<1/0&&(this.unitSize=e.unitSize,a.layerManager.invalidate(),e.sync&&o.socket.emit("Location.Options.Set",{unit_size:e.unitSize}))}setUseGrid(e){if(this.useGrid!==e.useGrid){this.useGrid=e.useGrid;const t=a.layerManager.getGridLayer();e.useGrid?t.canvas.style.display="block":t.canvas.style.display="none",e.sync&&o.socket.emit("Location.Options.Set",{use_grid:e.useGrid})}}setGridSize(e){if(this.gridSize!==e.gridSize&&e.gridSize>0){this.gridSize=e.gridSize;const t=a.layerManager.getGridLayer();void 0!==t&&t.drawGrid(),e.sync&&o.socket.emit("Gridsize.Set",e.gridSize)}}setVisionRangeMin(e){this.visionRangeMin=e.value,a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{vision_min_range:e.value})}setVisionRangeMax(e){this.visionRangeMax=Math.max(e.value,this.visionRangeMin),a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{vision_max_range:this.visionRangeMax})}setFullFOW(e){this.fullFOW!==e.fullFOW&&(this.fullFOW=e.fullFOW,a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{full_fow:e.fullFOW}))}setFOWOpacity(e){this.fowOpacity=e.fowOpacity,a.layerManager.invalidateLight(),e.sync&&o.socket.emit("Location.Options.Set",{fow_opacity:e.fowOpacity})}setLineOfSight(e){this.fowLOS!==e.fowLOS&&(this.fowLOS=e.fowLOS,a.layerManager.invalidate(),e.sync&&o.socket.emit("Location.Options.Set",{fow_los:e.fowLOS}))}setLocationName(e){this.locationName=e}updateNote(e){const t=this.notes.find(t=>t.uuid===e.note.uuid);void 0!==t&&(t.title=e.note.title,t.text=e.note.text,e.sync&&o.socket.emit("Note.Update",t))}removeNote(e){this.notes=this.notes.filter(t=>t.uuid!==e.note.uuid),e.sync&&o.socket.emit("Note.Remove",e.note.uuid)}clear(){this.context.state.visionSources=[],this.context.state.visionBlockers=[],this.context.state.ownedtokens=[],this.context.state.annotations=[],this.context.state.movementblockers=[],this.context.state.notes=[],this.context.commit("recalculateVision"),this.context.commit("recalculateMovement")}};n.__decorate([s.Mutation],h.prototype,"setVisionMode",null),n.__decorate([s.Mutation],h.prototype,"setBoardInitialized",null),n.__decorate([s.Mutation],h.prototype,"setDM",null),n.__decorate([s.Mutation],h.prototype,"setUsername",null),n.__decorate([s.Mutation],h.prototype,"setRoomName",null),n.__decorate([s.Mutation],h.prototype,"setRoomCreator",null),n.__decorate([s.Mutation],h.prototype,"setInvitationCode",null),n.__decorate([s.Mutation],h.prototype,"addLayer",null),n.__decorate([s.Mutation],h.prototype,"selectLayer",null),n.__decorate([s.Mutation],h.prototype,"newNote",null),n.__decorate([s.Mutation],h.prototype,"setAssets",null),n.__decorate([s.Mutation],h.prototype,"setLocations",null),n.__decorate([s.Mutation],h.prototype,"resetLayerInfo",null),n.__decorate([s.Mutation],h.prototype,"recalculateVision",null),n.__decorate([s.Mutation],h.prototype,"recalculateMovement",null),n.__decorate([s.Mutation],h.prototype,"updateZoom",null),n.__decorate([s.Mutation],h.prototype,"setGridColour",null),n.__decorate([s.Mutation],h.prototype,"setFOWColour",null),n.__decorate([s.Mutation],h.prototype,"setRulerColour",null),n.__decorate([s.Mutation],h.prototype,"setPanX",null),n.__decorate([s.Mutation],h.prototype,"setPanY",null),n.__decorate([s.Mutation],h.prototype,"setZoomFactor",null),n.__decorate([s.Mutation],h.prototype,"increasePanX",null),n.__decorate([s.Mutation],h.prototype,"increasePanY",null),n.__decorate([s.Mutation],h.prototype,"setUnitSize",null),n.__decorate([s.Mutation],h.prototype,"setUseGrid",null),n.__decorate([s.Mutation],h.prototype,"setGridSize",null),n.__decorate([s.Mutation],h.prototype,"setVisionRangeMin",null),n.__decorate([s.Mutation],h.prototype,"setVisionRangeMax",null),n.__decorate([s.Mutation],h.prototype,"setFullFOW",null),n.__decorate([s.Mutation],h.prototype,"setFOWOpacity",null),n.__decorate([s.Mutation],h.prototype,"setLineOfSight",null),n.__decorate([s.Mutation],h.prototype,"setLocationName",null),n.__decorate([s.Mutation],h.prototype,"updateNote",null),n.__decorate([s.Mutation],h.prototype,"removeNote",null),n.__decorate([s.Action],h.prototype,"clear",null),h=n.__decorate([s.Module({dynamic:!0,store:u.rootStore,name:"game",namespaced:!0})],h),t.gameStore=s.getModule(h)},f2d0:function(e,t,i){},f30c:function(e,t,i){"use strict";i.r(t);var n=i("dc37"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},f312:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aurasFromServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,visionSource:i.vision_source,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t}),t.aurasToServer=(e=>{const t=[];for(const i of e)t.push({uuid:i.uuid,vision_source:i.visionSource,visible:i.visible,name:i.name,value:i.value,dim:i.dim,colour:i.colour});return t})},f51a:function(e,t,i){"use strict";i.r(t);var n=i("e0e9"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},f551:function(e,t,i){"use strict";i.r(t);var n=i("2686"),s=i("1dd6");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("28b6");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7a3669fd",null);a.options.__file="note.vue",t["default"]=a.exports},f5fe:function(e,t,i){"use strict";i.r(t);var n=i("9d42"),s=i("7018");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("5b4c");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"ccaf03d6",null);a.options.__file="initiative.vue",t["default"]=a.exports},f692:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("4185"),s=i("b906"),o=i("38c9"),r=i("bab4"),a=i("6f92"),l=i("f10f");function c(e){const t=document.createElement("canvas");let i;t.style.zIndex=a.layerManager.layers.length.toString(),t.width=window.innerWidth,t.height=window.innerHeight,i="grid"===e.type_?new o.GridLayer(t,e.name):"fow"===e.type_?new n.FOWLayer(t,e.name):"fow-players"===e.type_?new s.FOWPlayersLayer(t,e.name):new r.Layer(t,e.name),i.selectable=e.selectable,i.playerEditable=e.player_editable,a.layerManager.addLayer(i);const c=document.getElementById("layers");null!==c?("fow-players"!==e.name&&c.appendChild(t),"grid"===e.type_&&e.size&&l.gameStore.setGridSize({gridSize:e.size,sync:!1}),i.setShapes(e.shapes)):console.warn("Layers div is missing, this will prevent the main game board from loading!")}t.createLayer=c},f8a4:function(e,t,i){},f8b3:function(e,t,i){"use strict";i.r(t);var n=i("d8ee"),s=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,function(){return n[e]})}(o);t["default"]=s.a},f994:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("form",{on:{focusin:e.focusin,focusout:e.focusout,submit:function(t){return t.preventDefault(),e.login(t)}}},[i("fieldset",[i("legend",{staticClass:"legend"},[e._v("PlanarAlly")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],attrs:{type:"text",name:"username",placeholder:"Username",autocomplete:"username",required:""},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}}),e._m(0)]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],attrs:{type:"password",name:"password",placeholder:"Password",autocomplete:"current-password",required:""},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}}),e._m(1)]),i("div",{staticStyle:{display:"flex"}},[i("button",{staticStyle:{visibility:"hidden",display:"none"},attrs:{type:"submit",name:"login"}}),i("button",{staticClass:"submit",attrs:{type:"button",name:"register",title:"Register"},on:{click:e.register}},[i("i",{staticClass:"fas fa-plus"})]),e._m(2)])]),e.error?i("div",{staticClass:"feedback"},[i("p",{staticClass:"error"},[i("strong",[e._v("Error:")]),e._v("\n "+e._s(e.error)+"\n ")])]):e._e()])},s=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-user-circle"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("span",[i("i",{staticClass:"fas fa-lock"})])},function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("button",{staticClass:"submit",attrs:{type:"submit",name:"login",title:"Login"}},[i("i",{staticClass:"fas fa-arrow-right"})])}];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},fbdd:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("9ab4"),s=n.__importDefault(i("a026")),o=n.__importDefault(i("65d9")),r=n.__importDefault(i("d065")),a=i("4a5b"),l=i("0bc6"),c=i("af17"),u=i("6f92");let d=class extends s.default{constructor(){super(...arguments),this.shape=null}mounted(){c.EventBus.$on("SelectionInfo.Shape.Set",e=>{this.shape=e})}beforeDestroy(){c.EventBus.$off()}openEditDialog(){this.$refs.editDialog.visible=!0}changeValue(e,t){null!==this.shape&&a.getRef("prompt").prompt(`New ${e.name} value:`,`Updating ${e.name}`).then(i=>{if(null===this.shape)return;const n=e.value;"+"===i[0]||"-"===i[0]?e.value+=parseInt(i,10):e.value=parseInt(i,10),isNaN(e.value)&&(e.value=n),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:t,temporary:!1}),t&&u.layerManager.invalidate()},()=>{})}};d=n.__decorate([o.default({components:{"edit-dialog":r.default}})],d),t.default=d},fe11:function(e,t,i){},fe80:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("af17"),o=i("8f0a"),r=i("6f92"),a=i("f692"),l=i("9cb7"),c=i("f10f"),u=i("5f86");n.socket.on("connect",()=>{console.log("Connected")}),n.socket.on("disconnect",()=>{console.log("Disconnected")}),n.socket.on("connect_error",e=>{console.error("Could not connect to game session."),u.router.push("/dashboard")}),n.socket.on("error",e=>{console.error("Game session does not exist."),u.router.push("/dashboard")}),n.socket.on("redirect",e=>{console.log("redirecting"),u.router.push(e)}),n.socket.on("Room.Info.Set",e=>{c.gameStore.setRoomName(e.name),c.gameStore.setRoomCreator(e.creator),c.gameStore.setInvitationCode(e.invitationCode)}),n.socket.on("Username.Set",e=>{c.gameStore.setUsername(e),c.gameStore.setDM(e===window.location.pathname.split("/")[2])}),n.socket.on("Client.Options.Set",e=>{c.gameStore.setGridColour({colour:e.grid_colour,sync:!1}),c.gameStore.setFOWColour({colour:e.fow_colour,sync:!1}),c.gameStore.setRulerColour({colour:e.ruler_colour,sync:!1}),c.gameStore.setPanX(e.pan_x),c.gameStore.setPanY(e.pan_y),c.gameStore.setZoomFactor(e.zoom_factor),e.active_layer&&r.layerManager.selectLayer(e.active_layer,!1),void 0!==r.layerManager.getGridLayer()&&r.layerManager.getGridLayer().invalidate()}),n.socket.on("Location.Set",e=>{void 0!==e.name&&c.gameStore.setLocationName(e.name),void 0!==e.unit_size&&c.gameStore.setUnitSize({unitSize:e.unit_size,sync:!1}),void 0!==e.use_grid&&c.gameStore.setUseGrid({useGrid:e.use_grid,sync:!1}),void 0!==e.full_fow&&c.gameStore.setFullFOW({fullFOW:e.full_fow,sync:!1}),void 0!==e.fow_opacity&&c.gameStore.setFOWOpacity({fowOpacity:e.fow_opacity,sync:!1}),void 0!==e.fow_los&&c.gameStore.setLineOfSight({fowLOS:e.fow_los,sync:!1}),void 0!==e.vision_min_range&&c.gameStore.setVisionRangeMin({value:e.vision_min_range,sync:!1}),void 0!==e.vision_max_range&&c.gameStore.setVisionRangeMax({value:e.vision_max_range,sync:!1}),void 0!==e.vision_mode&&(c.gameStore.setVisionMode({mode:e.vision_mode,sync:!1}),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement())}),n.socket.on("Position.Set",e=>{l.gameManager.setCenterPosition(new o.GlobalPoint(e.x,e.y))}),n.socket.on("Notes.Set",e=>{for(const t of e)c.gameStore.newNote({note:t,sync:!1})}),n.socket.on("Asset.List.Set",e=>{c.gameStore.setAssets(e)}),n.socket.on("Board.Set",e=>{c.gameStore.clear(),c.gameStore.setLocations(e.locations),document.getElementById("layers").innerHTML="",c.gameStore.resetLayerInfo(),r.layerManager.reset();for(const t of e.layers)a.createLayer(t);r.layerManager.selectLayer(r.layerManager.getLayer().name,!1),s.EventBus.$emit("Initiative.Clear"),c.gameStore.recalculateVision(),c.gameStore.recalculateMovement(),c.gameStore.setBoardInitialized(!0)}),n.socket.on("Gridsize.Set",e=>{c.gameStore.setGridSize({gridSize:e,sync:!1})}),n.socket.on("Shape.Add",e=>{l.gameManager.addShape(e)}),n.socket.on("Shape.Remove",e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.getLayer(e.layer);t.removeShape(r.layerManager.UUIDMap.get(e.uuid),!1),t.invalidate(!1)}),n.socket.on("Shape.Order.Set",e=>{if(!r.layerManager.UUIDMap.has(e.shape.uuid))return void console.log("Attempted to move the shape order of an unknown shape");if(!r.layerManager.hasLayer(e.shape.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.shape.layer}`);const t=r.layerManager.UUIDMap.get(e.shape.uuid),i=r.layerManager.getLayer(t.layer);i.moveShapeOrder(t,e.index,!1)}),n.socket.on("Shape.Layer.Change",e=>{const t=r.layerManager.UUIDMap.get(e.uuid);void 0!==t&&t.moveLayer(e.layer,!1)}),n.socket.on("Shape.Update",e=>{l.gameManager.updateShape(e)}),n.socket.on("Temp.Clear",e=>{e.forEach(e=>{if(!r.layerManager.UUIDMap.has(e.uuid))return void console.log("Attempted to remove an unknown temporary shape");if(!r.layerManager.hasLayer(e.layer))return void console.log(`Attempted to remove shape from an unknown layer ${e.layer}`);const t=r.layerManager.UUIDMap.get(e.uuid);r.layerManager.getLayer(e.layer).removeShape(t,!1)})})}}); -//# sourceMappingURL=app.f228bc3b.js.map \ No newline at end of file diff --git a/server/static/js/app.f228bc3b.js.map b/server/static/js/app.f228bc3b.js.map deleted file mode 100644 index 4ee3f38a5..000000000 --- a/server/static/js/app.f228bc3b.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/game/shapes/text.ts","webpack:///./src/game/ui/selection/shapecontext.vue","webpack:///./src/App.vue?5b85","webpack:///./src/core/components/modals/prompt.vue?d33d","webpack:///./src/core/components/colorpicker.vue?4d88","webpack:///./src/game/game.vue","webpack:///./src/game/api/socket.ts","webpack:///./src/assetManager/manager.vue?5633","webpack:///./src/game/ui/menu/asset_node.vue","webpack:///./src/game/ui/tools/selectcontext.vue?02dc","webpack:///./src/auth/login.vue","webpack:///./src/game/visibility/te/draw.ts","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/game/ui/annotation.ts","webpack:///./src/core/components/colorpicker.vue?8070","webpack:///./src/game/ui/menu/menu.vue","webpack:///./src/core/components/contextmenu.vue","webpack:///./src/game/ui/note.vue?49b7","webpack:///./src/auth/login.vue?c159","webpack:///./src/game/ui/tools/select.vue?9b60","webpack:///./src/game/ui/tools/select.vue?1885","webpack:///./src/game/shapes/utils.ts","webpack:///./src/core/components/modals/confirm.vue?e6fb","webpack:///./src/game/shapes/shape.ts","webpack:///./src/core/components/modals/prompt.vue?d457","webpack:///./src/game/ui/note.vue?a34d","webpack:///./src/game/ui/note.vue?23aa","webpack:///./src/core/components/modals/modal.vue?33b9","webpack:///./src/game/ui/tools/select.vue?49f9","webpack:///./src/game/ui/tools/utils.ts","webpack:///./src/game/ui/note.vue?a508","webpack:///./src/game/api/utils.ts","webpack:///./src/game/ui/menu/asset_node.vue?f519","webpack:///./src/core/components/contextmenu.vue?f03a","webpack:///./src/core/components/contextmenu.vue?7efa","webpack:///./src/assetManager/store.ts","webpack:///./src/core/components/contextmenu.vue?50e1","webpack:///./src/game/ui/selection/shapecontext.vue?1cf6","webpack:///./src/game/ui/selection/selection_info.vue?321c","webpack:///./src/game/ui/selection/selection_info.vue?8aba","webpack:///./src/game/ui/tools/map.vue?284a","webpack:///./src/game/layers/grid.ts","webpack:///./src/store.ts","webpack:///./src/core/components/colorpicker.vue","webpack:///./src/auth/login.vue?3521","webpack:///./src/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","webpack:///./src/game/ui/menu/menu.vue?002b","webpack:///./src/game/ui/menu/menu.vue?9e9a","webpack:///./src/game/shapes/circle.ts","webpack:///./src/game/ui/tools/map.vue?a3ab","webpack:///./src/core/components/load.vue","webpack:///./src/game/ui/tools/pan.ts","webpack:///./src/game/ui/tools/selectcontext.vue","webpack:///./src/core/utils.ts","webpack:///./src/assetManager/contextMenu.vue","webpack:///./src/game/visibility/te/triag.ts","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/edit_dialog.vue?530c","webpack:///./src/core/components/modals/modal.vue?44ae","webpack:///./src/assetManager/socket.ts","webpack:///./src/game/ui/tools/tools.vue?c96e","webpack:///./src/game/game.vue?5550","webpack:///./src/game/shapes/multiline.ts","webpack:///./src/core/components/colorpicker.vue?eaab","webpack:///./src/core/components/colorpicker.vue?8615","webpack:///./src/game/ui/tools/draw.vue","webpack:///./src/game/utils.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?d0df","webpack:///./src/game/ui/note.vue?f9bd","webpack:///./src/game/ui/initiative.vue?f4e1","webpack:///./src/game/ui/tools/draw.vue?b96d","webpack:///./src/game/shapes/line.ts","webpack:///./src/router.ts","webpack:///./src/game/ui/tools/tool.vue?d136","webpack:///./src/game/ui/tools/tools.vue","webpack:///./src/game/ui/tools/tool.vue?8ce3","webpack:///./src/game/shapes/asset.ts","webpack:///./src/game/visibility/te/cdt.ts","webpack:///./src/game/ui/tools/draw.vue?1261","webpack:///./src/game/layers/manager.ts","webpack:///./src/game/ui/initiative.vue?c7e1","webpack:///./src/game/ui/tools/createtoken_modal.vue","webpack:///./src/game/visibility/bvh/node.ts","webpack:///./src/game/ui/tools/createtoken_modal.vue?f918","webpack:///./src/game/events/keyboard.ts","webpack:///./src/assetManager/manager.vue?433f","webpack:///./src/game/ui/selection/shapecontext.vue?17f5","webpack:///./src/game/ui/tools/tools.vue?25b2","webpack:///./src/game/ui/selection/selection_info.vue?2310","webpack:///./src/core/components/modals/modal.vue?09d2","webpack:///./src/core/components/contextmenu.vue?a0a2","webpack:///./src/game/ui/selection/selection_info.vue?b9a9","webpack:///./src/core/components/modals/prompt.vue?4e1b","webpack:///./src/game/ui/menu/asset_node.vue?4088","webpack:///./src/game/ui/menu/asset_node.vue?fc27","webpack:///./src/core/components/load.vue?4ab2","webpack:///./src/core/components/load.vue?0f87","webpack:///./src/game/ui/tools/tools.vue?d74c","webpack:///./src/game/ui/tools/tools.vue?35df","webpack:///./src/game/ui/menu/menu.vue?8b23","webpack:///./src/game/shapes/boundingrect.ts","webpack:///./src/dashboard/main.vue?5e14","webpack:///./src/dashboard/main.vue?94d1","webpack:///./src/game/geom.ts","webpack:///./src/game/game.vue?5592","webpack:///./src/game/units.ts","webpack:///./src/game/ui/menu/menu.vue?ae57","webpack:///./src/core/components/colorpicker.vue?1682","webpack:///./src/game/ui/tools/selectcontext.vue?0020","webpack:///./src/game/ui/tools/selectcontext.vue?758c","webpack:///./src/game/visibility/te/tds.ts","webpack:///./src/game/visibility/bvh/bvh.ts","webpack:///./src/game/manager.ts","webpack:///./src/game/ui/initiative.vue?e806","webpack:///./src/game/ui/initiative.vue?ca6b","webpack:///./src/core/components/load.vue?8cd0","webpack:///./src/game/ui/selection/shapecontext.vue?4b66","webpack:///./src/game/ui/selection/shapecontext.vue?0558","webpack:///./src/game/game.vue?9a3e","webpack:///./src/dashboard/main.vue?3f72","webpack:///./src/core/components/modals/confirm.vue","webpack:///./src/game/ui/selection/shapecontext.vue?aac0","webpack:///./src/assetManager/contextMenu.vue?c131","webpack:///./src/assetManager/contextMenu.vue?a185","webpack:///./src/game/ui/tools/draw.vue?60f4","webpack:///./src/assetManager/manager.vue?a11e","webpack:///./src/game/ui/selection/edit_dialog.vue?6a1d","webpack:///./src/game/ui/selection/edit_dialog.vue?d983","webpack:///./src/game/event-bus.ts","webpack:///./src/dashboard/main.vue?d5a9","webpack:///./src/game/shapes/rect.ts","webpack:///./src/game/ui/tools/selectcontext.vue?6f66","webpack:///./src/game/layers/fowplayers.ts","webpack:///./src/game/layers/layer.ts","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/menu/asset_node.vue?be10","webpack:///./src/game/ui/menu/menu.vue?904d","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","webpack:///./src/game/ui/tools/createtoken_modal.vue?6f0b","webpack:///./src/assetManager/manager.vue?765a","webpack:///./src/assetManager/manager.vue?a045","webpack:///./src/game/ui/tools/selectcontext.vue?d61f","webpack:///./src/auth/logout.ts","webpack:///./src/core/store.ts","webpack:///./src/main.ts","webpack:///./src/core/components/contextmenu.vue?f402","webpack:///./src/invitation/invitation.ts","webpack:///./src/core/components/modals/prompt.vue","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/game/ui/tools/map.vue?f96f","webpack:///./src/game/ui/tools/map.vue?7f60","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","webpack:///./src/game/ui/tools/createtoken_modal.vue?e7b2","webpack:///./src/game/ui/tools/createtoken_modal.vue?5fcc","webpack:///./src/game/ui/tools/tool.vue?6323","webpack:///./src/game/ui/tools/tool.vue?f5ba","webpack:///./src/core/components/modals/modal.vue?1854","webpack:///./src/core/components/modals/modal.vue?e329","webpack:///./src/game/game.vue?d01c","webpack:///./src/game/ui/tools/ruler.ts","webpack:///./src/core/components/modals/modal.vue","webpack:///./src/game/visibility/te/pa.ts","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/game/ui/selection/edit_dialog.vue?9a84","webpack:///./src/game/game.vue?5ab9","webpack:///./src/game/game.vue?07bd","webpack:///./src/core/components/modals/confirm.vue?f9ee","webpack:///./src/game/ui/tools/map.vue","webpack:///./src/core/components/modals/confirm.vue?e141","webpack:///./src/core/components/modals/confirm.vue?be48","webpack:///./src/assetManager/contextMenu.vue?1b1b","webpack:///./src/game/ui/tools/select.vue?b7fd","webpack:///./src/game/shapes/polygon.ts","webpack:///./src/game/ui/tools/draw.vue?1866","webpack:///./src/game/ui/tools/draw.vue?03b4","webpack:///./src/assetManager/manager.vue","webpack:///./src/game/ui/tools/tools.vue?fa4a","webpack:///./src/game/ui/tools/tool.vue","webpack:///./src/core/components/modals/prompt.vue?0a11","webpack:///./src/core/components/modals/prompt.vue?36e2","webpack:///./src/game/ui/initiative.vue?36c8","webpack:///./src/game/ui/selection/selection_info.vue","webpack:///./src/game/store.ts","webpack:///./src/core/components/modals/confirm.vue?a22f","webpack:///./src/game/comm/conversion/aura.ts","webpack:///./src/assetManager/contextMenu.vue?1e9a","webpack:///./src/game/ui/note.vue","webpack:///./src/game/ui/initiative.vue","webpack:///./src/game/layers/utils.ts","webpack:///./src/game/ui/selection/edit_dialog.vue?3800","webpack:///./src/auth/login.vue?e4a1","webpack:///./src/auth/login.vue?8f9e","webpack:///./src/game/ui/selection/selection_info.vue?5d62","webpack:///./src/game/api/events.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","app","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","boundingrect_1","shape_1","units_1","Text","Shape","[object Object]","position","text","font","angle","fillColour","strokeColour","uuid","super","this","type","assign","getBaseDict","points","refPoint","x","y","BoundingRect","ctx","draw","fillStyle","save","dest","g2l","translate","rotate","textAlign","getLines","map","line","fillText","restore","point","centerPoint","canvas","getBoundingBox","visibleInCanvas","resizePoint","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","__webpack_exports__","_shapecontext_vue_vue_type_template_id_759e5a8a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","__WEBPACK_IMPORT_KEY__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__","component","options","__file","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_style_index_0_id_0602c2e6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor2_1","tslib_1","__importDefault","vue_1","vue_class_component_1","vue_color_1","vue_property_decorator_1","ColorPicker","default","display","left","top","transparent","$refs","chromePicker","val","rgba","a","setPosition","$nextTick","$children","$el","focus","newColor","toRgbString","$emit","color","rect","getBoundingClientRect","right","innerWidth","bottom","innerHeight","__decorate","Prop","String","components","chrome-picker","Chrome","_game_vue_vue_type_template_id_6d744362_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_4__","socket_io_client_1","createConnection","route","socket","io","opts","query","params","creator","room","connect","location","protocol","host","autoConnect","contextMenu_vue_1","confirm_vue_1","prompt_vue_1","socket_1","store_1","utils_1","AssetManager","path","draggingSelection","folders","assetStore","files","selected","idMap","currentFolder","root","parentFolder","parent","undefined","firstSelectedFile","sel","file_hash","nextFolder","pop","clearSelected","emit","prompt","inode","target","includes","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","classList","contains","add","remove","moveInode","upload","document","getElementById","click","fls","CHUNK_SIZE","uuidv4","slices","ceil","size","fr","FileReader","readAsArrayBuffer","min","onload","e","directory","totalSlices","Prompt","ConfirmDialog","AssetContextMenu","to","from","next","disconnect","_asset_node_vue_vue_type_template_id_62c91cd3_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_style_index_0_id_44a31e42_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_login_vue_vue_type_template_id_bc30fc14_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","manager_1","tds_1","triag_1","drawPolygon","polygon","colour","dl","layerManager","getLayer","lineJoin","beginPath","strokeStyle","random","moveTo","g2lx","g2ly","lineTo","closePath","stroke","drawPolygonL","xx","local","yy","I","J","drl","constrained","drawPolygonT","tds","clear","logs","T","clearRect","ei","EdgeIterator","valid","collect","fromP","edge","first","vertices","ccw","second","toP","cw","Infinity","constraints","console","log","pos","triangles","isInfinite","po","arc","PI","fill","DP","DPL","DPT","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","tinycolor","__importStar","circle_1","CircularToken","Circle","center","radius","fromDict","textBaseline","xs","calcFontScale","g2lz","ys","transform","mostReadable","toHexString","visible","gameStore","IS_DM","group","source","has_img","effects","index","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","height","getMaxHeight","w","zoomFactor","h","invalidate","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_b4f2c0b0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_style_index_0_id_b4f2c0b0_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_menu_vue_vue_type_template_id_aaf3f05e_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_contextmenu_vue_vue_type_template_id_256dde9c___WEBPACK_IMPORTED_MODULE_0__","_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","render","_vm","_h","$createElement","_c","_self","ref","staticRenderFns","asset_1","circulartoken_1","line_1","multiline_1","polygon_1","createShapeFromDict","shape","dummy","UUIDMap","has","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","Polygon","v","asset","img","Image","src","startsWith","URL","pathname","Asset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_style_index_0_id_1883e207_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","aura_1","trackers","auras","_owners","visionObstruction","movementObstruction","isToken","showHighlight","annotation","globalCompositeOperation","Map","_refPoint","delta","idx","entries","abs","prev","fromArray","vec","subtract","mid","multiply","normalize","skipLightUpdate","recalculate","self","obstructionIndex","visionBlockers","update","recalculateVision","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","recalculateMovement","ownedBy","ownedtokens","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","owners","is_token","JSON","stringify","aurasFromServer","parse","bbox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","freeze","username","owner","oldValue","newValue","ownerIndex","addOwner","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","note","attrs","mask","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","title","select","staticStyle","font-size","directives","rawName","expression","domProps","change","updateNote","input","composing","$set","style","calcHeight","removeNote","_v","_e","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_style_index_0_id_12ed61ba_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","selectcontext_vue_1","tool_vue_1","utils_2","utils_3","SelectOperations","SelectTool","showContextMenu","active","Noop","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","getPointIndex","l2gz","getRef","Resize","Drag","localRefPoint","GroupSelect","endPoint","og","direction","ogDelta","calculateDelta","asDict","redraw","temporary","resize","updateCursor","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","open","selectcontext","getPointOrientation","SelectContext","pa_1","done","visionMode","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","blockerBBox","found","intersectsWithInner","ray","fromPoints","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","centerTriangle","PA_CDT","movement","locate","asArray","lt","triangle","checkTriangle","skip","endpoint","neighbours","_cw","_ccw","ix","intersection","isConstrained","orientation","Sign","LEFT_TURN","ZERO","newDelta","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_note_vue_vue_type_style_index_0_id_7a3669fd_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","sendClientOptions","locationOptions","panX","panY","AssetNode","showImage","keys","filter","el","sort","alphSort","__files","b","toLowerCase","children","imageSource","querySelector","setDragImage","tabindex","blur","_t","vuex_module_decorators_1","AssetStore","VuexModule","Mutation","Module","dynamic","store","rootStore","namespaced","getModule","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","contextmenu_vue_1","event_bus_1","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","EventBus","ContextMenu","id","openEditDialog","_s","_l","tracker","changeValue","maxvalue","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","layer_1","GridLayer","Layer","doClear","drawGrid","gs","gridSize","gridColour","lineWidth","vuex_1","use","Store","_colorpicker_vue_vue_type_template_id_b4f2c0b0_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_login_vue_vue_type_style_index_0_id_bc30fc14_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","script","componentNormalizer","settings_1","te_1","FOWLayer","isVisionLayer","preFogShapes","virtualCanvas","createElement","vCtx","getContext","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","bb","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","computeVisibility","drawImage","fowLOS","preShape","ogComposite","getFogColour","fillRect","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","settings","locations","class","rm-list-dm","_m","enter","rm","transition","settingsClick","overflow-y","overflow-x","href","assets","createNote","openNote","notes","for","checked","Array","isArray","_i","$$a","$$el","$$c","$$v","$$i","modifiers","number","step","fowOpacity","_n","$forceUpdate","unitSize","changeVisionMode","$store","state","game","lazy","visionRangeMin","visionRangeMax","readonly","invitationCode","update:color","fowColour","rulerColour","text-decoration","changeLocation","createLocation","pow","targetX","targetY","round","diff","sqrt","baserect_1","MapTool","xCount","yCount","startPoint","clone","BaseRect","_load_vue_vue_type_template_id_ff095222___WEBPACK_IMPORTED_MODULE_0__","_load_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__","PanTool","panStart","distance","increasePanX","increasePanY","_selectcontext_vue_vue_type_template_id_44a31e42_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","main_1","replace","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","appendChild","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_606797b4___WEBPACK_IMPORTED_MODULE_0__","_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","edgeInfo","va","vb","ec","EdgeCirculator","indv","indexV","ri","infinite","vi","orient","COLLINEAR","collinearBetween","q","cPQ","cQR","compare","EQUAL","SMALLER","LARGER","px","py","qx","qy","rx","ry","pqx","pqy","prx","pry","det","determinant","maxX","maxY","aprX","aprY","eps","EPSILON","POSITIVE","NEGATIVE","a00","a01","a10","a11","hasInexactNegativeOrientation","sideOfOrientedCircle","perturb","sideOfOrientedCircleP","Error","p0","p1","p2","os","getOrientedSide","ON_ORIENTED_BOUNDARY","reverse","ON_NEGATIVE_SIDE","xyEqual","xySmaller","xyCompare","qpx","qpy","rpx","rpy","tpx","tpy","tqx","tqy","rqx","rqy","maxx","maxy","arpx","arpy","atqx","atqy","atpx","atpy","arqx","arqy","ON_POSITIVE_SIDE","segSegDoIntersectCrossing","p3","p4","RIGHT_TURN","segSegDoIntersectContained","pa","pb","pc","pd","getIntersectionType","intersectionType","IntersectionType","POINT","NO_INTERSECTION","getLine","doIntersect","l1","l2","info","getIntersectionTypeLine","la","lb","denom","nom1","nom2","A1","A2","B1","B2","nextUp","MAX_VALUE","MIN_VALUE","ulp","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_7c80ae3a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_style_index_0_id_7c80ae3a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","Boolean","destination","setRoot","folder","child","set","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_1fee50f5_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_style_index_0_id_1fee50f5_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_points","minx","miny","lineCap","currentTarget","closePicker","z-index","updateColor","_draw_vue_vue_type_template_id_639cd890_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","opposite","colorpicker_vue_1","modal_vue_1","CreateTokenModal","borderColour","updatePreview","Watch","color-picker","computed","mapState","NoteDialog","textarea","scrollHeight","then","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_ccaf03d6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_style_index_0_id_ccaf03d6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","DrawTool","brushHelper","ruler","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","_vertices","pushBrushBack","lastPoint","finaliseShape","axios_1","vue_router_1","manager_vue_1","login_vue_1","logout_1","load_vue_1","main_vue_1","game_vue_1","invitation_1","router","base","routes","redirect","meta","auth","template","beforeEach","coreStore","initialized","matched","record","authenticated","response","setAuthenticated","setUsername","setInitialized","catch","error","Tool","detailRight","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","onDeselect","onSelect","_tools_vue_vue_type_template_id_1fee50f5_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","topleft","CDT","TDS","insert","insertConstraintV","stack","markConstraint","intersectionInfo","findIntersectedFaces","triangulateHole","intersectedFaces","listAB","listBA","edges","triangulateHole2","propagatingFlipE","triangulateHalfHole","fl","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","BoundingBox","dilate","overlaps","removeConstrainedEdge","dimension","indf","locateInfo","iLocate","insertb","li","flipAround","propagatingFlip","depth","isFlipable","maxDepth","ni","flip","e1","e2","uid","eni","eI","edgeSet","lessEdge","indn","ed","tt","ii","u","t1","t2","t3","i3","t4","i4","insertInConstrainedEdge","LocateType","EDGE","insertc","updateConstraintsIncident","VERTEX","clearConstraintsIncident","updateConstraintsOpposite","c1","c2","fc","FaceCirculator","cwi","ccwi","insertFirst","finiteVertex","insertSecond","OUTSIDE_AFFINE_HULL","insertOutsideAffineHull","OUTSIDE_CONVEX_HULL","insertOutsideConvexHull","insertInEdge","FACE","insertInFace","insertDimUp","_infinite","conform","finiteEdge","COUNTERCLOCKWISE","insertOutsideConvexHull2","ccwlist","cwlist","th","marchLocate1D","marchLocate2D","ff","iv","pqt","Triangle","leftFirst","o0","o1","o2","sum","nTurns","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","LayerManager","interval","drawLoop","requestAnimationFrame","addLayer","selectedLayer","globalAlpha","selectLayer","getSelection","image","getData","l2gx","l2gy","lm","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_createtoken_modal_vue_vue_type_template_id_73816298_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","BoundingNode","nPrimitives","LeafNode","firstPrimOffset","InteriorNode","union","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","onKeyDown","keyCode","hasSelection","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_style_index_0_id_759e5a8a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","shapecontext_vue_1","createtoken_modal_vue_1","draw_vue_1","map_vue_1","pan_1","select_vue_1","manager_2","ruler_1","Tools","currentTool","tools","dmTools","currentToolComponent","tagName","targetTool","button","buttons","annotations","gameManager","annotationManager","setActiveText","select-tool","pan-tool","draw-tool","ruler-tool","RulerTool","map-tool","shape-menu","createtoken-dialog","watch","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextmenu_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_32cec914_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selection_info_vue_vue_type_style_index_0_id_32cec914_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","question","answer","resolve","reject","Promise","stopPropagation","toggle","mouseover","hash","mouseout","message","refInFor","tool-selected","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","botRight","vector","other","xmin","xmax","ymin","ymax","botright","dirIsNeg","txmin","getDiagCorner","txmax","tymin","tymax","tMax","coreVisible","owned","joined","submit","preventDefault","createRoom","placeholder","newSessionName","tag","getPointDistance","Point","scale","atan2","maxT","vue_slider_component_1","lodash_1","initiative_vue_1","menu_vue_1","note_vue_1","selection_info_vue_1","tools_vue_1","keyboard_1","mouse_1","Game","ready","manager","updateZoom","newZoomValue","zoomLocation","addEventListener","setWidth","setHeight","throttle","scrollZoom","mousedown","mouseup","mousemove","mouseleave","contextmenu","confirm","dropAsset","tool-bar","selection-info","prompt-dialog","confirm-dialog","menu-bar","initiative-dialog","zoom-slider","note-dialog","obj","z","l2gr","asset_node_vue_1","MenuBar","setUseGrid","setFullFOW","setFOWOpacity","setLineOfSight","setUnitSize","setGridSize","setGridColour","setFOWColour","setRulerColour","setVisionRangeMin","setVisionRangeMax","nextElementSibling","newNote","setVisionMode","asset-node","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_colorpicker_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","bringPlayers","createToken","showInitiative","_INFINITE_VERTEX","LineFaceState","newPoint","INFINITE","_counter","vertex","A","sign","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","dir","UNDEFINED","_tr","ic","vt","vr","pqr","VERTEX_VERTEX","VERTEX_EDGE","EDGE_VERTEX","EDGE_EDGE","createVertex","addVertex","infiniteVertex","n0","trig","t0","i0","setAdjacency","deleteList","copy","neighbour","lfit","reorient","vCW","vCCW","tri","bl","bli","vv","g","x1","y1","dist","node_1","BoundingVolume","totalNodes","buildData","orderedPrims","nodes","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","localPos","fakeSetData","disabled","updateOrder","model","callback","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","notAllowed","owns","syncInitiative","opacity","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","setTurn","nextTurn","LoadComponent","getLayers","background-color","setLayer","moveToBack","moveToFront","getInitiativeWord","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_6d744362_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_style_index_1_id_6d744362_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","registerHooks","Dashboard","vm","err","post","$router","_confirm_vue_vue_type_template_id_1883e207_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_shapecontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","rename","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_draw_vue_vue_type_style_index_0_id_639cd890_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","grid-column","updateShape","grid-column-start","setToken","setVisionBlocker","setMovementBlocker","updateOwner","removeOwner","removeTracker","updateAuraColour","updateAuraVisionSource","removeAura","updateAnnotation","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_selectcontext_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","FOWPlayersLayer","skipPlayerFOW","drctx","maxLength","tokenId","_a","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","destinationIndex","oldIdx","deltaY","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_62c91cd3_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_asset_node_vue_vue_type_style_index_0_id_62c91cd3_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_menu_vue_vue_type_style_index_0_id_aaf3f05e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","topright","botleft","mx","my","_select_vue_vue_type_template_id_cad11dd2___WEBPACK_IMPORTED_MODULE_0__","_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_main_vue_vue_type_template_id_61eb1455_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_main_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_createtoken_modal_vue_vue_type_style_index_0_id_73816298_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","dragover","moveDrag","drop","stopDrag","multiple","hidden","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","inode-selected","cm","startDrag","createtokendialog","Logout","CoreStore","init","App_vue_1","router_1","config","productionTip","devtools","performance","$mount","props","Initiative","code","sessionUrl","_prompt_vue_vue_type_template_id_0602c2e6_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_prompt_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","draw_1","drawt","drawTEContour","Q","rawOutput","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","--detailRight","--detailArrow","_edit_dialog_vue_vue_type_template_id_7c80ae3a_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","tempFill","Login","password","$route","statusText","span","modal-mask","dialog-mask","dragOver","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_game_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","diffsign","xdiff","ydiff","label","xmid","ymid","_modal_vue_vue_type_template_id_12ed61ba_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_modal_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","cdt_1","triangulate","partial","cdt","insertConstraint","vision","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_main_vue_vue_type_style_index_0_id_61eb1455_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","EditDialog","$off","addEmpty","hadAnnotation","an","layer-selected","dot-width","dot-height","tooltip-dir","tooltip","formatter","toFixed","slider-style","border-radius","bg-style","box-shadow","process-style","yes","no","ok","_map_vue_vue_type_template_id_2104f147___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","deny","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_select_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","option-selected","max-width","_manager_vue_vue_type_template_id_5b0def98___WEBPACK_IMPORTED_MODULE_0__","_manager_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tools_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_tool_vue_vue_type_template_id_1e034b42___WEBPACK_IMPORTED_MODULE_0__","_tool_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","keyup","_k","vuedraggable_1","getActor","actorId","order","show","option","effectIndex","syncEffect","_selection_info_vue_vue_type_template_id_32cec914_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_selection_info_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","bvh_1","GameStore","selectedLayerIndex","boardInitialized","roomName","roomCreator","locationName","vision_mode","isDM","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","vision_min_range","vision_max_range","full_fow","fow_opacity","fow_los","actualNote","context","commit","Action","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_confirm_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","vision_source","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_contextMenu_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","_note_vue_vue_type_template_id_7a3669fd_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_note_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","_initiative_vue_vue_type_template_id_ccaf03d6_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_initiative_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","fow_1","fowplayers_1","grid_1","createLayer","layerInfo","zIndex","player_editable","setShapes","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_js_ref_12_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_dialog_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default","focusin","focusout","login","autocomplete","required","visibility","register","edit_dialog_vue_1","SelectionInfo","editDialog","ogValue","isNaN","edit-dialog","setRoomName","setRoomCreator","setInvitationCode","setDM","grid_colour","fow_colour","ruler_colour","setPanX","pan_x","setPanY","pan_y","setZoomFactor","zoom_factor","active_layer","setLocationName","setCenterPosition","setAssets","locationInfo","setLocations","innerHTML","resetLayerInfo","reset","setBoardInitialized","realShape"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAGAe,KAAAhB,GAEA,MAAAO,EAAAC,OACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,E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eAAehS,EAAOhZ,EAAKgW,OAAO,KAE5C/J,EAAAf,OAAO4U,GAAG,qBAAuB9f,IAC7B,MAAMgZ,EAAQpI,EAAAO,aAAa+H,QAAQxW,IAAI1C,EAAK0E,WAC9BsI,IAAVgM,GACJA,EAAM8R,UAAU9qB,EAAK2W,OAAO,KAEhC1K,EAAAf,OAAO4U,GAAG,eAAiB9f,IACvBsvC,EAAAY,YAAYoQ,YAAYtgD,KAE5BiM,EAAAf,OAAO4U,GAAG,aAAeb,IACrBA,EAAOvC,QAAQ1D,IACX,IAAKpI,EAAAO,aAAa+H,QAAQC,IAAIH,EAAMtU,MAEhC,YADAiP,QAAQC,IAAI,kDAGhB,IAAKhD,EAAAO,aAAayF,SAASoC,EAAMrC,OAE7B,YADAhD,QAAQC,uDAAuDoF,EAAMrC,SAGzE,MAAMg6C,EAAY//C,EAAAO,aAAa+H,QAAQxW,IAAIsW,EAAMtU,MACjDkM,EAAAO,aAAaC,SAAS4H,EAAMrC,OAAQ+W,YAAYijC,GAAW","file":"static/js/app.f228bc3b.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2l } from \"@/game/units\";\n\nexport class Text extends Shape {\n type = \"text\";\n text: string;\n font: string;\n angle: number;\n constructor(\n position: GlobalPoint,\n text: string,\n font: string,\n angle?: number,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(position, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n this.angle = angle || 0;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n text: this.text,\n font: this.font,\n angle: this.angle,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(this.refPoint, 5, 5); // TODO: fix this bounding box\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.fillStyle = this.fillColour;\n ctx.save();\n const dest = g2l(this.refPoint);\n ctx.translate(dest.x, dest.y);\n ctx.rotate(this.angle);\n ctx.textAlign = \"center\";\n this.getLines(ctx).map(line => ctx.fillText(line.text, line.x, line.y));\n ctx.restore();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {}\n\n getMaxHeight(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const lineHeight = 30;\n return lineHeight * lines.length;\n }\n\n getMaxWidth(ctx: CanvasRenderingContext2D) {\n const lines = this.getLines(ctx);\n const widths = lines.map(line => ctx.measureText(line.text).width);\n return Math.max(...widths);\n }\n\n private getLines(ctx: CanvasRenderingContext2D) {\n const lines = this.text.split(\"\\n\");\n const allLines: { text: string; x: number; y: number }[] = [];\n const maxWidth = ctx.canvas.width;\n const lineHeight = 30;\n const x = 0; // this.refPoint.x;\n let y = 0; // this.refPoint.y;\n\n for (const line of lines) {\n let targetLine = \"\";\n const words = line.split(\" \");\n for (const word of words) {\n const testLine = targetLine + word + \" \";\n const metrics = ctx.measureText(testLine);\n const testWidth = metrics.width;\n if (testWidth > maxWidth) {\n ctx.fillText(targetLine, x, y);\n allLines.push({ text: targetLine, x, y });\n targetLine = word + \" \";\n y += lineHeight;\n } else {\n targetLine = testLine;\n }\n }\n allLines.push({ text: targetLine, x, y });\n y += lineHeight;\n }\n return allLines;\n }\n}\n","import { render, staticRenderFns } from \"./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"\nimport script from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./shapecontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"759e5a8a\",\n null\n \n)\n\ncomponent.options.__file = \"shapecontext.vue\"\nexport default component.exports","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Chrome } from \"vue-color\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component({\n components: {\n \"chrome-picker\": Chrome,\n },\n})\nexport default class ColorPicker extends Vue {\n @Prop(String) color!: string;\n\n display = false;\n left = 0;\n top = 0;\n transparent = false;\n\n mounted() {\n this.transparent = (this.$refs.chromePicker).val.rgba.a === 0;\n this.setPosition();\n }\n\n open() {\n if (this.display) return; // click on the picker itself\n this.setPosition();\n this.display = true;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n updateColor(value: { rgba: { r: number; g: number; b: number; a: number } }) {\n this.transparent = value.rgba.a === 0;\n const newColor = tinycolor(value.rgba).toRgbString();\n this.$emit(\"update:color\", newColor);\n this.$emit(\"input\", newColor);\n }\n closePicker() {\n this.display = false;\n this.$emit(\"change\", this.color);\n }\n setPosition() {\n const rect = this.$el.getBoundingClientRect();\n // 224 is the width of the picker, 242 the height\n if (rect.right + 224 > window.innerWidth) this.left = rect.left - 224;\n else this.left = rect.right;\n if (rect.bottom + 242 > window.innerHeight) this.top = rect.top - 242;\n else this.top = rect.bottom;\n }\n}\n","import { render, staticRenderFns } from \"./game.vue?vue&type=template&id=6d744362&scoped=true&\"\nimport script from \"./game.vue?vue&type=script&lang=ts&\"\nexport * from \"./game.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./game.vue?vue&type=style&index=0&lang=css&\"\nimport style1 from \"./game.vue?vue&type=style&index=1&id=6d744362&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6d744362\",\n null\n \n)\n\ncomponent.options.__file = \"game.vue\"\nexport default component.exports","import io from \"socket.io-client\";\nimport { Route } from \"vue-router\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/planarally\", { autoConnect: false });\n\nexport function createConnection(route: Route) {\n socket.io.opts.query = `user=${route.params.creator}&room=${route.params.room}`;\n socket.connect();\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport AssetContextMenu from \"@/assetManager/contextMenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { Asset } from \"@/core/comm/types\";\nimport { uuidv4 } from \"@/core/utils\";\n\n@Component({\n components: {\n Prompt,\n ConfirmDialog,\n AssetContextMenu,\n },\n beforeRouteEnter(to, from, next) {\n socket.connect();\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class AssetManager extends Vue {\n path: number[] = [];\n draggingSelection = false;\n\n get folders(): number[] {\n return assetStore.folders;\n }\n\n get files(): number[] {\n return assetStore.files;\n }\n\n get selected(): number[] {\n return assetStore.selected;\n }\n\n get idMap() {\n return assetStore.idMap;\n }\n\n get currentFolder(): number {\n if (this.path.length) return this.path[this.path.length - 1];\n return assetStore.root;\n }\n get parentFolder(): number {\n let parent = this.path[this.path.length - 2];\n if (parent === undefined) parent = assetStore.root;\n return parent;\n }\n get firstSelectedFile(): Asset | null {\n for (const sel of assetStore.selected) {\n if (assetStore.idMap.get(sel)!.file_hash) {\n return assetStore.idMap.get(sel)!;\n }\n }\n return null;\n }\n changeDirectory(nextFolder: number) {\n if (nextFolder < 0) this.path.pop();\n else this.path.push(nextFolder);\n assetStore.clearSelected();\n socket.emit(\"Folder.Get\", this.currentFolder);\n }\n createDirectory() {\n const name = window.prompt(\"New folder name\");\n if (name !== null) {\n socket.emit(\"Folder.Create\", { name, parent: this.currentFolder });\n }\n }\n moveInode(inode: number, target: number) {\n if (assetStore.files.includes(inode)) assetStore.files.splice(assetStore.files.indexOf(inode), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(inode), 1);\n assetStore.idMap.delete(inode);\n socket.emit(\"Inode.Move\", { inode, target });\n }\n select(event: MouseEvent, inode: number) {\n if (event.shiftKey && assetStore.selected.length > 0) {\n const inodes = [...assetStore.files, ...assetStore.folders];\n const start = inodes.indexOf(assetStore.selected[assetStore.selected.length - 1]);\n const end = inodes.indexOf(inode);\n for (let i = start; i !== end; start < end ? i++ : i--) {\n if (i === start) continue;\n assetStore.selected.push(inodes[i]);\n }\n assetStore.selected.push(inodes[end]);\n } else {\n if (!event.ctrlKey) {\n assetStore.clearSelected();\n }\n assetStore.selected.push(inode);\n }\n }\n startDrag(event: DragEvent, file: number) {\n if (event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"ittyHack\");\n event.dataTransfer.dropEffect = \"move\";\n if (!assetStore.selected.includes(file)) assetStore.selected.push(file);\n this.draggingSelection = true;\n }\n moveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.add(\"inode-selected\");\n }\n leaveDrag(event: DragEvent) {\n if ((event.target).classList.contains(\"folder\"))\n (event.target).classList.remove(\"inode-selected\");\n }\n stopDrag(event: DragEvent, target: number) {\n (event.target).classList.remove(\"inode-selected\");\n if (this.draggingSelection) {\n if (\n (target === assetStore.root || assetStore.folders.includes(target)) &&\n !assetStore.selected.includes(target)\n ) {\n for (const inode of assetStore.selected) {\n this.moveInode(inode, target);\n }\n }\n assetStore.clearSelected();\n } else if (event.dataTransfer && event.dataTransfer.files.length > 0) {\n this.upload(event.dataTransfer.files, target);\n }\n this.draggingSelection = false;\n }\n prepareUpload() {\n document.getElementById(\"files\")!.click();\n }\n upload(fls?: FileList, target?: number) {\n const files = (document.getElementById(\"files\")!).files;\n if (fls === undefined) {\n if (files) fls = files;\n else return;\n }\n if (target === undefined) target = this.currentFolder;\n const CHUNK_SIZE = 100000;\n for (const file of fls) {\n const uuid = uuidv4();\n const slices = Math.ceil(file.size / CHUNK_SIZE);\n for (let slice = 0; slice < slices; slice++) {\n const fr = new FileReader();\n fr.readAsArrayBuffer(\n file.slice(\n slice * CHUNK_SIZE,\n slice * CHUNK_SIZE + Math.min(CHUNK_SIZE, file.size - slice * CHUNK_SIZE),\n ),\n );\n fr.onload = e => {\n socket.emit(\"Asset.Upload\", {\n name: file.name,\n directory: target,\n data: fr.result,\n slice,\n totalSlices: slices,\n uuid,\n });\n };\n }\n }\n }\n}\n","import { render, staticRenderFns } from \"./asset_node.vue?vue&type=template&id=62c91cd3&scoped=true&\"\nimport script from \"./asset_node.vue?vue&type=script&lang=ts&\"\nexport * from \"./asset_node.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./asset_node.vue?vue&type=style&index=0&id=62c91cd3&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"62c91cd3\",\n null\n \n)\n\ncomponent.options.__file = \"asset_node.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"\nimport script from \"./login.vue?vue&type=script&lang=ts&\"\nexport * from \"./login.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"bc30fc14\",\n null\n \n)\n\ncomponent.options.__file = \"login.vue\"\nexport default component.exports","import { layerManager } from \"@/game/layers/manager\";\nimport { g2lx, g2ly } from \"@/game/units\";\nimport { EdgeIterator, TDS } from \"./tds\";\nimport { ccw, cw } from \"./triag\";\n\nexport function drawPolygon(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) {\n ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nexport function drawPolygonL(polygon: number[][], colour?: string) {\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n ctx.beginPath();\n ctx.strokeStyle =\n colour === undefined ? `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})` : colour;\n ctx.moveTo(polygon[0][0], polygon[0][1]);\n for (const point of polygon) {\n ctx.lineTo(point[0], point[1]);\n }\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction x(xx: number, local: boolean) {\n if (local) return xx;\n else return g2lx(xx);\n}\n\nfunction y(yy: number, local: boolean) {\n if (local) return yy;\n else return g2ly(yy);\n}\n\nlet I = 0;\nlet J = 0;\n\nfunction drl(ctx: CanvasRenderingContext2D, from: number[], to: number[], constrained: boolean, local: boolean) {\n // J++;\n // if (constrained) {\n // I++;\n // console.log(\"*\", from, to);\n // } else {\n // console.log(\" \", from, to);\n // }\n ctx.beginPath();\n ctx.strokeStyle = constrained ? \"rgba(255, 0, 0, 0.30)\" : \"rgba(0, 0, 0, 0.30)\";\n ctx.moveTo(x(from[0], local), y(from[1], local));\n ctx.lineTo(x(to[0], local), y(to[1], local));\n ctx.closePath();\n ctx.stroke();\n}\n\nfunction drawPolygonT(tds: TDS, local = true, clear = true, logs: 0 | 1 | 2 = 0) {\n I = 0;\n J = 0;\n let T = 0;\n const dl = layerManager.getLayer(\"draw\");\n if (dl === undefined) return;\n const ctx = dl.ctx;\n if (clear) ctx.clearRect(0, 0, 2000, 1000);\n ctx.lineJoin = \"round\";\n // ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n ctx.lineJoin = \"round\";\n const ei = new EdgeIterator(tds);\n while (ei.valid) {\n ei.next();\n ei.collect();\n }\n ei.collect();\n do {\n const fromP = ei.edge.first!.vertices[ccw(ei.edge.second)]!.point!;\n const toP = ei.edge.first!.vertices[cw(ei.edge.second)]!.point!;\n if (logs > 0) {\n if (fromP[0] === -Infinity || toP[0] === -Infinity) {\n ei.next();\n continue;\n }\n J++;\n if (ei.edge.first!.constraints[ei.edge.second]) {\n I++;\n if (logs === 2) console.log(`Edge: (*) ${fromP} > ${toP}`);\n } else if (logs === 2) console.log(`Edge: ${fromP} > ${toP}`);\n }\n do {\n ei.next();\n ei.collect();\n } while (ei.valid);\n } while (ei.pos !== null);\n for (const t of tds.triangles) {\n if (t.isInfinite()) continue;\n T++;\n const po = [];\n ctx.fillStyle = \"red\";\n if (t.vertices[0] !== undefined) {\n po.push(t.vertices[0]!.point);\n ctx.beginPath();\n ctx.arc(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[1] !== undefined) {\n po.push(t.vertices[1]!.point);\n ctx.arc(x(t.vertices[1]!.point![0], local), y(t.vertices[1]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (t.vertices[2] !== undefined) {\n po.push(t.vertices[2]!.point);\n ctx.arc(x(t.vertices[2]!.point![0], local), y(t.vertices[2]!.point![1], local), 5, 0, 2 * Math.PI);\n ctx.closePath();\n ctx.fill();\n }\n if (logs === 2) console.log(\"[T] \", ...po, t.constraints);\n\n ctx.moveTo(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local));\n if (t.vertices[0] !== undefined && t.vertices[1] !== undefined)\n drl(ctx, t.vertices[0]!.point!, t.vertices[1]!.point!, t.constraints[2], local);\n if (t.vertices[1] !== undefined && t.vertices[2] !== undefined)\n drl(ctx, t.vertices[1]!.point!, t.vertices[2]!.point!, t.constraints[0], local);\n if (t.vertices[2] !== undefined && t.vertices[0] !== undefined)\n drl(ctx, t.vertices[2]!.point!, t.vertices[0]!.point!, t.constraints[1], local);\n }\n if (logs > 0) {\n console.log(`Edges: ${I}/${J}`);\n console.log(`Faces: ${T}`);\n }\n}\n\n(window).DP = drawPolygon;\n(window).DPL = drawPolygonL;\n(window).DPT = drawPolygonT;\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=style&index=0&lang=css&\"","import * as tinycolor from \"tinycolor2\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerCircularToken } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lz } from \"@/game/units\";\n\nexport class CircularToken extends Circle {\n type = \"circulartoken\";\n text: string;\n font: string;\n constructor(\n center: GlobalPoint,\n r: number,\n text: string,\n font: string,\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(center, r, fillColour, strokeColour, uuid);\n this.text = text;\n this.font = font;\n }\n asDict(): ServerCircularToken {\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n text: this.text,\n font: this.font,\n });\n }\n fromDict(data: ServerCircularToken) {\n super.fromDict(data);\n this.r = data.radius;\n this.text = data.text;\n this.font = data.font;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.font = this.font;\n ctx.save();\n const dest = g2l(this.center());\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, g2lz(this.r), g2lz(this.r));\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name === \"\" || this.name === \"Unknown shape\" ? this.text : this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\n\nexport class AnnotationManager {\n annotationText: Text;\n annotationRect: Rect;\n layer: Layer | undefined;\n shown: boolean = false;\n\n constructor() {\n const origin = new GlobalPoint(0, 0);\n this.annotationText = new Text(origin, \"\", \"bold 20px serif\", 0, \"rgba(230, 230, 230, 1)\");\n this.annotationRect = new Rect(origin, 0, 0, \"rgba(0, 0, 0, 0.6)\");\n }\n\n setActiveText(text: string) {\n if (this.layer === undefined) {\n if (layerManager.hasLayer(\"draw\")) {\n this.layer = layerManager.getLayer(\"draw\")!;\n this.layer.addShape(this.annotationRect, false);\n this.layer.addShape(this.annotationText, false);\n } else {\n console.warn(\"There is no draw layer to draw annotations on!\");\n return;\n }\n }\n this.shown = text !== \"\";\n this.annotationText.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2, 50));\n this.annotationText.text = text;\n const width = this.shown ? this.annotationText.getMaxWidth(this.layer.ctx) + 10 : 0;\n const height = this.shown ? this.annotationText.getMaxHeight(this.layer.ctx) + 10 : 0;\n this.annotationRect.refPoint = l2g(new LocalPoint(this.layer.canvas.width / 2 - width / 2, 30));\n this.annotationRect.w = width / gameStore.zoomFactor;\n this.annotationRect.h = height / gameStore.zoomFactor;\n this.layer.invalidate(true);\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=b4f2c0b0&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=style&index=0&id=b4f2c0b0&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"\nimport script from \"./menu.vue?vue&type=script&lang=ts&\"\nexport * from \"./menu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"aaf3f05e\",\n null\n \n)\n\ncomponent.options.__file = \"menu.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./contextmenu.vue?vue&type=template&id=256dde9c&\"\nimport script from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextmenu.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./contextmenu.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextmenu.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SelectContext',{ref:\"selectcontext\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=template&id=cad11dd2&\"","import {\n ServerAsset,\n ServerCircle,\n ServerCircularToken,\n ServerLine,\n ServerMultiLine,\n ServerPolygon,\n ServerRect,\n ServerShape,\n ServerText,\n} from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { Text } from \"@/game/shapes/text\";\nimport { Polygon } from \"./polygon\";\n\nexport function createShapeFromDict(shape: ServerShape, dummy?: boolean) {\n // TODO: is this dummy stuff actually needed, do we ever want to return the local shape?\n if (dummy === undefined) dummy = false;\n if (!dummy && layerManager.UUIDMap.has(shape.uuid)) return layerManager.UUIDMap.get(shape.uuid);\n\n let sh: Shape;\n\n // A fromJSON and toJSON on Shape would be cleaner but ts does not allow for static abstracts so yeah.\n\n // Shape Type specifics\n\n const refPoint = new GlobalPoint(shape.x, shape.y);\n if (shape.type_ === \"rect\") {\n const rect = shape;\n sh = new Rect(refPoint, rect.width, rect.height, rect.fill_colour, rect.stroke_colour, rect.uuid);\n } else if (shape.type_ === \"circle\") {\n const circ = shape;\n sh = new Circle(refPoint, circ.radius, circ.fill_colour, circ.stroke_colour, circ.uuid);\n } else if (shape.type_ === \"circulartoken\") {\n const token = shape;\n sh = new CircularToken(\n refPoint,\n token.radius,\n token.text,\n token.font,\n token.fill_colour,\n token.stroke_colour,\n token.uuid,\n );\n } else if (shape.type_ === \"line\") {\n const line = shape;\n sh = new Line(refPoint, new GlobalPoint(line.x2, line.y2), line.line_width, line.stroke_colour, line.uuid);\n } else if (shape.type_ === \"multiline\") {\n const multiline = shape;\n sh = new MultiLine(\n refPoint,\n multiline.points.map(p => new GlobalPoint(p.x, p.y)),\n multiline.line_width,\n multiline.stroke_colour,\n multiline.uuid,\n );\n } else if (shape.type_ === \"polygon\") {\n const polygon = shape;\n sh = new Polygon(\n refPoint,\n polygon.vertices.map(v => new GlobalPoint(v.x, v.y)),\n polygon.fill_colour,\n polygon.stroke_colour,\n polygon.uuid,\n );\n } else if (shape.type_ === \"text\") {\n const text = shape;\n sh = new Text(refPoint, text.text, text.font, text.angle, text.fill_colour, text.stroke_colour, text.uuid);\n } else if (shape.type_ === \"assetrect\") {\n const asset = shape;\n const img = new Image(asset.width, asset.height);\n if (asset.src.startsWith(\"http\")) img.src = new URL(asset.src).pathname;\n else img.src = asset.src;\n sh = new Asset(img, refPoint, asset.width, asset.height, asset.uuid);\n img.onload = () => {\n layerManager.getLayer(shape.layer)!.invalidate(false);\n };\n } else {\n return undefined;\n }\n sh.fromDict(shape);\n return sh;\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"","import tinycolor from \"tinycolor2\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { aurasFromServer, aurasToServer } from \"@/game/comm/conversion/aura\";\nimport { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport abstract class Shape {\n // Used to create class instance from server shape data\n abstract readonly type: string;\n // The unique ID of this shape\n readonly uuid: string;\n // The layer the shape is currently on\n layer!: string;\n\n // A reference point regarding that specific shape's structure\n protected _refPoint: GlobalPoint;\n\n // Fill colour of the shape\n fillColour: string = \"#000\";\n strokeColour: string = \"rgba(0,0,0,0)\";\n // The optional name associated with the shape\n name = \"Unknown shape\";\n\n // Associated trackers/auras/owners\n trackers: Tracker[] = [];\n auras: Aura[] = [];\n protected _owners: string[] = [];\n\n // Block light sources\n visionObstruction = false;\n // Prevent shapes from overlapping with this shape\n movementObstruction = false;\n // Does this shape represent a playable token\n isToken = false;\n // Show a highlight box\n showHighlight = false;\n\n // Mouseover annotation\n annotation: string = \"\";\n\n // Draw modus to use\n globalCompositeOperation: string = \"source-over\";\n\n // Additional options for specialized uses\n options: Map = new Map();\n\n constructor(refPoint: GlobalPoint, fillColour?: string, strokeColour?: string, uuid?: string) {\n this._refPoint = refPoint;\n this.uuid = uuid || uuidv4();\n if (fillColour !== undefined) this.fillColour = fillColour;\n if (strokeColour !== undefined) this.strokeColour = strokeColour;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n this._refPoint = point;\n }\n\n abstract getBoundingBox(): BoundingRect;\n\n // If inWorldCoord is\n abstract contains(point: GlobalPoint): boolean;\n\n abstract center(): GlobalPoint;\n abstract center(centerPoint: GlobalPoint): void;\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n // for (const aura of this.auras) {\n // if (aura.value > 0) {\n // const auraCircle = new Circle(this.center(), aura.value);\n // if (auraCircle.visibleInCanvas(canvas)) return true;\n // }\n // }\n return false;\n }\n\n // Code to snap a shape to the grid\n // This is shape dependent as the shape refPoints are shape specific in\n abstract snapToGrid(): void;\n abstract resizeToGrid(): void;\n abstract resize(resizePoint: number, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n getPointIndex(p: GlobalPoint, delta = 0): number {\n for (const [idx, point] of this.points.entries()) {\n if (Math.abs(p.x - point[0]) <= delta && Math.abs(p.y - point[1]) <= delta) return idx;\n }\n return -1;\n }\n\n getPointOrientation(i: number): Vector {\n const prev = GlobalPoint.fromArray(this.points[(this.points.length + i - 1) % this.points.length]);\n const point = GlobalPoint.fromArray(this.points[i]);\n const next = GlobalPoint.fromArray(this.points[(i + 1) % this.points.length]);\n const vec = next.subtract(prev);\n const mid = prev.add(vec.multiply(0.5));\n return point.subtract(mid).normalize();\n }\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources(recalculate = true) {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let update = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n update = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateVision();\n\n // Check if the visionsource auras are in the gameManager\n this.auras.forEach(au => {\n const ls = gameStore.visionSources;\n const i = ls.findIndex(o => o.aura === au.uuid);\n if (au.visionSource && i === -1) {\n ls.push({ shape: self.uuid, aura: au.uuid });\n } else if (!au.visionSource && i >= 0) {\n ls.splice(i, 1);\n }\n });\n // Check if anything in the gameManager referencing this shape is in fact still a visionsource\n for (let i = gameStore.visionSources.length - 1; i >= 0; i--) {\n const ls = gameStore.visionSources[i];\n if (ls.shape === self.uuid) {\n if (!self.auras.some(a => a.uuid === ls.aura && a.visionSource)) gameStore.visionSources.splice(i, 1);\n }\n }\n }\n\n setMovementBlock(blocksMovement: boolean, recalculate = true) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n let update = false;\n if (this.movementObstruction && obstructionIndex === -1) {\n gameStore.movementblockers.push(this.uuid);\n update = true;\n } else if (!this.movementObstruction && obstructionIndex >= 0) {\n gameStore.movementblockers.splice(obstructionIndex, 1);\n update = true;\n }\n if (update && recalculate) gameStore.recalculateMovement();\n }\n\n setIsToken(isToken: boolean) {\n this.isToken = isToken;\n if (this.ownedBy()) {\n const i = gameStore.ownedtokens.indexOf(this.uuid);\n if (this.isToken && i === -1) gameStore.ownedtokens.push(this.uuid);\n else if (!this.isToken && i >= 0) gameStore.ownedtokens.splice(i, 1);\n }\n }\n\n abstract asDict(): ServerShape;\n getBaseDict(): ServerShape {\n return {\n type_: this.type,\n uuid: this.uuid,\n x: this.refPoint.x,\n y: this.refPoint.y,\n layer: this.layer,\n draw_operator: this.globalCompositeOperation,\n movement_obstruction: this.movementObstruction,\n vision_obstruction: this.visionObstruction,\n auras: aurasToServer(this.auras),\n trackers: this.trackers,\n owners: this._owners,\n fill_colour: this.fillColour,\n stroke_colour: this.strokeColour,\n name: this.name,\n annotation: this.annotation,\n is_token: this.isToken,\n options: JSON.stringify([...this.options]),\n };\n }\n fromDict(data: ServerShape) {\n this.layer = data.layer;\n this.globalCompositeOperation = data.draw_operator;\n this.movementObstruction = data.movement_obstruction;\n this.visionObstruction = data.vision_obstruction;\n this.auras = aurasFromServer(data.auras);\n this.trackers = data.trackers;\n this._owners = data.owners;\n this.isToken = data.is_token;\n if (data.annotation) this.annotation = data.annotation;\n if (data.name) this.name = data.name;\n if (data.options) this.options = new Map(JSON.parse(data.options));\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n if (this.globalCompositeOperation !== undefined) ctx.globalCompositeOperation = this.globalCompositeOperation;\n else ctx.globalCompositeOperation = \"source-over\";\n if (this.showHighlight) {\n const bbox = this.getBoundingBox();\n ctx.strokeStyle = \"red\";\n ctx.strokeRect(g2lx(bbox.topLeft.x) - 5, g2ly(bbox.topLeft.y) - 5, g2lz(bbox.w) + 10, g2lz(bbox.h) + 10);\n }\n }\n\n drawAuras(ctx: CanvasRenderingContext2D) {\n for (const aura of this.auras) {\n if (aura.value === 0 && aura.dim === 0) return;\n ctx.beginPath();\n\n const loc = g2l(this.center());\n const innerRange = g2lr(aura.value + aura.dim);\n\n if (aura.dim === 0) ctx.fillStyle = aura.colour;\n else {\n const gradient = ctx.createRadialGradient(\n loc.x,\n loc.y,\n g2lr(aura.value),\n loc.x,\n loc.y,\n g2lr(aura.value + aura.dim),\n );\n const tc = tinycolor(aura.colour);\n ctx.fillStyle = gradient;\n gradient.addColorStop(0, aura.colour);\n gradient.addColorStop(1, tc.setAlpha(0).toRgbString());\n }\n if (!aura.visionSource || aura.lastPath === undefined) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n } else {\n try {\n ctx.fill(aura.lastPath);\n } catch (e) {\n ctx.arc(loc.x, loc.y, innerRange, 0, 2 * Math.PI);\n ctx.fill();\n console.warn(e);\n }\n }\n }\n }\n\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.name,\n has_img: false,\n effects: [],\n index: Infinity,\n };\n }\n\n moveLayer(layer: string, sync: boolean) {\n const oldLayer = layerManager.getLayer(this.layer);\n const newLayer = layerManager.getLayer(layer);\n if (oldLayer === undefined || newLayer === undefined) return;\n this.layer = layer;\n // Update layer shapes\n oldLayer.shapes.splice(oldLayer.shapes.indexOf(this), 1);\n newLayer.shapes.push(this);\n // Revalidate layers (light should at most be redone once)\n oldLayer.invalidate(true);\n newLayer.invalidate(false);\n // Sync!\n if (sync) socket.emit(\"Shape.Layer.Change\", { uuid: this.uuid, layer });\n }\n\n get owners() {\n return Object.freeze(this._owners.slice());\n }\n\n ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this._owners.includes(username);\n }\n\n addOwner(owner: string) {\n if (!this._owners.includes(owner)) this._owners.push(owner);\n }\n\n updateOwner(oldValue: string, newValue: string) {\n const ownerIndex = this._owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this._owners.splice(ownerIndex, 1, newValue);\n else this.addOwner(newValue);\n }\n\n removeOwner(owner: string) {\n const ownerIndex = this._owners.findIndex(o => o === owner);\n this._owners.splice(ownerIndex, 1);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.note !== null)?_c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('span',{on:{\"click\":function($event){_vm.$refs.title.select()}}},[_c('i',{staticClass:\"fas fa-pencil-alt\",staticStyle:{\"font-size\":\"15px\"}})]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.title),expression:\"note.title\"}],ref:\"title\",domProps:{\"value\":(_vm.note.title)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"title\", $event.target.value)}}}),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.note.text),expression:\"note.text\"}],ref:\"textarea\",style:({'height': _vm.calcHeight()}),domProps:{\"value\":(_vm.note.text)},on:{\"change\":_vm.updateNote,\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.note, \"text\", $event.target.value)}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.removeNote}},[_c('i',{staticClass:\"far fa-trash-alt\"}),_vm._v(\" Remove\\n \")])])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"","\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport SelectContext from \"@/game/ui/tools/selectcontext.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\nimport SelectionInfo from \"../selection/selection_info.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint, LocalPoint, Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, l2g, l2gz } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport enum SelectOperations {\n Noop,\n Resize,\n Drag,\n GroupSelect,\n}\n\nconst start = new GlobalPoint(-1000, -1000);\n\n@Component({\n components: {\n SelectContext,\n },\n})\nexport default class SelectTool extends Tool {\n name = \"Select\";\n showContextMenu = false;\n active = false;\n\n mode = SelectOperations.Noop;\n resizePoint = 0;\n deltaChanged = false;\n // Because we never drag from the asset's (0, 0) coord and want a smoother drag experience\n // we keep track of the actual offset within the asset.\n dragRay = new Ray(new LocalPoint(0, 0), new Vector(0, 0));\n selectionStartPoint = start;\n selectionHelper = new Rect(start, 0, 0);\n created() {\n this.selectionHelper.globalCompositeOperation = \"source-over\";\n }\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (!this.selectionHelper.owners.includes(gameStore.username)) {\n this.selectionHelper.addOwner(gameStore.username);\n }\n\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n let hit = false;\n // The selectionStack allows for lower positioned objects that are selected to have precedence during overlap.\n let selectionStack;\n if (!layer.selection.length) selectionStack = layer.shapes;\n else selectionStack = layer.shapes.concat(layer.selection);\n for (let i = selectionStack.length - 1; i >= 0; i--) {\n const shape = selectionStack[i];\n\n if (!shape.ownedBy()) continue;\n\n this.resizePoint = shape.getPointIndex(globalMouse, l2gz(3));\n\n // Resize case, a corner is selected\n if (this.resizePoint >= 0) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n layer.invalidate(true);\n hit = true;\n break;\n\n // Drag case, a shape is selected\n } else if (shape.contains(globalMouse)) {\n const selection = shape;\n if (layer.selection.indexOf(selection) === -1) {\n layer.selection = [selection];\n getRef(\"selectionInfo\").shape = selection;\n }\n this.mode = SelectOperations.Drag;\n const localRefPoint = g2l(selection.refPoint);\n this.dragRay = new Ray(localRefPoint, mouse.subtract(localRefPoint));\n layer.invalidate(true);\n hit = true;\n break;\n }\n }\n\n // GroupSelect case, draw a selection box to select multiple shapes\n if (!hit) {\n this.mode = SelectOperations.GroupSelect;\n for (const selection of layer.selection) getRef(\"selectionInfo\").shape = selection;\n\n this.selectionStartPoint = globalMouse;\n\n this.selectionHelper.refPoint = this.selectionStartPoint;\n this.selectionHelper.w = 0;\n this.selectionHelper.h = 0;\n\n layer.selection = [this.selectionHelper];\n layer.invalidate(true);\n }\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n // if (!this.active) return; we require mousemove for the resize cursor\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n this.deltaChanged = false;\n\n if (this.mode === SelectOperations.GroupSelect) {\n // Currently draw on active layer\n const endPoint = globalMouse;\n\n this.selectionHelper.w = Math.abs(endPoint.x - this.selectionStartPoint.x);\n this.selectionHelper.h = Math.abs(endPoint.y - this.selectionStartPoint.y);\n this.selectionHelper.refPoint = new GlobalPoint(\n Math.min(this.selectionStartPoint.x, endPoint.x),\n Math.min(this.selectionStartPoint.y, endPoint.y),\n );\n layer.invalidate(true);\n } else if (layer.selection.length) {\n const og = g2l(layer.selection[layer.selection.length - 1].refPoint);\n const origin = og.add(this.dragRay.direction);\n let delta = mouse.subtract(origin).multiply(1 / gameStore.zoomFactor);\n const ogDelta = delta;\n if (this.mode === SelectOperations.Drag) {\n // If we are on the tokens layer do a movement block check.\n if (layer.name === \"tokens\" && !(event.shiftKey && gameStore.IS_DM)) {\n for (const sel of layer.selection) {\n if (sel.uuid === this.selectionHelper.uuid) continue; // the selection helper should not be treated as a real shape.\n delta = calculateDelta(delta, sel);\n if (delta !== ogDelta) this.deltaChanged = true;\n }\n }\n // Actually apply the delta on all shapes\n for (const sel of layer.selection) {\n sel.refPoint = sel.refPoint.add(delta);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n }\n layer.invalidate(false);\n } else if (this.mode === SelectOperations.Resize) {\n for (const sel of layer.selection) {\n sel.resize(this.resizePoint, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n this.updateCursor(layer, globalMouse);\n }\n } else {\n this.updateCursor(layer, globalMouse);\n }\n } else {\n document.body.style.cursor = \"default\";\n }\n }\n onMouseUp(e: MouseEvent): void {\n if (!this.active) return;\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n\n if (this.mode === SelectOperations.GroupSelect) {\n layer.clearSelection();\n layer.shapes.forEach(shape => {\n if (shape === this.selectionHelper) return;\n const bbox = shape.getBoundingBox();\n if (!shape.ownedBy()) return;\n if (\n this.selectionHelper!.refPoint.x <= bbox.topRight.x &&\n this.selectionHelper!.refPoint.x + this.selectionHelper!.w >= bbox.topLeft.x &&\n this.selectionHelper!.refPoint.y <= bbox.botLeft.y &&\n this.selectionHelper!.refPoint.y + this.selectionHelper!.h >= bbox.topLeft.y\n ) {\n layer.selection.push(shape);\n }\n });\n\n // Push the selection helper as the last element of the selection\n // This makes sure that it will be the first one to be hit in the hit detection onMouseDown\n if (layer.selection.length > 0) layer.selection.push(this.selectionHelper);\n\n layer.invalidate(true);\n } else if (layer.selection.length) {\n layer.selection.forEach(sel => {\n if (this.mode === SelectOperations.Drag) {\n if (\n this.dragRay.origin!.x === g2lx(sel.refPoint.x) &&\n this.dragRay.origin!.y === g2ly(sel.refPoint.y)\n )\n return;\n\n if (gameStore.useGrid && !e.altKey && !this.deltaChanged) {\n sel.snapToGrid();\n }\n\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n if (this.mode === SelectOperations.Resize) {\n if (gameStore.useGrid && !e.altKey) {\n sel.resizeToGrid();\n }\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateVision();\n if (sel.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n layer.invalidate(false);\n }\n });\n }\n this.mode = SelectOperations.Noop;\n this.active = false;\n }\n onContextMenu(event: MouseEvent) {\n if (layerManager.getLayer() === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n const layer = layerManager.getLayer()!;\n const mouse = getMouse(event);\n const globalMouse = l2g(mouse);\n\n for (const shape of layer.selection) {\n if (shape.contains(globalMouse) && shape !== this.selectionHelper) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n layer.invalidate(true);\n (this.$parent.$refs.shapecontext).open(event, shape);\n return;\n }\n }\n (this.$refs.selectcontext).open(event);\n }\n updateCursor(layer: Layer, globalMouse: GlobalPoint) {\n for (const sel of layer.selection) {\n const resizePoint = sel.getPointIndex(globalMouse, l2gz(3));\n if (resizePoint < 0) document.body.style.cursor = \"default\";\n else {\n let angle = sel.getPointOrientation(resizePoint).angle();\n if (angle < 0) angle += 360;\n const d = 45 / 2;\n if (angle >= 315 + d || angle < d || (angle >= 135 + d && angle < 225 - d))\n document.body.style.cursor = \"ew-resize\";\n if ((angle >= 45 + d && angle < 135 - d) || (angle >= 225 + d && angle < 315 - d))\n document.body.style.cursor = \"ns-resize\";\n if ((angle >= d && angle < 90 - d) || (angle >= 180 + d && angle < 270 - d))\n document.body.style.cursor = \"nwse-resize\";\n if ((angle >= 90 + d && angle < 180 - d) || (angle >= 270 + d && angle < 360 - d))\n document.body.style.cursor = \"nesw-resize\";\n }\n }\n }\n}\n","import { GlobalPoint, Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { PA_CDT } from \"@/game/visibility/te/pa\";\nimport { Point, Sign, Triangle } from \"@/game/visibility/te/tds\";\nimport { ccw, cw, intersection, orientation } from \"@/game/visibility/te/triag\";\n\n// First go through each shape in the selection and see if the delta has to be truncated due to movement blockers\n\n// This is definitely super convoluted and inefficient but I was tired and really wanted the smooth wall sliding collision stuff to work\n// And it does now, so hey ¯\\_(ツ)_/¯\nexport function calculateDelta(delta: Vector, sel: Shape, done?: string[]) {\n if (delta.x === 0 && delta.y === 0) return delta;\n if (gameStore.visionMode === \"bvh\") {\n if (done === undefined) done = [];\n const ogSelBBox = sel.getBoundingBox();\n const newSelBBox = ogSelBBox.offset(delta);\n let refine = false;\n for (const movementBlocker of gameStore.movementblockers) {\n if (done.includes(movementBlocker)) continue;\n const blocker = layerManager.UUIDMap.get(movementBlocker)!;\n const blockerBBox = blocker.getBoundingBox();\n let found = blockerBBox.intersectsWithInner(newSelBBox);\n if (!found) {\n // This is an edge case, precalculating the rays is not worth in this case.\n const ray = Ray.fromPoints(ogSelBBox.topLeft.add(delta.normalize()), newSelBBox.topLeft);\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n found = blockerBBox.intersectP(ray, invDir, dirIsNegative).hit;\n }\n // Check if the bounding box of our destination would intersect with the bounding box of the movementblocker\n if (found) {\n const bCenter = blockerBBox.center();\n const sCenter = ogSelBBox.center();\n\n const d = sCenter.subtract(bCenter);\n const ux = new Vector(1, 0);\n const uy = new Vector(0, 1);\n let dx = d.dot(ux);\n let dy = d.dot(uy);\n if (dx > blockerBBox.w / 2) dx = blockerBBox.w / 2;\n if (dx < -blockerBBox.w / 2) dx = -blockerBBox.w / 2;\n if (dy > blockerBBox.h / 2) dy = blockerBBox.h / 2;\n if (dy < -blockerBBox.h / 2) dy = -blockerBBox.h / 2;\n\n // Closest point / intersection point between the two bboxes. Not the delta intersect!\n const p = bCenter.add(ux.multiply(dx)).add(uy.multiply(dy));\n\n if (p.x === ogSelBBox.topLeft.x || p.x === ogSelBBox.topRight.x) delta = new Vector(0, delta.y);\n else if (p.y === ogSelBBox.topLeft.y || p.y === ogSelBBox.botLeft.y) delta = new Vector(delta.x, 0);\n else {\n if (p.x < ogSelBBox.topLeft.x) delta = new Vector(p.x - ogSelBBox.topLeft.x, delta.y);\n else if (p.x > ogSelBBox.topRight.x) delta = new Vector(p.x - ogSelBBox.topRight.x, delta.y);\n else if (p.y < ogSelBBox.topLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.topLeft.y);\n else if (p.y > ogSelBBox.botLeft.y) delta = new Vector(delta.x, p.y - ogSelBBox.botLeft.y);\n }\n refine = true;\n done.push(movementBlocker);\n break;\n }\n }\n if (refine) delta = calculateDelta(delta, sel, done);\n return delta;\n } else {\n const centerTriangle = PA_CDT.movement.locate(sel.center().asArray(), null).loc;\n for (const point of sel.points) {\n const lt = PA_CDT.movement.locate(point, centerTriangle);\n const triangle = lt.loc;\n if (triangle === null) continue;\n delta = checkTriangle(point, triangle, delta);\n }\n return delta;\n }\n}\n\nfunction checkTriangle(point: Point, triangle: Triangle, delta: Vector, skip: Triangle[] = []): Vector {\n const p = new GlobalPoint(point[0], point[1]);\n const endpoint = p.add(delta).asArray();\n if (triangle.contains(endpoint)) return delta;\n skip.push(triangle);\n\n for (let i = 0; i < 3; i++) {\n if (skip.includes(triangle.neighbours[i]!)) continue;\n\n const _cw = triangle.vertices[cw(i)]!.point!;\n const _ccw = triangle.vertices[ccw(i)]!.point!;\n const ix = intersection(point, endpoint, _cw, _ccw);\n\n if (ix === null) continue;\n\n if (!triangle.isConstrained(i)) return checkTriangle(point, triangle.neighbours[i]!, delta, skip);\n\n if (ix[0] === p.x && ix[1] === p.y) {\n const OR = orientation;\n const o = orientation(point, endpoint, _ccw);\n // Remember: canvas y axis is inverted\n if (o === Sign.LEFT_TURN) continue;\n if (o === Sign.ZERO) continue;\n }\n let newDelta = new GlobalPoint(ix[0], ix[1]).subtract(p).multiply(0.8);\n if (newDelta.length() < 1) newDelta = new Vector(0, 0);\n if (newDelta.length() < delta.length()) delta = newDelta;\n }\n return delta;\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"","import { socket } from \"@/game/api/socket\";\nimport { gameStore } from \"@/game/store\";\n\nexport function sendClientOptions() {\n socket.emit(\"Client.Options.Set\", {\n locationOptions: {\n panX: gameStore.panX,\n panY: gameStore.panY,\n zoomFactor: gameStore.zoomFactor,\n },\n });\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\nimport { AssetFile, AssetList } from \"@/core/comm/types\";\nimport { alphSort } from \"@/core/utils\";\n\n@Component({\n name: \"asset-node\",\n})\nexport default class AssetNode extends Vue {\n @Prop() asset!: AssetList;\n\n showImage = null;\n get folders(): string[] {\n return Object.keys(this.asset)\n .filter(el => ![\"__files\"].includes(el))\n .sort(alphSort);\n }\n\n get files(): AssetFile[] {\n if (this.asset.__files)\n return (this.asset.__files)\n .concat()\n .sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1));\n return [];\n }\n\n toggle(event: { target: HTMLElement }) {\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < event.target.children.length; i++) {\n const el = event.target.children[i];\n el.style.display = el.style.display === \"\" ? \"block\" : \"\";\n }\n }\n\n dragStart(event: DragEvent, imageSource: string) {\n if (event === null || event.dataTransfer === null) return;\n const img = (event.target).querySelector(\".preview\")!;\n event.dataTransfer.setDragImage(img, 0, 0);\n event.dataTransfer.setData(\"text/plain\", imageSource);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:\"ContextMenu\",style:({left:_vm.left, top:_vm.top}),attrs:{\"tabindex\":\"-1\"},on:{\"blur\":function($event){_vm.$emit('close')}}},[_c('ul',[_vm._t(\"default\")],2)]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=template&id=256dde9c&\"","// import Vuex from \"vuex\";\nimport { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { rootStore } from \"@/store\";\n\nexport interface AssetState {\n root: number;\n files: number[];\n folders: number[];\n idMap: Map;\n selected: number[];\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"assets\", namespaced: true })\nclass AssetStore extends VuexModule {\n root = -1;\n files: number[] = [];\n folders: number[] = [];\n idMap: Map = new Map();\n selected: number[] = [];\n\n @Mutation\n clear() {\n this.folders = [];\n this.files = [];\n }\n\n @Mutation\n clearSelected() {\n console.log(\"Cleared\");\n this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n}\n\nexport const assetStore = getModule(AssetStore);\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=script&lang=ts&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class ShapeContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n shape: Shape | null = null;\n get activeLayer(): string {\n const layer = layerManager.getLayer();\n return layer === undefined ? \"\" : layer.name;\n }\n open(event: MouseEvent, shape: Shape) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.shape = shape;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n this.shape = null;\n }\n getLayers() {\n return layerManager.layers.filter(l => l.selectable && (gameStore.IS_DM || l.playerEditable));\n }\n getActiveLayer() {\n return layerManager.getLayer();\n }\n getInitiativeWord() {\n if (this.shape === null) return \"\";\n return getRef(\"initiative\").contains(this.shape.uuid) ? \"Show\" : \"Add\";\n }\n setLayer(newLayer: string) {\n if (this.shape === null) return;\n this.shape.moveLayer(newLayer, true);\n this.close();\n }\n moveToBack() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, 0, true);\n this.close();\n }\n moveToFront() {\n if (this.shape === null) return;\n const layer = this.getActiveLayer()!;\n layer.moveShapeOrder(this.shape, layer.shapes.length - 1, true);\n this.close();\n }\n addInitiative() {\n if (this.shape === null) return;\n const initiative = getRef(\"initiative\");\n if (!initiative.contains(this.shape.uuid)) initiative.addInitiative(this.shape.getInitiativeRepr());\n initiative.visible = true;\n this.close();\n }\n openEditDialog() {\n EventBus.$emit(\"EditDialog.Open\", this.shape);\n this.close();\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.shape !== null)?_c('div',[_c('div',{attrs:{\"id\":\"selection-menu\"}},[_c('div',{attrs:{\"id\":\"selection-edit-button\"},on:{\"click\":_vm.openEditDialog}},[_c('i',{staticClass:\"fas fa-edit\"})]),_c('div',{attrs:{\"id\":\"selection-name\"}},[_vm._v(_vm._s(_vm.shape.name))]),_c('div',{attrs:{\"id\":\"selection-trackers\"}},[_vm._l((_vm.shape.trackers),function(tracker){return (tracker.name !== '' || tracker.value !== 0)?[_c('div',{key:'name-' + tracker.uuid},[_vm._v(_vm._s(tracker.name))]),_c('div',{key:'value-' + tracker.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(tracker, false)}}},[(tracker.maxvalue === 0)?[_vm._v(_vm._s(tracker.value))]:[_vm._v(_vm._s(tracker.value)+\" / \"+_vm._s(tracker.maxvalue))]],2)]:_vm._e()})],2),_c('div',{attrs:{\"id\":\"selection-auras\"}},[_vm._l((_vm.shape.auras),function(aura){return (aura.name !== '' || aura.value !== 0)?[_c('div',{key:'name-' + aura.uuid},[_vm._v(_vm._s(aura.name))]),_c('div',{key:'value-' + aura.uuid,staticClass:\"selection-tracker-value\",on:{\"click\":function($event){_vm.changeValue(aura, true)}}},[(aura.dim === 0)?[_vm._v(_vm._s(aura.value))]:[_vm._v(_vm._s(aura.value)+\" / \"+_vm._s(aura.dim))]],2)]:_vm._e()})],2)]),_c('edit-dialog',{ref:\"editDialog\",attrs:{\"shape\":_vm.shape}})],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=template&id=32cec914&scoped=true&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=script&lang=ts&\"","import { Layer } from \"@/game/layers/layer\";\nimport { gameStore } from \"@/game/store\";\n\nexport class GridLayer extends Layer {\n invalidate(): void {\n this.valid = false;\n }\n draw(doClear?: boolean): void {\n if (!this.valid) {\n this.drawGrid();\n }\n }\n drawGrid(): void {\n const ctx = this.ctx;\n this.clear();\n ctx.beginPath();\n\n const gs = gameStore.gridSize;\n\n for (let i = 0; i < this.width; i += gs * gameStore.zoomFactor) {\n ctx.moveTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, 0);\n ctx.lineTo(i + (gameStore.panX % gs) * gameStore.zoomFactor, this.height);\n ctx.moveTo(0, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n ctx.lineTo(this.width, i + (gameStore.panY % gs) * gameStore.zoomFactor);\n }\n\n ctx.strokeStyle = gameStore.gridColour;\n ctx.lineWidth = 1;\n ctx.stroke();\n this.valid = true;\n }\n}\n","import Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nimport { AssetState } from \"@/assetManager/store\";\nimport { CoreState } from \"@/core/store\";\nimport { GameState } from \"@/game/store\";\n\nVue.use(Vuex);\n\nexport interface RootState {\n assets: AssetState;\n core: CoreState;\n game: GameState;\n}\n\nexport const rootStore = new Vuex.Store({});\n","import { render, staticRenderFns } from \"./colorpicker.vue?vue&type=template&id=b4f2c0b0&scoped=true&\"\nimport script from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nexport * from \"./colorpicker.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./colorpicker.vue?vue&type=style&index=0&id=b4f2c0b0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b4f2c0b0\",\n null\n \n)\n\ncomponent.options.__file = \"colorpicker.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=style&index=0&id=bc30fc14&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view',{ref:\"activeComponent\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=196415f0&\"\nvar script = {}\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"App.vue\"\nexport default component.exports","import { GlobalPoint, Ray } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly, g2lz, getUnitDistance } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n virtualCanvas: HTMLCanvasElement;\n vCtx: CanvasRenderingContext2D;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n super(canvas, name);\n this.virtualCanvas = document.createElement(\"canvas\");\n this.virtualCanvas.width = window.innerWidth;\n this.virtualCanvas.height = window.innerHeight;\n this.vCtx = this.virtualCanvas.getContext(\"2d\")!;\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n super.addShape(shape, sync, temporary, invalidate);\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n this.preFogShapes.push(shape);\n }\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (shape.options.has(\"preFogShape\") && shape.options.get(\"preFogShape\")) {\n const idx = this.preFogShapes.findIndex(s => s.uuid === shape.uuid);\n this.preFogShapes.splice(idx, 1);\n }\n super.removeShape(shape, sync, temporary);\n }\n\n draw(): void {\n if (!this.valid) {\n const ctx = this.ctx;\n\n if (Settings.skipLightFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n const originalOperation = ctx.globalCompositeOperation;\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n const dctx = layerManager.getLayer(\"draw\")!.ctx;\n if (Settings.drawAngleLines || Settings.drawFirstLightHit) {\n dctx.clearRect(0, 0, dctx.canvas.width, dctx.canvas.height);\n }\n\n // At all times provide a minimal vision range to prevent losing your tokens in fog.\n if (gameStore.fullFOW && layerManager.hasLayer(\"tokens\")) {\n layerManager.getLayer(\"tokens\")!.shapes.forEach(sh => {\n if (!sh.ownedBy() || !sh.isToken) return;\n const bb = sh.getBoundingBox();\n const lcenter = g2l(sh.center());\n const alm = 0.8 * g2lz(bb.w);\n ctx.beginPath();\n ctx.arc(lcenter.x, lcenter.y, alm, 0, 2 * Math.PI);\n const gradient = ctx.createRadialGradient(lcenter.x, lcenter.y, alm / 2, lcenter.x, lcenter.y, alm);\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n ctx.fill();\n });\n }\n\n this.vCtx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n\n // First cut out all the light sources\n for (const light of gameStore.visionSources) {\n const shape = layerManager.UUIDMap.get(light.shape);\n if (shape === undefined) continue;\n const aura = shape.auras.find(a => a.uuid === light.aura);\n if (aura === undefined) continue;\n\n const auraLength = getUnitDistance(aura.value + aura.dim);\n const center = shape.center();\n const lcenter = g2l(center);\n\n const auraCircle = new Circle(center, auraLength);\n if (!auraCircle.visibleInCanvas(ctx.canvas)) continue;\n\n if (gameStore.visionMode === \"bvh\") {\n let lastArcAngle = -1;\n\n const path = new Path2D();\n path.moveTo(lcenter.x, lcenter.y);\n let firstPoint: GlobalPoint;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 180) * Math.PI) {\n const anglePoint = new GlobalPoint(\n center.x + auraLength * Math.cos(angle),\n center.y + auraLength * Math.sin(angle),\n );\n if (Settings.drawAngleLines) {\n dctx!.beginPath();\n dctx!.moveTo(g2lx(center.x), g2ly(center.y));\n dctx!.lineTo(g2lx(anglePoint.x), g2ly(anglePoint.y));\n dctx!.stroke();\n }\n\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = Ray.fromPoints(center, anglePoint);\n const hitResult = gameStore.BV.intersect(lightRay);\n\n if (angle === 0) firstPoint = hitResult.hit ? hitResult.intersect : anglePoint;\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n // Draw a line from the last non arc location back to the arc\n const dest = g2l(anglePoint);\n ctx.lineTo(dest.x, dest.y);\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, angle);\n lastArcAngle = -1;\n }\n path.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n // Finish the final arc.\n if (lastArcAngle === -1) path.lineTo(g2lx(firstPoint!.x), g2ly(firstPoint!.y));\n else path.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), lastArcAngle, 2 * Math.PI);\n\n if (gameStore.fullFOW) {\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n ctx.fill(path);\n }\n\n aura.lastPath = path;\n } else {\n this.vCtx.globalCompositeOperation = \"source-over\";\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n const polygon = computeVisibility(center, \"vision\");\n this.vCtx.beginPath();\n this.vCtx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) this.vCtx.lineTo(g2lx(point[0]), g2ly(point[1]));\n this.vCtx.closePath();\n this.vCtx.fill();\n if (aura.dim > 0) {\n // Fill the light aura with a radial dropoff towards the outside.\n const gradient = this.vCtx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(aura.value),\n lcenter.x,\n lcenter.y,\n g2lr(aura.value + aura.dim),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n this.vCtx.fillStyle = gradient;\n } else {\n this.vCtx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n this.vCtx.globalCompositeOperation = \"source-in\";\n this.vCtx.beginPath();\n this.vCtx.arc(lcenter.x, lcenter.y, g2lr(aura.value + aura.dim), 0, 2 * Math.PI);\n this.vCtx.fill();\n ctx.drawImage(this.virtualCanvas, 0, 0);\n }\n }\n\n // At the DM Side due to opacity of the two fow layers, it looks strange if we just render them on top of eachother like players.\n if (gameStore.fowLOS) {\n ctx.globalCompositeOperation = \"source-in\";\n ctx.drawImage(layerManager.getLayer(\"fow-players\")!.canvas, 0, 0);\n }\n\n for (const preShape of this.preFogShapes) {\n if (!preShape.visibleInCanvas(this.canvas)) continue;\n const ogComposite = preShape.globalCompositeOperation;\n if (!gameStore.fullFOW) {\n if (preShape.globalCompositeOperation === \"source-over\")\n preShape.globalCompositeOperation = \"destination-out\";\n else if (preShape.globalCompositeOperation === \"destination-out\")\n preShape.globalCompositeOperation = \"source-over\";\n }\n preShape.draw(ctx);\n preShape.globalCompositeOperation = ogComposite;\n }\n\n if (gameStore.fullFOW) {\n ctx.globalCompositeOperation = \"source-out\";\n ctx.fillStyle = getFogColour();\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n super.draw(false);\n\n ctx.globalCompositeOperation = originalOperation;\n }\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"menuContainer\"}},[_c('div',{ref:\"rm\",style:({\n left: _vm.visible.settings ? '200px' : '0',\n top: _vm.visible.locations ? '100px' : '0'\n }),attrs:{\"id\":\"radialmenu\"}},[_c('div',{staticClass:\"rm-wrapper\"},[_c('div',{staticClass:\"rm-toggler\"},[_c('ul',{staticClass:\"rm-list\",class:{ 'rm-list-dm': _vm.IS_DM }},[(_vm.IS_DM)?_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-locations\"},on:{\"click\":function($event){_vm.visible.locations = !_vm.visible.locations}}},[_vm._m(0)]):_vm._e(),_c('li',{staticClass:\"rm-item\",attrs:{\"id\":\"rm-settings\"},on:{\"click\":function($event){_vm.visible.settings = !_vm.visible.settings}}},[_vm._m(1)])])]),_vm._m(2)])]),_c('transition',{attrs:{\"name\":\"settings\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'left 500ms'}}},[(_vm.visible.settings)?_c('div',{ref:\"settings\",attrs:{\"id\":\"menu\"},on:{\"click\":_vm.settingsClick}},[_c('div',{staticStyle:{\"width\":\"200px\",\"height\":\"90%\",\"overflow-y\":\"auto\",\"overflow-x\":\"hidden\"}},[(_vm.IS_DM)?[_c('button',{staticClass:\"accordion\"},[_vm._v(\"Assets\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('a',{staticClass:\"actionButton\",attrs:{\"href\":\"/assets\",\"target\":\"blank\",\"title\":\"Open asset manager\"}},[_c('i',{staticClass:\"fas fa-external-link-alt\"})]),_c('div',{staticClass:\"directory\",attrs:{\"id\":\"menu-tokens\"}},[_c('asset-node',{attrs:{\"asset\":_vm.assets}}),(!_vm.assets)?_c('div',[_vm._v(\"No assets\")]):_vm._e()],1)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Notes\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\",attrs:{\"id\":\"menu-notes\"}},[_c('a',{staticClass:\"actionButton\",on:{\"click\":_vm.createNote}},[_c('i',{staticClass:\"far fa-plus-square\"})]),_vm._l((_vm.notes),function(note){return _c('div',{key:note.uuid,staticStyle:{\"cursor\":\"pointer\"},on:{\"click\":function($event){_vm.openNote(note)}}},[_vm._v(_vm._s(note.title || \"[?]\"))])}),(!_vm.notes.length)?_c('div',[_vm._v(\"No notes\")]):_vm._e()],2)]),_c('button',{staticClass:\"accordion\"},[_vm._v(\"DM Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"useGridInput\"}},[_vm._v(\"Use grid:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.useGrid),expression:\"useGrid\"}],attrs:{\"id\":\"useGridInput\",\"type\":\"checkbox\",\"checked\":\"checked\"},domProps:{\"checked\":Array.isArray(_vm.useGrid)?_vm._i(_vm.useGrid,null)>-1:(_vm.useGrid)},on:{\"change\":function($event){var $$a=_vm.useGrid,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.useGrid=$$a.concat([$$v]))}else{$$i>-1&&(_vm.useGrid=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.useGrid=$$c}}}}),_c('label',{attrs:{\"for\":\"useFOWInput\"}},[_vm._v(\"Fill entire canvas with FOW:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fullFOW),expression:\"fullFOW\"}],attrs:{\"id\":\"useFOWInput\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fullFOW)?_vm._i(_vm.fullFOW,null)>-1:(_vm.fullFOW)},on:{\"change\":function($event){var $$a=_vm.fullFOW,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fullFOW=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fullFOW=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fullFOW=$$c}}}}),_c('label',{attrs:{\"for\":\"fowOpacity\"}},[_vm._v(\"FOW opacity:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.fowOpacity),expression:\"fowOpacity\",modifiers:{\"number\":true}}],attrs:{\"id\":\"fowOpacity\",\"type\":\"number\",\"min\":\"0\",\"max\":\"1\",\"step\":\"0.1\"},domProps:{\"value\":(_vm.fowOpacity)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.fowOpacity=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"fowLOS\"}},[_vm._v(\"Only show lights in LoS:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fowLOS),expression:\"fowLOS\"}],attrs:{\"id\":\"fowLOS\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.fowLOS)?_vm._i(_vm.fowLOS,null)>-1:(_vm.fowLOS)},on:{\"change\":function($event){var $$a=_vm.fowLOS,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.fowLOS=$$a.concat([$$v]))}else{$$i>-1&&(_vm.fowLOS=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.fowLOS=$$c}}}}),_c('label',{attrs:{\"for\":\"unitSizeInput\"}},[_vm._v(\"Unit Size (in ft.):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.unitSize),expression:\"unitSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"unitSizeInput\",\"type\":\"number\"},domProps:{\"value\":(_vm.unitSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.unitSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"gridSizeInput\"}},[_vm._v(\"Grid Size (in pixels):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(_vm.gridSize),expression:\"gridSize\",modifiers:{\"number\":true}}],attrs:{\"id\":\"gridSizeInput\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.gridSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.gridSize=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'bvh'}},[_vm._v(\"BVH\")]),_c('option',{domProps:{\"selected\":_vm.$store.state.game.visionMode === 'triangle'}},[_vm._v(\"Triangle\")])]),_c('label',{attrs:{\"for\":\"vmininp\"}},[_vm._v(\"Minimal full vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMin),expression:\"visionRangeMin\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmininp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMin)},on:{\"change\":function($event){_vm.visionRangeMin=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"vmaxinp\"}},[_vm._v(\"Maximal vision (ft):\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(_vm.visionRangeMax),expression:\"visionRangeMax\",modifiers:{\"lazy\":true,\"number\":true}}],attrs:{\"id\":\"vmaxinp\",\"type\":\"number\",\"min\":\"0\"},domProps:{\"value\":(_vm.visionRangeMax)},on:{\"change\":function($event){_vm.visionRangeMax=_vm._n($event.target.value)},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('label',{attrs:{\"for\":\"invitation\"}},[_vm._v(\"Invitation Code:\")]),_c('input',{attrs:{\"id\":\"invitation\",\"type\":\"text\",\"readonly\":\"readonly\"},domProps:{\"value\":_vm.invitationCode}})])])]:_vm._e(),_c('button',{staticClass:\"accordion\"},[_vm._v(\"Client Options\")]),_c('div',{staticClass:\"accordion-panel\"},[_c('div',{staticClass:\"accordion-subpanel\"},[_c('label',{attrs:{\"for\":\"gridColour\"}},[_vm._v(\"Grid Colour:\")]),_c('color-picker',{attrs:{\"id\":\"gridColour\",\"color\":_vm.gridColour},on:{\"update:color\":function($event){_vm.gridColour=$event}}}),_c('label',{attrs:{\"for\":\"fowColour\"}},[_vm._v(\"FOW Colour:\")]),_c('color-picker',{attrs:{\"id\":\"fowColour\",\"color\":_vm.fowColour},on:{\"update:color\":function($event){_vm.fowColour=$event}}}),_c('label',{attrs:{\"for\":\"rulerColour\"}},[_vm._v(\"Ruler Colour:\")]),_c('color-picker',{attrs:{\"id\":\"rulerColour\",\"color\":_vm.rulerColour},on:{\"update:color\":function($event){_vm.rulerColour=$event}}})],1)])],2),_c('router-link',{staticClass:\"accordion\",staticStyle:{\"text-decoration\":\"none\",\"display\":\"inline-block\",\"position\":\"absolute\",\"bottom\":\"0\"},attrs:{\"to\":\"/dashboard\"}},[_vm._v(\"Exit\")])],1):_vm._e()]),_c('transition',{attrs:{\"name\":\"locations\"},on:{\"enter\":function($event){_vm.$refs.rm.style.transition = 'top 500ms'}}},[(_vm.IS_DM && _vm.visible.locations)?_c('div',{attrs:{\"id\":\"locations-menu\"}},[_c('div',[_vm._l((_vm.locations),function(location){return _c('div',{key:location,on:{\"click\":function($event){_vm.changeLocation(location)}}},[_vm._v(_vm._s(location))])}),_c('div',{on:{\"click\":_vm.createLocation}},[_c('i',{staticClass:\"fas fa-plus\"})])],2)]):_vm._e()]),_c('img',{attrs:{\"id\":\"dragImage\"}})],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"far fa-compass\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{attrs:{\"href\":\"#\"}},[_c('i',{staticClass:\"fas fa-cog\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"rm-topper\"},[_c('i',{staticClass:\"icon-share-alt\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=template&id=aaf3f05e&scoped=true&\"","import { ServerCircle } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2l, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Circle extends Shape {\n type = \"circle\";\n r: number;\n constructor(center: GlobalPoint, r: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(center, fillColour, strokeColour, uuid);\n this.r = r || 1;\n }\n asDict(): ServerCircle {\n // const base = this.getBaseDict();\n // base.r = this.r;\n // base.border = this.border;\n // return base;\n return Object.assign(this.getBaseDict(), {\n radius: this.r,\n });\n }\n fromDict(data: ServerCircle) {\n super.fromDict(data);\n this.r = data.radius;\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(this.refPoint.x - this.r, this.refPoint.y - this.r),\n this.r * 2,\n this.r * 2,\n );\n }\n\n get points() {\n return this.getBoundingBox().points;\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const loc = g2l(this.refPoint);\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.fill();\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = g2lz(5);\n ctx.strokeStyle = this.strokeColour;\n ctx.arc(loc.x, loc.y, g2lz(this.r), 0, 2 * Math.PI);\n ctx.stroke();\n }\n }\n contains(point: GlobalPoint): boolean {\n return (point.x - this.refPoint.x) ** 2 + (point.y - this.refPoint.y) ** 2 < this.r ** 2;\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint;\n this.refPoint = centerPoint;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid() {\n const gs = gameStore.gridSize;\n let targetX;\n let targetY;\n if (((2 * this.r) / gs) % 2 === 0) {\n targetX = Math.round(this.refPoint.x / gs) * gs;\n } else {\n targetX = Math.round((this.refPoint.x - gs / 2) / gs) * gs + this.r;\n }\n if (((2 * this.r) / gs) % 2 === 0) {\n targetY = Math.round(this.refPoint.y / gs) * gs;\n } else {\n targetY = Math.round((this.refPoint.y - gs / 2) / gs) * gs + this.r;\n }\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.r = Math.max(Math.round(this.r / gs) * gs, gs / 2);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n const diff = l2g(point).subtract(this.refPoint);\n this.r = Math.sqrt(Math.pow(diff.length(), 2) / 2);\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class MapTool extends Tool {\n name = \"Map\";\n active = false;\n xCount = 3;\n yCount = 3;\n startPoint: GlobalPoint | null = null;\n rect: Rect | null = null;\n\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = true;\n\n this.startPoint = l2g(getMouse(event));\n this.rect = new Rect(this.startPoint.clone(), 0, 0, \"rgba(0,0,0,0)\", \"black\");\n layer.addShape(this.rect, false, false);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.rect === null || this.startPoint === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n const endPoint = l2g(getMouse(event));\n\n this.rect.w = Math.abs(endPoint.x - this.startPoint.x);\n this.rect.h = Math.abs(endPoint.y - this.startPoint.y);\n this.rect.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.rect === null) return;\n const layer = layerManager.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n if (layer.selection.length !== 1) {\n layer.removeShape(this.rect, false, false);\n return;\n }\n\n const w = this.rect.w;\n const h = this.rect.h;\n const sel = layer.selection[0];\n\n if (sel instanceof BaseRect) {\n sel.w *= (this.xCount * gameStore.gridSize) / w;\n sel.h *= (this.yCount * gameStore.gridSize) / h;\n }\n\n layer.removeShape(this.rect, false, false);\n }\n}\n","import { render, staticRenderFns } from \"./load.vue?vue&type=template&id=ff095222&\"\nimport script from \"./load.vue?vue&type=script&lang=ts&\"\nexport * from \"./load.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"load.vue\"\nexport default component.exports","import Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class PanTool extends Tool {\n name = \"Pan\";\n panStart = new LocalPoint(0, 0);\n active = false;\n\n onMouseDown(event: MouseEvent) {\n this.panStart = getMouse(event);\n this.active = true;\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active) return;\n const mouse = getMouse(event);\n const distance = mouse.subtract(this.panStart).multiply(1 / gameStore.zoomFactor);\n gameStore.increasePanX(Math.round(distance.x));\n gameStore.increasePanY(Math.round(distance.y));\n this.panStart = mouse;\n layerManager.invalidate();\n }\n onMouseUp(event: MouseEvent) {\n this.active = false;\n sendClientOptions();\n }\n}\n","import { render, staticRenderFns } from \"./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"\nimport script from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nexport * from \"./selectcontext.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selectcontext.vue?vue&type=style&index=0&id=44a31e42&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"44a31e42\",\n null\n \n)\n\ncomponent.options.__file = \"selectcontext.vue\"\nexport default component.exports","import Vue from \"vue\";\n\nimport { app } from \"@/main\";\n\n// Reference: https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\nexport function uuidv4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0;\n const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport function capitalize(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nexport function alphSort(a: string, b: string) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n else return 1;\n}\n\nexport function getHTMLFont(element: HTMLElement) {\n let font = element.style.font;\n while (font === null && element.parentElement !== null) {\n element = element.parentElement;\n font = element.style.font;\n }\n if (font === null) font = window.getComputedStyle(document.body).getPropertyValue(\"font\");\n return font;\n}\n\nexport function getHTMLTextWidth(text: string, font: string): number {\n let fakeElement = document.getElementById(\"emptycanvas\");\n if (fakeElement === null) {\n fakeElement = document.createElement(\"canvas\");\n fakeElement.id = \"emptycanvas\";\n fakeElement.style.display = \"\";\n document.body.appendChild(fakeElement);\n }\n const ctx = fakeElement.getContext(\"2d\")!;\n ctx.font = font;\n return Math.ceil(ctx.measureText(text).width);\n}\n\nexport function partition(arr: T[], predicate: (n: T) => boolean) {\n const ret: T[][] = [[], []];\n arr.forEach(n => (predicate(n) ? ret[1].push(n) : ret[0].push(n)));\n return ret;\n}\n\nexport function calcFontScale(ctx: CanvasRenderingContext2D, text: string, width: number, height: number) {\n const points = Number(ctx.font.split(\"px\")[0]) * 0.2;\n const fontWidth = ctx.measureText(text).width;\n return Math.min(width / fontWidth, height / points);\n}\n\nexport function fixedEncodeURIComponent(str: string) {\n return encodeURIComponent(str).replace(/[!'()*]/g, c => {\n return \"%\" + c.charCodeAt(0).toString(16);\n });\n}\n\nexport class OrderedMap {\n keys: K[] = [];\n values: V[] = [];\n\n get length() {\n return this.keys.length;\n }\n\n get(key: K) {\n return this.values[this.keys.indexOf(key)];\n }\n getIndexValue(idx: number) {\n return this.values[idx];\n }\n getIndexKey(idx: number) {\n return this.keys[idx];\n }\n set(key: K, value: V) {\n this.keys.push(key);\n this.values.push(value);\n }\n has(key: K) {\n return this.indexOf(key) >= 0;\n }\n indexOf(element: K) {\n return this.keys.indexOf(element);\n }\n remove(element: K) {\n const idx = this.indexOf(element);\n this.keys.splice(idx, 1);\n this.values.splice(idx, 1);\n }\n}\n\nexport function getComponent(): T {\n return app.$children[0].$refs.activeComponent;\n}\n\nexport function getRef(ref: string): T {\n const active = app.$children[0].$refs.activeComponent;\n return active.$refs[ref];\n}\n","import { render, staticRenderFns } from \"./contextMenu.vue?vue&type=template&id=606797b4&\"\nimport script from \"./contextMenu.vue?vue&type=script&lang=ts&\"\nexport * from \"./contextMenu.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"contextMenu.vue\"\nexport default component.exports","import { EdgeCirculator, Point, Sign, Triangle, Vertex } from \"./tds\";\n\ntype Line = number[];\n\nexport function cw(index: number) {\n return (index + 2) % 3;\n}\n\nexport function ccw(index: number) {\n return (index + 1) % 3;\n}\n\nexport function edgeInfo(va: Vertex, vb: Vertex) {\n const ec = new EdgeCirculator(va, null);\n if (ec.valid) {\n do {\n const indv = 3 - ec.t!.indexV(va) - ec.ri;\n const v = ec.t!.vertices[indv]!;\n if (!v.infinite) {\n if (v === vb) {\n return { includes: true, vi: vb, fr: ec.t!, i: ec.ri };\n } else {\n const orient = orientation(va.point!, vb.point!, v.point!);\n if (orient === Sign.COLLINEAR && collinearBetween(va.point!, v.point!, vb.point!)) {\n return { includes: true, vi: v, fr: ec.t!, i: ec.ri };\n }\n }\n }\n } while (ec.next());\n }\n return { includes: false };\n}\n\nexport function collinearBetween(p: Point, q: Point, r: Point): boolean {\n let cPQ: Sign;\n let cQR: Sign;\n if (compare(0, p, r) === Sign.EQUAL) {\n cPQ = compare(1, p, q);\n cQR = compare(1, q, r);\n } else {\n cPQ = compare(0, p, q);\n cQR = compare(0, q, r);\n }\n return (cPQ === Sign.SMALLER && cQR === Sign.SMALLER) || (cPQ === Sign.LARGER && cQR === Sign.LARGER);\n}\n\nfunction compare(index: number, a: Point, b: Point): Sign {\n if (a[index] < b[index]) return Sign.SMALLER;\n if (a[index] > b[index]) return Sign.LARGER;\n return Sign.EQUAL;\n}\n\nexport function orientation(p: Point, q: Point, r: Point) {\n const px = p[0];\n const py = p[1];\n const qx = q[0];\n const qy = q[1];\n const rx = r[0];\n const ry = r[1];\n const pqx = qx - px;\n const pqy = qy - py;\n const prx = rx - px;\n const pry = ry - py;\n const det = determinant(pqx, pqy, prx, pry);\n let maxX = Math.abs(pqx);\n let maxY = Math.abs(pqy);\n const aprX = Math.abs(prx);\n const aprY = Math.abs(pry);\n if (maxX < aprX) maxX = aprX;\n if (maxY < aprY) maxY = aprY;\n if (maxX > maxY) [maxX, maxY] = [maxY, maxX];\n // underflow proection in eps computation?? Math.sqrt(Number.MIN_VALUE, Number.EPSILON)\n if (maxX < 2e-162 && maxX === 0) {\n return Sign.ZERO;\n }\n // overflow protection in det computation\n if (maxY < 1e153) {\n const eps = Number.EPSILON * maxX * maxY;\n if (det > eps) return Sign.POSITIVE;\n if (det < -eps) return Sign.NEGATIVE;\n }\n return Sign.ZERO;\n}\n\nexport function determinant(a00: number, a01: number, a10: number, a11: number) {\n return a00 * a11 - a01 * a10;\n}\n\nexport function hasInexactNegativeOrientation(p: Point, q: Point, r: Point) {\n return determinant(q[0] - p[0], q[1] - p[1], r[0] - p[0], r[1] - p[1]) < 0;\n}\n\nexport function sideOfOrientedCircle(t: Triangle, p: Point, perturb: boolean): Sign {\n if (!t.isInfinite())\n return sideOfOrientedCircleP(t.vertices[0]!.point!, t.vertices[1]!.point!, t.vertices[2]!.point!, p, perturb);\n throw new Error(\"SSS\");\n}\n\nfunction sideOfOrientedCircleP(p0: Point, p1: Point, p2: Point, p: Point, perturb: boolean): Sign {\n const os = getOrientedSide(p0, p1, p2, p);\n if (os !== Sign.ON_ORIENTED_BOUNDARY || !perturb) return os;\n const points = [p0, p1, p2, p];\n points.sort((a, b) => a[0] - b[0] || a[1] - b[1]);\n for (const point of points.reverse()) {\n if (point === p) return Sign.ON_NEGATIVE_SIDE;\n let o = orientation(p0, p1, p);\n if (point === p2 && o !== Sign.COLLINEAR) return o;\n o = orientation(p0, p, p2);\n if (point === p1 && o !== Sign.COLLINEAR) return o;\n o = orientation(p, p1, p2);\n if (point === p0 && o !== Sign.COLLINEAR) return o;\n }\n return Sign.ON_NEGATIVE_SIDE;\n}\n\nexport function xyEqual(p: Point, q: Point) {\n return p[0] === q[0] && p[1] === q[1];\n}\n\nexport function xySmaller(p: Point, q: Point) {\n return p[0] < q[0] || (p[0] === q[0] && p[1] < q[1]);\n}\n\nexport function xyCompare(p: Point, q: Point) {\n if (xySmaller(p, q)) return Sign.SMALLER;\n if (xyEqual(p, q)) return Sign.EQUAL;\n return Sign.LARGER;\n}\n\nfunction getOrientedSide(p: Point, q: Point, r: Point, t: Point): Sign {\n const qpx = q[0] - p[0];\n const qpy = q[1] - p[1];\n const rpx = r[0] - p[0];\n const rpy = r[1] - p[1];\n const tpx = t[0] - p[0];\n const tpy = t[1] - p[1];\n const tqx = t[0] - q[0];\n const tqy = t[1] - q[1];\n const rqx = r[0] - q[0];\n const rqy = r[1] - q[1];\n\n const det = determinant(qpx * tpy - qpy * tpx, tpx * tqx + tpy * tqy, qpx * rpy - qpy * rpx, rpx * rqx + rpy * rqy);\n let maxx = Math.abs(qpx);\n let maxy = Math.abs(qpy);\n const arpx = Math.abs(rpx);\n const arpy = Math.abs(rpy);\n const atqx = Math.abs(tqx);\n const atqy = Math.abs(tqy);\n const atpx = Math.abs(tpx);\n const atpy = Math.abs(tpy);\n const arqx = Math.abs(rqx);\n const arqy = Math.abs(rqy);\n\n if (maxx < arpx) maxx = arpx;\n if (maxx < atpx) maxx = atpx;\n if (maxx < atqx) maxx = atqx;\n if (maxx < arqx) maxx = arqx;\n\n if (maxy < arpy) maxy = arpy;\n if (maxy < atpy) maxy = atpy;\n if (maxy < atqy) maxy = atqy;\n if (maxy < arqy) maxy = arqy;\n\n if (maxx > maxy) [maxx, maxy] = [maxy, maxx];\n\n if (maxx < 1e-73 && maxx === 0) return Sign.ON_ORIENTED_BOUNDARY;\n // sqrt(sqrt(max_double/16\n else if (maxy < 1e76) {\n const eps = Number.EPSILON * maxx * maxy * (maxy * maxy);\n if (det > eps) return Sign.ON_POSITIVE_SIDE;\n if (det < -eps) return Sign.ON_NEGATIVE_SIDE;\n }\n\n return Sign.ZERO;\n}\n\nfunction segSegDoIntersectCrossing(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p3, p4, p2) !== Sign.RIGHT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p3, p4, p2) !== Sign.LEFT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nfunction segSegDoIntersectContained(p1: Point, p2: Point, p3: Point, p4: Point): boolean {\n switch (orientation(p1, p2, p3)) {\n case Sign.LEFT_TURN:\n return orientation(p1, p2, p4) !== Sign.LEFT_TURN;\n case Sign.RIGHT_TURN:\n return orientation(p1, p2, p4) !== Sign.RIGHT_TURN;\n case Sign.COLLINEAR:\n return true;\n }\n}\n\nexport function intersection(pa: Point, pb: Point, pc: Point, pd: Point) {\n const i = getIntersectionType(pa, pb, pc, pd);\n switch (i.intersectionType) {\n case IntersectionType.POINT:\n return i.point!;\n case IntersectionType.NO_INTERSECTION:\n return null;\n }\n throw new Error(\"sdfgighowen\");\n}\n\nenum IntersectionType {\n NO_INTERSECTION,\n POINT,\n SEGMENT,\n}\n\nfunction getLine(p0: Point, p1: Point): Line {\n if (p0[0] === p1[0]) return [1, 0, -p0[0]];\n if (p0[1] === p1[1]) return [0, 1, -p0[1]];\n const x = p1[0] - p0[0];\n const y = p1[1] - p0[1];\n return [-y, x, -x * p0[1] + y * p0[0]];\n}\n\nfunction getIntersectionType(pa: Point, pb: Point, pc: Point, pd: Point) {\n if (!doIntersect(pa, pb, pc, pd)) return { intersectionType: IntersectionType.NO_INTERSECTION, point: null };\n const l1 = getLine(pa, pb);\n const l2 = getLine(pc, pd);\n const info = getIntersectionTypeLine(l1, l2);\n switch (info.intersectionType) {\n case IntersectionType.POINT: {\n return info;\n }\n }\n throw new Error(\"gzseuihgpib\");\n}\n\nfunction getIntersectionTypeLine(la: Line, lb: Line) {\n const denom = la[0] * lb[1] - lb[0] * la[1];\n const nom1 = la[1] * lb[2] - lb[1] * la[2];\n const nom2 = lb[0] * la[2] - la[0] * lb[2];\n return {\n intersectionType: IntersectionType.POINT,\n point: [nom1 / denom, nom2 / denom],\n };\n}\n\nfunction doIntersect(A1: Point, A2: Point, B1: Point, B2: Point): boolean {\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A2, B1) || xySmaller(B2, A1)) return false;\n } else {\n if (xySmaller(A2, B2) || xySmaller(B1, A1)) return false;\n }\n } else {\n if (xySmaller(B1, B2)) {\n if (xySmaller(A1, B1) || xySmaller(B2, A2)) return false;\n } else {\n if (xySmaller(A1, B2) || xySmaller(B1, A2)) return false;\n }\n }\n if (xySmaller(A1, A2)) {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A1, A2);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A1, A2, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A1, A2, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A1, A2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A1, A2);\n }\n }\n }\n }\n }\n } else {\n if (xySmaller(B1, B2)) {\n switch (xyCompare(A2, B1)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B1, B2);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B1, B2);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B2, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B2, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B1, B2, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B1, B2, A2, A1);\n }\n }\n }\n }\n } else {\n switch (xyCompare(A2, B2)) {\n case Sign.SMALLER: {\n switch (xyCompare(A1, B2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(A1, B1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(A2, A1, B2, B1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(A2, A1, B2, B1);\n }\n }\n }\n }\n case Sign.EQUAL:\n return true;\n default:\n switch (xyCompare(B1, A2)) {\n case Sign.SMALLER:\n return false;\n case Sign.EQUAL:\n return true;\n default: {\n switch (xyCompare(B1, A1)) {\n case Sign.SMALLER:\n return segSegDoIntersectCrossing(B2, B1, A2, A1);\n case Sign.EQUAL:\n return true;\n default:\n return segSegDoIntersectContained(B2, B1, A2, A1);\n }\n }\n }\n }\n }\n }\n}\n\nfunction nextUp(x: number) {\n if (x !== x) {\n return x;\n }\n if (x === -1 / 0) {\n return -Number.MAX_VALUE;\n }\n if (x === +1 / 0) {\n return +1 / 0;\n }\n if (x === +Number.MAX_VALUE) {\n return +1 / 0;\n }\n let y = x * (x < 0 ? 1 - Number.EPSILON / 2 : 1 + Number.EPSILON);\n if (y === x) {\n y = Number.MIN_VALUE * Number.EPSILON > 0 ? x + Number.MIN_VALUE * Number.EPSILON : x + Number.MIN_VALUE;\n }\n if (y === +1 / 0) {\n y = +Number.MAX_VALUE;\n }\n const b = x + (y - x) / 2;\n if (x < b && b < y) {\n y = b;\n }\n const c = (y + x) / 2;\n if (x < c && c < y) {\n y = c;\n }\n return y === 0 ? -0 : y;\n}\n\nexport function ulp(x: number) {\n return x < 0 ? nextUp(x) - x : x + nextUp(-x);\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=7c80ae3a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=style&index=0&id=7c80ae3a&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Prop } from \"vue-property-decorator\";\n\n@Component\nexport default class Modal extends Vue {\n @Prop(Boolean) visible!: boolean;\n @Prop({ type: Boolean, default: true }) mask!: boolean;\n\n $refs!: {\n container: HTMLElement;\n };\n\n positioned = false;\n offsetX = 0;\n offsetY = 0;\n screenX = 0;\n screenY = 0;\n dragging = false;\n\n // Example of mounted required: opening note\n mounted() {\n this.updatePosition();\n }\n // Example of updated required: opening initiative\n updated() {\n this.updatePosition();\n }\n\n close(event: MouseEvent) {\n this.$emit(\"close\");\n }\n updatePosition() {\n if (!this.positioned) {\n const container = this.$refs.container;\n if (container.offsetWidth === 0 && container.offsetHeight === 0) return;\n this.$refs.container.style.left = (window.innerWidth - container.offsetWidth) / 2 + \"px\";\n this.$refs.container.style.top = (window.innerHeight - container.offsetHeight) / 2 + \"px\";\n this.positioned = true;\n }\n }\n dragStart(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n event.dataTransfer.setData(\"Hack\", \"\");\n // Because the drag event is happening on the header, we have to change the drag image\n // in order to give the impression that the entire modal is dragged.\n event.dataTransfer.setDragImage(this.$refs.container, event.offsetX, event.offsetY);\n this.offsetX = event.offsetX;\n this.offsetY = event.offsetY;\n this.screenX = event.screenX;\n this.screenY = event.screenY;\n this.dragging = true;\n }\n dragEnd(event: DragEvent) {\n this.dragging = false;\n let left = event.clientX - this.offsetX;\n let top = event.clientY - this.offsetY;\n if (event.clientX === 0 && event.clientY === 0 && event.pageX === 0 && event.pageY === 0) {\n left = parseInt(this.$refs.container.style.left!, 10) - (this.screenX - event.screenX);\n top = parseInt(this.$refs.container.style.top!, 10) - (this.screenY - event.screenY);\n }\n if (left < 0) left = 0;\n if (left > window.innerWidth - 100) left = window.innerWidth - 100;\n if (top < 0) top = 0;\n if (top > window.innerHeight - 100) top = window.innerHeight - 100;\n this.$refs.container.style.left = left + \"px\";\n this.$refs.container.style.top = top + \"px\";\n this.$refs.container.style.display = \"block\";\n }\n dragOver(event: DragEvent) {\n if (this.dragging) this.$refs.container.style.display = \"none\";\n }\n}\n","import io from \"socket.io-client\";\n\nimport { Asset } from \"@/core/comm/types\";\nimport { assetStore } from \"./store\";\n\nexport const socket = io(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\", { autoConnect: false });\n\n// export const socket = io.connect(location.protocol + \"//\" + location.host + \"/pa_assetmgmt\");\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n window.location.href = destination;\n});\nsocket.on(\"Folder.Root.Set\", (root: number) => {\n assetStore.setRoot(root);\n});\nsocket.on(\"Folder.Set\", (folder: Asset) => {\n assetStore.clear();\n if (folder.children) {\n for (const child of folder.children) {\n assetStore.idMap.set(child.id, child);\n if (child.file_hash) {\n assetStore.files.push(child.id);\n } else {\n assetStore.folders.push(child.id);\n }\n }\n }\n});\nsocket.on(\"Folder.Create\", (folder: Asset) => {\n assetStore.folders.push(folder.id);\n assetStore.idMap.set(folder.id, folder);\n});\nsocket.on(\"Asset.Upload.Finish\", (asset: Asset) => {\n assetStore.idMap.set(asset.id, asset);\n assetStore.files.push(asset.id);\n});\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=1fee50f5&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=style&index=0&id=1fee50f5&scoped=true&lang=css&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=0&lang=css&\"","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, g2lz, l2g } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\nimport { ServerMultiLine } from \"../comm/types/shapes\";\n\nexport class MultiLine extends Shape {\n type = \"multiline\";\n _points: GlobalPoint[] = [];\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n points?: GlobalPoint[],\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this._points = points || [];\n this.lineWidth = lineWidth || 3;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._points.length; i++) this._points[i] = this._points[i].add(delta);\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n line_width: this.lineWidth,\n points: this._points.map(p => ({ x: p.x, y: p.y })),\n });\n }\n fromDict(data: ServerMultiLine) {\n super.fromDict(data);\n this._points = data.points.map(p => new GlobalPoint(p.x, p.y));\n }\n get points() {\n return this._points.map(point => [point.x, point.y]);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._points) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.beginPath();\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n for (const p of this._points) ctx.lineTo(g2lx(p.x), g2ly(p.y));\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = g2lz(this.lineWidth);\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._points[resizePoint - 1] = l2g(point);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"outer\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}},[_c('div',{staticClass:\"current-color\",style:(_vm.transparent ? 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)' : 'background-color:' + _vm.color),on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.open($event)}}}),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],staticClass:\"mask\",on:{\"click\":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.closePicker($event)}}}),_c('chrome-picker',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.display),expression:\"display\"}],ref:\"chromePicker\",style:({position: 'fixed', left:_vm.left + 'px', top:_vm.top + 'px', 'z-index': 9999}),attrs:{\"value\":_vm.color,\"tabindex\":\"-1\"},on:{\"input\":_vm.updateColor}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=template&id=b4f2c0b0&scoped=true&\"","import { render, staticRenderFns } from \"./draw.vue?vue&type=template&id=639cd890&scoped=true&\"\nimport script from \"./draw.vue?vue&type=script&lang=ts&\"\nexport * from \"./draw.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"639cd890\",\n null\n \n)\n\ncomponent.options.__file = \"draw.vue\"\nexport default component.exports","import tinycolor from \"tinycolor2\";\n\nimport { LocalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function getMouse(e: MouseEvent): LocalPoint {\n return new LocalPoint(e.pageX, e.pageY);\n}\n\nexport function getFogColour(opposite: boolean = false): string {\n const tc = tinycolor(gameStore.fowColour);\n if (gameStore.IS_DM) tc.setAlpha(opposite ? 1 : gameStore.fowOpacity);\n else tc.setAlpha(1);\n return tc.toRgbString();\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport * as tinycolor from \"tinycolor2\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { calcFontScale } from \"@/core/utils\";\nimport { LocalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { CircularToken } from \"@/game/shapes/circulartoken\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { Watch } from \"vue-property-decorator\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n computed: {\n ...mapState(\"game\", [\"unitSize\"]),\n },\n})\nexport default class CreateTokenModal extends Vue {\n x = 0;\n y = 0;\n visible = false;\n text = \"X\";\n fillColour = \"rgba(255, 255, 255, 1)\";\n borderColour = \"rgba(0, 0, 0, 1)\";\n\n mounted() {\n this.updatePreview();\n }\n\n @Watch(\"text\")\n onTextChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"fillColour\")\n onFillChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n @Watch(\"borderColour\")\n onBorderChange(newValue: string, oldValue: string) {\n this.updatePreview();\n }\n\n open(x: number, y: number) {\n this.visible = true;\n this.x = x;\n this.y = y;\n }\n submit() {\n const layer = layerManager.getLayer();\n if (layer === undefined) return;\n const token = new CircularToken(\n l2g(new LocalPoint(this.x, this.y)),\n getUnitDistance(gameStore.unitSize / 2),\n this.text,\n \"10px serif\",\n this.fillColour,\n this.borderColour,\n );\n token.addOwner(gameStore.username);\n layer.addShape(token, true);\n layer.invalidate(false);\n this.visible = false;\n }\n updatePreview() {\n const ctx = (this.$refs.canvas).getContext(\"2d\")!;\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.beginPath();\n const dest = { x: ctx.canvas.width / 2, y: ctx.canvas.height / 2 };\n const r = Math.min(dest.x, dest.y) * 0.9;\n\n ctx.fillStyle = this.fillColour;\n\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.fill();\n if (this.borderColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.beginPath();\n ctx.lineWidth = 5;\n ctx.strokeStyle = this.borderColour;\n ctx.arc(dest.x, dest.y, r, 0, 2 * Math.PI);\n ctx.stroke();\n }\n ctx.save();\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n const xs = calcFontScale(ctx, this.text, r, r);\n const ys = 0;\n ctx.transform(xs, ys, -ys, xs, dest.x, dest.y);\n ctx.fillStyle = tinycolor.mostReadable(this.fillColour, [\"#000\", \"#fff\"]).toHexString();\n ctx.fillText(this.text, 0, 0);\n ctx.restore();\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class NoteDialog extends Vue {\n visible = false;\n note: Note | null = null;\n\n open(note: Note) {\n this.visible = true;\n this.note = note;\n }\n calcHeight() {\n if (this.$refs.textarea) {\n const el = this.$refs.textarea;\n el.style.height = \"auto\";\n el.style.height = el.scrollHeight + \"px\";\n // Using the return value without the above did not achieve what I want, so hey /shrug\n return el.scrollHeight + \"px\";\n }\n return \"100px\";\n }\n updateNote() {\n if (this.note) gameStore.updateNote({ note: this.note, sync: true });\n }\n removeNote() {\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result && this.note) {\n gameStore.removeNote({ note: this.note, sync: true });\n this.visible = false;\n }\n },\n () => {},\n );\n }\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=ccaf03d6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=style&index=0&id=ccaf03d6&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Component from \"vue-class-component\";\n\nimport { Watch } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Circle } from \"@/game/shapes/circle\";\nimport { Line } from \"@/game/shapes/line\";\nimport { MultiLine } from \"@/game/shapes/multiline\";\nimport { Polygon } from \"@/game/shapes/polygon\";\nimport { Rect } from \"@/game/shapes/rect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { getUnitDistance, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n },\n})\nexport default class DrawTool extends Tool {\n name = \"Draw\";\n active = false;\n\n startPoint: GlobalPoint | null = null;\n shape: Shape | null = null;\n brushHelper: Circle | null = null;\n ruler: Line | null = null;\n\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"draw-polygon\", \"paint-brush\"];\n modeSelect = \"normal\";\n modes = [\"normal\", \"reveal\", \"hide\"];\n\n brushSize = getUnitDistance(gameStore.unitSize);\n\n get helperSize(): number {\n if (this.shapeSelect === \"paint-brush\") return this.brushSize / 2;\n return getUnitDistance(this.unitSize) / 8;\n }\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n\n @Watch(\"fillColour\")\n onFillChange() {\n if (this.brushHelper) this.brushHelper.fillColour = this.fillColour;\n }\n\n @Watch(\"modeSelect\")\n onModeUpdate(newValue: string, oldValue: string) {\n this.onModeChange(newValue, oldValue);\n }\n\n setupBrush() {\n if (this.brushHelper === null) return;\n if (this.modeSelect === \"reveal\" || this.modeSelect === \"hide\") {\n this.brushHelper.options.set(\"preFogShape\", true);\n this.brushHelper.options.set(\"skipDraw\", true);\n this.brushHelper.fillColour = \"rgba(0, 0, 0, 1)\";\n\n if (this.modeSelect === \"reveal\") this.brushHelper.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.brushHelper.globalCompositeOperation = \"destination-out\";\n } else {\n this.brushHelper.options.delete(\"preFogShape\");\n this.brushHelper.options.delete(\"skipDraw\");\n this.brushHelper.globalCompositeOperation = \"source-over\";\n this.brushHelper.fillColour = this.fillColour;\n }\n }\n onModeChange(newValue: string, oldValue: string) {\n if (this.brushHelper === null) return;\n\n const fowLayer = layerManager.getLayer(\"fow\");\n const normalLayer = layerManager.getLayer();\n if (fowLayer === undefined || normalLayer === undefined) return;\n\n this.setupBrush();\n\n if (newValue !== \"normal\" && oldValue === \"normal\") {\n normalLayer.removeShape(this.brushHelper, false);\n fowLayer.addShape(this.brushHelper, false);\n } else if (newValue === \"normal\" && oldValue !== \"normal\") {\n normalLayer.addShape(this.brushHelper, false);\n fowLayer.removeShape(this.brushHelper, false);\n }\n }\n getLayer() {\n if (this.modeSelect === \"normal\") return layerManager.getLayer();\n return layerManager.getLayer(\"fow\");\n }\n onMouseDown(event: MouseEvent) {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (!this.active) {\n this.startPoint = l2g(getMouse(event));\n this.active = true;\n switch (this.shapeSelect) {\n case \"square\": {\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n break;\n }\n case \"circle\": {\n this.shape = new Circle(\n this.startPoint.clone(),\n this.helperSize,\n this.fillColour,\n this.borderColour,\n );\n break;\n }\n case \"paint-brush\": {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n break;\n }\n case \"draw-polygon\": {\n this.shape = new Polygon(this.startPoint.clone(), [], this.fillColour, this.borderColour);\n break;\n }\n default:\n return;\n }\n\n if (this.modeSelect !== \"normal\") {\n this.shape.options.set(\"preFogShape\", true);\n this.shape.options.set(\"skipDraw\", true);\n this.shape.fillColour = \"rgba(0, 0, 0, 1)\";\n }\n if (this.modeSelect === \"reveal\") this.shape.globalCompositeOperation = \"source-over\";\n else if (this.modeSelect === \"hide\") this.shape.globalCompositeOperation = \"destination-out\";\n\n this.shape.addOwner(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n layer.addShape(this.shape, true, false, false);\n\n // Push brushhelper to back\n this.pushBrushBack();\n } else if (this.shape !== null && this.shape instanceof Polygon) {\n // For polygon draw\n this.shape._vertices.push(l2g(getMouse(event)));\n }\n if (this.shape !== null && this.shape instanceof Polygon) {\n const lastPoint = l2g(getMouse(event));\n if (this.ruler === null) {\n this.ruler = new Line(lastPoint, lastPoint, 3, \"black\");\n layer.addShape(this.ruler, false);\n } else {\n this.ruler.refPoint = lastPoint;\n this.ruler.endPoint = lastPoint;\n }\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n layer.invalidate(false);\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n }\n }\n onMouseMove(event: MouseEvent) {\n const endPoint = l2g(getMouse(event));\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n\n if (this.brushHelper !== null) {\n this.brushHelper.r = this.helperSize;\n this.brushHelper.refPoint = endPoint;\n if (!this.active) layer.invalidate(false);\n }\n\n if (!this.active || this.startPoint === null || this.shape === null) return;\n\n switch (this.shapeSelect) {\n case \"square\": {\n (this.shape).w = Math.abs(endPoint.x - this.startPoint.x);\n (this.shape).h = Math.abs(endPoint.y - this.startPoint.y);\n this.shape.refPoint = new GlobalPoint(\n Math.min(this.startPoint.x, endPoint.x),\n Math.min(this.startPoint.y, endPoint.y),\n );\n break;\n }\n case \"circle\": {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n break;\n }\n case \"paint-brush\": {\n (this.shape)._points.push(endPoint);\n break;\n }\n case \"draw-polygon\": {\n this.ruler!.endPoint = endPoint;\n break;\n }\n }\n\n if (!(this.shape instanceof Polygon)) {\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateVision(true);\n }\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null || this.shape instanceof Polygon) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n this.finaliseShape();\n }\n onContextMenu(event: MouseEvent) {\n if (!this.active || this.shape === null || !(this.shape instanceof Polygon)) return;\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n layer.removeShape(this.ruler!, false);\n this.ruler = null;\n this.finaliseShape();\n }\n\n private finaliseShape() {\n if (this.shape === null) return;\n if (this.shape.visionObstruction) gameStore.recalculateVision();\n if (this.shape.movementObstruction) gameStore.recalculateMovement();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\n }\n\n onSelect() {\n const layer = this.getLayer();\n if (layer === undefined) return;\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n onDeselect() {\n const layer = this.getLayer();\n if (this.brushHelper !== null && layer !== undefined) layer.removeShape(this.brushHelper, false);\n if (this.active && layer !== undefined && this.shape !== null) {\n layer.removeShape(this.shape, true, false);\n this.shape = null;\n this.active = false;\n layer.invalidate(false);\n }\n }\n\n private pushBrushBack() {\n const layer = this.getLayer();\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n if (this.brushHelper !== null) layer.removeShape(this.brushHelper, false);\n this.brushHelper = new Circle(new GlobalPoint(-1000, -1000), this.brushSize / 2, this.fillColour);\n this.setupBrush();\n layer.addShape(this.brushHelper, false); // during mode change the shape is already added\n }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly, l2g } from \"@/game/units\";\n\nexport class Line extends Shape {\n type = \"line\";\n endPoint: GlobalPoint;\n lineWidth: number;\n constructor(\n startPoint: GlobalPoint,\n endPoint: GlobalPoint,\n lineWidth?: number,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, \"rgba(0, 0, 0, 0)\", strokeColour || \"#000\", uuid);\n this.endPoint = endPoint;\n this.lineWidth = lineWidth === undefined ? 1 : lineWidth;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n x2: this.endPoint.x,\n y2: this.endPoint.y,\n line_width: this.lineWidth,\n });\n }\n get points() {\n return [[this.refPoint.x, this.refPoint.y], [this.endPoint.x, this.endPoint.y]];\n }\n getBoundingBox(): BoundingRect {\n return new BoundingRect(\n new GlobalPoint(Math.min(this.refPoint.x, this.endPoint.x), Math.min(this.refPoint.y, this.endPoint.y)),\n Math.abs(this.refPoint.x - this.endPoint.x),\n Math.abs(this.refPoint.y - this.endPoint.y),\n );\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.strokeStyle = this.strokeColour;\n ctx.beginPath();\n ctx.moveTo(g2lx(this.refPoint.x), g2ly(this.refPoint.y));\n ctx.lineTo(g2lx(this.endPoint.x), g2ly(this.endPoint.y));\n ctx.lineWidth = this.lineWidth;\n ctx.stroke();\n }\n contains(point: GlobalPoint): boolean {\n return false; // TODO\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this.refPoint = l2g(point);\n else this.endPoint = l2g(point);\n }\n}\n","// import \"./class-component-hooks\";\n\nimport axios, { AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Router from \"vue-router\";\n\nVue.use(Router);\n\nimport AssetManager from \"@/assetManager/manager.vue\";\nimport Login from \"@/auth/login.vue\";\nimport Logout from \"@/auth/logout\";\nimport LoadComponent from \"@/core/components/load.vue\";\nimport Dashboard from \"@/dashboard/main.vue\";\nimport Game from \"@/game/game.vue\";\nimport Invitation from \"@/invitation/invitation\";\n\nimport { coreStore } from \"@/core/store\";\n// import { AssetManager } from \"./assetManager/assets\";\n// const AssetManager = () => import(\"./assetManager/assets\").then(m => m.AssetManager);\n\nexport const router = new Router({\n mode: \"history\",\n base: process.env.BASE_URL,\n routes: [\n {\n path: \"/\",\n redirect: \"/dashboard\",\n },\n {\n path: \"/_load\",\n name: \"load\",\n component: LoadComponent,\n },\n {\n path: \"/assets\",\n component: AssetManager,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/auth\",\n component: { template: \"\" },\n children: [{ path: \"login\", component: Login }, { path: \"logout\", component: Logout }],\n },\n {\n path: \"/invite/:code\",\n component: Invitation,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/dashboard\",\n component: Dashboard,\n meta: {\n auth: true,\n },\n },\n {\n path: \"/game/:creator/:room\",\n component: Game,\n meta: {\n auth: true,\n },\n },\n ],\n});\n\nrouter.beforeEach((to, from, next) => {\n if (!coreStore.initialized && to.path !== \"/_load\") {\n next({ path: \"/_load\" });\n axios\n .get(\"/api/auth\")\n .then((response: AxiosResponse) => {\n if (response.data.auth) {\n coreStore.setAuthenticated(true);\n coreStore.setUsername(response.data.username);\n }\n coreStore.setInitialized(true);\n router.push(to.path);\n })\n .catch(() => {\n console.error(\"Authentication check could not be fulfilled.\");\n });\n } else if (to.matched.some(record => record.meta.auth) && !coreStore.authenticated) {\n next({ path: \"/auth/login\", query: { redirect: to.path } });\n } else {\n next();\n }\n});\n","\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class Tool extends Vue {\n name = \"\";\n selected = false;\n active = false;\n get detailRight(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n\n return `${window.innerWidth - Math.min(window.innerWidth - 25, mid + 75)}px`;\n }\n get detailArrow(): string {\n const rect = (this.$parent.$refs[this.name + \"-selector\"])[0].getBoundingClientRect();\n const mid = rect.left + rect.width / 2;\n const right = Math.min(window.innerWidth - 25, mid + 75);\n return `${right - mid - 14}px`; // border width\n }\n created() {\n this.$parent.$on(\"mousedown\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseDown(event);\n });\n this.$parent.$on(\"mouseup\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseUp(event);\n });\n this.$parent.$on(\"mousemove\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onMouseMove(event);\n });\n this.$parent.$on(\"contextmenu\", (event: MouseEvent, tool: string) => {\n if (tool === this.name) this.onContextMenu(event);\n });\n this.$parent.$on(\"tools-select-change\", (newValue: string, oldValue: string) => {\n if (oldValue === this.name) {\n this.selected = false;\n this.onDeselect();\n } else if (newValue === this.name) {\n this.selected = true;\n this.onSelect();\n }\n });\n }\n onSelect() {}\n onDeselect() {}\n onMouseDown(event: MouseEvent) {}\n onMouseUp(event: MouseEvent) {}\n onMouseMove(event: MouseEvent) {}\n onContextMenu(event: MouseEvent) {}\n}\n","import { render, staticRenderFns } from \"./tools.vue?vue&type=template&id=1fee50f5&scoped=true&\"\nimport script from \"./tools.vue?vue&type=script&lang=ts&\"\nexport * from \"./tools.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tools.vue?vue&type=style&index=0&id=1fee50f5&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1fee50f5\",\n null\n \n)\n\ncomponent.options.__file = \"tools.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=script&lang=ts&\"","import { InitiativeData } from \"@/game/comm/types/general\";\nimport { ServerAsset } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\n\nexport class Asset extends BaseRect {\n type = \"assetrect\";\n img: HTMLImageElement;\n src: string = \"\";\n constructor(img: HTMLImageElement, topleft: GlobalPoint, w: number, h: number, uuid?: string) {\n super(topleft, w, h, undefined, undefined, uuid);\n this.img = img;\n }\n asDict() {\n return Object.assign(this.getBaseDict(), {\n src: this.src,\n });\n }\n fromDict(data: ServerAsset) {\n super.fromDict(data);\n this.src = data.src;\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n try {\n ctx.drawImage(this.img, g2lx(this.refPoint.x), g2ly(this.refPoint.y), g2lz(this.w), g2lz(this.h));\n } catch (error) {\n console.warn(`Shape ${this.uuid} could not load the image ${this.src}`);\n }\n }\n getInitiativeRepr(): InitiativeData {\n return {\n uuid: this.uuid,\n visible: !gameStore.IS_DM,\n group: false,\n source: this.src,\n has_img: true,\n effects: [],\n index: Infinity,\n };\n }\n}\n","import {\n BoundingBox,\n EdgeCirculator,\n FaceCirculator,\n LineFaceCirculator,\n LocateType,\n Point,\n Sign,\n TDS,\n Triangle,\n Vertex,\n} from \"./tds\";\nimport {\n ccw,\n collinearBetween,\n cw,\n edgeInfo,\n hasInexactNegativeOrientation,\n intersection,\n orientation,\n sideOfOrientedCircle,\n xyEqual,\n} from \"./triag\";\n\nexport type Edge = [Triangle, number];\n\nexport class CDT {\n tds: TDS;\n constructor() {\n this.tds = new TDS();\n }\n insertConstraint(a: Point, b: Point) {\n const va = this.insert(a);\n const vb = this.insert(b);\n if (va !== vb) this.insertConstraintV(va, vb);\n }\n\n insertConstraintV(va: Vertex, vb: Vertex) {\n const stack = [[va, vb]];\n while (stack.length > 0) {\n const v = stack.pop()!;\n const info = edgeInfo(v[0], v[1]);\n if (info.includes) {\n this.markConstraint(info.fr!, info.i!);\n if (info.vi! !== v[1]) {\n stack.push([info.vi!, v[1]]);\n }\n continue;\n }\n const intersectionInfo = this.findIntersectedFaces(v[0], v[1]);\n if (intersectionInfo.found) {\n if (intersectionInfo.vi !== v[0] && intersectionInfo.vi !== v[1]) {\n stack.push([v[0], intersectionInfo.vi]);\n stack.push([intersectionInfo.vi, v[1]]);\n } else {\n stack.push(v);\n }\n continue;\n }\n this.triangulateHole(intersectionInfo.intersectedFaces, intersectionInfo.listAB, intersectionInfo.listBA);\n if (intersectionInfo.vi !== v[1]) {\n stack.push([intersectionInfo.vi, v[1]]);\n }\n }\n }\n\n triangulateHole(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[]) {\n const edges: Edge[] = [];\n this.triangulateHole2(intersectedFaces, listAB, listBA, edges);\n this.propagatingFlipE(edges);\n }\n\n triangulateHole2(intersectedFaces: Triangle[], listAB: Edge[], listBA: Edge[], edges: Edge[]) {\n if (listAB.length > 0) {\n this.triangulateHalfHole(listAB, edges);\n this.triangulateHalfHole(listBA, edges);\n const fl = listAB[0][0];\n const fr = listBA[0][0];\n fl.neighbours[2] = fr;\n fr.neighbours[2] = fl;\n fl.constraints[2] = true;\n fr.constraints[2] = true;\n\n while (intersectedFaces.length > 0) {\n this.tds.deleteTriangle(intersectedFaces.shift()!);\n }\n }\n }\n\n triangulateHalfHole(conflictBoundaries: Edge[], edges: Edge[]) {\n let iC = 0;\n let iN: number;\n let iT: number;\n const current = () => conflictBoundaries[iC];\n const next = () => conflictBoundaries[iN];\n const tempo = () => conflictBoundaries[iT];\n\n const va = current()[0].vertices[ccw(current()[1])]!;\n iN = iC;\n ++iN;\n\n let n: Triangle;\n let n1: Triangle;\n let n2: Triangle;\n let ind: number;\n let ind1: number;\n let ind2: number;\n do {\n n1 = current()[0];\n ind1 = current()[1];\n if (n1.neighbours[ind1] !== null) {\n n = n1.neighbours[ind1]!;\n ind = cw(n.indexV(n1.vertices[cw(ind1)]!));\n n1 = n.neighbours[ind]!;\n ind1 = this.tds.mirrorIndex(n, ind);\n }\n n2 = next()[0];\n ind2 = next()[1];\n if (n2.neighbours[ind2] !== null) {\n n = n2.neighbours[ind2]!;\n ind = cw(n.indexV(n2.vertices[cw(ind2)]!));\n n2 = n.neighbours[ind]!;\n ind2 = this.tds.mirrorIndex(n, ind);\n }\n const v0 = n1.vertices[ccw(ind1)]!;\n const v1 = n1.vertices[cw(ind1)]!;\n const v2 = n2.vertices[cw(ind2)]!;\n const orient = orientation(v0.point!, v1.point!, v2.point!);\n switch (orient) {\n case Sign.RIGHT_TURN: {\n const newlf = this.tds.createTriangle(v0, v2, v1, null, null, null);\n edges.push([newlf, 2]);\n newlf.neighbours[1] = n1;\n newlf.neighbours[0] = n2;\n n1.neighbours[ind1] = newlf;\n n2.neighbours[ind2] = newlf;\n if (n1.isConstrained(ind1)) newlf.constraints[1] = true;\n if (n2.isConstrained(ind2)) newlf.constraints[0] = true;\n v0.triangle = newlf;\n v1.triangle = newlf;\n v2.triangle = newlf;\n iT = iC + 1;\n conflictBoundaries.splice(iC, 0, [newlf, 2]);\n conflictBoundaries.splice(Math.max(iT, iN), 1);\n conflictBoundaries.splice(Math.min(iT, iN), 1);\n iN = iC;\n if (v0 !== va) --iC;\n else ++iN;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.COLLINEAR: {\n ++iC;\n ++iN;\n break;\n }\n }\n } while (iN < conflictBoundaries.length);\n }\n\n findIntersectedFaces(vaa: Vertex, vbb: Vertex) {\n const aa = vaa.point!;\n const bb = vbb.point!;\n const listAB: Edge[] = [];\n const listBA: Edge[] = [];\n const intersectedFaces: Triangle[] = [];\n const lfc = new LineFaceCirculator(vaa, this, bb);\n let ind = lfc.pos!.indexV(vaa);\n let vi: Vertex;\n if (lfc.pos!.isConstrained(ind)) {\n vi = this.intersect(lfc.pos!, ind, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n }\n let lf = lfc.pos!.neighbours[ccw(ind)]!;\n let rf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n intersectedFaces.unshift(lfc.pos!);\n let previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n let currentVertex = lfc.pos!.vertices[ind]!;\n let done = false;\n while (currentVertex !== vbb && !done) {\n let i1: number;\n let i2: number;\n const orient = orientation(aa, bb, currentVertex.point!);\n switch (orient) {\n case Sign.COLLINEAR: {\n done = true;\n break;\n }\n case Sign.LEFT_TURN:\n case Sign.RIGHT_TURN: {\n if (orient === Sign.LEFT_TURN) {\n i1 = ccw(ind);\n i2 = cw(ind);\n } else {\n i1 = cw(ind);\n i2 = ccw(ind);\n }\n if (lfc.pos!.isConstrained(i1)) {\n vi = this.intersect(lfc.pos!, i1, vaa, vbb);\n return { found: true, vi, listAB, listBA, intersectedFaces };\n } else {\n lf = lfc.pos!.neighbours[i2]!;\n intersectedFaces.unshift(lfc.pos!);\n if (orient === Sign.LEFT_TURN) listAB.push([lf, lf.indexT(lfc.pos!)]);\n else listBA.unshift([lf, lf.indexT(lfc.pos!)]);\n previousFace = lfc.pos!;\n lfc.next();\n ind = lfc.pos!.indexT(previousFace);\n currentVertex = lfc.pos!.vertices[ind]!;\n }\n break;\n }\n }\n }\n vi = currentVertex;\n intersectedFaces.unshift(lfc.pos!);\n lf = lfc.pos!.neighbours[cw(ind)]!;\n listAB.push([lf, lf.indexT(lfc.pos!)]);\n rf = lfc.pos!.neighbours[ccw(ind)]!;\n listBA.unshift([rf, rf.indexT(lfc.pos!)]);\n return { found: false, vi, listAB, listBA, intersectedFaces };\n }\n\n intersect(t: Triangle, i: number, vaa: Vertex, vbb: Vertex): Vertex {\n const vcc = t.vertices[cw(i)]!;\n const vdd = t.vertices[ccw(i)]!;\n const pa = vaa.point!;\n const pb = vbb.point!;\n const pc = vcc.point!;\n const pd = vdd.point!;\n let pi = intersection(pa, pb, pc, pd);\n if (pi !== pa && pi !== pb && pi !== pc && pi !== pd) {\n const bbox = new BoundingBox(pi!);\n bbox.dilate(4);\n if (bbox.overlaps(new BoundingBox(pa))) pi = pa;\n if (bbox.overlaps(new BoundingBox(pb))) pi = pb;\n if (bbox.overlaps(new BoundingBox(pc))) pi = pc;\n if (bbox.overlaps(new BoundingBox(pd))) pi = pd;\n }\n let vi: Vertex;\n if (pi === null) throw new Error(\"what\");\n else {\n this.removeConstrainedEdge(t, i);\n vi = this.insert(pi, t);\n }\n\n if (vi !== vcc && vi !== vdd) {\n this.insertConstraintV(vcc, vi);\n this.insertConstraintV(vi, vdd);\n } else {\n this.insertConstraintV(vcc, vdd);\n }\n return vi;\n }\n\n removeConstrainedEdge(t: Triangle, i: number) {\n t.constraints[i] = false;\n if (this.tds.dimension === 2) t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = false;\n }\n\n updateConstraintsOpposite(v: Vertex) {\n let t = v.triangle!;\n const start = t;\n let indf: number;\n do {\n indf = t.indexV(v);\n if (t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)]) t.constraints[indf] = true;\n else t.constraints[indf] = false;\n t = t.neighbours[ccw(indf)]!;\n } while (t !== start);\n }\n\n markConstraint(t: Triangle, i: number) {\n if (this.tds.dimension === 1) t.constraints[2] = true;\n else {\n t.constraints[i] = true;\n t.neighbours[i]!.constraints[this.tds.mirrorIndex(t, i)] = true;\n }\n }\n\n insert(p: Point, start: Triangle | null = null) {\n const locateInfo = this.locate(p, this.iLocate(p, start));\n const va = this.insertb(p, locateInfo.loc, locateInfo.lt, locateInfo.li);\n this.flipAround(va);\n return va;\n }\n\n flipAround(v: Vertex) {\n if (this.tds.dimension <= 1) return;\n let t = v.triangle!;\n let i: number;\n let next: Triangle;\n const start = t;\n do {\n i = t.indexV(v);\n next = t.neighbours[ccw(i)]!;\n this.propagatingFlip(t, i);\n t = next;\n } while (next !== start);\n }\n\n propagatingFlip(t: Triangle, i: number, depth = 0) {\n if (!this.isFlipable(t, i)) return;\n const maxDepth = 100;\n if (depth === maxDepth) {\n throw new Error(\"maxde\");\n return;\n }\n const ni = t.neighbours[i]!;\n this.flip(t, i);\n this.propagatingFlip(t, i, depth + 1);\n i = ni.indexV(t.vertices[i]!);\n this.propagatingFlip(ni, i, depth + 1);\n }\n\n lessEdge(e1: Edge, e2: Edge) {\n const ind1 = e1[1];\n const ind2 = e2[1];\n return e1[0].uid < e2[0].uid || (e1[0].uid === e2[0].uid && ind1 < ind2);\n }\n\n propagatingFlipE(edges: Edge[]) {\n let eI = 0;\n let t: Triangle;\n let i: number;\n let eni: Edge;\n const edgeSet: Edge[] = [];\n while (eI < edges.length) {\n t = edges[eI][0];\n i = edges[eI][1];\n if (this.isFlipable(t, i)) {\n eni = [t.neighbours[i]!, this.tds.mirrorIndex(t, i)];\n if (this.lessEdge(edges[eI], eni)) edgeSet.push(edges[eI]);\n else edgeSet.push(eni);\n }\n ++eI;\n }\n let indf: number;\n let ni: Triangle;\n let indn: number;\n let ei: Edge;\n const e: (Edge | null)[] = [null, null, null, null];\n while (edgeSet.length > 0) {\n t = edgeSet[0][0];\n indf = edgeSet[0][1];\n ni = t.neighbours[indf]!;\n indn = this.tds.mirrorIndex(t, indf);\n ei = [t, indf];\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === ei[0] && ed[1] === ei[1]), 1);\n e[0] = [t, cw(indf)];\n e[1] = [t, ccw(indf)];\n e[2] = [ni, cw(indn)];\n e[3] = [ni, ccw(indn)];\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni))\n edgeSet.splice(edgeSet.findIndex(ed => ed[0] === edge![0] && ed[1] === edge![1]), 1);\n else edgeSet.splice(edgeSet.findIndex(ed => ed[0] === eni[0] && ed[1] === eni[1]), 1);\n }\n\n this.flip(t, indf);\n\n for (const edge of e) {\n const tt = edge![0];\n const ii = edge![1];\n if (this.isFlipable(tt, ii)) {\n eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)];\n if (this.lessEdge(edge!, eni)) edgeSet.push(edge!);\n else edgeSet.push(eni);\n }\n }\n }\n }\n\n flip(t: Triangle, i: number) {\n const u = t.neighbours[i]!;\n const j = this.tds.mirrorIndex(t, i);\n const t1 = t.neighbours[cw(i)]!;\n const i1 = this.tds.mirrorIndex(t, cw(i));\n const t2 = t.neighbours[ccw(i)]!;\n const i2 = this.tds.mirrorIndex(t, ccw(i));\n const t3 = u.neighbours[cw(j)]!;\n const i3 = this.tds.mirrorIndex(u, cw(j));\n const t4 = u.neighbours[ccw(j)]!;\n const i4 = this.tds.mirrorIndex(u, ccw(j));\n this.tds.flip(t, i);\n t.constraints[t.indexT(u)] = false;\n u.constraints[u.indexT(t)] = false;\n t1.neighbours[i1]!.constraints[this.tds.mirrorIndex(t1, i1)] = t1.constraints[i1];\n t2.neighbours[i2]!.constraints[this.tds.mirrorIndex(t2, i2)] = t2.constraints[i2];\n t3.neighbours[i3]!.constraints[this.tds.mirrorIndex(t3, i3)] = t3.constraints[i3];\n t4.neighbours[i4]!.constraints[this.tds.mirrorIndex(t4, i4)] = t4.constraints[i4];\n }\n\n isFlipable(t: Triangle, i: number, perturb = true) {\n const ni = t.neighbours[i]!;\n if (t.isInfinite() || ni.isInfinite()) return false;\n if (t.constraints[i]) return false;\n return sideOfOrientedCircle(ni, t.vertices[i]!.point!, perturb) === Sign.ON_POSITIVE_SIDE;\n }\n\n insertb(a: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n let insertInConstrainedEdge = false;\n let v1: Vertex;\n let v2: Vertex;\n if (lt === LocateType.EDGE && loc!.isConstrained(li)) {\n insertInConstrainedEdge = true;\n v1 = loc!.vertices[ccw(li)]!;\n v2 = loc!.vertices[cw(li)]!;\n }\n const va = this.insertc(a, loc, lt, li);\n if (insertInConstrainedEdge) this.updateConstraintsIncident(va, v1!, v2!);\n else if (lt !== LocateType.VERTEX) this.clearConstraintsIncident(va);\n if (this.tds.dimension === 2) this.updateConstraintsOpposite(va);\n return va;\n }\n\n updateConstraintsIncident(va: Vertex, c1: Vertex, c2: Vertex) {\n if (this.tds.dimension === 0) return;\n if (this.tds.dimension === 1) {\n const ec = new EdgeCirculator(va, null);\n do {\n ec.t!.constraints[2] = true;\n } while (ec.next());\n } else {\n const fc = new FaceCirculator(va, null);\n do {\n const indf = fc.t!.indexV(va);\n const cwi = cw(indf);\n const ccwi = ccw(indf);\n if (fc.t!.vertices[cwi] === c1 || fc.t!.vertices[cwi] === c2) {\n fc.t!.constraints[ccwi] = true;\n fc.t!.constraints[cwi] = false;\n } else {\n fc.t!.constraints[ccwi] = false;\n fc.t!.constraints[cwi] = true;\n }\n } while (fc.next());\n }\n }\n\n clearConstraintsIncident(v: Vertex) {\n const ec = new EdgeCirculator(v, null);\n if (ec.valid) {\n do {\n const t = ec.t!;\n const indf = ec.ri;\n t.constraints[indf] = false;\n if (this.tds.dimension === 2) t.neighbours[indf]!.constraints[this.tds.mirrorIndex(t, indf)] = false;\n } while (ec.next());\n }\n }\n\n insertc(p: Point, loc: Triangle | null, lt: LocateType, li: number): Vertex {\n if (this.tds.vertices.length === 1) {\n return this.insertFirst(p);\n } else if (this.tds.vertices.length === 2) {\n if (lt === LocateType.VERTEX) return this.tds.finiteVertex;\n else return this.insertSecond(p);\n }\n switch (lt) {\n case LocateType.VERTEX: {\n return loc!.vertices[li]!;\n }\n case LocateType.OUTSIDE_AFFINE_HULL: {\n return this.insertOutsideAffineHull(p);\n }\n case LocateType.OUTSIDE_CONVEX_HULL: {\n return this.insertOutsideConvexHull(p, loc!);\n }\n case LocateType.EDGE: {\n return this.insertInEdge(p, loc!, li);\n }\n case LocateType.FACE: {\n return this.insertInFace(p, loc!);\n }\n }\n throw new Error(\"qwe\");\n return new Vertex();\n }\n\n insertInEdge(p: Point, loc: Triangle, li: number): Vertex {\n const v = this.tds.insertInEdge(loc, li);\n v.point = p;\n return v;\n }\n\n insertInFace(p: Point, loc: Triangle): Vertex {\n const v = this.tds.insertInFace(loc);\n v.point = p;\n return v;\n }\n\n insertFirst(p: Point): Vertex {\n const v = this.tds.insertDimUp();\n v.point = p;\n return v;\n }\n\n insertSecond(p: Point): Vertex {\n const v = this.tds.insertDimUp(this.tds._infinite, true);\n v.point = p;\n return v;\n }\n\n insertOutsideAffineHull(p: Point): Vertex {\n let conform = false;\n if (this.tds.dimension === 1) {\n const t = this.tds.finiteEdge.first!;\n const orient = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n conform = orient === Sign.COUNTERCLOCKWISE;\n }\n const v = this.tds.insertDimUp(this.tds._infinite, conform);\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull(p: Point, t: Triangle): Vertex {\n let v: Vertex;\n if (this.tds.dimension === 1) {\n throw new Error(\"sdfasdasd\");\n } else {\n v = this.insertOutsideConvexHull2(p, t);\n }\n v.point = p;\n return v;\n }\n\n insertOutsideConvexHull2(p: Point, t: Triangle): Vertex {\n let li = t.indexV(this.tds._infinite);\n const ccwlist: Triangle[] = [];\n const cwlist: Triangle[] = [];\n let fc = new FaceCirculator(this.tds._infinite, t);\n let done = false;\n while (!done) {\n fc.prev();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) ccwlist.push(fc.t!);\n else done = true;\n }\n fc = new FaceCirculator(this.tds._infinite, t);\n done = false;\n while (!done) {\n fc.next();\n li = fc.t!.indexV(this.tds._infinite);\n const q = fc.t!.vertices[ccw(li)]!.point!;\n const r = fc.t!.vertices[cw(li)]!.point!;\n if (orientation(p, q, r) === Sign.LEFT_TURN) cwlist.push(fc.t!);\n else done = true;\n }\n const v = this.tds.insertInFace(t);\n v.point = p;\n let th;\n while (ccwlist.length > 0) {\n th = ccwlist[0];\n li = ccw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n ccwlist.shift();\n }\n while (cwlist.length > 0) {\n th = cwlist[0];\n li = cw(th.indexV(this.tds._infinite));\n this.tds.flip(th, li);\n cwlist.shift();\n }\n fc = new FaceCirculator(v, null);\n while (!fc.t!.isInfinite()) fc.next();\n this.tds._infinite.triangle = fc.t!;\n return v;\n }\n\n locate(p: Point, start: Triangle | null) {\n let lt = 0;\n let li = 0;\n if (this.tds.dimension < 0) {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 0) {\n if (xyEqual(p, this.tds.finiteVertex.triangle!.vertices[0]!.point!)) {\n lt = LocateType.VERTEX;\n } else {\n lt = LocateType.OUTSIDE_AFFINE_HULL;\n }\n li = 4;\n return { loc: null, lt, li };\n } else if (this.tds.dimension === 1) {\n return this.marchLocate1D(p);\n }\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)]!;\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)]!;\n }\n return this.marchLocate2D(start, p);\n }\n\n marchLocate1D(p: Point) {\n const ff = this.tds._infinite.triangle!;\n const iv = ff.indexV(this.tds._infinite);\n const t = ff.neighbours[iv]!;\n const pqt = orientation(t.vertices[0]!.point!, t.vertices[1]!.point!, p);\n if (pqt === Sign.RIGHT_TURN || pqt === Sign.LEFT_TURN) {\n return { loc: new Triangle(), lt: LocateType.OUTSIDE_AFFINE_HULL, li: 4 };\n }\n const i = t.indexT(ff);\n if (collinearBetween(p, t.vertices[1 - i]!.point!, t.vertices[i]!.point!))\n return { loc: ff, lt: LocateType.OUTSIDE_CONVEX_HULL, li: iv };\n\n if (xyEqual(p, t.vertices[1 - i]!.point!)) return { loc: t, lt: LocateType.VERTEX, li: 1 - i };\n throw new Error(\"sdfsdf\");\n }\n\n marchLocate2D(c: Triangle, p: Point) {\n let prev = null;\n let first = true;\n let lt: LocateType | undefined;\n let li: number | undefined;\n while (true) {\n if (c.isInfinite()) {\n return { loc: c, lt: LocateType.OUTSIDE_CONVEX_HULL, li: c.indexV(this.tds._infinite) };\n }\n const leftFirst = 0; // Math.round(Math.random());\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n let o0: Sign;\n let o1: Sign;\n let o2: Sign;\n if (first) {\n prev = c;\n first = false;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (leftFirst) {\n if (c.neighbours[0]! === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1]! === prev) {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = Sign.POSITIVE;\n } else if (c.neighbours[1] === prev) {\n prev = c;\n o0 = orientation(p0, p1, p);\n if (o0 === Sign.NEGATIVE) {\n c = c.neighbours[2]!;\n continue;\n }\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = Sign.POSITIVE;\n } else {\n prev = c;\n o1 = orientation(p1, p2, p);\n if (o1 === Sign.NEGATIVE) {\n c = c.neighbours[0]!;\n continue;\n }\n o2 = orientation(p2, p0, p);\n if (o2 === Sign.NEGATIVE) {\n c = c.neighbours[1]!;\n continue;\n }\n o0 = Sign.POSITIVE;\n }\n }\n const sum =\n (o0 === Sign.COLLINEAR ? 1 : 0) + (o1 === Sign.COLLINEAR ? 1 : 0) + (o2 === Sign.COLLINEAR ? 1 : 0);\n switch (sum) {\n case 0: {\n lt = LocateType.FACE;\n li = 4;\n break;\n }\n case 1: {\n lt = LocateType.EDGE;\n li = o0 === Sign.COLLINEAR ? 2 : o1 === Sign.COLLINEAR ? 0 : 1;\n break;\n }\n case 2: {\n lt = LocateType.VERTEX;\n li = o0 !== Sign.COLLINEAR ? 2 : o1 !== Sign.COLLINEAR ? 0 : 1;\n break;\n }\n }\n if (lt === undefined || li === undefined) throw new Error(\"ert\");\n return { loc: c, lt, li };\n }\n }\n\n iLocate(p: Point, start: Triangle | null) {\n if (this.tds.dimension < 2) return start;\n if (start === null) {\n const t = this.tds._infinite.triangle!;\n start = t.neighbours[t.indexV(this.tds._infinite)];\n } else if (start.isInfinite()) {\n start = start.neighbours[start.indexV(this.tds._infinite)];\n }\n let prev = null;\n let c = start!;\n let first = true;\n let nTurns = 2500;\n while (true) {\n if (!nTurns--) return c;\n if (c.isInfinite()) return c;\n const p0 = c.vertices[0]!.point!;\n const p1 = c.vertices[1]!.point!;\n const p2 = c.vertices[2]!.point!;\n if (first) {\n prev = c;\n first = false;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else {\n if (c.neighbours[0] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n } else if (c.neighbours[1] === prev) {\n prev = c;\n if (hasInexactNegativeOrientation(p0, p1, p)) {\n c = c.neighbours[2]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n } else {\n prev = c;\n if (hasInexactNegativeOrientation(p2, p0, p)) {\n c = c.neighbours[1]!;\n continue;\n }\n if (hasInexactNegativeOrientation(p1, p2, p)) {\n c = c.neighbours[0]!;\n continue;\n }\n }\n }\n break;\n }\n return c;\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { Asset } from \"@/game/shapes/asset\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy, l2gz } from \"@/game/units\";\n\nclass LayerManager {\n layers: Layer[] = [];\n width = window.innerWidth;\n height = window.innerHeight;\n\n UUIDMap: Map = new Map();\n\n // Refresh interval and redraw setter.\n interval = 30;\n\n constructor() {\n requestAnimationFrame(this.drawLoop);\n }\n\n reset() {\n this.layers = [];\n this.UUIDMap = new Map();\n }\n\n drawLoop = () => {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].draw();\n }\n requestAnimationFrame(this.drawLoop);\n };\n\n setWidth(width: number): void {\n this.width = width;\n for (const layer of this.layers) {\n layer.canvas.width = width;\n layer.width = width;\n }\n }\n\n setHeight(height: number): void {\n this.height = height;\n for (const layer of this.layers) {\n layer.canvas.height = height;\n layer.height = height;\n }\n }\n\n addLayer(layer: Layer): void {\n this.layers.push(layer);\n if (!gameStore.IS_DM && !layer.playerEditable) return;\n if (layer.selectable) gameStore.addLayer(layer.name);\n }\n\n hasLayer(name: string): boolean {\n return this.layers.some(l => l.name === name);\n }\n\n getLayer(name?: string) {\n name = name === undefined ? gameStore.selectedLayer : name;\n for (const layer of this.layers) {\n if (layer.name === name) return layer;\n }\n }\n\n selectLayer(name: string, sync: boolean = true): void {\n let found = false;\n for (const layer of this.layers) {\n if (!layer.selectable) continue;\n if (found && layer.name !== \"fow\") layer.ctx.globalAlpha = 0.3;\n else layer.ctx.globalAlpha = 1.0;\n\n if (name === layer.name) {\n gameStore.selectLayer({ name, sync });\n found = true;\n }\n\n layer.clearSelection();\n layer.invalidate(true);\n }\n }\n\n getGridLayer(): GridLayer | undefined {\n return this.getLayer(\"grid\");\n }\n\n hasSelection() {\n const selection = this.getSelection();\n return selection !== undefined && selection.length > 0;\n }\n\n // THIS INCLUDES POTENTIALLY THE SelectTool.SelectionHelper !!!\n getSelection() {\n const layer = this.getLayer();\n if (layer === undefined) return undefined;\n return layer.selection;\n }\n\n invalidate(): void {\n for (let i = this.layers.length - 1; i >= 0; i--) {\n this.layers[i].invalidate(true);\n }\n }\n\n invalidateLight() {\n for (let i = this.layers.length - 1; i >= 0; i--)\n if (this.layers[i].isVisionLayer) this.layers[i].invalidate(true);\n }\n\n dropAsset(event: DragEvent) {\n const layer = this.getLayer();\n if (layer === undefined || event === null || event.dataTransfer === null) return;\n const image = document.createElement(\"img\");\n image.src = event.dataTransfer.getData(\"text/plain\");\n const asset = new Asset(\n image,\n new GlobalPoint(l2gx(event.clientX), l2gy(event.clientY)),\n l2gz(image.width),\n l2gz(image.height),\n );\n asset.src = new URL(image.src).pathname;\n\n if (gameStore.useGrid) {\n const gs = gameStore.gridSize;\n asset.refPoint = new GlobalPoint(\n Math.round(asset.refPoint.x / gs) * gs,\n Math.round(asset.refPoint.y / gs) * gs,\n );\n asset.w = Math.max(Math.round(asset.w / gs) * gs, gs);\n asset.h = Math.max(Math.round(asset.h / gs) * gs, gs);\n }\n\n layer.addShape(asset, true);\n }\n}\n\nexport const layerManager = new LayerManager();\n(window).lm = layerManager;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"\nimport script from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./createtoken_modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"73816298\",\n null\n \n)\n\ncomponent.options.__file = \"createtoken_modal.vue\"\nexport default component.exports","import { BoundingRect } from \"@/game/shapes/boundingrect\";\n\nexport class BoundingNode {\n bbox: BoundingRect;\n nPrimitives: number;\n children: BoundingNode[] = [];\n constructor(nPrimitives: number, bbox: BoundingRect) {\n this.nPrimitives = nPrimitives;\n this.bbox = bbox;\n }\n}\n\nexport class LeafNode extends BoundingNode {\n firstPrimOffset: number;\n constructor(first: number, n: number, bbox: BoundingRect) {\n super(n, bbox);\n this.firstPrimOffset = first;\n }\n}\n\nexport class InteriorNode extends BoundingNode {\n dimension: number;\n constructor(dimension: number, c1: BoundingNode, c2: BoundingNode) {\n super(0, c1.bbox.union(c2.bbox));\n this.dimension = dimension;\n this.children.push(c1);\n this.children.push(c2);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=script&lang=ts&\"","import Tools from \"../ui/tools/tools.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\n\nexport function onKeyUp(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n } else {\n if (event.key === \"Delete\" || event.key === \"Del\" || event.key === \"Backspace\") {\n if (layerManager.getLayer === undefined) {\n console.log(\"No active layer selected for delete operation\");\n return;\n }\n const l = layerManager.getLayer()!;\n for (let i = l.selection.length - 1; i >= 0; i--) {\n const sel = l.selection[i];\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) {\n l.selection.splice(i, 1);\n continue;\n }\n l.removeShape(sel, true, false);\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n EventBus.$emit(\"Initiative.Remove\", sel.uuid);\n }\n }\n }\n}\n\nexport function onKeyDown(event: KeyboardEvent) {\n if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) {\n if (event.keyCode === 65 && event.ctrlKey) event.target!.select();\n } else {\n if (event.keyCode >= 37 && event.keyCode <= 40) {\n // todo: this should already be rounded\n const gridSize = Math.round(gameStore.gridSize);\n let offsetX = gridSize * (event.keyCode % 2);\n let offsetY = gridSize * (event.keyCode % 2 ? 0 : 1);\n if (layerManager.hasSelection()) {\n const selection = layerManager.getSelection()!;\n offsetX *= event.keyCode <= 38 ? -1 : 1;\n offsetY *= event.keyCode <= 38 ? -1 : 1;\n let delta = new Vector(offsetX, offsetY);\n if (!event.shiftKey || !gameStore.IS_DM) {\n // First check for collisions. Using the smooth wall slide collision check used on mouse move is overkill here.\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n delta = calculateDelta(delta, sel);\n }\n }\n for (const sel of selection) {\n if ((getRef(\"tools\").$refs.selectTool).selectionHelper.uuid === sel.uuid) continue;\n sel.refPoint = sel.refPoint.add(delta);\n // todo: Fix again\n // if (sel.refPoint.x % gridSize !== 0 || sel.refPoint.y % gridSize !== 0) sel.snapToGrid();\n socket.emit(\"Shape.Position.Update\", { shape: sel.asDict(), redraw: true, temporary: false });\n }\n gameStore.recalculateVision();\n layerManager.getLayer()!.invalidate(false);\n } else {\n // The pan offsets should be in the opposite direction to give the correct feel.\n gameStore.increasePanX(offsetX * (event.keyCode <= 38 ? 1 : -1));\n gameStore.increasePanY(offsetY * (event.keyCode <= 38 ? 1 : -1));\n layerManager.invalidate();\n sendClientOptions();\n }\n } else if (event.keyCode === 68) {\n const layer = layerManager.getLayer();\n if (layer) {\n layer.clearSelection();\n layer.invalidate(true);\n }\n }\n }\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=style&index=0&id=759e5a8a&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport ShapeContext from \"@/game/ui/selection/shapecontext.vue\";\nimport CreateTokenModal from \"@/game/ui/tools/createtoken_modal.vue\";\nimport DrawTool from \"@/game/ui/tools/draw.vue\";\nimport MapTool from \"@/game/ui/tools/map.vue\";\nimport PanTool from \"@/game/ui/tools/pan\";\nimport SelectTool from \"@/game/ui/tools/select.vue\";\n\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { RulerTool } from \"@/game/ui/tools/ruler\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\n\n@Component({\n components: {\n \"select-tool\": SelectTool,\n \"pan-tool\": PanTool,\n \"draw-tool\": DrawTool,\n \"ruler-tool\": RulerTool,\n \"map-tool\": MapTool,\n \"shape-menu\": ShapeContext,\n \"createtoken-dialog\": CreateTokenModal,\n },\n watch: {\n currentTool(newValue, oldValue) {\n this.$emit(\"tools-select-change\", newValue, oldValue);\n },\n },\n})\nexport default class Tools extends Vue {\n $refs!: {\n selectTool: InstanceType;\n };\n\n currentTool = \"Select\";\n tools = [\"Select\", \"Pan\", \"Draw\", \"Ruler\", \"Map\"];\n dmTools = [\"Map\"];\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get currentToolComponent(): string {\n return `${this.currentTool.toLowerCase()}-tool`;\n }\n\n mousedown(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mousedown\", event, targetTool);\n }\n mouseup(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if (event.button === 1) {\n targetTool = \"Pan\";\n } else if (event.button !== 0) {\n return;\n }\n\n this.$emit(\"mouseup\", event, targetTool);\n }\n mousemove(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n\n let targetTool = this.currentTool;\n if ((event.buttons & 4) !== 0) {\n targetTool = \"Pan\";\n } else if ((event.button & 1) > 1) {\n return;\n }\n\n this.$emit(\"mousemove\", event, targetTool);\n\n // Annotation hover\n let found = false;\n for (const uuid of gameStore.annotations) {\n if (layerManager.UUIDMap.has(uuid) && layerManager.hasLayer(\"draw\")) {\n const shape = layerManager.UUIDMap.get(uuid)!;\n if (shape.contains(l2g(getMouse(event)))) {\n found = true;\n gameManager.annotationManager.setActiveText(shape.annotation);\n }\n }\n }\n if (!found && gameManager.annotationManager.shown) {\n gameManager.annotationManager.setActiveText(\"\");\n }\n }\n mouseleave(event: MouseEvent) {\n // When leaving the window while a mouse is pressed down, act as if it was released\n if ((event.buttons & 1) !== 0) {\n this.$emit(\"mouseup\", event, this.currentTool);\n }\n }\n contextmenu(event: MouseEvent) {\n if ((event.target).tagName !== \"CANVAS\") return;\n if (event.button !== 2 || (event.target).tagName !== \"CANVAS\") return;\n this.$emit(\"contextmenu\", event, this.currentTool);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=ts&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextmenu.vue?vue&type=style&index=0&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=32cec914&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selection_info.vue?vue&type=style&index=0&id=32cec914&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class Prompt extends Vue {\n $refs!: {\n answer: HTMLElement;\n };\n\n visible = false;\n question = \"\";\n answer = \"\";\n title = \"\";\n\n resolve = (value: string) => {};\n reject = () => {};\n\n submit() {\n this.resolve(this.answer);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.question = \"\";\n this.answer = \"\";\n this.title = \"\";\n }\n prompt(question: string, title: string): Promise {\n this.question = question;\n this.title = title;\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.answer.focus();\n });\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_vm._l((_vm.folders),function(folder){return _c('li',{key:folder,staticClass:\"folder\",on:{\"click\":function($event){$event.stopPropagation();return _vm.toggle($event)}}},[_vm._v(\"\\n \"+_vm._s(folder)+\"\\n \"),_c('asset-node',{attrs:{\"asset\":_vm.asset[folder]}})],1)}),_vm._l((_vm.files),function(file){return _c('li',{key:file.name,staticClass:\"file draggable token\",attrs:{\"draggable\":\"true\"},on:{\"mouseover\":function($event){_vm.showImage = file.hash},\"mouseout\":function($event){_vm.showImage = null},\"dragstart\":function($event){_vm.dragStart($event, '/static/assets/' + file.hash)}}},[_vm._v(\"\\n \"+_vm._s(file.name)+\"\\n \"),(_vm.showImage == file.hash)?_c('div',{staticClass:\"preview\"},[_c('img',{staticClass:\"asset-preview-image\",attrs:{\"src\":'/static/assets/' + file.hash}})]):_vm._e()])})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=template&id=62c91cd3&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._v(_vm._s(_vm.message))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./load.vue?vue&type=template&id=ff095222&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{attrs:{\"id\":\"toolselect\"}},[_c('ul',_vm._l((_vm.tools),function(tool){return (!_vm.dmTools.includes(tool) || _vm.IS_DM)?_c('li',{key:tool,ref:tool + '-selector',refInFor:true,class:{'tool-selected': _vm.currentTool === tool},on:{\"click\":function($event){_vm.currentTool = tool}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(tool))])]):_vm._e()}))]),_c('div',[[_c('select-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Select'),expression:\"currentTool === 'Select'\"}],ref:\"selectTool\"}),_c('pan-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Pan'),expression:\"currentTool === 'Pan'\"}]}),_c('keep-alive',[_c('draw-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Draw'),expression:\"currentTool === 'Draw'\"}]})],1),_c('ruler-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Ruler'),expression:\"currentTool === 'Ruler'\"}]}),_c('map-tool',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currentTool === 'Map'),expression:\"currentTool === 'Map'\"}]}),_c('shape-menu',{ref:\"shapecontext\"}),_c('createtoken-dialog',{ref:\"createtokendialog\"})]],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=template&id=1fee50f5&scoped=true&\"","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=script&lang=ts&\"","import { GlobalPoint, Point, Ray, Vector } from \"@/game/geom\";\nimport { g2lx, g2ly } from \"../units\";\n\nexport class BoundingRect {\n readonly w: number;\n readonly h: number;\n readonly topLeft: GlobalPoint;\n readonly topRight: GlobalPoint;\n readonly botRight: GlobalPoint;\n readonly botLeft: GlobalPoint;\n\n constructor(topleft: GlobalPoint, w: number, h: number) {\n this.w = w;\n this.h = h;\n this.topLeft = topleft;\n this.topRight = new GlobalPoint(topleft.x + w, topleft.y);\n this.botRight = new GlobalPoint(topleft.x + w, topleft.y + h);\n this.botLeft = new GlobalPoint(topleft.x, topleft.y + h);\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.topLeft.x <= point.x &&\n this.topRight.x >= point.x &&\n this.topLeft.y <= point.y &&\n this.botLeft.y >= point.y\n );\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.topLeft.x, this.topLeft.y]];\n return [\n [this.topLeft.x, this.topLeft.y],\n [this.botLeft.x, this.botLeft.y],\n [this.botRight.x, this.botRight.y],\n [this.topRight.x, this.topRight.y],\n ];\n }\n\n offset(vector: Vector): BoundingRect {\n return new BoundingRect(this.topLeft.add(vector), this.w, this.h);\n }\n\n union(other: BoundingRect): BoundingRect {\n const xmin = Math.min(this.topLeft.x, other.topLeft.x);\n const xmax = Math.max(this.topRight.x, other.topRight.x);\n const ymin = Math.min(this.topLeft.y, other.topLeft.y);\n const ymax = Math.max(this.botLeft.y, other.botLeft.y);\n return new BoundingRect(new GlobalPoint(xmin, ymin), xmax - xmin, ymax - ymin);\n }\n\n getDiagCorner(botright: boolean) {\n return botright ? this.botRight : this.topLeft;\n }\n\n intersectsWith(other: BoundingRect): boolean {\n return !(\n other.topLeft.x > this.topRight.x ||\n other.topRight.x < this.topLeft.x ||\n other.topLeft.y > this.botLeft.y ||\n other.botLeft.y < this.topLeft.y\n );\n }\n\n intersectsWithInner(other: BoundingRect): boolean {\n return !(\n other.topLeft.x >= this.topRight.x ||\n other.topRight.x <= this.topLeft.x ||\n other.topLeft.y >= this.botLeft.y ||\n other.botLeft.y <= this.topLeft.y\n );\n }\n\n intersectP(ray: Ray, invDir: Vector, dirIsNeg: boolean[]) {\n let txmin = invDir.x * (this.getDiagCorner(dirIsNeg[0]).x - ray.origin!.x);\n let txmax = invDir.x * (this.getDiagCorner(!dirIsNeg[0]).x - ray.origin!.x);\n const tymin = invDir.y * (this.getDiagCorner(dirIsNeg[1]).y - ray.origin!.y);\n const tymax = invDir.y * (this.getDiagCorner(!dirIsNeg[1]).y - ray.origin!.y);\n if (txmin > tymax || tymin > txmax) return { hit: false, min: txmin, max: txmax };\n if (tymin > txmin) txmin = tymin;\n if (tymax < txmax) txmax = tymax;\n return { hit: txmin < ray.tMax! && txmax > 0, min: txmin, max: txmax };\n }\n\n center(): GlobalPoint {\n return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n const coreVisible = !(\n g2lx(this.topLeft.x) > canvas.width ||\n g2ly(this.topLeft.y) > canvas.height ||\n g2lx(this.topRight.x) < 0 ||\n g2ly(this.botRight.y) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"formcontainer\"}},[(_vm.owned || _vm.joined)?_c('form',[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"Your sessions\")]),_c('div',{staticClass:\"input\"},[_vm._l((_vm.owned),function(room,i){return _c('router-link',{key:'o-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[0]))])}),_vm._l((_vm.joined),function(room,i){return _c('router-link',{key:'j-'+i,attrs:{\"to\":'/game/' + room[1] + '/' + room[0]}},[_vm._v(_vm._s(room[1])+\"/\"+_vm._s(room[0]))])})],2),(_vm.owned.length === 0)?_c('div',{staticClass:\"input\"},[_vm._v(\"No active sessions\")]):_vm._e()])]):_vm._e(),_vm._m(0),_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.createRoom($event)}}},[_c('fieldset',[(!_vm.owned && !_vm.joined)?_c('legend',{staticClass:\"legend\"},[_vm._v(\"Create a session\")]):_c('div',{staticClass:\"input\"},[_vm._v(\"Create a new session\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.newSessionName),expression:\"newSessionName\"}],attrs:{\"type\":\"text\",\"name\":\"room_name\",\"placeholder\":\"Session Name\"},domProps:{\"value\":(_vm.newSessionName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.newSessionName=$event.target.value}}}),_vm._m(1)]),_vm._m(2)])]),_c('div',{attrs:{\"id\":\"account-options\"}},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Account Settings\",\"to\":\"/account\"}},[_c('i',{staticClass:\"fas fa-cog\"})])],1),_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},[_c('router-link',{staticClass:\"submit\",attrs:{\"tag\":\"button\",\"title\":\"Logout\",\"to\":\"/auth/logout\"}},[_c('i',{staticClass:\"fas fa-sign-out-alt\"})])],1)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h4',[_c('span',[_vm._v(\"OR\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fab fa-d-and-d\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"title\":\"Create\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=template&id=61eb1455&scoped=true&\"","/*\nThis module defines some Point classes.\nA strong focus is made to ensure that at no time a global and a local point are mixed up with each other.\nAt first glance this adds weird looking hacks as ts does not support nominal typing.\n*/\n\nexport function getPointDistance(p1: Point, p2: Point) {\n const a = p1.x - p2.x;\n const b = p1.y - p2.y;\n return Math.sqrt(a * a + b * b);\n}\n\nexport class Point {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n static fromArray(point: number[]) {\n return new Point(point[0], point[1]);\n }\n add(vec: Vector) {\n return new Point(this.x + vec.x, this.y + vec.y);\n }\n subtract(other: Point) {\n return new Vector(this.x - other.x, this.y - other.y);\n }\n clone(): Point {\n return new Point(this.x, this.y);\n }\n get(dimension: 0 | 1) {\n if (dimension === 0) return this.x;\n return this.y;\n }\n asArray(): number[] {\n return [this.x, this.y];\n }\n}\nexport class GlobalPoint extends Point {\n // This is to differentiate with LocalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _GlobalPoint!: string;\n add(vec: Vector): GlobalPoint {\n return super.add(vec);\n }\n subtract(other: GlobalPoint): Vector {\n return super.subtract(other);\n }\n clone(): GlobalPoint {\n return super.clone();\n }\n static fromArray(point: number[]) {\n return new GlobalPoint(point[0], point[1]);\n }\n}\n\nexport class LocalPoint extends Point {\n // This is to differentiate with GlobalPoint, is actually never used\n // We do ! to prevent errors that it never gets initialized\n // tslint:disable-next-line:variable-name\n _LocalPoint!: string;\n add(vec: Vector): LocalPoint {\n return super.add(vec);\n }\n subtract(other: LocalPoint): Vector {\n return super.subtract(other);\n }\n clone(): LocalPoint {\n return super.clone();\n }\n}\n\nexport class Vector {\n readonly x: number;\n readonly y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n dot(other: Vector): number {\n return this.x * other.x + this.y * other.y;\n }\n inverse(): Vector {\n return new Vector(this.x === 0 ? 0 : 1 / this.x, this.y === 0 ? 0 : 1 / this.y);\n }\n length(): number {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize(): Vector {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse(): Vector {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number): Vector {\n return new Vector(this.x * scale, this.y * scale);\n }\n angle(): number {\n return (Math.atan2(this.y, this.x) * 180) / Math.PI;\n }\n}\n\nexport class Ray {\n readonly direction: Vector;\n readonly origin: T;\n tMax: number;\n constructor(origin: T, direction: Vector, tMax?: number) {\n this.direction = direction;\n this.origin = origin;\n if (tMax === undefined) tMax = Infinity;\n this.tMax = tMax;\n }\n static fromPoints(p1: T, p2: T): Ray {\n const vec = new Vector(p2.x - p1.x, p2.y - p1.y);\n let maxT;\n if (Math.abs(vec.x) > 0.01) maxT = (p2.x - p1.x) / vec.x;\n else maxT = (p2.y - p1.y) / vec.y;\n return new Ray(p1, vec, maxT);\n }\n get(t: number): T {\n return new Point(this.origin.x + t * this.direction.x, this.origin.y + t * this.direction.y);\n }\n getDistance(t1: number, t2: number) {\n return Math.sqrt(Math.pow(t2 - t1, 2) * (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n getT(t1: number, distance: number) {\n return t1 + Math.sqrt(Math.pow(distance, 2) / (Math.pow(this.direction.x, 2) + Math.pow(this.direction.y, 2)));\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport vueSlider from \"vue-slider-component\";\n\nimport \"@/game/api/events\";\n\nimport { throttle } from \"lodash\";\nimport { mapGetters, mapState } from \"vuex\";\n\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport Initiative from \"@/game/ui/initiative.vue\";\nimport MenuBar from \"@/game/ui/menu/menu.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\nimport SelectionInfo from \"@/game/ui/selection/selection_info.vue\";\nimport Tools from \"@/game/ui/tools/tools.vue\";\n\nimport { createConnection, socket } from \"@/game/api/socket\";\nimport { onKeyDown, onKeyUp } from \"@/game/events/keyboard\";\nimport { scrollZoom } from \"@/game/events/mouse\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { LocalPoint } from \"./geom\";\n\n@Component({\n components: {\n \"tool-bar\": Tools,\n \"selection-info\": SelectionInfo,\n \"prompt-dialog\": Prompt,\n \"confirm-dialog\": ConfirmDialog,\n \"menu-bar\": MenuBar,\n \"initiative-dialog\": Initiative,\n \"zoom-slider\": vueSlider,\n \"note-dialog\": NoteDialog,\n },\n beforeRouteEnter(to, from, next) {\n createConnection(to);\n next();\n },\n beforeRouteLeave(to, from, next) {\n socket.disconnect();\n next();\n },\n})\nexport default class Game extends Vue {\n $refs!: {\n confirm: InstanceType;\n tools: InstanceType;\n };\n\n ready = {\n manager: false,\n tools: false,\n };\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n get layers(): string[] {\n return gameStore.layers;\n }\n\n get selectedLayer(): string {\n return gameStore.selectedLayer;\n }\n\n get zoomFactor(): number {\n return gameStore.zoomFactor;\n }\n\n set zoomFactor(value: number) {\n gameStore.updateZoom({\n newZoomValue: value,\n zoomLocation: l2g(new LocalPoint(window.innerWidth / 2, window.innerHeight / 2)),\n });\n }\n\n mounted() {\n window.addEventListener(\"resize\", () => {\n layerManager.setWidth(window.innerWidth);\n layerManager.setHeight(window.innerHeight);\n layerManager.invalidate();\n });\n window.addEventListener(\"wheel\", throttle(scrollZoom));\n window.addEventListener(\"keyup\", onKeyUp);\n window.addEventListener(\"keydown\", onKeyDown);\n // // prevent double clicking text selection\n window.addEventListener(\"selectstart\", e => {\n e.preventDefault();\n return false;\n });\n this.ready.manager = true;\n }\n\n mousedown(event: MouseEvent) {\n this.$refs.tools.mousedown(event);\n }\n mouseup(event: MouseEvent) {\n this.$refs.tools.mouseup(event);\n }\n mousemove(event: MouseEvent) {\n this.$refs.tools.mousemove(event);\n }\n mouseleave(event: MouseEvent) {\n this.$refs.tools.mouseleave(event);\n }\n contextmenu(event: MouseEvent) {\n this.$refs.tools.contextmenu(event);\n }\n selectLayer(layer: string) {\n layerManager.selectLayer(layer);\n }\n drop(event: DragEvent) {\n if (event === null || event.dataTransfer === null) return;\n if (event.dataTransfer.files.length > 0) {\n this.$refs.confirm\n .open(\"Uploading files should be done through the asset manager.\", \"Ok\", \"\")\n .then(() => {}, () => {});\n } else if (event.dataTransfer.getData(\"text/plain\") === \"\") {\n return;\n } else {\n layerManager.dropAsset(event);\n }\n }\n}\n","import { GlobalPoint, LocalPoint, Ray } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nexport function g2l(obj: GlobalPoint): LocalPoint {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n return new LocalPoint((obj.x + panX) * z, (obj.y + panY) * z);\n}\n\nexport function g2lx(x: number) {\n return g2l(new GlobalPoint(x, 0)).x;\n}\n\nexport function g2ly(y: number) {\n return g2l(new GlobalPoint(0, y)).y;\n}\n\nexport function g2lz(z: number) {\n return z * gameStore.zoomFactor;\n}\n\nexport function getUnitDistance(r: number) {\n return (r / gameStore.unitSize) * gameStore.gridSize;\n}\n\nexport function g2lr(r: number) {\n return g2lz(getUnitDistance(r));\n}\n\nexport function l2g(obj: LocalPoint): GlobalPoint;\nexport function l2g(obj: Ray): Ray;\nexport function l2g(obj: LocalPoint | Ray): GlobalPoint | Ray {\n const z = gameStore.zoomFactor;\n const panX = gameStore.panX;\n const panY = gameStore.panY;\n if (obj instanceof LocalPoint) {\n return new GlobalPoint(obj.x / z - panX, obj.y / z - panY);\n } else {\n return new Ray(l2g(obj.origin), obj.direction.multiply(1 / z), obj.tMax);\n }\n}\n\nexport function l2gx(x: number) {\n return l2g(new LocalPoint(x, 0)).x;\n}\n\nexport function l2gy(y: number) {\n return l2g(new LocalPoint(0, y)).y;\n}\n\nexport function l2gz(z: number) {\n return z / gameStore.zoomFactor;\n}\n\nexport function l2gr(r: number) {\n return l2gz(getUnitDistance(r));\n}\n\n(window).g2lx = g2lx;\n(window).g2ly = g2ly;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { mapState } from \"vuex\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport AssetNode from \"@/game/ui/menu/asset_node.vue\";\nimport NoteDialog from \"@/game/ui/note.vue\";\n\nimport { getRef, uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n \"color-picker\": ColorPicker,\n \"asset-node\": AssetNode,\n },\n computed: {\n ...mapState(\"game\", [\"invitationCode\", \"IS_DM\", \"locations\", \"assets\", \"notes\"]),\n },\n})\nexport default class MenuBar extends Vue {\n visible = {\n settings: false,\n locations: false,\n };\n\n get useGrid(): boolean {\n return gameStore.useGrid;\n }\n set useGrid(value: boolean) {\n gameStore.setUseGrid({ useGrid: value, sync: true });\n }\n get fullFOW(): boolean {\n return gameStore.fullFOW;\n }\n set fullFOW(value: boolean) {\n gameStore.setFullFOW({ fullFOW: value, sync: true });\n }\n get fowOpacity(): number {\n return gameStore.fowOpacity;\n }\n set fowOpacity(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setFOWOpacity({ fowOpacity: value, sync: true });\n }\n get fowLOS(): boolean {\n return gameStore.fowLOS;\n }\n set fowLOS(value: boolean) {\n gameStore.setLineOfSight({ fowLOS: value, sync: true });\n }\n get unitSize(): number {\n return gameStore.unitSize;\n }\n set unitSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setUnitSize({ unitSize: value, sync: true });\n }\n get gridSize(): number {\n return gameStore.gridSize;\n }\n set gridSize(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setGridSize({ gridSize: value, sync: true });\n }\n get gridColour(): string {\n return gameStore.gridColour;\n }\n set gridColour(value: string) {\n gameStore.setGridColour({ colour: value, sync: true });\n }\n get fowColour(): string {\n return gameStore.fowColour;\n }\n set fowColour(value: string) {\n gameStore.setFOWColour({ colour: value, sync: true });\n }\n get rulerColour(): string {\n return gameStore.rulerColour;\n }\n set rulerColour(value: string) {\n gameStore.setRulerColour({ colour: value, sync: true });\n }\n get visionRangeMin(): number {\n return gameStore.visionRangeMin;\n }\n set visionRangeMin(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMin({ value, sync: true });\n }\n get visionRangeMax(): number {\n return gameStore.visionRangeMax;\n }\n set visionRangeMax(value: number) {\n if (typeof value !== \"number\") return;\n gameStore.setVisionRangeMax({ value, sync: true });\n }\n settingsClick(event: { target: HTMLElement }) {\n if (event.target.classList.contains(\"accordion\")) {\n event.target.classList.toggle(\"accordion-active\");\n const next = event.target.nextElementSibling;\n if (next !== null) next.style.display = next.style.display === \"\" ? \"block\" : \"\";\n }\n }\n changeLocation(name: string) {\n socket.emit(\"Location.Change\", name);\n }\n createLocation() {\n getRef(\"prompt\")\n .prompt(`New location name:`, `Create new location`)\n .then(\n (value: string) => {\n socket.emit(\"Location.New\", value);\n },\n () => {},\n );\n }\n createNote() {\n const note = { title: \"New note\", text: \"\", uuid: uuidv4() };\n gameStore.newNote({ note, sync: true });\n this.openNote(note);\n }\n openNote(note: Note) {\n getRef(\"note\").open(note);\n }\n changeVisionMode(event: { target: HTMLSelectElement }) {\n const value = event.target.value.toLowerCase();\n if (value !== \"bvh\" && value !== \"triangle\") return;\n gameStore.setVisionMode({ mode: value, sync: true });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n layerManager.invalidate();\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/ts-loader/index.js??ref--12-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./colorpicker.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.IS_DM)?_c('li',{on:{\"click\":_vm.bringPlayers}},[_vm._v(\"Bring players\")]):_vm._e(),_c('li',{on:{\"click\":_vm.createToken}},[_vm._v(\"Create basic token\")]),_c('li',{on:{\"click\":_vm.showInitiative}},[_vm._v(\"Show initiative\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=template&id=44a31e42&scoped=true&\"","import { CDT } from \"./cdt\";\nimport { ccw, cw, orientation, ulp } from \"./triag\";\n\nexport type Point = number[];\n\nexport const INFINITE = -7e310;\n\nlet _INFINITE_VERTEX: Vertex;\n\nexport enum Sign {\n NEGATIVE = -1,\n ZERO = 0,\n POSITIVE = 1,\n\n RIGHT_TURN = -1,\n LEFT_TURN = 1,\n\n SMALLER = -1,\n EQUAL = 0,\n LARGER = 1,\n\n CLOCKWISE = -1,\n COUNTERCLOCKWISE = 1,\n\n COLLINEAR = 0,\n COPLANAR = 0,\n DEGENERATE = 0,\n\n ON_NEGATIVE_SIDE = -1,\n ON_ORIENTED_BOUNDARY = 0,\n ON_POSITIVE_SIDE = 1,\n}\n\nenum LineFaceState {\n UNDEFINED = -1,\n VERTEX_VERTEX = 0,\n VERTEX_EDGE = 1,\n EDGE_VERTEX = 2,\n EDGE_EDGE = 3,\n}\n\nfunction newPoint(): Point {\n return [INFINITE, INFINITE];\n}\n\nexport class Triangle {\n vertices: (Vertex | null)[] = [];\n neighbours: (Triangle | null)[] = [null, null, null];\n constraints = [false, false, false];\n static _counter = 0;\n uid = Triangle._counter++;\n\n constructor(...vertices: (Vertex | null)[]) {\n this.vertices = vertices;\n }\n\n from(t: Triangle): this {\n this.vertices = t.vertices.slice(0, t.vertices.length);\n this.neighbours = t.neighbours.slice(0, t.neighbours.length);\n this.constraints = t.constraints.slice(0, t.constraints.length);\n return this;\n }\n\n get dimension() {\n return this.vertices.length - 1;\n }\n\n addVertex(vertex: Vertex) {\n if (vertex === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(vertex);\n vertex.triangle = this;\n }\n\n isConstrained(index: number): boolean {\n return this.constraints[index];\n }\n\n reorient() {\n // If certain indices do not exist yet thay will append faulty undefined's, thus we slice them\n this.vertices = [this.vertices[1], this.vertices[0], this.vertices[2]].slice(0, this.vertices.length);\n this.neighbours = [this.neighbours[1], this.neighbours[0], this.neighbours[2]];\n this.constraints = [this.constraints[1], this.constraints[0], this.constraints[2]];\n }\n\n indexV(v: Vertex): number {\n return this.vertices.indexOf(v);\n }\n\n indexT(t: Triangle): number {\n return this.neighbours.indexOf(t);\n }\n\n isInfinite(index?: number): boolean {\n if (index === undefined) {\n return this.vertices.includes(_INFINITE_VERTEX);\n } else {\n return this.vertices[ccw(index)]!.infinite || this.vertices[cw(index)]!.infinite;\n }\n }\n\n contains(point: Point) {\n const A =\n -this.vertices[1]!.point![1] * this.vertices[2]!.point![0] +\n this.vertices[0]!.point![1] * (-this.vertices[1]!.point![0] + this.vertices[2]!.point![0]) +\n this.vertices[0]!.point![0] * (this.vertices[1]!.point![1] - this.vertices[2]!.point![1]) +\n this.vertices[1]!.point![0] * this.vertices[2]!.point![1];\n const sign = A < 0 ? -1 : 1;\n const s =\n (this.vertices[0]!.point![1] * this.vertices[2]!.point![0] -\n this.vertices[0]!.point![0] * this.vertices[2]!.point![1] +\n (this.vertices[2]!.point![1] - this.vertices[0]!.point![1]) * point[0] +\n (this.vertices[0]!.point![0] - this.vertices[2]!.point![0]) * point[1]) *\n sign;\n if (s < 0) return false;\n const t =\n (this.vertices[0]!.point![0] * this.vertices[1]!.point![1] -\n this.vertices[0]!.point![1] * this.vertices[1]!.point![0] +\n (this.vertices[0]!.point![1] - this.vertices[1]!.point![1]) * point[0] +\n (this.vertices[1]!.point![0] - this.vertices[0]!.point![0]) * point[1]) *\n sign;\n\n return t > 0 && s + t < A * sign;\n }\n}\n\nexport class Vertex {\n infinite = false;\n private _point: Point | undefined;\n triangle: Triangle | undefined;\n\n constructor(point?: Point) {\n this._point = point;\n }\n\n get point(): Point | undefined {\n return this._point;\n }\n\n set point(point: Point | undefined) {\n this._point = point;\n this.infinite = false;\n }\n}\n\nexport class EdgeCirculator {\n ri: number;\n v: Vertex | null;\n t: Triangle | null;\n _ri: number;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 1) {\n this.ri = 0;\n this.v = null;\n this.t = null;\n } else {\n const i = this.t.indexV(v!);\n if (this.t.dimension === 2) this.ri = ccw(i);\n else this.ri = 2;\n }\n this._ri = this.ri;\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n next(): boolean {\n let i = this.t!.indexV(this.v!);\n if (this.t!.dimension === 1) {\n this.t = this.t!.neighbours[i === 0 ? 1 : 0];\n } else {\n this.t = this.t!.neighbours[ccw(i)];\n i = this.t!.indexV(this.v!);\n this.ri = ccw(i);\n }\n return this.ri !== this._ri || this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class EdgeIterator {\n private i = 0;\n pos: Triangle | null;\n edge: Edge = new Edge();\n tds: TDS;\n _es = 0;\n constructor(tds: TDS) {\n this.tds = tds;\n this.edge.second = 0;\n if (tds.dimension <= 0) {\n this.pos = null;\n return;\n }\n this.pos = tds.triangles[0];\n if (tds.dimension === 1) this.edge.second = 2;\n while (this.pos !== null && !this.associatedEdge()) {\n throw new Error(\"[poi\");\n }\n\n if (tds.dimension === 1) this._es = 2;\n }\n\n get valid(): boolean {\n return (this.pos !== null || this._es !== this.edge.second) && this.pos!.isInfinite(this.edge.second);\n }\n\n next() {\n do {\n this.increment();\n } while (this.pos !== null && !this.associatedEdge());\n }\n\n collect(): Edge {\n this.edge.first = this.pos;\n return this.edge;\n }\n\n associatedEdge(): boolean {\n if (this.tds.dimension === 1) return true;\n return (\n this.tds.triangles.indexOf(this.pos!) < this.tds.triangles.indexOf(this.pos!.neighbours[this.edge.second]!)\n );\n }\n\n increment() {\n if (this.tds.dimension === 1) {\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else if (this.edge.second === 2) {\n this.edge.second = 0;\n this.i++;\n if (this.tds.triangles.length <= this.i) this.pos = null;\n else this.pos = this.tds.triangles[this.i];\n } else {\n this.edge.second++;\n }\n }\n}\n\nexport class FaceCirculator {\n v: Vertex | null;\n t: Triangle | null;\n _v: Vertex | null;\n _t: Triangle | null;\n\n constructor(v: Vertex | null, t: Triangle | null) {\n this.v = v;\n this.t = t;\n if (v === null) {\n this.t = null;\n } else if (t === null) {\n this.t = v.triangle!;\n }\n if (this.t == null || this.t.dimension < 2) {\n this.v = null;\n this.t = null;\n }\n this._v = this.v;\n this._t = this.t;\n }\n\n get valid() {\n return this.t !== null && this.v !== null;\n }\n\n prev() {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[cw(i)];\n }\n\n next(): boolean {\n const i = this.t!.indexV(this.v!);\n this.t = this.t!.neighbours[ccw(i)];\n return this.v !== this._v || this.t !== this._t;\n }\n}\n\nexport class LineFaceCirculator {\n private i = 0;\n pos: Triangle | null = null;\n _tr: CDT;\n s: LineFaceState = LineFaceState.UNDEFINED;\n p: Point;\n q: Point;\n\n constructor(v: Vertex, tr: CDT, dir: Point) {\n this._tr = tr;\n this.p = v.point!;\n this.q = dir;\n\n const fc = new FaceCirculator(v, null);\n let ic = fc.t!.indexV(v);\n let vt = fc.t!.vertices[cw(ic)]!;\n while (v === _INFINITE_VERTEX || orientation(this.p, this.q, vt.point!) !== Sign.LEFT_TURN) {\n fc.next();\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n if (!fc.valid) {\n return;\n }\n }\n\n let vr = fc.t!.vertices[ccw(ic)]!;\n let pqr: Sign = Sign.RIGHT_TURN;\n // tslint:disable:no-conditional-assignment\n while (vr !== _INFINITE_VERTEX && (pqr = orientation(this.p, this.q, vr.point!)) === Sign.LEFT_TURN) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n }\n\n ic = fc.t!.indexV(v);\n vt = fc.t!.vertices[cw(ic)]!;\n\n if (vr === _INFINITE_VERTEX) {\n fc.prev();\n ic = fc.t!.indexV(v);\n vr = fc.t!.vertices[ccw(ic)]!;\n pqr = orientation(this.p, this.q, vr.point!);\n switch (pqr) {\n case Sign.RIGHT_TURN:\n case Sign.COLLINEAR: {\n fc.next();\n ic = fc.t!.indexV(_INFINITE_VERTEX);\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ic;\n break;\n }\n case Sign.LEFT_TURN: {\n break;\n }\n }\n } else if (pqr === Sign.COLLINEAR) {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(ic);\n } else {\n this.pos = fc.t!;\n this.s = LineFaceState.VERTEX_EDGE;\n this.i = ic;\n }\n }\n\n next() {\n this.increment();\n }\n\n increment() {\n let o: Sign;\n if (this.s === LineFaceState.VERTEX_VERTEX || this.s === LineFaceState.EDGE_VERTEX) {\n do {\n const n = this.pos!.neighbours[cw(this.i)]!;\n this.i = n.indexT(this.pos!);\n this.pos = n;\n if (this.pos!.vertices[this.i] === _INFINITE_VERTEX) {\n o = Sign.COLLINEAR;\n this.i = cw(this.i);\n break;\n }\n o = orientation(this.p, this.q, this.pos!.vertices[this.i]!.point!);\n this.i = cw(this.i);\n } while (o === Sign.LEFT_TURN);\n if (o === Sign.COLLINEAR) {\n this.s = LineFaceState.VERTEX_VERTEX;\n this.i = ccw(this.i);\n } else {\n this.s = LineFaceState.VERTEX_EDGE;\n }\n } else {\n const n = this.pos!.neighbours[this.i]!;\n const ni = n.indexT(this.pos!);\n this.pos = n;\n o =\n this.pos!.vertices[ni]! === _INFINITE_VERTEX\n ? Sign.COLLINEAR\n : orientation(this.p, this.q, this.pos!.vertices[ni]!.point!);\n switch (o) {\n case Sign.LEFT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = ccw(ni);\n break;\n }\n case Sign.RIGHT_TURN: {\n this.s = LineFaceState.EDGE_EDGE;\n this.i = cw(ni);\n break;\n }\n default: {\n this.s = LineFaceState.EDGE_VERTEX;\n this.i = ni;\n }\n }\n }\n }\n}\n\nclass Edge {\n first: Triangle | null = null;\n second: number = 0;\n}\n\nexport enum LocateType {\n VERTEX,\n EDGE,\n FACE,\n OUTSIDE_CONVEX_HULL,\n OUTSIDE_AFFINE_HULL,\n}\n\nexport class TDS {\n dimension = -1;\n vertices: Vertex[] = [];\n triangles: Triangle[] = [];\n _infinite: Vertex;\n\n constructor() {\n this._infinite = this.createVertex();\n _INFINITE_VERTEX = this._infinite;\n const t = new Triangle();\n t.addVertex(this._infinite);\n this.triangles.push(t);\n }\n\n createVertex(): Vertex {\n const v = this.infiniteVertex;\n if (v === undefined) {\n console.log(\"UNDEFINED HIERE\");\n }\n this.vertices.push(v);\n return v;\n }\n\n createTriangle(\n v0: Vertex | null,\n v1: Vertex | null,\n v2: Vertex | null,\n n0: Triangle | null,\n n1: Triangle | null,\n n2: Triangle | null,\n ) {\n const t = new Triangle(v0, v1, v2);\n t.neighbours[0] = n0;\n t.neighbours[1] = n1;\n t.neighbours[2] = n2;\n this.triangles.push(t);\n return t;\n }\n\n deleteTriangle(trig: Triangle) {\n this.triangles = this.triangles.filter(t => t !== trig);\n }\n\n setAdjacency(t0: Triangle, i0: number, t1: Triangle, i1: number) {\n t0.neighbours[i0] = t1;\n t1.neighbours[i1] = t0;\n }\n\n get finiteVertex(): Vertex {\n return this.vertices[1];\n }\n\n get infiniteVertex(): Vertex {\n const v = new Vertex(newPoint());\n v.infinite = true;\n return v;\n }\n\n get finiteEdge(): Edge {\n if (this.dimension < 1) throw new Error(\"aspo\");\n const ei = new EdgeIterator(this);\n while (ei.valid) ei.next();\n return ei.collect();\n }\n\n insertDimUp(w: Vertex = new Vertex(), orient: boolean = true): Vertex {\n const v = this.createVertex();\n this.dimension++;\n let t1: Triangle;\n let t2: Triangle;\n switch (this.dimension) {\n case 0: {\n t1 = this.triangles[0];\n t2 = new Triangle(v);\n this.triangles.push(t2);\n this.setAdjacency(t1, 0, t2, 0);\n v.triangle = t2;\n break;\n }\n case 1:\n case 2: {\n const deleteList: Triangle[] = [];\n const triangles = this.triangles.slice(0, this.triangles.length);\n for (const trig of triangles) {\n const copy = new Triangle().from(trig);\n this.triangles.push(copy);\n trig.vertices[this.dimension] = v;\n copy.vertices[this.dimension] = w;\n this.setAdjacency(trig, this.dimension, copy, this.dimension);\n if (trig.vertices.includes(w)) deleteList.push(copy);\n }\n for (const trig of triangles) {\n const neighbour = trig.neighbours[this.dimension];\n for (let j = 0; j < this.dimension; ++j) {\n neighbour!.neighbours[j] = trig.neighbours[j]!.neighbours[this.dimension];\n }\n }\n\n let lfit = 0;\n if (this.dimension === 1) {\n if (orient) {\n triangles[lfit].reorient();\n lfit++;\n triangles[lfit].neighbours[1]!.reorient();\n } else {\n triangles[lfit].neighbours[1]!.reorient();\n lfit++;\n triangles[lfit].reorient();\n }\n } else {\n for (const trig of triangles) {\n if (orient) trig.neighbours[2]!.reorient();\n else trig.reorient();\n }\n }\n\n for (const trig of deleteList) {\n let j = 1;\n if (trig.vertices[0] === w) j = 0;\n t1 = trig.neighbours[this.dimension]!;\n const i1 = this.mirrorIndex(trig, this.dimension);\n t2 = trig.neighbours[j]!;\n const i2 = this.mirrorIndex(trig, j);\n this.setAdjacency(t1, i1, t2, i2);\n this.deleteTriangle(trig);\n }\n v.triangle = triangles[0];\n break;\n }\n default: {\n throw new Error(\"Dimension unknown\");\n }\n }\n return v;\n }\n\n mirrorIndex(t: Triangle, i: number): number {\n if (t.dimension === 1) {\n const j = t.neighbours[i]!.indexV(t.vertices[i === 0 ? 1 : 0]!);\n return j === 0 ? 1 : 0;\n }\n return ccw(t.neighbours[i]!.indexV(t.vertices[ccw(i)]!));\n }\n\n insertInFace(t: Triangle) {\n const v = this.createVertex();\n const v0 = t.vertices[0]!;\n const v1 = t.vertices[1]!;\n const v2 = t.vertices[2]!;\n const n1 = t.neighbours[1]!;\n const n2 = t.neighbours[2]!;\n const t1 = this.createTriangle(v0, v, v2, t, n1, null);\n const t2 = this.createTriangle(v0, v1, v, t, null, n2);\n this.setAdjacency(t1, 2, t2, 1);\n if (n1 !== null) {\n const i1 = this.mirrorIndex(t, 1);\n n1.neighbours[i1] = t1;\n }\n if (n2 !== null) {\n const i2 = this.mirrorIndex(t, 2);\n n2.neighbours[i2] = t2;\n }\n t.vertices[0] = v;\n t.neighbours[1] = t1;\n t.neighbours[2] = t2;\n if (v0.triangle === t) v0.triangle = t2;\n v.triangle = t;\n return v;\n }\n\n flip(t: Triangle, i: number) {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n const vCW = t.vertices[cw(i)]!;\n const vCCW = t.vertices[ccw(i)]!;\n const tr = t.neighbours[ccw(i)]!;\n const tri = this.mirrorIndex(t, ccw(i));\n const bl = n.neighbours[ccw(ni)]!;\n const bli = this.mirrorIndex(n, ccw(ni));\n\n t.vertices[cw(i)] = n.vertices[ni]!;\n n.vertices[cw(ni)] = t.vertices[i]!;\n\n this.setAdjacency(t, i, bl, bli);\n this.setAdjacency(t, ccw(i), n, ccw(ni));\n this.setAdjacency(n, ni, tr, tri);\n\n if (vCW.triangle! === t) vCW.triangle = n;\n if (vCCW.triangle! === n) vCCW.triangle = t;\n }\n\n insertInEdge(t: Triangle, i: number) {\n let v: Vertex;\n if (this.dimension === 1) {\n v = this.createVertex();\n const ff = t.neighbours[0]!;\n const vv = t.vertices[1]!;\n const g = this.createTriangle(v, vv, null, ff, t, null);\n t.vertices[1] = v;\n t.neighbours[0] = g;\n ff.neighbours[1] = g;\n v.triangle = g;\n vv.triangle = ff;\n } else {\n const n = t.neighbours[i]!;\n const ni = this.mirrorIndex(t, i);\n v = this.insertInFace(t);\n this.flip(n, ni);\n }\n return v;\n }\n}\n\nexport class BoundingBox {\n x1: number;\n x2: number;\n y1: number;\n y2: number;\n constructor(p: Point) {\n this.x1 = p[0];\n this.y1 = p[1];\n this.x2 = p[0];\n this.y2 = p[1];\n }\n\n dilate(dist: number) {\n this.x1 -= dist * ulp(this.x1);\n this.y1 -= dist * ulp(this.y1);\n this.x2 += dist * ulp(this.x2);\n this.y2 += dist * ulp(this.y2);\n }\n\n overlaps(other: BoundingBox): boolean {\n if (this.x2 < other.x1 || other.x2 < this.x1) return false;\n if (this.y2 < other.y1 || other.y2 < this.y1) return false;\n return true;\n }\n}\n","import { partition } from \"@/core/utils\";\nimport { GlobalPoint, Ray } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly, g2lz } from \"@/game/units\";\nimport { BoundingNode, InteriorNode, LeafNode } from \"@/game/visibility/bvh/node\";\n\ninterface BuildInfo {\n index: number;\n bbox: BoundingRect;\n center: BoundingRect;\n}\ninterface LinearBHVNode {\n bbox: BoundingRect;\n nPrimitives: number;\n}\ninterface LinearLeafNode extends LinearBHVNode {\n primitivesOffset: number;\n}\ninterface LinearInternalNode extends LinearBHVNode {\n secondChildOffset: number;\n dimension: number;\n}\n\nexport class BoundingVolume {\n totalNodes = 0;\n buildData: BuildInfo[] = [];\n shapes: string[];\n orderedPrims: string[] = [];\n root: BoundingNode | null;\n nodes: LinearBHVNode[] = [];\n\n offset = 0;\n\n constructor(shapes: string[]) {\n this.shapes = shapes;\n if (this.shapes.length === 0) {\n this.root = null;\n this.nodes = [];\n return;\n }\n for (let i = 0; i < shapes.length; i++) {\n const shape = layerManager.UUIDMap.get(shapes[i])!;\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n }\n this.root = this.recursiveBuild(0, shapes.length);\n this.compact();\n }\n\n draw() {\n const ctx = layerManager.getLayer(\"draw\")!.ctx;\n for (const node of this.nodes) {\n const b = node.bbox;\n ctx.strokeRect(g2lx(b.topLeft.x), g2ly(b.topLeft.y), g2lz(b.w), g2lz(b.h));\n }\n }\n\n recursiveBuild(start: number, end: number): BoundingNode {\n this.totalNodes++;\n let bbox = this.buildData[start].bbox;\n for (let i = start + 1; i < end; i++) bbox = bbox.union(this.buildData[i].bbox);\n const nPrimitives = end - start;\n if (nPrimitives === 1) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n } else {\n let centroidBbox = this.buildData[start].center;\n for (let i = start; i < end; i++) centroidBbox = centroidBbox.union(this.buildData[i].center);\n const dimension = centroidBbox.getMaxExtent();\n if (centroidBbox.botRight.get(dimension) === centroidBbox.topLeft.get(dimension)) {\n return this.createLeaf(start, end, nPrimitives, bbox);\n }\n // Use shitty Middle thingy until an introselect js algo is added\n const pMid = 0.5 * (centroidBbox.topLeft.get(dimension) + centroidBbox.botRight.get(dimension));\n const partitionedData = partition(\n this.buildData.slice(start, end),\n (n: BuildInfo) => n.center.center().get(dimension) < pMid,\n );\n const flattened = ([]).concat.apply([], partitionedData);\n if (partitionedData[0].length === 0 || partitionedData[1].length === 0) console.log(\"EMPTY\");\n this.buildData.splice(start, flattened.length, ...flattened);\n const mid = partitionedData[0].length + start;\n return new InteriorNode(dimension, this.recursiveBuild(start, mid), this.recursiveBuild(mid, end));\n }\n }\n\n intersect(ray: Ray, stopOnFirstHit?: boolean) {\n if (this.nodes.length === 0) return { hit: false, intersect: ray.get(0), tMin: 0, tMax: ray.tMax };\n if (stopOnFirstHit === undefined) stopOnFirstHit = false;\n // Initialize return values\n let hit = false;\n let tMin = 0;\n let tMax = ray.tMax;\n\n // Initialize work variables\n let todoOffset = 0;\n let nodeNum = 0;\n const todo: number[] = [];\n\n // Precalculate intersection vectors\n const invDir = ray.direction.inverse();\n const dirIsNegative = [invDir.x < 0, invDir.y < 0];\n\n while (true) {\n const node = this.nodes[nodeNum];\n\n const i = node.bbox.intersectP(ray, invDir, dirIsNegative);\n if (i.hit) {\n if (node.nPrimitives > 0) {\n // TODO: nPrimitives is currently always 1 , this could be generalised\n // for (let i=0; i < node.nPrimitives; i++) {\n // if (this.shapes[(node).primitivesOffset + i])\n // }\n hit = true;\n tMin = ray.tMax = i.min;\n tMax = i.max;\n if (todoOffset === 0 || stopOnFirstHit) break;\n nodeNum = todo[--todoOffset];\n } else {\n if (dirIsNegative[(node).dimension]) {\n todo[todoOffset++] = nodeNum + 1;\n nodeNum = (node).secondChildOffset;\n } else {\n todo[todoOffset++] = (node).secondChildOffset;\n nodeNum++;\n }\n }\n } else {\n if (todoOffset === 0) break;\n nodeNum = todo[--todoOffset];\n }\n }\n return { hit, intersect: ray.get(tMin), tMin, tMax };\n }\n\n private compact() {\n this.offset = 0;\n if (this.root !== null) this.flatten(this.root);\n }\n\n private flatten(node: BoundingNode) {\n const index = this.offset;\n const myOffset = this.offset++;\n if (node.nPrimitives === 0) {\n this.flatten(node.children[0]);\n const secondOffset = this.flatten(node.children[1]);\n this.nodes[index] = {\n bbox: node.bbox,\n dimension: (node).dimension,\n nPrimitives: 0,\n secondChildOffset: secondOffset,\n };\n } else {\n this.nodes[index] = {\n bbox: node.bbox,\n primitivesOffset: (node).firstPrimOffset,\n nPrimitives: node.nPrimitives,\n };\n }\n return myOffset;\n }\n\n private createLeaf(start: number, end: number, nPrimitives: number, bbox: BoundingRect) {\n const size = this.orderedPrims.length;\n for (let i = start; i < end; i++) this.orderedPrims.push(this.shapes[this.buildData[i].index]);\n return new LeafNode(size, nPrimitives, bbox);\n }\n}\n","import Initiative from \"./ui/initiative.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { AnnotationManager } from \"@/game/ui/annotation\";\nimport { g2l } from \"@/game/units\";\n\nexport class GameManager {\n selectedTool: number = 0;\n\n annotationManager = new AnnotationManager();\n\n addShape(shape: ServerShape): void {\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Shape with unknown layer ${shape.layer} could not be added`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n const sh = createShapeFromDict(shape);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${shape.type_} could not be added`);\n return;\n }\n layer.addShape(sh, false);\n layer.invalidate(false);\n }\n\n updateShape(data: { shape: ServerShape; redraw: boolean; move: boolean }): void {\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Shape with unknown layer ${data.shape.layer} could not be added`);\n return;\n }\n const sh = createShapeFromDict(data.shape, true);\n if (sh === undefined) {\n console.log(`Shape with unknown type ${data.shape.type_} could not be added`);\n return;\n }\n const oldShape = layerManager.UUIDMap.get(data.shape.uuid);\n if (oldShape === undefined) {\n console.log(`Shape with unknown id could not be updated`);\n return;\n }\n const redrawInitiative = sh.owners !== oldShape.owners;\n const shape = Object.assign(oldShape, sh);\n shape.checkVisionSources();\n shape.setMovementBlock(shape.movementObstruction);\n shape.setIsToken(shape.isToken);\n if (data.redraw) layerManager.getLayer(data.shape.layer)!.invalidate(false);\n if (redrawInitiative) getRef(\"initiative\").$forceUpdate();\n }\n\n setCenterPosition(position: GlobalPoint) {\n const localPos = g2l(position);\n gameStore.increasePanX((window.innerWidth / 2 - localPos.x) / gameStore.zoomFactor);\n gameStore.increasePanY((window.innerHeight / 2 - localPos.y) / gameStore.zoomFactor);\n layerManager.invalidate();\n sendClientOptions();\n }\n}\n\nexport const gameManager = new GameManager();\n(window).gameManager = gameManager;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Initiative\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('draggable',{attrs:{\"id\":\"initiative-list\",\"options\":{setData: _vm.fakeSetData, disabled: !_vm.$store.state.game.IS_DM}},on:{\"change\":_vm.updateOrder},model:{value:(_vm.data),callback:function ($$v) {_vm.data=$$v},expression:\"data\"}},[_vm._l((_vm.data),function(actor){return [_c('div',{key:actor.uuid,staticStyle:{\"display\":\"flex\",\"flex-direction\":\"column\",\"align-items\":\"flex-end\"}},[_c('div',{staticClass:\"initiative-actor\",class:{'initiative-selected': _vm.currentActor === actor.uuid},style:({'cursor': _vm.$store.state.game.IS_DM && 'move'}),on:{\"mouseenter\":function($event){_vm.toggleHighlight(actor, true)},\"mouseleave\":function($event){_vm.toggleHighlight(actor, false)}}},[(actor.has_img)?[_c('img',{attrs:{\"src\":actor.source,\"width\":\"30px\",\"height\":\"30px\"}})]:[_c('span',{staticStyle:{\"width\":\"auto\"}},[_vm._v(_vm._s(actor.source))])],_c('input',{directives:[{name:\"model\",rawName:\"v-model.lazy.number\",value:(actor.initiative),expression:\"actor.initiative\",modifiers:{\"lazy\":true,\"number\":true}}],class:{'notAllowed': !_vm.owns(actor)},attrs:{\"type\":\"text\",\"placeholder\":\"value\",\"disabled\":!_vm.owns(actor)},domProps:{\"value\":(actor.initiative)},on:{\"change\":[function($event){_vm.$set(actor, \"initiative\", _vm._n($event.target.value))},function($event){_vm.syncInitiative(actor)}],\"blur\":function($event){_vm.$forceUpdate()}}}),_c('div',{staticClass:\"initiative-effects-icon\",class:{'notAllowed': !_vm.owns(actor)},staticStyle:{\"opacity\":\"0.6\"},on:{\"click\":function($event){_vm.createEffect(actor, _vm.getDefaultEffect(), true)}}},[_c('i',{staticClass:\"fas fa-stopwatch\"}),(actor.effects)?[_vm._v(_vm._s(actor.effects.length))]:[_vm._v(\"0\")]],2),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.visible ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'visible')}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': actor.group ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.toggleOption(actor, 'group')}}},[_c('i',{staticClass:\"fas fa-users\"})]),_c('div',{class:{'notAllowed': !_vm.owns(actor)},style:({'opacity': _vm.owns(actor) ? '1.0' : '0.3'}),on:{\"click\":function($event){_vm.removeInitiative(actor.uuid, true, true)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})])],2),(actor.effects)?_c('div',{staticClass:\"initiative-effect\"},_vm._l((actor.effects),function(effect){return _c('div',{key:effect.uuid},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.name),expression:\"effect.name\"}],attrs:{\"type\":\"text\",\"size\":effect.name.length || 1},domProps:{\"value\":(effect.name)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(effect.turns),expression:\"effect.turns\"}],attrs:{\"type\":\"text\",\"size\":effect.turns.toString().length || 1},domProps:{\"value\":(effect.turns)},on:{\"change\":function($event){_vm.updateEffect(actor.uuid, effect, true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(effect, \"turns\", $event.target.value)}}})])})):_vm._e()])]})],2),_c('div',{attrs:{\"id\":\"initiative-bar\"}},[_c('div',{attrs:{\"id\":\"initiative-round\"}},[_vm._v(\"Round \"+_vm._s(_vm.roundCounter))]),_c('div',{staticStyle:{\"display\":\"flex\"}}),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":function($event){_vm.setRound(0, true); _vm.setTurn(_vm.data[0].uuid, true)}}},[_c('i',{staticClass:\"fas fa-sync-alt\"})]),_c('div',{staticClass:\"initiative-bar-button\",class:{'notAllowed': !_vm.$store.state.game.IS_DM},on:{\"click\":_vm.nextTurn}},[_c('i',{staticClass:\"fas fa-chevron-right\"})])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./initiative.vue?vue&type=template&id=ccaf03d6&scoped=true&\"","\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component\nexport default class LoadComponent extends Vue {\n message = \"Loading...\";\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.getActiveLayer() !== undefined)?_c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.x + 'px',\"top\":_vm.y + 'px'},on:{\"close\":_vm.close}},[(_vm.getLayers().length > 1)?_c('li',[_vm._v(\"Layer\\n \"),_c('ul',_vm._l((_vm.getLayers()),function(layer){return _c('li',{key:layer.name,style:([_vm.getActiveLayer().name === layer.name ? {'background-color':'#82c8a0'}: {}]),on:{\"click\":function($event){_vm.setLayer(layer.name)}}},[_vm._v(_vm._s(layer.name))])}))]):_vm._e(),_c('li',{on:{\"click\":_vm.moveToBack}},[_vm._v(\"Move to back\")]),_c('li',{on:{\"click\":_vm.moveToFront}},[_vm._v(\"Move to front\")]),_c('li',{on:{\"click\":_vm.addInitiative}},[_vm._v(_vm._s(_vm.getInitiativeWord())+\" initiative\")]),_c('li',{on:{\"click\":_vm.openEditDialog}},[_vm._v(\"Show properties\")])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=template&id=759e5a8a&scoped=true&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=6d744362&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=style&index=1&id=6d744362&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component\nexport default class Dashboard extends Vue {\n owned = [];\n joined = [];\n error = \"\";\n\n newSessionName = \"\";\n\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n axios\n .get(\"/api/rooms\")\n .then((response: AxiosResponse) => {\n next((vm: this) => {\n vm.owned = response.data.owned;\n vm.joined = response.data.joined;\n });\n })\n .catch((err: AxiosError) => {\n next((vm: this) => {\n vm.error = err.message;\n });\n });\n }\n\n createRoom(event: Event) {\n axios\n .post(\"/api/rooms\", {\n name: this.newSessionName,\n })\n .then((response: AxiosResponse) => {\n this.$router.push(`/game/${coreStore.username}/${this.newSessionName}`);\n })\n .catch((err: AxiosError) => {\n this.error = err.message;\n });\n }\n}\n","import { render, staticRenderFns } from \"./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"\nimport script from \"./confirm.vue?vue&type=script&lang=ts&\"\nexport * from \"./confirm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./confirm.vue?vue&type=style&index=0&id=1883e207&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1883e207\",\n null\n \n)\n\ncomponent.options.__file = \"confirm.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shapecontext.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ContextMenu',{attrs:{\"visible\":_vm.visible,\"left\":_vm.left + 'px',\"top\":_vm.top + 'px'},on:{\"close\":_vm.close}},[_c('li',{on:{\"click\":_vm.rename}},[_vm._v(\"Rename\")]),_c('li',{on:{\"click\":_vm.remove}},[_vm._v(\"Remove\")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=template&id=606797b4&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=style&index=0&id=639cd890&scoped=true&lang=css&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible,\"mask\":false},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_c('div',[_vm._v(\"Edit asset\")]),_c('div',{staticClass:\"header-close\",on:{\"click\":function($event){_vm.visible = false}}},[_c('i',{staticClass:\"far fa-window-close\"})])])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('label',{attrs:{\"for\":\"shapeselectiondialog-name\"}},[_vm._v(\"Name\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.name),expression:\"shape.name\"}],staticStyle:{\"grid-column\":\"numerator / end\"},attrs:{\"type\":\"text\",\"id\":\"shapeselectiondialog-name\"},domProps:{\"value\":(_vm.shape.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.shape, \"name\", $event.target.value)}}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-istoken\"}},[_vm._v(\"Is a token\")]),_c('input',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-istoken\"},domProps:{\"checked\":_vm.shape.isToken},on:{\"click\":_vm.setToken}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-visionblocker\"}},[_vm._v(\"Blocks vision/light\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.shape.visionObstruction),expression:\"shape.visionObstruction\"}],staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-visionblocker\"},domProps:{\"checked\":Array.isArray(_vm.shape.visionObstruction)?_vm._i(_vm.shape.visionObstruction,null)>-1:(_vm.shape.visionObstruction)},on:{\"change\":[function($event){var $$a=_vm.shape.visionObstruction,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.shape, \"visionObstruction\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.shape, \"visionObstruction\", $$c)}},_vm.setVisionBlocker]}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-moveblocker\"}},[_vm._v(\"Blocks movement\")]),_c('input',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"type\":\"checkbox\",\"id\":\"shapeselectiondialog-moveblocker\"},domProps:{\"checked\":_vm.shape.movementObstruction},on:{\"click\":_vm.setMovementBlocker}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-strokecolour\"}},[_vm._v(\"Border colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"color\":_vm.shape.strokeColour},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"strokeColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('label',{attrs:{\"for\":\"shapeselectiondialog-fillcolour\"}},[_vm._v(\"Fill colour\")]),_c('color-picker',{staticStyle:{\"grid-column-start\":\"remove\",\"width\":\"15px\",\"height\":\"15px\"},attrs:{\"color\":_vm.shape.fillColour},on:{\"update:color\":function($event){_vm.$set(_vm.shape, \"fillColour\", $event)},\"input\":function($event){_vm.updateShape(true, true)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Access\")]),_vm._l((_vm.shape.owners),function(owner){return [_c('input',{key:owner,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\"},domProps:{\"value\":owner},on:{\"change\":function($event){_vm.updateOwner($event, owner)}}}),(owner !== '')?_c('div',{key:'remove-' + owner,staticStyle:{\"grid-column-start\":\"remove\"},on:{\"click\":function($event){_vm.removeOwner(owner)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Trackers\")]),_vm._l((_vm.shape.trackers),function(tracker){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(tracker.name),expression:\"tracker.name\"}],key:'name-'+tracker.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\"},domProps:{\"value\":(tracker.name)},on:{\"change\":function($event){_vm.updateShape(false);},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.value),expression:\"tracker.value\",modifiers:{\"number\":true}}],key:'value-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\"},domProps:{\"value\":(tracker.value)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+tracker.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(tracker.maxvalue),expression:\"tracker.maxvalue\",modifiers:{\"number\":true}}],key:'maxvalue-'+tracker.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\"},domProps:{\"value\":(tracker.maxvalue)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(tracker, \"maxvalue\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'sspan-'+tracker.uuid}),_c('div',{key:'visibility-'+tracker.uuid,style:({opacity: tracker.visible ? 1.0 : 0.3}),on:{\"click\":function($event){tracker.visible = !tracker.visible;_vm.updateShape(false)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('span',{key:'tspan-'+tracker.uuid}),(tracker.name !== '' || tracker.value !== 0)?_c('div',{key:'remove-'+tracker.uuid,on:{\"click\":function($event){_vm.removeTracker(tracker.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Auras\")]),_vm._l((_vm.shape.auras),function(aura){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(aura.name),expression:\"aura.name\"}],key:'name-'+aura.uuid,staticStyle:{\"grid-column-start\":\"name\"},attrs:{\"type\":\"text\",\"placeholder\":\"name\"},domProps:{\"value\":(aura.name)},on:{\"change\":function($event){_vm.updateShape(false)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"name\", $event.target.value)}}}),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.value),expression:\"aura.value\",modifiers:{\"number\":true}}],key:'value-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Current value\"},domProps:{\"value\":(aura.value)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"value\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('span',{key:'fspan-'+aura.uuid},[_vm._v(\"/\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model.number\",value:(aura.dim),expression:\"aura.dim\",modifiers:{\"number\":true}}],key:'dimvalue-'+aura.uuid,attrs:{\"type\":\"text\",\"title\":\"Dim value\"},domProps:{\"value\":(aura.dim)},on:{\"change\":function($event){_vm.updateShape(true)},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(aura, \"dim\", _vm._n($event.target.value))},\"blur\":function($event){_vm.$forceUpdate()}}}),_c('color-picker',{key:'colour-'+aura.uuid,attrs:{\"color\":aura.colour},on:{\"update:color\":function($event){_vm.$set(aura, \"colour\", $event)},\"input\":function($event){_vm.updateAuraColour(aura, $event)},\"change\":function($event){_vm.updateShape(true)}}}),_c('div',{key:'visibility-'+aura.uuid,style:({opacity: aura.visible ? 1.0 : 0.3}),on:{\"click\":function($event){aura.visible = !aura.visible;_vm.updateShape(true)}}},[_c('i',{staticClass:\"fas fa-eye\"})]),_c('div',{key:'visionsource-'+aura.uuid,style:({opacity: aura.visionSource ? 1.0 : 0.3}),on:{\"click\":function($event){_vm.updateAuraVisionSource(aura)}}},[_c('i',{staticClass:\"fas fa-lightbulb\"})]),(aura.name !== '' || aura.value !== 0)?_c('div',{key:'remove-'+aura.uuid,on:{\"click\":function($event){_vm.removeAura(aura.uuid)}}},[_c('i',{staticClass:\"fas fa-trash-alt\"})]):_vm._e()]}),_c('div',{staticClass:\"spanrow header\"},[_vm._v(\"Annotation\")]),_c('textarea',{staticClass:\"spanrow\",domProps:{\"value\":_vm.shape.annotation},on:{\"change\":_vm.updateAnnotation}})],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=template&id=7c80ae3a&scoped=true&\"","import Vue from \"vue\";\nexport const EventBus = new Vue();\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=script&lang=ts&\"","import { GlobalPoint } from \"@/game/geom\";\nimport { BaseRect } from \"@/game/shapes/baserect\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\n\nexport class Rect extends BaseRect {\n type = \"rect\";\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, w, h, fillColour, strokeColour, uuid);\n }\n asDict() {\n return super.getBaseDict();\n }\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n const z = gameStore.zoomFactor;\n const loc = g2l(this.refPoint);\n ctx.fillRect(loc.x, loc.y, this.w * z, this.h * z);\n if (this.strokeColour !== \"rgba(0, 0, 0, 0)\") {\n ctx.strokeStyle = this.strokeColour;\n ctx.lineWidth = 5;\n ctx.strokeRect(loc.x, loc.y, this.w * z, this.h * z);\n }\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./selectcontext.vue?vue&type=script&lang=ts&\"","import { Ray, Vector } from \"@/game/geom\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Settings } from \"@/game/settings\";\nimport { gameStore } from \"@/game/store\";\nimport { g2l, g2lr, g2lx, g2ly } from \"@/game/units\";\nimport { computeVisibility } from \"../visibility/te/te\";\n\nexport class FOWPlayersLayer extends Layer {\n isVisionLayer: boolean = true;\n\n draw(): void {\n if (!this.valid) {\n // console.time(\"VI\");\n const ctx = this.ctx;\n\n if (!gameStore.fowLOS || Settings.skipPlayerFOW) {\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n this.valid = true;\n return;\n }\n\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n const drctx = layerManager.getLayer(\"draw\")!.ctx;\n drctx.clearRect(0, 0, window.innerWidth, window.innerHeight);\n\n const originalOperation = ctx.globalCompositeOperation;\n\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n\n // For the DM this is done at the end of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (!gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n // Then cut out all the player vision auras\n const maxLength = ctx.canvas.width + ctx.canvas.height;\n\n for (const tokenId of gameStore.ownedtokens) {\n const token = layerManager.UUIDMap.get(tokenId);\n if (token === undefined) continue;\n const center = token.center();\n const lcenter = g2l(center);\n if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n\n for (let angle = 0; angle < 2 * Math.PI; angle += (Settings.angleSteps / 2 / 180) * Math.PI) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n // Check if there is a hit with one of the nearby light blockers.\n const lightRay = new Ray(center, new Vector(cos, sin));\n const hitResult = gameStore.BV.intersect(lightRay);\n\n // We can move on to the next angle if nothing was hit.\n if (!hitResult.hit) {\n // If an earlier hit caused the aura to leave the arc, we need to go back to the arc\n if (lastArcAngle === -1) {\n // Draw a line from the last non arc location back to the arc\n ctx.lineTo(lcenter.x + maxLength * cos, lcenter.y + maxLength * sin);\n // Set the start of a new arc beginning at the current angle\n lastArcAngle = angle;\n }\n continue;\n }\n // If hit , first finish any ongoing arc, then move to the intersection point\n if (lastArcAngle !== -1) {\n ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, angle);\n lastArcAngle = -1;\n }\n ctx.lineTo(g2lx(hitResult.intersect.x), g2ly(hitResult.intersect.y));\n }\n\n // Finish the final arc.\n if (lastArcAngle !== -1) ctx.arc(lcenter.x, lcenter.y, maxLength, lastArcAngle, 2 * Math.PI);\n else ctx.closePath();\n ctx.fill();\n } else {\n if (true) {\n // Add a gradient vision dropoff\n const gradient = ctx.createRadialGradient(\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMin),\n lcenter.x,\n lcenter.y,\n g2lr(gameStore.visionRangeMax),\n );\n gradient.addColorStop(0, \"rgba(0, 0, 0, 1)\");\n gradient.addColorStop(1, \"rgba(0, 0, 0, 0)\");\n ctx.fillStyle = gradient;\n } else {\n ctx.fillStyle = \"rgba(0, 0, 0, 1)\";\n }\n try {\n const polygon = computeVisibility(token.center(), \"vision\");\n ctx.beginPath();\n ctx.moveTo(g2lx(polygon[0][0]), g2ly(polygon[0][1]));\n for (const point of polygon) ctx.lineTo(g2lx(point[0]), g2ly(point[1]));\n ctx.closePath();\n ctx.fill();\n } catch {}\n }\n }\n\n // For the players this is done at the beginning of this function. TODO: why the split up ???\n // This was done in commit be1e65cff1e7369375fe11cfa1643fab1d11beab.\n if (gameStore.IS_DM) super.draw(!gameStore.fullFOW);\n\n ctx.globalCompositeOperation = originalOperation;\n // console.timeEnd(\"VI\");\n }\n }\n}\n","import { socket } from \"@/game/api/socket\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { createShapeFromDict } from \"@/game/shapes/utils\";\nimport { gameStore } from \"@/game/store\";\nimport { g2lx, g2ly } from \"@/game/units\";\n\nexport class Layer {\n name: string;\n width: number;\n height: number;\n canvas: HTMLCanvasElement;\n ctx: CanvasRenderingContext2D;\n\n selectable: boolean = false;\n playerEditable: boolean = false;\n isVisionLayer: boolean = false;\n\n // When set to false, the layer will be redrawn on the next tick\n valid: boolean = false;\n // The collection of shapes that this layer contains.\n // These are ordered on a depth basis.\n shapes: Shape[] = [];\n\n // Collection of shapes that are currently selected\n selection: Shape[] = [];\n\n // Extra selection highlighting settings\n selectionColor = \"#CC0000\";\n selectionWidth = 2;\n\n constructor(canvas: HTMLCanvasElement, name: string) {\n this.canvas = canvas;\n this.name = name;\n this.width = canvas.width;\n this.height = canvas.height;\n this.ctx = canvas.getContext(\"2d\")!;\n }\n\n invalidate(skipLightUpdate: boolean): void {\n this.valid = false;\n if (!skipLightUpdate) {\n layerManager.invalidateLight();\n }\n }\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean, invalidate = true): void {\n if (temporary === undefined) temporary = false;\n shape.layer = this.name;\n this.shapes.push(shape);\n layerManager.UUIDMap.set(shape.uuid, shape);\n shape.checkVisionSources(invalidate);\n shape.setMovementBlock(shape.movementObstruction, invalidate);\n if (shape.ownedBy(gameStore.username) && shape.isToken) gameStore.ownedtokens.push(shape.uuid);\n if (shape.annotation.length) gameStore.annotations.push(shape.uuid);\n if (sync) socket.emit(\"Shape.Add\", { shape: shape.asDict(), temporary });\n if (invalidate) this.invalidate(!sync);\n }\n\n setShapes(shapes: ServerShape[]): void {\n for (const serverShape of shapes) {\n const shape = createShapeFromDict(serverShape);\n if (shape === undefined) {\n console.log(`Shape with unknown type ${serverShape.type_} could not be added`);\n return;\n }\n this.addShape(shape, false, false, false);\n }\n this.clearSelection(); // TODO: Fix keeping selection on those items that are not moved.\n this.invalidate(false);\n }\n\n removeShape(shape: Shape, sync: boolean, temporary?: boolean) {\n if (temporary === undefined) temporary = false;\n this.shapes.splice(this.shapes.indexOf(shape), 1);\n\n if (sync) socket.emit(\"Shape.Remove\", { shape, temporary });\n const lsI = gameStore.visionSources.findIndex(ls => ls.shape === shape.uuid);\n const lbI = gameStore.visionBlockers.findIndex(ls => ls === shape.uuid);\n\n const mbI = gameStore.movementblockers.findIndex(ls => ls === shape.uuid);\n const anI = gameStore.annotations.findIndex(ls => ls === shape.uuid);\n if (lsI >= 0) gameStore.visionSources.splice(lsI, 1);\n if (lbI >= 0) gameStore.visionBlockers.splice(lbI, 1);\n if (mbI >= 0) gameStore.movementblockers.splice(mbI, 1);\n if (anI >= 0) gameStore.annotations.splice(anI, 1);\n\n const annotationIndex = gameStore.annotations.indexOf(shape.uuid);\n if (annotationIndex >= 0) gameStore.annotations.splice(annotationIndex, 1);\n\n const ownedIndex = gameStore.ownedtokens.indexOf(shape.uuid);\n if (ownedIndex >= 0) gameStore.ownedtokens.splice(ownedIndex, 1);\n\n layerManager.UUIDMap.delete(shape.uuid);\n\n const index = this.selection.indexOf(shape);\n if (index >= 0) this.selection.splice(index, 1);\n if (lbI >= 0) gameStore.recalculateVision();\n if (mbI >= 0) gameStore.recalculateMovement();\n this.invalidate(!sync);\n }\n\n clear(): void {\n this.ctx.clearRect(0, 0, this.width, this.height);\n }\n\n clearSelection(): void {\n this.selection = [];\n EventBus.$emit(\"SelectionInfo.Shape.Set\", null);\n }\n\n draw(doClear?: boolean): void {\n if (!this.valid) {\n const ctx = this.ctx;\n const ogOP = ctx.globalCompositeOperation;\n doClear = doClear === undefined ? true : doClear;\n\n if (doClear) this.clear();\n\n const state = this;\n\n // We iteratre twice over all shapes\n // First to draw the auras and a second time to draw the shapes themselves\n // Otherwise auras from one shape could be overlapping another shape itself.\n\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.drawAuras(ctx);\n });\n this.shapes.forEach(shape => {\n if (shape.options.has(\"skipDraw\") && shape.options.get(\"skipDraw\")) return;\n if (layerManager.getLayer() === undefined) return;\n if (!shape.visibleInCanvas(state.canvas)) return;\n if (state.name === \"fow\" && shape.visionObstruction && layerManager.getLayer()!.name !== state.name)\n return;\n shape.draw(ctx);\n });\n\n if (this.selection != null) {\n ctx.fillStyle = this.selectionColor;\n ctx.strokeStyle = this.selectionColor;\n ctx.lineWidth = this.selectionWidth;\n const z = gameStore.zoomFactor;\n this.selection.forEach(sel => {\n ctx.globalCompositeOperation = sel.globalCompositeOperation;\n const bb = sel.getBoundingBox();\n // TODO: REFACTOR THIS TO Shape.drawSelection(ctx);\n ctx.strokeRect(g2lx(bb.topLeft.x), g2ly(bb.topLeft.y), bb.w * z, bb.h * z);\n\n for (const p of sel.points) {\n ctx.beginPath();\n ctx.arc(g2lx(p[0]), g2ly(p[1]), 3, 0, 2 * Math.PI);\n ctx.fill();\n }\n ctx.beginPath();\n ctx.moveTo(g2lx(sel.points[0][0]), g2ly(sel.points[0][1]));\n for (let i = 1; i <= sel.points.length; i++) {\n const vertex = sel.points[i % sel.points.length];\n ctx.lineTo(g2lx(vertex[0]), g2ly(vertex[1]));\n }\n ctx.stroke();\n });\n }\n ctx.globalCompositeOperation = ogOP;\n this.valid = true;\n }\n }\n\n moveShapeOrder(shape: Shape, destinationIndex: number, sync: boolean): void {\n const oldIdx = this.shapes.indexOf(shape);\n if (oldIdx === destinationIndex) return;\n this.shapes.splice(oldIdx, 1);\n this.shapes.splice(destinationIndex, 0, shape);\n if (sync) socket.emit(\"Shape.Order.Set\", { shape: shape.asDict(), index: destinationIndex });\n this.invalidate(true);\n }\n}\n","import { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\nexport function scrollZoom(e: WheelEvent) {\n if (!e.target || !(e.target).tagName || (e.target).tagName !== \"CANVAS\") return;\n let delta: number;\n delta = Math.sign(e.deltaY) * -1;\n gameStore.updateZoom({ newZoomValue: gameStore.zoomFactor + 0.1 * delta, zoomLocation: l2g(getMouse(e)) });\n}\n","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=62c91cd3&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./asset_node.vue?vue&type=style&index=0&id=62c91cd3&scoped=true&lang=css&\"","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./menu.vue?vue&type=style&index=0&id=aaf3f05e&scoped=true&lang=css&\"","import { GlobalPoint, LocalPoint, Vector } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { calculateDelta } from \"@/game/ui/tools/utils\";\nimport { g2lx, g2ly, l2g, l2gx, l2gy } from \"@/game/units\";\n\nexport abstract class BaseRect extends Shape {\n w: number;\n h: number;\n constructor(topleft: GlobalPoint, w: number, h: number, fillColour?: string, strokeColour?: string, uuid?: string) {\n super(topleft, fillColour, strokeColour, uuid);\n this.w = w;\n this.h = h;\n }\n getBaseDict() {\n return Object.assign(super.getBaseDict(), {\n width: this.w,\n height: this.h,\n });\n }\n getBoundingBox() {\n return new BoundingRect(this.refPoint, this.w, this.h);\n }\n\n get points() {\n if (this.w === 0 || this.h === 0) return [[this.refPoint.x, this.refPoint.y]];\n // note to self: topright and botleft are swapped because I'm retarded.\n const topright = this.refPoint.add(new Vector(0, this.h));\n const botright = this.refPoint.add(new Vector(this.w, this.h));\n const botleft = this.refPoint.add(new Vector(this.w, 0));\n return [\n [this.refPoint.x, this.refPoint.y],\n [topright.x, topright.y],\n [botright.x, botright.y],\n [botleft.x, botleft.y],\n ];\n }\n\n contains(point: GlobalPoint): boolean {\n return (\n this.refPoint.x <= point.x &&\n this.refPoint.x + this.w >= point.x &&\n this.refPoint.y <= point.y &&\n this.refPoint.y + this.h >= point.y\n );\n }\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.refPoint.add(new Vector(this.w / 2, this.h / 2));\n this.refPoint = new GlobalPoint(centerPoint.x - this.w / 2, centerPoint.y - this.h / 2);\n }\n\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n if (super.visibleInCanvas(canvas)) return true;\n const coreVisible = !(\n g2lx(this.refPoint.x) > canvas.width ||\n g2ly(this.refPoint.y) > canvas.height ||\n g2lx(this.refPoint.x + this.w) < 0 ||\n g2ly(this.refPoint.y + this.h) < 0\n );\n if (coreVisible) return true;\n return false;\n }\n snapToGrid() {\n const gs = gameStore.gridSize;\n const center = this.center();\n const mx = center.x;\n const my = center.y;\n\n let targetX;\n let targetY;\n\n if ((this.w / gs) % 2 === 0) {\n targetX = Math.round(mx / gs) * gs - this.w / 2;\n } else {\n targetX = (Math.round((mx + gs / 2) / gs) - 1 / 2) * gs - this.w / 2;\n }\n if ((this.h / gs) % 2 === 0) {\n targetY = Math.round(my / gs) * gs - this.h / 2;\n } else {\n targetY = (Math.round((my + gs / 2) / gs) - 1 / 2) * gs - this.h / 2;\n }\n\n const delta = calculateDelta(new Vector(targetX - this.refPoint.x, targetY - this.refPoint.y), this);\n this.refPoint = this.refPoint.add(delta);\n\n this.invalidate(false);\n }\n resizeToGrid() {\n const gs = gameStore.gridSize;\n this.refPoint = new GlobalPoint(Math.round(this.refPoint.x / gs) * gs, Math.round(this.refPoint.y / gs) * gs);\n this.w = Math.max(Math.round(this.w / gs) * gs, gs);\n this.h = Math.max(Math.round(this.h / gs) * gs, gs);\n this.invalidate(false);\n }\n resize(resizePoint: number, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n switch (resizePoint) {\n case 0: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = l2g(point);\n break;\n }\n case 1: {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint = new GlobalPoint(l2gx(point.x), this.refPoint.y);\n break;\n }\n case 2: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n break;\n }\n case 3: {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint = new GlobalPoint(this.refPoint.x, l2gy(point.y));\n break;\n }\n }\n\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint = this.refPoint.add(new Vector(this.w, 0));\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint = this.refPoint.add(new Vector(0, this.h));\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=cad11dd2&\"\nimport script from \"./select.vue?vue&type=script&lang=ts&\"\nexport * from \"./select.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"select.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./main.vue?vue&type=template&id=61eb1455&scoped=true&\"\nimport script from \"./main.vue?vue&type=script&lang=ts&\"\nexport * from \"./main.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"61eb1455\",\n null\n \n)\n\ncomponent.options.__file = \"main.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=style&index=0&id=73816298&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"AssetManager\"}},[_c('div',{attrs:{\"id\":\"titlebar\"}},[_vm._v(\"Asset Manager\")]),_c('div',{attrs:{\"id\":\"main\"}},[_c('div',{attrs:{\"id\":\"assets\"},on:{\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.currentFolder)}}},[_c('div',{attrs:{\"id\":\"breadcrumbs\"}},[_c('div',[_vm._v(\"/\")]),_vm._l((_vm.path),function(dir){return _c('div',{key:dir},[_vm._v(_vm._s(_vm.idMap.get(dir).name))])})],2),_c('div',{attrs:{\"id\":\"actionbar\"}},[_c('input',{attrs:{\"id\":\"files\",\"type\":\"file\",\"multiple\":\"\",\"hidden\":\"\"},on:{\"change\":function($event){_vm.upload()}}}),_c('div',{attrs:{\"title\":\"Create folder\"},on:{\"click\":_vm.createDirectory}},[_c('i',{staticClass:\"fas fa-plus-square\"})]),_c('div',{attrs:{\"title\":\"Upload files\"},on:{\"click\":_vm.prepareUpload}},[_c('i',{staticClass:\"fas fa-upload\"})])]),_c('div',{attrs:{\"id\":\"explorer\"}},[(_vm.path.length)?_c('div',{staticClass:\"inode folder\",on:{\"dblclick\":function($event){_vm.changeDirectory(-1)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, _vm.parentFolder)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(\"..\")])]):_vm._e(),_vm._l((_vm.folders),function(key){return _c('div',{key:key,staticClass:\"inode folder\",class:{'inode-selected': _vm.selected.includes(key)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, key)},\"dblclick\":function($event){_vm.changeDirectory(key)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, key)},\"dragstart\":function($event){_vm.startDrag($event, key)},\"dragover\":function($event){$event.preventDefault();return _vm.moveDrag($event)},\"dragleave\":function($event){$event.preventDefault();return _vm.leaveDrag($event)},\"drop\":function($event){$event.preventDefault();$event.stopPropagation();_vm.stopDrag($event, key)}}},[_c('i',{staticClass:\"fas fa-folder\",staticStyle:{\"font-size\":\"50px\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(key).name))])])}),_vm._l((_vm.files),function(file){return _c('div',{key:file,staticClass:\"inode file\",class:{'inode-selected': _vm.selected.includes(file)},attrs:{\"draggable\":\"true\"},on:{\"click\":function($event){_vm.select($event, file)},\"contextmenu\":function($event){$event.preventDefault();_vm.$refs.cm.open($event, file)},\"dragstart\":function($event){_vm.startDrag($event, file)}}},[_c('img',{attrs:{\"src\":'/static/assets/' + _vm.idMap.get(file).file_hash,\"width\":\"50\"}}),_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.idMap.get(file).name))])])})],2)]),(_vm.firstSelectedFile)?_c('div',{attrs:{\"id\":\"asset-details\"}},[_c('div',{attrs:{\"id\":\"asset-detail-title\"}},[_vm._v(_vm._s(_vm.firstSelectedFile.name))]),_c('img',{attrs:{\"src\":'/static/assets/' + _vm.firstSelectedFile.file_hash}})]):_vm._e()]),_c('AssetContextMenu',{ref:\"cm\"}),_c('Prompt',{ref:\"prompt\"}),_c('ConfirmDialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./manager.vue?vue&type=template&id=5b0def98&\"","\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { gameStore } from \"@/game/store\";\nimport { l2gx, l2gy } from \"@/game/units\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class SelectContext extends Vue {\n visible = false;\n x = 0;\n y = 0;\n\n get IS_DM(): boolean {\n return gameStore.IS_DM;\n }\n\n open(event: MouseEvent) {\n this.visible = true;\n this.x = event.pageX;\n this.y = event.pageY;\n this.$nextTick(() => this.$children[0].$el.focus());\n }\n close() {\n this.visible = false;\n }\n bringPlayers() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Players.Bring\", { x: l2gx(this.x), y: l2gy(this.y) });\n this.close();\n }\n createToken() {\n (this.$parent.$parent.$refs.createtokendialog).open(this.x, this.y);\n this.close();\n }\n showInitiative() {\n EventBus.$emit(\"Initiative.Show\");\n this.close();\n }\n}\n","import Axios from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\nimport { coreStore } from \"@/core/store\";\n\nComponent.registerHooks([\"beforeRouteEnter\"]);\n\n@Component({})\nexport default class Logout extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/logout\").then(() => {\n coreStore.setAuthenticated(false);\n coreStore.setUsername(\"\");\n next({ path: \"/auth/login\" });\n });\n }\n}\n","import { getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { rootStore } from \"@/store\";\n\nexport interface CoreState {\n authenticated: boolean;\n initialized: boolean;\n username: string;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule implements CoreState {\n authenticated = false;\n initialized = false;\n username = \"\";\n\n @Mutation\n setAuthenticated(auth: boolean) {\n this.authenticated = auth;\n }\n\n @Mutation\n setInitialized(init: boolean) {\n this.initialized = init;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n}\n\nexport const coreStore = getModule(CoreStore);\n","import Vue from \"vue\";\n\nimport App from \"@/App.vue\";\nimport { router } from \"@/router\";\nimport { rootStore } from \"@/store\";\n\nVue.config.productionTip = false;\nVue.config.devtools = true;\nVue.config.performance = true;\n\nexport const app = new Vue({\n router,\n store: rootStore,\n render: h => h(App),\n}).$mount(\"#app\");\n\n(window).app = app;\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\n@Component({\n props: [\"visible\", \"left\", \"top\"],\n})\nexport default class ContextMenu extends Vue {}\n","import Axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport { Route } from \"vue-router\";\n\n@Component({ template: \"\" })\nexport default class Initiative extends Vue {\n beforeRouteEnter(to: Route, from: Route, next: ({}) => {}) {\n Axios.post(\"/api/invite\", {\n code: to.params.code,\n })\n .then((response: AxiosResponse) => {\n next({ path: response.data.sessionUrl });\n })\n .catch((error: AxiosError) => {\n console.error(\"Invitation code could not be redeemed\");\n next({ path: \"/dashboard\" });\n });\n }\n}\n","import { render, staticRenderFns } from \"./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"\nimport script from \"./prompt.vue?vue&type=script&lang=ts&\"\nexport * from \"./prompt.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./prompt.vue?vue&type=style&index=0&id=0602c2e6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0602c2e6\",\n null\n \n)\n\ncomponent.options.__file = \"prompt.vue\"\nexport default component.exports","import { GlobalPoint } from \"@/game/geom\";\nimport { gameStore } from \"@/game/store\";\n\nimport { Edge } from \"./cdt\";\nimport { drawPolygon } from \"./draw\";\nimport { PA_CDT } from \"./pa\";\nimport { Point, Sign, Triangle } from \"./tds\";\nimport { ccw, cw, orientation } from \"./triag\";\n\nexport function computeVisibility(q: GlobalPoint, target: \"vision\" | \"movement\", drawt?: boolean): number[][] {\n if (drawt === undefined) drawt = gameStore.drawTEContour;\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT[target].locate(Q, null).loc;\n if (triangle === null) {\n console.error(\"Triangle not found\");\n return [];\n }\n // triangle.fill();\n rawOutput.push(triangle.vertices[1]!.point!);\n if (!triangle.isConstrained(0))\n expandEdge(Q, triangle.vertices[2]!.point!, triangle.vertices[1]!.point!, triangle, 0, rawOutput);\n rawOutput.push(triangle.vertices[2]!.point!);\n if (!triangle.isConstrained(1))\n expandEdge(Q, triangle.vertices[0]!.point!, triangle.vertices[2]!.point!, triangle, 1, rawOutput);\n rawOutput.push(triangle.vertices[0]!.point!);\n if (!triangle.isConstrained(2))\n expandEdge(Q, triangle.vertices[1]!.point!, triangle.vertices[0]!.point!, triangle, 2, rawOutput);\n // console.timeEnd(\"CV\");\n\n if (drawt) drawPolygon(rawOutput, \"red\");\n\n return rawOutput;\n}\n\nfunction expandEdge(\n q: Point,\n left: number[],\n right: number[],\n fh: Triangle,\n index: number,\n rawOutput: number[][],\n): void {\n // fh.edge(index).draw();\n const nfh = fh.neighbours[index]!;\n // nfh.fill(\"rgba(255, 0, 0, 0.25)\");\n const nIndex = nfh.indexT(fh);\n const rIndex = ccw(nIndex);\n const lIndex = cw(nIndex);\n const nvh = nfh.vertices[nIndex]!;\n const rvh = nfh.vertices[lIndex]!;\n const lvh = nfh.vertices[rIndex]!;\n\n const re: Edge = [nfh, rIndex];\n const le: Edge = [nfh, lIndex];\n\n const ro = orientation(q, right, nvh.point!);\n const lo = orientation(q, left, nvh.point!);\n\n // const ctx = layerManager.getLayer(\"draw\")!.ctx;\n // ctx.beginPath();\n // ctx.strokeStyle = \"red\";\n // ctx.lineJoin = \"round\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(left[0]), g2ly(left[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.strokeStyle = \"blue\";\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(right[0]), g2ly(right[1]));\n // ctx.moveTo(g2lx(q.x), g2ly(q.y));\n // ctx.lineTo(g2lx(nvh[0]), g2ly(nvh[1]));\n // ctx.closePath();\n // ctx.stroke();\n\n // Right edge is seen if the new vertex is ccw of the right ray\n if (ro === Sign.COUNTERCLOCKWISE) {\n if (re[0].isConstrained(re[1])) {\n // See if current right ray is rvh\n if (right !== rvh.point!) rawOutput.push(raySegIntersection(q, right, nvh.point!, rvh.point!));\n if (lo === Sign.COUNTERCLOCKWISE) rawOutput.push(raySegIntersection(q, left, nvh.point!, rvh.point!));\n } else {\n if (lo === Sign.COUNTERCLOCKWISE) return expandEdge(q, left, right, nfh, rIndex, rawOutput);\n else expandEdge(q, nvh.point!, right, nfh, rIndex, rawOutput);\n }\n }\n\n if (ro !== Sign.CLOCKWISE && lo !== Sign.COUNTERCLOCKWISE) {\n rawOutput.push(nvh.point!);\n }\n\n if (lo === Sign.CLOCKWISE) {\n if (le[0].isConstrained(le[1])) {\n if (ro === Sign.CLOCKWISE) {\n rawOutput.push(raySegIntersection(q, right, nvh.point!, lvh.point!));\n }\n if (left !== lvh.point!) {\n rawOutput.push(raySegIntersection(q, left, nvh.point!, lvh.point!));\n }\n return;\n } else {\n if (ro === Sign.CLOCKWISE) {\n return expandEdge(q, left, right, nfh, lIndex, rawOutput);\n } else {\n return expandEdge(q, left, nvh.point!, nfh, lIndex, rawOutput);\n }\n }\n }\n}\n\nfunction raySegIntersection(q: Point, b: Point, s: Point, t: Point) {\n const denominator = (t[1] - s[1]) * (b[0] - q[0]) - (t[0] - s[0]) * (b[1] - q[1]);\n const ua = ((t[0] - s[0]) * (q[1] - s[1]) - (t[1] - s[1]) * (q[0] - s[0])) / denominator;\n // const ub = ((b[0] - q.x) * (q.y - s[1]) - (b[1] - q.y) * (q.x - s[0])) / denominator;\n const x = q[0] + ua * (b[0] - q[0]);\n const y = q[1] + ua * (b[1] - q[1]);\n\n return [x, y];\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',[_vm._v(\"#X\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.xCount),expression:\"xCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.xCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.xCount=$event.target.value}}}),_c('div',[_vm._v(\"#Y\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.yCount),expression:\"yCount\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.yCount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.yCount=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./map.vue?vue&type=template&id=2104f147&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=7c80ae3a&scoped=true&\"\nimport script from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./edit_dialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./edit_dialog.vue?vue&type=style&index=0&id=7c80ae3a&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7c80ae3a\",\n null\n \n)\n\ncomponent.options.__file = \"edit_dialog.vue\"\nexport default component.exports","export class Settings {\n static angleSteps = 4;\n static drawAngleLines = false;\n static drawFirstLightHit = false;\n static skipPlayerFOW = false;\n static skipLightFOW = false;\n\n static tempFill: string = \"fog\";\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport axios, { AxiosError, AxiosResponse } from \"axios\";\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { coreStore } from \"@/core/store\";\n\n@Component\nexport default class Login extends Vue {\n username = \"\";\n password = \"\";\n error = \"\";\n\n login() {\n axios\n .post(\"/api/login\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n register() {\n axios\n .post(\"/api/register\", {\n username: this.username,\n password: this.password,\n })\n .then((response: AxiosResponse) => {\n coreStore.setUsername(this.username);\n coreStore.setAuthenticated(true);\n this.$router.push(this.$route.query.redirect || \"/\");\n })\n .catch((error: AxiosError) => {\n if (error.response) this.error = error.response.statusText;\n else this.error = \"Unknown error occured\";\n });\n }\n\n focusin(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"0\";\n }\n }\n\n focusout(event: { target?: { nextElementSibling?: HTMLElement } }) {\n if (event.target && event.target.nextElementSibling) {\n const span = event.target.nextElementSibling;\n span.style.opacity = \"1\";\n }\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":function($event){_vm.visible = false}},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(\"Create basic token\")])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('label',{attrs:{\"for\":\"createtokendialog-text\"}},[_vm._v(\"Text\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.text),expression:\"text\"}],attrs:{\"type\":\"text\",\"id\":\"createtokendialog-name\"},domProps:{\"value\":(_vm.text)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.text=$event.target.value}}}),_c('label',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"colours\"},[_c('span',[_vm._v(\"Fill:\")]),_c('color-picker',{attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('span',[_vm._v(\"Border:\")]),_c('color-picker',{attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('canvas',{ref:\"canvas\",attrs:{\"width\":\"100px\",\"height\":\"100px\"}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./createtoken_modal.vue?vue&type=template&id=73816298&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(\"div\")}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tool.vue?vue&type=template&id=1e034b42&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{\"name\":\"modal\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.visible),expression:\"visible\"}],staticClass:\"mask\",class:{'modal-mask': _vm.mask, 'dialog-mask': !_vm.mask},on:{\"click\":_vm.close,\"dragover\":function($event){$event.preventDefault();return _vm.dragOver($event)}}},[_c('div',{ref:\"container\",staticClass:\"modal-container\",on:{\"click\":function($event){$event.stopPropagation();}}},[_vm._t(\"header\",null,{dragStart:_vm.dragStart,dragEnd:_vm.dragEnd}),_vm._t(\"default\")],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=script&lang=ts&\"","import Component from \"vue-class-component\";\n\nimport Tool from \"@/game/ui/tools/tool.vue\";\n\nimport { socket } from \"@/game/api/socket\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Line } from \"@/game/shapes/line\";\nimport { Text } from \"@/game/shapes/text\";\nimport { gameStore } from \"@/game/store\";\nimport { l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\n\n@Component\nexport class RulerTool extends Tool {\n name = \"Ruler\";\n active = false;\n startPoint: GlobalPoint | null = null;\n ruler: Line | null = null;\n text: Text | null = null;\n onMouseDown(event: MouseEvent) {\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n this.active = true;\n this.startPoint = l2g(getMouse(event));\n this.ruler = new Line(this.startPoint, this.startPoint, 3, gameStore.rulerColour);\n this.text = new Text(this.startPoint.clone(), \"\", \"bold 20px serif\");\n this.ruler.addOwner(gameStore.username);\n this.text.addOwner(gameStore.username);\n layer.addShape(this.ruler, true, true);\n layer.addShape(this.text, true, true);\n }\n onMouseMove(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No draw layer!\");\n return;\n }\n const endPoint = l2g(getMouse(event));\n\n this.ruler.endPoint = endPoint;\n socket.emit(\"Shape.Update\", { shape: this.ruler!.asDict(), redraw: true, temporary: true });\n\n const diffsign = Math.sign(endPoint.x - this.startPoint.x) * Math.sign(endPoint.y - this.startPoint.y);\n const xdiff = Math.abs(endPoint.x - this.startPoint.x);\n const ydiff = Math.abs(endPoint.y - this.startPoint.y);\n const label =\n Math.round((Math.sqrt(xdiff ** 2 + ydiff ** 2) * gameStore.unitSize) / gameStore.gridSize) + \" ft\";\n const angle = Math.atan2(diffsign * ydiff, xdiff);\n const xmid = Math.min(this.startPoint.x, endPoint.x) + xdiff / 2;\n const ymid = Math.min(this.startPoint.y, endPoint.y) + ydiff / 2;\n this.text.refPoint = new GlobalPoint(xmid, ymid);\n this.text.text = label;\n this.text.angle = angle;\n socket.emit(\"Shape.Update\", { shape: this.text.asDict(), redraw: true, temporary: true });\n layer.invalidate(true);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.ruler === null || this.startPoint === null || this.text === null) return;\n\n const layer = layerManager.getLayer(\"draw\");\n if (layer === undefined) {\n console.log(\"No active layer!\");\n return;\n }\n this.active = false;\n\n layer.removeShape(this.ruler, true, true);\n layer.removeShape(this.text, true, true);\n layer.invalidate(true);\n this.ruler = this.startPoint = this.text = null;\n }\n}\n","import { render, staticRenderFns } from \"./modal.vue?vue&type=template&id=12ed61ba&scoped=true&\"\nimport script from \"./modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./modal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./modal.vue?vue&type=style&index=0&id=12ed61ba&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"12ed61ba\",\n null\n \n)\n\ncomponent.options.__file = \"modal.vue\"\nexport default component.exports","import { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nimport { CDT } from \"./cdt\";\n\nexport let PA_CDT = {\n vision: new CDT(),\n movement: new CDT(),\n};\n\nexport function triangulate(target: \"vision\" | \"movement\", partial: boolean = false) {\n const cdt = new CDT();\n\n let shapes;\n if (target === \"vision\") shapes = gameStore.visionBlockers;\n else shapes = gameStore.movementblockers;\n\n for (const sh of shapes) {\n const shape = layerManager.UUIDMap.get(sh)!;\n if (partial && !shape.visibleInCanvas(layerManager.getLayer()!.canvas)) continue;\n for (let i = 0; i < shape.points.length; i++) {\n cdt.insertConstraint(shape.points[i], shape.points[(i + 1) % shape.points.length]);\n }\n }\n // LEFT WALL\n cdt.insertConstraint([-1e10, -1e10], [-1e10, 1e10]);\n cdt.insertConstraint([-1e10, 1e10], [-1e11, 1e10]);\n cdt.insertConstraint([-1e11, 1e10], [-1e11, -1e10]);\n cdt.insertConstraint([-1e11, -1e10], [-1e10, -1e10]);\n // TOP WALL\n cdt.insertConstraint([-1e10, -1e10], [1e10, -1e10]);\n cdt.insertConstraint([1e10, -1e10], [1e10, -1e11]);\n cdt.insertConstraint([1e10, -1e11], [-1e10, -1e11]);\n cdt.insertConstraint([-1e10, -1e11], [-1e10, -1e10]);\n // RIGHT WALL\n cdt.insertConstraint([1e10, -1e10], [1e10, 1e10]);\n cdt.insertConstraint([1e10, 1e10], [1e11, 1e10]);\n cdt.insertConstraint([1e11, 1e10], [1e11, -1e10]);\n cdt.insertConstraint([1e11, -1e10], [1e10, -1e10]);\n // BOT WALL\n cdt.insertConstraint([-1e10, 1e10], [1e10, 1e10]);\n cdt.insertConstraint([1e10, 1e10], [1e10, 1e11]);\n cdt.insertConstraint([1e10, 1e11], [-1e10, 1e11]);\n cdt.insertConstraint([-1e10, 1e11], [-1e10, 1e10]);\n PA_CDT[target] = cdt;\n (window).CDT = PA_CDT;\n}\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./main.vue?vue&type=style&index=0&id=61eb1455&scoped=true&lang=css&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport { Prop } from \"vue-property-decorator\";\n\nimport ColorPicker from \"@/core/components/colorpicker.vue\";\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n \"color-picker\": ColorPicker,\n },\n})\nexport default class EditDialog extends Vue {\n @Prop() shape!: Shape;\n\n visible = false;\n\n mounted() {\n EventBus.$on(\"EditDialog.Open\", (shape: Shape) => {\n this.shape = shape;\n this.visible = true;\n });\n }\n\n beforeDestroy() {\n EventBus.$off();\n }\n\n updated() {\n this.addEmpty();\n }\n\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.addOwner(\"\");\n if (\n !this.shape.trackers.length ||\n this.shape.trackers[this.shape.trackers.length - 1].name !== \"\" ||\n this.shape.trackers[this.shape.trackers.length - 1].value !== 0\n )\n this.shape.trackers.push({ uuid: uuidv4(), name: \"\", value: 0, maxvalue: 0, visible: false });\n if (\n !this.shape.auras.length ||\n this.shape.auras[this.shape.auras.length - 1].name !== \"\" ||\n this.shape.auras[this.shape.auras.length - 1].value !== 0\n )\n this.shape.auras.push({\n uuid: uuidv4(),\n name: \"\",\n value: 0,\n dim: 0,\n visionSource: false,\n colour: \"rgba(0,0,0,0)\",\n visible: false,\n });\n }\n updateShape(redraw: boolean, temporary = false) {\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary });\n if (redraw) layerManager.invalidate();\n this.addEmpty();\n }\n setToken(event: { target: HTMLInputElement }) {\n this.shape.setIsToken(event.target.checked);\n this.updateShape(true);\n }\n setVisionBlocker(event: { target: HTMLInputElement }) {\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n setMovementBlocker(event: { target: HTMLInputElement }) {\n this.shape.setMovementBlock(event.target.checked);\n this.updateShape(false);\n }\n updateAnnotation(event: { target: HTMLInputElement }) {\n const hadAnnotation = this.shape.annotation !== \"\";\n this.shape.annotation = event.target.value;\n if (this.shape.annotation !== \"\" && !hadAnnotation) {\n gameStore.annotations.push(this.shape.uuid);\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n } else if (this.shape.annotation === \"\" && hadAnnotation) {\n gameStore.annotations.splice(gameStore.annotations.findIndex(an => an === this.shape.uuid));\n if (layerManager.hasLayer(\"draw\")) layerManager.getLayer(\"draw\")!.invalidate(true);\n }\n this.updateShape(false);\n }\n updateOwner(event: { target: HTMLInputElement }, oldValue: string) {\n this.shape.updateOwner(oldValue, event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n this.shape.removeOwner(value);\n this.updateShape(gameStore.fowLOS);\n }\n removeTracker(uuid: string) {\n this.shape.trackers = this.shape.trackers.filter(tr => tr.uuid !== uuid);\n this.updateShape(false);\n }\n removeAura(uuid: string) {\n this.shape.auras = this.shape.auras.filter(au => au.uuid !== uuid);\n this.shape.checkVisionSources();\n this.updateShape(true);\n }\n updateAuraVisionSource(aura: Aura) {\n aura.visionSource = !aura.visionSource;\n const i = gameStore.visionSources.findIndex(ls => ls.aura === aura.uuid);\n if (aura.visionSource && i === -1) gameStore.visionSources.push({ shape: this.shape.uuid, aura: aura.uuid });\n else if (!aura.visionSource && i >= 0) gameStore.visionSources.splice(i, 1);\n // aura.lastPath = undefined;\n layerManager.invalidateLight();\n this.updateShape(true);\n }\n updateAuraColour(aura: Aura, colour: string) {\n const layer = layerManager.getLayer(this.shape.layer);\n if (layer === undefined) return;\n layer.invalidate(!aura.visionSource);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"main\"},on:{\"mouseleave\":_vm.mouseleave}},[_c('menu-bar'),_c('div',{attrs:{\"id\":\"board\"}},[(_vm.ready.manager)?[_c('tool-bar',{ref:\"tools\"})]:_vm._e(),_c('div',{attrs:{\"id\":\"layers\"},on:{\"mousedown\":_vm.mousedown,\"mouseup\":_vm.mouseup,\"mousemove\":_vm.mousemove,\"contextmenu\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.contextmenu($event)},\"dragover\":function($event){$event.preventDefault();},\"drop\":_vm.drop}}),(_vm.layers.length > 1)?_c('div',{attrs:{\"id\":\"layerselect\"}},[_c('ul',_vm._l((_vm.layers),function(layer){return _c('li',{key:layer.name,class:{ 'layer-selected': layer === _vm.selectedLayer },on:{\"click\":function($event){_vm.selectLayer(layer)}}},[_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(_vm._s(layer))])])}))]):_vm._e()],2),_c('selection-info',{ref:\"selectionInfo\"}),_c('initiative-dialog',{ref:\"initiative\",attrs:{\"id\":\"initiativedialog\"}}),_c('note-dialog',{ref:\"note\"}),_c('zoom-slider',{attrs:{\"id\":\"zoomer\",\"height\":6,\"width\":200,\"min\":0.01,\"max\":5.0,\"interval\":0.1,\"dot-width\":8,\"dot-height\":20,\"tooltip-dir\":'bottom',\"tooltip\":'hover',\"formatter\":_vm.zoomFactor.toFixed(1),\"slider-style\":{'border-radius': '15%'},\"bg-style\":{'background-color': '#fff', 'box-shadow': '0.5px 0.5px 3px 1px rgba(0, 0, 0, .36)'},\"process-style\":{'background-color': '#fff'}},model:{value:(_vm.zoomFactor),callback:function ($$v) {_vm.zoomFactor=$$v},expression:\"zoomFactor\"}}),_c('prompt-dialog',{ref:\"prompt\"}),_c('confirm-dialog',{ref:\"confirm\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./game.vue?vue&type=template&id=6d744362&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\n@Component({\n components: {\n Modal,\n },\n})\nexport default class ConfirmDialog extends Vue {\n $refs!: {\n confirm: HTMLButtonElement;\n };\n\n visible = false;\n yes = \"Yes\";\n no = \"No\";\n title = \"\";\n\n resolve = (ok: boolean) => {};\n reject = () => {};\n\n confirm() {\n this.resolve(true);\n this.close();\n }\n deny() {\n this.resolve(false);\n this.close();\n }\n close() {\n this.reject();\n this.visible = false;\n this.title = \"\";\n }\n open(title: string, yes = \"yes\", no = \"no\"): Promise {\n this.yes = yes;\n this.no = no;\n this.title = title;\n\n this.visible = true;\n this.$nextTick(() => {\n this.$refs.confirm.focus();\n });\n\n return new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","import { render, staticRenderFns } from \"./map.vue?vue&type=template&id=2104f147&\"\nimport script from \"./map.vue?vue&type=script&lang=ts&\"\nexport * from \"./map.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"map.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_c('button',{ref:\"confirm\",on:{\"click\":_vm.confirm}},[_vm._v(_vm._s(_vm.yes))]),(!!_vm.no)?_c('button',{on:{\"click\":_vm.deny}},[_vm._v(_vm._s(_vm.no))]):_vm._e()])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=template&id=1883e207&scoped=true&\"","\n\n\n\n\n\n\n\nimport Vue from \"vue\";\n\nimport Component from \"vue-class-component\";\n\nimport ContextMenu from \"@/core/components/contextmenu.vue\";\nimport ConfirmDialog from \"@/core/components/modals/confirm.vue\";\nimport Prompt from \"@/core/components/modals/prompt.vue\";\n\nimport { socket } from \"@/assetManager/socket\";\nimport { assetStore } from \"@/assetManager/store\";\nimport { getComponent, getRef } from \"@/core/utils\";\n\n@Component({\n components: {\n ContextMenu,\n },\n})\nexport default class AssetContextMenu extends Vue {\n visible = false;\n left = 0;\n top = 0;\n open(event: MouseEvent, inode: number) {\n if (!assetStore.selected.includes(inode)) getComponent().select(event, inode);\n\n this.visible = true;\n this.left = event.pageX;\n this.top = event.pageY;\n this.$nextTick(() => {\n this.$children[0].$el.focus();\n });\n }\n close() {\n this.visible = false;\n }\n rename() {\n if (assetStore.selected.length !== 1) return;\n const asset = assetStore.idMap.get(assetStore.selected[0])!;\n\n getRef(\"prompt\")\n .prompt(\"New name:\", `Renaming ${asset.name}`)\n .then(\n (name: string) => {\n socket.emit(\"Asset.Rename\", {\n asset: asset.id,\n name,\n });\n asset.name = name;\n getComponent().$forceUpdate();\n },\n () => {},\n );\n this.close();\n }\n remove() {\n if (assetStore.selected.length === 0) return;\n getRef(\"confirm\")\n .open(\"Are you sure you wish to remove this?\")\n .then(\n (result: boolean) => {\n if (result) {\n for (const sel of assetStore.selected) {\n socket.emit(\"Asset.Remove\", sel);\n if (assetStore.files.includes(sel))\n assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.clearSelected();\n }\n },\n () => {},\n );\n this.close();\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./select.vue?vue&type=script&lang=ts&\"","import { ServerPolygon } from \"../comm/types/shapes\";\nimport { GlobalPoint, LocalPoint } from \"../geom\";\nimport { g2lx, g2ly, g2lz, l2g } from \"../units\";\nimport { getFogColour } from \"../utils\";\nimport { BoundingRect } from \"./boundingrect\";\nimport { Shape } from \"./shape\";\n\nexport class Polygon extends Shape {\n type = \"polygon\";\n _vertices: GlobalPoint[] = [];\n\n constructor(\n startPoint: GlobalPoint,\n vertices: GlobalPoint[] = [],\n fillColour?: string,\n strokeColour?: string,\n uuid?: string,\n ) {\n super(startPoint, fillColour, strokeColour, uuid);\n this._vertices = vertices;\n }\n\n get refPoint() {\n return this._refPoint;\n }\n set refPoint(point: GlobalPoint) {\n const delta = point.subtract(this._refPoint);\n this._refPoint = point;\n for (let i = 0; i < this._vertices.length; i++) this._vertices[i] = this._vertices[i].add(delta);\n }\n\n get vertices() {\n return [this._refPoint, ...this._vertices];\n }\n\n asDict() {\n return Object.assign(this.getBaseDict(), {\n vertices: this._vertices.map(p => ({ x: p.x, y: p.y })),\n });\n }\n\n fromDict(data: ServerPolygon) {\n super.fromDict(data);\n this._vertices = data.vertices.map(v => new GlobalPoint(v.x, v.y));\n }\n\n get points() {\n return this.vertices.map(point => [point.x, point.y]);\n }\n\n draw(ctx: CanvasRenderingContext2D) {\n super.draw(ctx);\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n\n if (this.strokeColour === \"fog\") ctx.strokeStyle = getFogColour();\n else if (this.vertices.length === 2) ctx.strokeStyle = this.fillColour;\n else ctx.strokeStyle = this.strokeColour;\n if (this.fillColour === \"fog\") ctx.fillStyle = getFogColour();\n else ctx.fillStyle = this.fillColour;\n ctx.lineWidth = g2lz(2);\n\n ctx.beginPath();\n ctx.moveTo(g2lx(this.vertices[0].x), g2ly(this.vertices[0].y));\n for (let i = 1; i <= this.vertices.length; i++) {\n const vertex = this.vertices[i % this.vertices.length];\n ctx.lineTo(g2lx(vertex.x), g2ly(vertex.y));\n }\n ctx.fill();\n ctx.stroke();\n }\n\n contains(point: GlobalPoint): boolean {\n return this.getBoundingBox().contains(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n return this.getBoundingBox().center();\n }\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return this.getBoundingBox().visibleInCanvas(canvas);\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizePoint: number, point: LocalPoint): void {\n if (resizePoint === 0) this._refPoint = l2g(point);\n else this._vertices[resizePoint - 1] = l2g(point);\n }\n getBoundingBox(): BoundingRect {\n let minx: number = this.refPoint.x;\n let maxx: number = this.refPoint.x;\n let miny: number = this.refPoint.y;\n let maxy: number = this.refPoint.y;\n for (const p of this._vertices) {\n if (p.x < minx) minx = p.x;\n if (p.x > maxx) maxx = p.x;\n if (p.y < miny) miny = p.y;\n if (p.y > maxy) maxy = p.y;\n }\n return new BoundingRect(new GlobalPoint(minx, miny), maxx - minx, maxy - miny);\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.selected)?_c('div',{staticClass:\"tool-detail\",style:({'--detailRight': _vm.detailRight, '--detailArrow': _vm.detailArrow})},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}]},[_vm._v(\"Mode\")]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.IS_DM),expression:\"IS_DM\"}],staticClass:\"selectgroup\"},_vm._l((_vm.modes),function(mode){return _c('div',{key:mode,staticClass:\"option\",class:{'option-selected': _vm.modeSelect === mode},on:{\"click\":function($event){_vm.modeSelect = mode}}},[_vm._v(_vm._s(mode))])})),_c('div',[_vm._v(\"Shape\")]),_c('div',{staticClass:\"selectgroup\"},_vm._l((_vm.shapes),function(shape){return _c('div',{key:shape,staticClass:\"option\",class:{'option-selected': _vm.shapeSelect === shape},on:{\"click\":function($event){_vm.shapeSelect = shape}}},[_c('i',{staticClass:\"fas\",class:'fa-' + shape})])})),_c('div',[_vm._v(\"Colours\")]),_c('div',{staticClass:\"selectgroup\"},[_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.fillColour},on:{\"update:color\":function($event){_vm.fillColour=$event}}}),_c('color-picker',{staticClass:\"option\",attrs:{\"color\":_vm.borderColour},on:{\"update:color\":function($event){_vm.borderColour=$event}}})],1),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}]},[_vm._v(\"Brush size\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.brushSize),expression:\"brushSize\"},{name:\"show\",rawName:\"v-show\",value:(_vm.shapeSelect === 'paint-brush'),expression:\"shapeSelect === 'paint-brush'\"}],staticStyle:{\"max-width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.brushSize)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.brushSize=$event.target.value}}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./draw.vue?vue&type=template&id=639cd890&scoped=true&\"","import { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=5b0def98&\"\nimport script from \"./manager.vue?vue&type=script&lang=ts&\"\nexport * from \"./manager.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./manager.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"manager.vue\"\nexport default component.exports","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./tools.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./tool.vue?vue&type=template&id=1e034b42&\"\nimport script from \"./tool.vue?vue&type=script&lang=ts&\"\nexport * from \"./tool.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./tool.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\ncomponent.options.__file = \"tool.vue\"\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Modal',{attrs:{\"visible\":_vm.visible},on:{\"close\":_vm.close},scopedSlots:_vm._u([{key:\"header\",fn:function(m){return _c('div',{staticClass:\"modal-header\",attrs:{\"draggable\":\"true\"},on:{\"dragstart\":m.dragStart,\"dragend\":m.dragEnd}},[_vm._v(_vm._s(_vm.title))])}}])},[_c('div',{staticClass:\"modal-body\"},[_vm._v(\"\\n \"+_vm._s(_vm.question)+\"\\n \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.answer),expression:\"answer\"}],ref:\"answer\",attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.answer)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.submit($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.answer=$event.target.value}}})]),_c('div',{staticClass:\"modal-footer\"},[_c('button',{on:{\"click\":_vm.submit}},[_vm._v(\"Submit\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./prompt.vue?vue&type=template&id=0602c2e6&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\nimport draggable from \"vuedraggable\";\nVue.component(\"draggable\", draggable);\n\nimport Modal from \"@/core/components/modals/modal.vue\";\n\nimport { uuidv4 } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { InitiativeData, InitiativeEffect } from \"@/game/comm/types/general\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\n@Component({\n components: {\n Modal,\n draggable,\n },\n})\nexport default class Initiative extends Vue {\n visible = false;\n data: InitiativeData[] = [];\n currentActor: string | null = null;\n roundCounter = 0;\n\n mounted() {\n EventBus.$on(\"Initiative.Clear\", this.clear);\n EventBus.$on(\"Initiative.Remove\", (data: string) => this.removeInitiative(data));\n EventBus.$on(\"Initiative.Show\", () => (this.visible = true));\n\n socket.on(\"Initiative.Set\", (data: InitiativeData[]) => {\n this.data = data;\n });\n socket.on(\"Initiative.Turn.Update\", (data: string) => this.setTurn(data, false));\n socket.on(\"Initiative.Round.Update\", (data: number) => this.setRound(data, false));\n socket.on(\"Initiative.Effect.New\", (data: { actor: string; effect: InitiativeEffect }) => {\n const actor = this.getActor(data.actor);\n if (actor === undefined) return;\n this.createEffect(actor, data.effect, false);\n });\n socket.on(\"Initiative.Effect.Update\", (data: { actor: string; effect: InitiativeEffect }) =>\n this.updateEffect(data.actor, data.effect, false),\n );\n }\n\n beforeDestroy() {\n EventBus.$off();\n }\n\n // Utilities\n clear() {\n this.data = [];\n this.currentActor = null;\n }\n getActor(actorId: string) {\n return this.data.find(a => a.uuid === actorId);\n }\n contains(uuid: string) {\n return this.data.some(d => d.uuid === uuid);\n }\n owns(actor: InitiativeData): boolean {\n if (gameStore.IS_DM) return true;\n const shape = layerManager.UUIDMap.get(actor.uuid);\n // Shapes that are unknown to this client are hidden from this client but owned by other clients\n if (shape === undefined) return false;\n return shape.owners.includes(gameStore.username);\n }\n getDefaultEffect() {\n return { uuid: uuidv4(), name: \"New Effect\", turns: 10 };\n }\n fakeSetData(dataTransfer: DataTransfer) {\n dataTransfer.setData(\"Hack\", \"\");\n }\n syncInitiative(data: InitiativeData | { uuid: string }) {\n socket.emit(\"Initiative.Update\", data);\n }\n // Events\n addInitiative(data: InitiativeData) {\n const d = this.data.findIndex(a => a.uuid === data.uuid);\n if (d >= 0) return;\n if (data.initiative === undefined) data.initiative = 0;\n this.syncInitiative(data);\n }\n removeInitiative(uuid: string) {\n const d = this.data.findIndex(a => a.uuid === uuid);\n if (d < 0 || this.data[d].group) return;\n this.syncInitiative({ uuid });\n // Remove highlight\n const shape = layerManager.UUIDMap.get(uuid);\n if (shape === undefined) return;\n if (shape.showHighlight) {\n shape.showHighlight = false;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n }\n updateOrder() {\n if (!gameStore.IS_DM) return;\n socket.emit(\"Initiative.Set\", this.data.map(d => d.uuid));\n }\n setTurn(actorId: string | null, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.currentActor = actorId;\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n if (actor.effects) {\n for (let e = actor.effects.length - 1; e >= 0; e--) {\n if (actor.effects[e].turns <= 0) actor.effects.splice(e, 1);\n else actor.effects[e].turns--;\n }\n }\n if (sync) socket.emit(\"Initiative.Turn.Update\", actorId);\n }\n setRound(round: number, sync: boolean) {\n if (!gameStore.IS_DM && sync) return;\n this.roundCounter = round;\n if (sync) socket.emit(\"Initiative.Round.Update\", round);\n }\n nextTurn() {\n if (!gameStore.IS_DM) return;\n const order = this.data;\n const next = order[(order.findIndex(a => a.uuid === this.currentActor) + 1) % order.length];\n if (this.data[0].uuid === next.uuid) this.setRound(this.roundCounter + 1, true);\n this.setTurn(next.uuid, true);\n }\n toggleHighlight(actor: InitiativeData, show: boolean) {\n const shape = layerManager.UUIDMap.get(actor.uuid);\n if (shape === undefined) return;\n shape.showHighlight = show;\n layerManager.getLayer(shape.layer)!.invalidate(true);\n }\n toggleOption(actor: InitiativeData, option: \"visible\" | \"group\") {\n if (!this.owns(actor)) return;\n actor[option] = !actor[option];\n this.syncInitiative(actor);\n }\n createEffect(actor: InitiativeData, effect: InitiativeEffect, sync: boolean) {\n if (!this.owns(actor)) return;\n actor.effects.push(effect);\n if (sync) socket.emit(\"Initiative.Effect.New\", { actor: actor.uuid, effect });\n }\n syncEffect(actor: InitiativeData, effect: InitiativeEffect) {\n if (!this.owns(actor)) return;\n socket.emit(\"Initiative.Effect.Update\", { actor: actor.uuid, effect });\n }\n updateEffect(actorId: string, effect: InitiativeEffect, sync: boolean) {\n const actor = this.data.find(a => a.uuid === actorId);\n if (actor === undefined) return;\n const effectIndex = actor.effects.findIndex(e => e.uuid === effect.uuid);\n if (effectIndex === undefined) return;\n actor.effects[effectIndex] = effect;\n if (sync) this.syncEffect(actor, effect);\n else this.$forceUpdate();\n }\n}\n","import { render, staticRenderFns } from \"./selection_info.vue?vue&type=template&id=32cec914&scoped=true&\"\nimport script from \"./selection_info.vue?vue&type=script&lang=ts&\"\nexport * from \"./selection_info.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./selection_info.vue?vue&type=style&index=0&id=32cec914&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"32cec914\",\n null\n \n)\n\ncomponent.options.__file = \"selection_info.vue\"\nexport default component.exports","// import Vuex from \"vuex\";\nimport { Action, getModule, Module, Mutation, VuexModule } from \"vuex-module-decorators\";\n\nimport { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { sendClientOptions } from \"@/game/api/utils\";\nimport { Note } from \"@/game/comm/types/general\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { g2l, l2g } from \"@/game/units\";\nimport { BoundingVolume } from \"@/game/visibility/bvh/bvh\";\nimport { rootStore } from \"@/store\";\nimport { triangulate } from \"./visibility/te/pa\";\n\nexport interface GameState {\n boardInitialized: boolean;\n}\n\n@Module({ dynamic: true, store: rootStore, name: \"game\", namespaced: true })\nclass GameStore extends VuexModule implements GameState {\n // This is a limited view of selectable layers that is used to generate the layer selection UI and ability to switch layers\n // See the layerManager for proper layer management tools\n layers: string[] = [];\n selectedLayerIndex = -1;\n boardInitialized = false;\n\n locations: string[] = [];\n\n assets: AssetList = {};\n\n notes: Note[] = [];\n\n IS_DM = false;\n gridSize = 50;\n username = \"\";\n roomName = \"\";\n roomCreator = \"\";\n invitationCode = \"\";\n\n gridColour = \"rgba(0, 0, 0, 1)\";\n fowColour = \"rgba(0, 0, 0, 1)\";\n rulerColour = \"rgba(255, 0, 0, 1)\";\n panX = 0;\n panY = 0;\n zoomFactor = 1;\n\n unitSize = 5;\n useGrid = true;\n fullFOW = false;\n fowOpacity = 0.3;\n fowLOS = false;\n locationName = \"\";\n\n visionSources: { shape: string; aura: string }[] = [];\n visionBlockers: string[] = [];\n annotations: string[] = [];\n movementblockers: string[] = [];\n ownedtokens: string[] = [];\n\n BV = Object.freeze(new BoundingVolume([]));\n\n visionMode: \"bvh\" | \"triangle\" = \"bvh\";\n drawTEContour = false;\n visionRangeMin = 1640;\n visionRangeMax = 3281;\n\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n @Mutation\n setVisionMode(data: { mode: \"bvh\" | \"triangle\"; sync: boolean }) {\n this.visionMode = data.mode;\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_mode: data.mode });\n }\n\n @Mutation\n setBoardInitialized(boardInitialized: boolean) {\n this.boardInitialized = boardInitialized;\n }\n\n @Mutation\n setDM(isDM: boolean) {\n this.IS_DM = isDM;\n }\n\n @Mutation\n setUsername(username: string) {\n this.username = username;\n }\n\n @Mutation\n setRoomName(name: string) {\n this.roomName = name;\n }\n\n @Mutation\n setRoomCreator(name: string) {\n this.roomCreator = name;\n }\n\n @Mutation\n setInvitationCode(code: string) {\n this.invitationCode = code;\n }\n\n @Mutation\n addLayer(name: string) {\n this.layers.push(name);\n if (this.selectedLayerIndex === -1) this.selectedLayerIndex = this.layers.indexOf(name);\n }\n\n @Mutation\n selectLayer(data: { name: string; sync: boolean }) {\n const index = this.layers.indexOf(data.name);\n if (index >= 0) this.selectedLayerIndex = index;\n if (data.sync) socket.emit(\"Client.ActiveLayer.Set\", data.name);\n }\n\n @Mutation\n newNote(data: { note: Note; sync: boolean }) {\n this.notes.push(data.note);\n if (data.sync) socket.emit(\"Note.New\", data.note);\n }\n\n @Mutation\n setAssets(assets: AssetList) {\n this.assets = assets;\n }\n\n @Mutation\n setLocations(locations: string[]) {\n this.locations = locations;\n }\n\n @Mutation\n resetLayerInfo() {\n this.layers = [];\n this.selectedLayerIndex = -1;\n }\n\n @Mutation\n recalculateVision(partial = false) {\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(\"vision\", partial);\n else this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n }\n }\n\n @Mutation\n recalculateMovement(partial = false) {\n if (this.boardInitialized && this.visionMode === \"triangle\") triangulate(\"movement\", partial);\n }\n\n @Mutation\n updateZoom(data: { newZoomValue: number; zoomLocation: GlobalPoint }) {\n if (data.newZoomValue === this.zoomFactor) return;\n if (data.newZoomValue < 0.1) data.newZoomValue = 0.01;\n if (data.newZoomValue > 5) data.newZoomValue = 5;\n\n const oldLoc = g2l(data.zoomLocation);\n\n this.zoomFactor = data.newZoomValue;\n\n const newLoc = l2g(oldLoc);\n\n // Change the pan settings to keep the zoomLocation in the same exact location before and after the zoom.\n const diff = newLoc.subtract(data.zoomLocation);\n this.panX += diff.x;\n this.panY += diff.y;\n\n layerManager.invalidate();\n sendClientOptions();\n }\n\n @Mutation\n setGridColour(data: { colour: string; sync: boolean }) {\n this.gridColour = data.colour;\n layerManager.getGridLayer()!.drawGrid();\n if (data.sync) socket.emit(\"Client.Options.Set\", { gridColour: data.colour });\n }\n\n @Mutation\n setFOWColour(data: { colour: string; sync: boolean }) {\n this.fowColour = data.colour;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Client.Options.Set\", { fowColour: data.colour });\n }\n\n @Mutation\n setRulerColour(data: { colour: string; sync: boolean }) {\n this.rulerColour = data.colour;\n if (data.sync) socket.emit(\"Client.Options.Set\", { rulerColour: data.colour });\n }\n\n @Mutation\n setPanX(x: number) {\n this.panX = x;\n }\n\n @Mutation\n setPanY(y: number) {\n this.panY = y;\n }\n\n @Mutation\n setZoomFactor(zoomFactor: number) {\n this.zoomFactor = zoomFactor;\n }\n\n @Mutation\n increasePanX(increase: number) {\n this.panX += increase;\n }\n\n @Mutation\n increasePanY(increase: number) {\n this.panY += increase;\n }\n\n @Mutation\n setUnitSize(data: { unitSize: number; sync: boolean }) {\n if (this.unitSize !== data.unitSize && data.unitSize > 0 && data.unitSize < Infinity) {\n this.unitSize = data.unitSize;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { unit_size: data.unitSize });\n }\n }\n\n @Mutation\n setUseGrid(data: { useGrid: boolean; sync: boolean }) {\n if (this.useGrid !== data.useGrid) {\n this.useGrid = data.useGrid;\n const gridLayer = layerManager.getGridLayer()!;\n if (data.useGrid) gridLayer.canvas.style.display = \"block\";\n else gridLayer.canvas.style.display = \"none\";\n if (data.sync) socket.emit(\"Location.Options.Set\", { use_grid: data.useGrid });\n }\n }\n\n @Mutation\n setGridSize(data: { gridSize: number; sync: boolean }): void {\n if (this.gridSize !== data.gridSize && data.gridSize > 0) {\n this.gridSize = data.gridSize;\n const gridLayer = layerManager.getGridLayer();\n if (gridLayer !== undefined) gridLayer.drawGrid();\n if (data.sync) socket.emit(\"Gridsize.Set\", data.gridSize);\n }\n }\n\n @Mutation\n setVisionRangeMin(data: { value: number; sync: boolean }): void {\n this.visionRangeMin = data.value;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_min_range: data.value });\n }\n\n @Mutation\n setVisionRangeMax(data: { value: number; sync: boolean }): void {\n this.visionRangeMax = Math.max(data.value, this.visionRangeMin);\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { vision_max_range: this.visionRangeMax });\n }\n\n @Mutation\n setFullFOW(data: { fullFOW: boolean; sync: boolean }) {\n if (this.fullFOW !== data.fullFOW) {\n this.fullFOW = data.fullFOW;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { full_fow: data.fullFOW });\n }\n }\n\n @Mutation\n setFOWOpacity(data: { fowOpacity: number; sync: boolean }) {\n this.fowOpacity = data.fowOpacity;\n layerManager.invalidateLight();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_opacity: data.fowOpacity });\n }\n\n @Mutation\n setLineOfSight(data: { fowLOS: boolean; sync: boolean }) {\n if (this.fowLOS !== data.fowLOS) {\n this.fowLOS = data.fowLOS;\n layerManager.invalidate();\n if (data.sync) socket.emit(\"Location.Options.Set\", { fow_los: data.fowLOS });\n }\n }\n\n @Mutation\n setLocationName(name: string) {\n this.locationName = name;\n }\n\n @Mutation\n updateNote(data: { note: Note; sync: boolean }) {\n const actualNote = this.notes.find(n => n.uuid === data.note.uuid);\n if (actualNote === undefined) return;\n actualNote.title = data.note.title;\n actualNote.text = data.note.text;\n if (data.sync) socket.emit(\"Note.Update\", actualNote);\n }\n\n @Mutation\n removeNote(data: { note: Note; sync: boolean }) {\n this.notes = this.notes.filter(n => n.uuid !== data.note.uuid);\n if (data.sync) socket.emit(\"Note.Remove\", data.note.uuid);\n }\n\n @Action\n clear() {\n (this.context.state).visionSources = [];\n (this.context.state).visionBlockers = [];\n (this.context.state).ownedtokens = [];\n (this.context.state).annotations = [];\n (this.context.state).movementblockers = [];\n (this.context.state).notes = [];\n this.context.commit(\"recalculateVision\");\n this.context.commit(\"recalculateMovement\");\n }\n}\n\nexport const gameStore = getModule(GameStore);\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./confirm.vue?vue&type=script&lang=ts&\"","import { ServerAura } from \"@/game/comm/types/shapes\";\n\nexport const aurasFromServer = (auras: ServerAura[]): Aura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n visionSource: aura.vision_source,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n\nexport const aurasToServer = (auras: Aura[]): ServerAura[] => {\n const result = [];\n for (const aura of auras) {\n result.push({\n uuid: aura.uuid,\n vision_source: aura.visionSource,\n visible: aura.visible,\n name: aura.name,\n value: aura.value,\n dim: aura.dim,\n colour: aura.colour,\n });\n }\n return result;\n};\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/ts-loader/index.js??ref--12-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contextMenu.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./note.vue?vue&type=template&id=7a3669fd&scoped=true&\"\nimport script from \"./note.vue?vue&type=script&lang=ts&\"\nexport * from \"./note.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./note.vue?vue&type=style&index=0&id=7a3669fd&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7a3669fd\",\n null\n \n)\n\ncomponent.options.__file = \"note.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./initiative.vue?vue&type=template&id=ccaf03d6&scoped=true&\"\nimport script from \"./initiative.vue?vue&type=script&lang=ts&\"\nexport * from \"./initiative.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./initiative.vue?vue&type=style&index=0&id=ccaf03d6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"ccaf03d6\",\n null\n \n)\n\ncomponent.options.__file = \"initiative.vue\"\nexport default component.exports","import { ServerLayer } from \"@/game/comm/types/general\";\nimport { FOWLayer } from \"@/game/layers/fow\";\nimport { FOWPlayersLayer } from \"@/game/layers/fowplayers\";\nimport { GridLayer } from \"@/game/layers/grid\";\nimport { Layer } from \"@/game/layers/layer\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { gameStore } from \"@/game/store\";\n\nexport function createLayer(layerInfo: ServerLayer) {\n // Create canvas element\n const canvas = document.createElement(\"canvas\");\n canvas.style.zIndex = layerManager.layers.length.toString();\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n\n // Create the Layer instance\n let layer: Layer;\n if (layerInfo.type_ === \"grid\") layer = new GridLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow\") layer = new FOWLayer(canvas, layerInfo.name);\n else if (layerInfo.type_ === \"fow-players\") layer = new FOWPlayersLayer(canvas, layerInfo.name);\n else layer = new Layer(canvas, layerInfo.name);\n layer.selectable = layerInfo.selectable;\n layer.playerEditable = layerInfo.player_editable;\n layerManager.addLayer(layer);\n\n // Add the element to the DOM\n const layers = document.getElementById(\"layers\");\n if (layers === null) {\n console.warn(\"Layers div is missing, this will prevent the main game board from loading!\");\n return;\n }\n if (layerInfo.name !== \"fow-players\") layers.appendChild(canvas);\n\n if (layerInfo.type_ === \"grid\" && layerInfo.size) gameStore.setGridSize({ gridSize: layerInfo.size, sync: false });\n // Load layer shapes\n layer.setShapes(layerInfo.shapes);\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.js??ref--12-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit_dialog.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{on:{\"focusin\":_vm.focusin,\"focusout\":_vm.focusout,\"submit\":function($event){$event.preventDefault();return _vm.login($event)}}},[_c('fieldset',[_c('legend',{staticClass:\"legend\"},[_vm._v(\"PlanarAlly\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.username),expression:\"username\"}],attrs:{\"type\":\"text\",\"name\":\"username\",\"placeholder\":\"Username\",\"autocomplete\":\"username\",\"required\":\"\"},domProps:{\"value\":(_vm.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.username=$event.target.value}}}),_vm._m(0)]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.password),expression:\"password\"}],attrs:{\"type\":\"password\",\"name\":\"password\",\"placeholder\":\"Password\",\"autocomplete\":\"current-password\",\"required\":\"\"},domProps:{\"value\":(_vm.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.password=$event.target.value}}}),_vm._m(1)]),_c('div',{staticStyle:{\"display\":\"flex\"}},[_c('button',{staticStyle:{\"visibility\":\"hidden\",\"display\":\"none\"},attrs:{\"type\":\"submit\",\"name\":\"login\"}}),_c('button',{staticClass:\"submit\",attrs:{\"type\":\"button\",\"name\":\"register\",\"title\":\"Register\"},on:{\"click\":_vm.register}},[_c('i',{staticClass:\"fas fa-plus\"})]),_vm._m(2)])]),(_vm.error)?_c('div',{staticClass:\"feedback\"},[_c('p',{staticClass:\"error\"},[_c('strong',[_vm._v(\"Error:\")]),_vm._v(\"\\n \"+_vm._s(_vm.error)+\"\\n \")])]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-user-circle\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',[_c('i',{staticClass:\"fas fa-lock\"})])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"submit\",attrs:{\"type\":\"submit\",\"name\":\"login\",\"title\":\"Login\"}},[_c('i',{staticClass:\"fas fa-arrow-right\"})])}]\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"74f43d04-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=template&id=bc30fc14&scoped=true&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Component from \"vue-class-component\";\n\nimport Prompt from \"@/core/components/modals/prompt.vue\";\nimport EditDialog from \"@/game/ui/selection/edit_dialog.vue\";\n\nimport { getRef } from \"@/core/utils\";\nimport { socket } from \"@/game/api/socket\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\n\n@Component({\n components: {\n \"edit-dialog\": EditDialog,\n },\n})\nexport default class SelectionInfo extends Vue {\n shape: Shape | null = null;\n\n mounted() {\n EventBus.$on(\"SelectionInfo.Shape.Set\", (shape: Shape | null) => {\n this.shape = shape;\n });\n }\n\n beforeDestroy() {\n EventBus.$off();\n }\n\n openEditDialog() {\n (this.$refs.editDialog).visible = true;\n }\n changeValue(object: Tracker | Aura, redraw: boolean) {\n if (this.shape === null) return;\n getRef(\"prompt\")\n .prompt(`New ${object.name} value:`, `Updating ${object.name}`)\n .then(\n (value: string) => {\n if (this.shape === null) return;\n const ogValue = object.value;\n if (value[0] === \"+\" || value[0] === \"-\") object.value += parseInt(value, 10);\n else object.value = parseInt(value, 10);\n if (isNaN(object.value)) object.value = ogValue;\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\n if (redraw) layerManager.invalidate();\n },\n () => {},\n );\n }\n}\n","import { AssetList } from \"@/core/comm/types\";\nimport { socket } from \"@/game/api/socket\";\nimport { BoardInfo, Note, ServerClient, ServerLocation } from \"@/game/comm/types/general\";\nimport { ServerShape } from \"@/game/comm/types/shapes\";\nimport { EventBus } from \"@/game/event-bus\";\nimport { GlobalPoint } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { createLayer } from \"@/game/layers/utils\";\nimport { gameManager } from \"@/game/manager\";\nimport { gameStore } from \"@/game/store\";\nimport { router } from \"@/router\";\n\nsocket.on(\"connect\", () => {\n console.log(\"Connected\");\n});\nsocket.on(\"disconnect\", () => {\n console.log(\"Disconnected\");\n});\nsocket.on(\"connect_error\", (error: any) => {\n console.error(\"Could not connect to game session.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"error\", (error: any) => {\n console.error(\"Game session does not exist.\");\n router.push(\"/dashboard\");\n});\nsocket.on(\"redirect\", (destination: string) => {\n console.log(\"redirecting\");\n router.push(destination);\n});\nsocket.on(\"Room.Info.Set\", (data: { name: string; creator: string; invitationCode: string }) => {\n gameStore.setRoomName(data.name);\n gameStore.setRoomCreator(data.creator);\n gameStore.setInvitationCode(data.invitationCode);\n});\nsocket.on(\"Username.Set\", (username: string) => {\n gameStore.setUsername(username);\n gameStore.setDM(username === window.location.pathname.split(\"/\")[2]);\n});\nsocket.on(\"Client.Options.Set\", (options: ServerClient) => {\n gameStore.setGridColour({ colour: options.grid_colour, sync: false });\n gameStore.setFOWColour({ colour: options.fow_colour, sync: false });\n gameStore.setRulerColour({ colour: options.ruler_colour, sync: false });\n gameStore.setPanX(options.pan_x);\n gameStore.setPanY(options.pan_y);\n gameStore.setZoomFactor(options.zoom_factor);\n if (options.active_layer) layerManager.selectLayer(options.active_layer, false);\n if (layerManager.getGridLayer() !== undefined) layerManager.getGridLayer()!.invalidate();\n});\nsocket.on(\"Location.Set\", (data: Partial) => {\n if (data.name !== undefined) gameStore.setLocationName(data.name);\n if (data.unit_size !== undefined) gameStore.setUnitSize({ unitSize: data.unit_size, sync: false });\n if (data.use_grid !== undefined) gameStore.setUseGrid({ useGrid: data.use_grid, sync: false });\n if (data.full_fow !== undefined) gameStore.setFullFOW({ fullFOW: data.full_fow, sync: false });\n if (data.fow_opacity !== undefined) gameStore.setFOWOpacity({ fowOpacity: data.fow_opacity, sync: false });\n if (data.fow_los !== undefined) gameStore.setLineOfSight({ fowLOS: data.fow_los, sync: false });\n if (data.vision_min_range !== undefined) gameStore.setVisionRangeMin({ value: data.vision_min_range, sync: false });\n if (data.vision_max_range !== undefined) gameStore.setVisionRangeMax({ value: data.vision_max_range, sync: false });\n if (data.vision_mode !== undefined) {\n gameStore.setVisionMode({ mode: data.vision_mode, sync: false });\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n }\n});\nsocket.on(\"Position.Set\", (data: { x: number; y: number }) => {\n gameManager.setCenterPosition(new GlobalPoint(data.x, data.y));\n});\nsocket.on(\"Notes.Set\", (notes: Note[]) => {\n for (const note of notes) gameStore.newNote({ note, sync: false });\n});\nsocket.on(\"Asset.List.Set\", (assets: AssetList) => {\n gameStore.setAssets(assets);\n});\nsocket.on(\"Board.Set\", (locationInfo: BoardInfo) => {\n gameStore.clear();\n gameStore.setLocations(locationInfo.locations);\n document.getElementById(\"layers\")!.innerHTML = \"\";\n gameStore.resetLayerInfo();\n layerManager.reset();\n for (const layer of locationInfo.layers) createLayer(layer);\n // Force the correct opacity render on other layers.\n layerManager.selectLayer(layerManager.getLayer()!.name, false);\n EventBus.$emit(\"Initiative.Clear\");\n gameStore.recalculateVision();\n gameStore.recalculateMovement();\n gameStore.setBoardInitialized(true);\n});\nsocket.on(\"Gridsize.Set\", (gridSize: number) => {\n gameStore.setGridSize({ gridSize, sync: false });\n});\nsocket.on(\"Shape.Add\", (shape: ServerShape) => {\n gameManager.addShape(shape);\n});\nsocket.on(\"Shape.Remove\", (shape: ServerShape) => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(`Attempted to remove an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const layer = layerManager.getLayer(shape.layer)!;\n layer.removeShape(layerManager.UUIDMap.get(shape.uuid)!, false);\n layer.invalidate(false);\n});\nsocket.on(\"Shape.Order.Set\", (data: { shape: ServerShape; index: number }) => {\n if (!layerManager.UUIDMap.has(data.shape.uuid)) {\n console.log(`Attempted to move the shape order of an unknown shape`);\n return;\n }\n if (!layerManager.hasLayer(data.shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${data.shape.layer}`);\n return;\n }\n const shape = layerManager.UUIDMap.get(data.shape.uuid)!;\n const layer = layerManager.getLayer(shape.layer)!;\n layer.moveShapeOrder(shape, data.index, false);\n});\nsocket.on(\"Shape.Layer.Change\", (data: { uuid: string; layer: string }) => {\n const shape = layerManager.UUIDMap.get(data.uuid);\n if (shape === undefined) return;\n shape.moveLayer(data.layer, false);\n});\nsocket.on(\"Shape.Update\", (data: { shape: ServerShape; redraw: boolean; move: boolean }) => {\n gameManager.updateShape(data);\n});\nsocket.on(\"Temp.Clear\", (shapes: ServerShape[]) => {\n shapes.forEach(shape => {\n if (!layerManager.UUIDMap.has(shape.uuid)) {\n console.log(\"Attempted to remove an unknown temporary shape\");\n return;\n }\n if (!layerManager.hasLayer(shape.layer)) {\n console.log(`Attempted to remove shape from an unknown layer ${shape.layer}`);\n return;\n }\n const realShape = layerManager.UUIDMap.get(shape.uuid)!;\n layerManager.getLayer(shape.layer)!.removeShape(realShape, false);\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/server/templates/index.html b/server/templates/index.html index dfc0de686..e9e6c6824 100644 --- a/server/templates/index.html +++ b/server/templates/index.html @@ -1 +1 @@ -PlanarAlly - The companion tool for your planar travels.
\ No newline at end of file +PlanarAlly - The companion tool for your planar travels.
\ No newline at end of file