From b52bd79fe50269804931556f1d5fb7309a61ccdd Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Fri, 18 Jan 2019 23:26:11 +0100 Subject: [PATCH 1/9] Fixes and debugs for triangulation --- client/src/game/visibility/te/cdt.ts | 13 +++++++++-- client/src/game/visibility/te/draw.ts | 30 +++++++++++++++----------- client/src/game/visibility/te/tds.ts | 26 ++++++++++++++++++++++ client/src/game/visibility/te/triag.ts | 2 +- 4 files changed, 55 insertions(+), 16 deletions(-) diff --git a/client/src/game/visibility/te/cdt.ts b/client/src/game/visibility/te/cdt.ts index 861c4115c..de42a6b0d 100644 --- a/client/src/game/visibility/te/cdt.ts +++ b/client/src/game/visibility/te/cdt.ts @@ -8,6 +8,7 @@ import { TDS, Triangle, Vertex, + BoundingBox, } from "./tds"; import { ccw, @@ -232,7 +233,15 @@ export class CDT { const pb = vbb.point!; const pc = vcc.point!; const pd = vdd.point!; - const pi = intersection(pa, pb, pc, pd); + let pi = intersection(pa, pb, pc, pd); + if (pi !== pa && pi !== pb && pi !== pc && pi !== pd) { + const bbox = new BoundingBox(pi!); + bbox.dilate(4); + if (bbox.overlaps(new BoundingBox(pa))) pi = pa; + if (bbox.overlaps(new BoundingBox(pb))) pi = pb; + if (bbox.overlaps(new BoundingBox(pc))) pi = pc; + if (bbox.overlaps(new BoundingBox(pd))) pi = pd; + } let vi: Vertex; if (pi === null) throw new Error("what"); else { @@ -615,7 +624,7 @@ export class CDT { if (c.isInfinite()) { return { loc: c, lt: LocateType.OUTSIDE_CONVEX_HULL, li: c.indexV(this.tds._infinite) }; } - const leftFirst = Math.round(Math.random()); + const leftFirst = 0; // Math.round(Math.random()); const p0 = c.vertices[0]!.point!; const p1 = c.vertices[1]!.point!; const p2 = c.vertices[2]!.point!; diff --git a/client/src/game/visibility/te/draw.ts b/client/src/game/visibility/te/draw.ts index 11394ea4f..af0d2384a 100644 --- a/client/src/game/visibility/te/draw.ts +++ b/client/src/game/visibility/te/draw.ts @@ -68,7 +68,7 @@ function drl(ctx: CanvasRenderingContext2D, from: number[], to: number[], constr ctx.stroke(); } -function drawPolygonT(tds: TDS, local = true, clear = true) { +function drawPolygonT(tds: TDS, local = true, clear = true, logs: 0 | 1 | 2 = 0) { I = 0; J = 0; let T = 0; @@ -88,15 +88,17 @@ function drawPolygonT(tds: TDS, local = true, clear = true) { do { const fromP = ei.edge.first!.vertices[ccw(ei.edge.second)]!.point!; const toP = ei.edge.first!.vertices[cw(ei.edge.second)]!.point!; - // if (fromP[0] === -Infinity || toP[0] === -Infinity) { - // ei.next(); - // continue; - // } - J++; - // if (ei.edge.first!.constraints[ei.edge.second]) { - // I++; - // console.log(`Edge: (*) ${fromP} > ${toP}`); - // } else console.log(`Edge: ${fromP} > ${toP}`); + if (logs > 0) { + if (fromP[0] === -Infinity || toP[0] === -Infinity) { + ei.next(); + continue; + } + J++; + if (ei.edge.first!.constraints[ei.edge.second]) { + I++; + if (logs === 2) console.log(`Edge: (*) ${fromP} > ${toP}`); + } else if (logs === 2) console.log(`Edge: ${fromP} > ${toP}`); + } do { ei.next(); ei.collect(); @@ -126,7 +128,7 @@ function drawPolygonT(tds: TDS, local = true, clear = true) { ctx.closePath(); ctx.fill(); } - // console.log("[T] ", ...po, t.constraints); + if (logs === 2) console.log("[T] ", ...po, t.constraints); ctx.moveTo(x(t.vertices[0]!.point![0], local), y(t.vertices[0]!.point![1], local)); if (t.vertices[0] !== undefined && t.vertices[1] !== undefined) @@ -136,8 +138,10 @@ function drawPolygonT(tds: TDS, local = true, clear = true) { if (t.vertices[2] !== undefined && t.vertices[0] !== undefined) drl(ctx, t.vertices[2]!.point!, t.vertices[0]!.point!, t.constraints[1], local); } - console.log(`Edges: ${I}/${J}`); - console.log(`Faces: ${T}`); + if (logs > 0) { + console.log(`Edges: ${I}/${J}`); + console.log(`Faces: ${T}`); + } } (window).DP = drawPolygon; diff --git a/client/src/game/visibility/te/tds.ts b/client/src/game/visibility/te/tds.ts index 5077d4d4e..8e9bbb6df 100644 --- a/client/src/game/visibility/te/tds.ts +++ b/client/src/game/visibility/te/tds.ts @@ -611,3 +611,29 @@ export class TDS { return v; } } + +export class BoundingBox { + x1: number; + x2: number; + y1: number; + y2: number; + constructor(p: Point) { + this.x1 = p[0]; + this.y1 = p[1]; + this.x2 = p[0]; + this.y2 = p[1]; + } + + dilate(dist: number) { + this.x1 -= dist; + this.y1 -= dist; + this.x2 += dist; + this.y2 += dist; + } + + overlaps(other: BoundingBox): boolean { + if (this.x2 < other.x1 || other.x2 < this.x1) return false; + if (this.y2 < other.y1 || other.y2 < this.y1) return false; + return true; + } +} diff --git a/client/src/game/visibility/te/triag.ts b/client/src/game/visibility/te/triag.ts index d02b4c55f..5dacdb568 100644 --- a/client/src/game/visibility/te/triag.ts +++ b/client/src/game/visibility/te/triag.ts @@ -118,7 +118,7 @@ export function xyEqual(p: Point, q: Point) { } export function xySmaller(p: Point, q: Point) { - return p[0] <= q[0] && p[1] <= q[1]; + return p[0] < q[0] || (p[0] === q[0] && p[1] < q[1]); } export function xyCompare(p: Point, q: Point) { From 2c9b3e22b4ca91dc1a86c19fd77cf8479da77047 Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 00:14:58 +0100 Subject: [PATCH 2/9] Fix dilate to use ULP --- client/src/game/visibility/te/tds.ts | 10 ++++---- client/src/game/visibility/te/triag.ts | 35 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/client/src/game/visibility/te/tds.ts b/client/src/game/visibility/te/tds.ts index 8e9bbb6df..7e108f4ec 100644 --- a/client/src/game/visibility/te/tds.ts +++ b/client/src/game/visibility/te/tds.ts @@ -1,6 +1,6 @@ import { uuidv4 } from "@/core/utils"; import { CDT } from "./cdt"; -import { ccw, cw, orientation } from "./triag"; +import { ccw, cw, orientation, ulp } from "./triag"; export type Point = number[]; @@ -625,10 +625,10 @@ export class BoundingBox { } dilate(dist: number) { - this.x1 -= dist; - this.y1 -= dist; - this.x2 += dist; - this.y2 += dist; + this.x1 -= dist * ulp(this.x1); + this.y1 -= dist * ulp(this.y1); + this.x2 += dist * ulp(this.x2); + this.y2 += dist * ulp(this.y2); } overlaps(other: BoundingBox): boolean { diff --git a/client/src/game/visibility/te/triag.ts b/client/src/game/visibility/te/triag.ts index 5dacdb568..9ac935e8b 100644 --- a/client/src/game/visibility/te/triag.ts +++ b/client/src/game/visibility/te/triag.ts @@ -424,3 +424,38 @@ function doIntersect(A1: Point, A2: Point, B1: Point, B2: Point): boolean { } } } + +function nextUp(x: number) { + if (x !== x) { + return x; + } + if (x === -1 / 0) { + return -Number.MAX_VALUE; + } + if (x === +1 / 0) { + return +1 / 0; + } + if (x === +Number.MAX_VALUE) { + return +1 / 0; + } + let y = x * (x < 0 ? 1 - Number.EPSILON / 2 : 1 + Number.EPSILON); + if (y === x) { + y = Number.MIN_VALUE * Number.EPSILON > 0 ? x + Number.MIN_VALUE * Number.EPSILON : x + Number.MIN_VALUE; + } + if (y === +1 / 0) { + y = +Number.MAX_VALUE; + } + const b = x + (y - x) / 2; + if (x < b && b < y) { + y = b; + } + const c = (y + x) / 2; + if (x < c && c < y) { + y = c; + } + return y === 0 ? -0 : y; +} + +export function ulp(x: number) { + return x < 0 ? nextUp(x) - x : x + nextUp(-x); +} From ddc917b50e45fa2076f837762ea617c765cb5562 Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 00:50:34 +0100 Subject: [PATCH 3/9] Fix lessEdge implementation --- client/src/game/visibility/te/cdt.ts | 6 +----- client/src/game/visibility/te/tds.ts | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/client/src/game/visibility/te/cdt.ts b/client/src/game/visibility/te/cdt.ts index de42a6b0d..084b575a4 100644 --- a/client/src/game/visibility/te/cdt.ts +++ b/client/src/game/visibility/te/cdt.ts @@ -321,11 +321,7 @@ export class CDT { lessEdge(e1: Edge, e2: Edge) { const ind1 = e1[1]; const ind2 = e2[1]; - /* return( (&(*e1.first) < &(*e2.first)) - || ( (&(*e1.first) == &(*e2.first)) && (ind1 < ind2)));*/ - // TODO: This is not proper. - // console.error("This has to be done correctly"); - return ind1 < ind2; + return e1[0].uid < e2[0].uid || (e1[0].uid === e2[0].uid && ind1 < ind2); } propagatingFlipE(edges: Edge[]) { diff --git a/client/src/game/visibility/te/tds.ts b/client/src/game/visibility/te/tds.ts index 7e108f4ec..5a8706aed 100644 --- a/client/src/game/visibility/te/tds.ts +++ b/client/src/game/visibility/te/tds.ts @@ -1,4 +1,3 @@ -import { uuidv4 } from "@/core/utils"; import { CDT } from "./cdt"; import { ccw, cw, orientation, ulp } from "./triag"; @@ -48,7 +47,8 @@ export class Triangle { vertices: (Vertex | null)[] = []; neighbours: (Triangle | null)[] = [null, null, null]; constraints = [false, false, false]; - uuid = uuidv4(); + static _counter = 0; + uid = Triangle._counter++; constructor(...vertices: (Vertex | null)[]) { this.vertices = vertices; @@ -105,7 +105,6 @@ export class Vertex { infinite = false; private _point: Point | undefined; triangle: Triangle | undefined; - uuid = uuidv4(); constructor(point?: Point) { this._point = point; From b6b1eeb72ce2bcccdc5d0d0a49981517a9bbcecb Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 09:15:43 +0100 Subject: [PATCH 4/9] Fix missing popagatingFlipE code --- client/src/game/visibility/te/cdt.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/src/game/visibility/te/cdt.ts b/client/src/game/visibility/te/cdt.ts index 084b575a4..8cffa392e 100644 --- a/client/src/game/visibility/te/cdt.ts +++ b/client/src/game/visibility/te/cdt.ts @@ -357,6 +357,17 @@ export class CDT { e[2] = [ni, cw(indn)]; e[3] = [ni, ccw(indn)]; + for (const edge of e) { + const tt = edge![0]; + const ii = edge![1]; + eni = [tt.neighbours[ii]!, this.tds.mirrorIndex(tt, ii)]; + if (this.lessEdge(edge!, eni)) + edgeSet.splice(edgeSet.findIndex(ed => ed[0] === edge![0] && ed[1] === edge![1]), 1); + else edgeSet.splice(edgeSet.findIndex(ed => ed[0] === eni[0] && ed[1] === eni[1]), 1); + } + + this.flip(t, indf); + for (const edge of e) { const tt = edge![0]; const ii = edge![1]; From d8a290922df3e1cc9b764dfff0437958fb0dec7f Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 10:29:30 +0100 Subject: [PATCH 5/9] Fix getLine algorithm --- client/src/game/visibility/te/triag.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/game/visibility/te/triag.ts b/client/src/game/visibility/te/triag.ts index 9ac935e8b..a9c94a927 100644 --- a/client/src/game/visibility/te/triag.ts +++ b/client/src/game/visibility/te/triag.ts @@ -218,7 +218,7 @@ function getLine(p0: Point, p1: Point): Line { if (p0[1] === p1[1]) return [0, 1, -p0[1]]; const x = p1[0] - p0[0]; const y = p1[1] - p0[1]; - return [-y, x, -x + y]; + return [-y, x, -x * p0[1] + y * p0[0]]; } function getIntersectionType(pa: Point, pb: Point, pc: Point, pd: Point) { From b94ed83603d86f8e7309c9f6158da614c948fd4b Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 10:36:58 +0100 Subject: [PATCH 6/9] Fix import ordering --- client/src/game/ui/menu/menu.vue | 2 +- client/src/game/visibility/te/cdt.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/game/ui/menu/menu.vue b/client/src/game/ui/menu/menu.vue index c26776393..a45e36d1a 100644 --- a/client/src/game/ui/menu/menu.vue +++ b/client/src/game/ui/menu/menu.vue @@ -153,8 +153,8 @@ import NoteDialog from "@/game/ui/note.vue"; import { getRef, uuidv4 } from "@/core/utils"; import { socket } from "@/game/api/socket"; import { Note } from "@/game/comm/types/general"; -import { gameStore } from "@/game/store"; import { layerManager } from "@/game/layers/manager"; +import { gameStore } from "@/game/store"; @Component({ components: { diff --git a/client/src/game/visibility/te/cdt.ts b/client/src/game/visibility/te/cdt.ts index 8cffa392e..ddda11a09 100644 --- a/client/src/game/visibility/te/cdt.ts +++ b/client/src/game/visibility/te/cdt.ts @@ -1,4 +1,5 @@ import { + BoundingBox, EdgeCirculator, FaceCirculator, LineFaceCirculator, @@ -8,7 +9,6 @@ import { TDS, Triangle, Vertex, - BoundingBox, } from "./tds"; import { ccw, From c9b922ddfdc89af2231ecd24735341bd499bc47a Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 10:38:41 +0100 Subject: [PATCH 7/9] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25025ce99..ec3debef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file. ## Unreleased +### Fixed + +- Multiple bugs with triangle vision + ## [0.13.2] - 2019-01-13 ### Fixed From be7f9b9c90791751268464beaca122375e242a4c Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 10:40:11 +0100 Subject: [PATCH 8/9] Bump version to 0.13.3 --- CHANGELOG.md | 2 ++ client/package-lock.json | 2 +- client/package.json | 2 +- server/VERSION | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec3debef6..52401f64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ All notable changes to this project will be documented in this file. ## Unreleased +## [0.13.3] - 2019-01-19 + ### Fixed - Multiple bugs with triangle vision diff --git a/client/package-lock.json b/client/package-lock.json index f39f046dc..b8b56b43a 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,6 +1,6 @@ { "name": "planarally-client", - "version": "0.11.6", + "version": "0.13.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/client/package.json b/client/package.json index 1267a919c..7716e1b2d 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "planarally-client", - "version": "0.13.2", + "version": "0.13.3", "description": "A companion tool for when you travel into the planes.", "scripts": { "serve": "vue-cli-service serve", diff --git a/server/VERSION b/server/VERSION index 3f8dcd03d..8eb5b22f2 100644 --- a/server/VERSION +++ b/server/VERSION @@ -1 +1 @@ -0.13.2 \ No newline at end of file +0.13.3 \ No newline at end of file From 1494e278796521d33a5cdb436503a2be2ceb730c Mon Sep 17 00:00:00 2001 From: Darragh Van Tichelen Date: Sat, 19 Jan 2019 10:40:58 +0100 Subject: [PATCH 9/9] Build production files --- server/static/css/{app.20405678.css => app.fd504196.css} | 2 +- server/static/js/app-legacy.e427aa98.js | 2 -- server/static/js/app-legacy.e427aa98.js.map | 1 - server/static/js/app-legacy.e9743101.js | 2 ++ server/static/js/app-legacy.e9743101.js.map | 1 + server/static/js/app.e427aa98.js | 2 -- server/static/js/app.e427aa98.js.map | 1 - server/static/js/app.e9743101.js | 2 ++ server/static/js/app.e9743101.js.map | 1 + server/templates/index.html | 2 +- 10 files changed, 8 insertions(+), 8 deletions(-) rename server/static/css/{app.20405678.css => app.fd504196.css} (88%) delete mode 100644 server/static/js/app-legacy.e427aa98.js delete mode 100644 server/static/js/app-legacy.e427aa98.js.map create mode 100644 server/static/js/app-legacy.e9743101.js create mode 100644 server/static/js/app-legacy.e9743101.js.map delete mode 100644 server/static/js/app.e427aa98.js delete mode 100644 server/static/js/app.e427aa98.js.map create mode 100644 server/static/js/app.e9743101.js create mode 100644 server/static/js/app.e9743101.js.map diff --git a/server/static/css/app.20405678.css b/server/static/css/app.fd504196.css similarity index 88% rename from server/static/css/app.20405678.css rename to server/static/css/app.fd504196.css index 2e3661fc7..9e912017e 100644 --- a/server/static/css/app.20405678.css +++ b/server/static/css/app.fd504196.css @@ -1 +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-6bbf3b79]{-ms-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}form[data-v-6bbf3b79]{position:relative;top:50%;width:250px;display:table;margin:-150px auto 0 auto;background:#fff;border-radius:4px}.legend[data-v-6bbf3b79]{position:relative;text-align:center;width:100%;display:block;background:#ff7052;padding:15px;color:#fff;font-size:20px}.legend[data-v-6bbf3b79]:after{content:"";opacity:.06;top:0;left:0;bottom:0;right:0;position:absolute}.input[data-v-6bbf3b79]{position:relative;width:90%;margin:15px auto}.input span[data-v-6bbf3b79]{position:absolute;display:block;color:#d4d4d4;left:10px;top:8px;font-size:20px}.input input[data-v-6bbf3b79]{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-6bbf3b79]:focus{padding:10px 5px 10px 10px;outline:0;border-color:#ff7052}.submit[data-v-6bbf3b79]{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-6bbf3b79]:focus,.submit[data-v-6bbf3b79]:hover{background:#ff7052;color:#fff;outline:0}.feedback[data-v-6bbf3b79]{position:absolute;bottom:-70px;width:100%;text-align:center;color:#fff;background:#c71585;padding:10px 0;font-size:12px}.feedback[data-v-6bbf3b79]: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-21f210ea]{display:none}.directory>.file[data-v-21f210ea],.directory>.folder[data-v-21f210ea]{display:block}.folder[data-v-21f210ea]:hover{font-weight:700;cursor:pointer}.folder:hover>[data-v-21f210ea]{font-weight:400}#menuContainer[data-v-21f210ea]{position:absolute;z-index:20;top:0;left:0;height:100%;width:100%;pointer-events:none}#menu[data-v-21f210ea]{height:100%;max-width:200px}#locations-menu[data-v-21f210ea],#menu[data-v-21f210ea]{position:absolute;top:0;left:0;z-index:21;background-color:#fa5a5a;overflow:auto;pointer-events:auto}#locations-menu[data-v-21f210ea]{max-height:100px;width:100%}#locations-menu>div[data-v-21f210ea]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}#locations-menu>div>div[data-v-21f210ea]{background-color:#fff;text-align:center;line-height:100px;width:100px;border-right:1px solid #82c8a0}#locations-menu>div>div[data-v-21f210ea]:hover{cursor:pointer;background-color:#82c8a0}.actionButton[data-v-21f210ea]{position:absolute;right:0;margin:5px;margin-right:10px;padding:0}.accordion[data-v-21f210ea]{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-21f210ea],.accordion[data-v-21f210ea]:hover{background-color:#82c8a0}.accordion-panel[data-v-21f210ea]{background-color:#fff;display:none;overflow:hidden;min-height:2em}.accordion-subpanel[data-v-21f210ea]{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-21f210ea]{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-21f210ea]:hover{background-color:#82c8a0}#exitButton[data-v-21f210ea]{position:fixed;bottom:0;width:100%}#radialmenu[data-v-21f210ea]{position:absolute;z-index:20;width:0;height:0;pointer-events:auto}.rm-list-dm #rm-locations svg[data-v-21f210ea]{margin-left:50px}.rm-list-dm #rm-settings svg[data-v-21f210ea]{margin-bottom:50px}.rm-wrapper[data-v-21f210ea]{position:relative;width:200px;height:200px;top:-100px;left:-100px}.rm-wrapper .rm-topper[data-v-21f210ea]{pointer-events:none;text-align:center;line-height:50px;font-size:25px}.rm-wrapper .rm-toggler[data-v-21f210ea],.rm-wrapper .rm-topper[data-v-21f210ea]{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-21f210ea],.rm-wrapper .rm-topper .rm-list[data-v-21f210ea]{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-21f210ea]{-webkit-transform:rotate(135deg)!important;transform:rotate(135deg)!important}.rm-wrapper .rm-toggler:hover .rm-list[data-v-21f210ea],.rm-wrapper .rm-topper:hover .rm-list[data-v-21f210ea]{opacity:1}.rm-wrapper .rm-toggler .rm-list .rm-item[data-v-21f210ea],.rm-wrapper .rm-topper .rm-list .rm-item[data-v-21f210ea]{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-21f210ea]:hover,.rm-wrapper .rm-topper .rm-list .rm-item[data-v-21f210ea]:hover{background-color:#82c8a0}.rm-wrapper .rm-toggler .rm-list .rm-item:hover a[data-v-21f210ea],.rm-wrapper .rm-topper .rm-list .rm-item:hover a[data-v-21f210ea]{color:#fff}.rm-wrapper .rm-toggler .rm-list .rm-item a[data-v-21f210ea],.rm-wrapper .rm-topper .rm-list .rm-item a[data-v-21f210ea]{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-21f210ea],.settings-leave-active[data-v-21f210ea]{-webkit-transition:width .5s;transition:width .5s}.settings-enter[data-v-21f210ea],.settings-leave-to[data-v-21f210ea]{width:0}.settings-enter-to[data-v-21f210ea],.settings-leave[data-v-21f210ea]{width:200px}.locations-enter-active[data-v-21f210ea],.locations-leave-active[data-v-21f210ea]{-webkit-transition:height .5s;transition:height .5s}.locations-enter[data-v-21f210ea],.locations-leave-to[data-v-21f210ea]{height:0}.locations-enter-to[data-v-21f210ea],.locations-leave[data-v-21f210ea]{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-078b3b76]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-078b3b76]{position:absolute;top:5px;right:5px}.modal-body[data-v-078b3b76]{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-078b3b76],.modal-body[data-v-078b3b76]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.colours[data-v-078b3b76]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header[data-v-078b3b76]{line-height:.1em;margin:20px 0 15px}.header[data-v-078b3b76]:after{position:absolute;right:5px;width:75%;border-bottom:1px solid #000;content:""}.spanrow[data-v-078b3b76]{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-7111f3f6]{border:1px solid #82c8a0}.ContextMenu ul li[data-v-7111f3f6]{border-bottom:1px solid #82c8a0}.ContextMenu ul li[data-v-7111f3f6]:hover{background-color:#82c8a0}canvas[data-v-66ccc134]{grid-column:label/end;justify-self:center}.modal-header[data-v-66ccc134]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-66ccc134]{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-66ccc134]{padding-top:0;padding:10px;text-align:right}.colours[data-v-66ccc134]{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-7abc7fe9]{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-7abc7fe9],.option[data-v-7abc7fe9]:hover{background-color:#82c8a0}.selectgroup[data-v-7abc7fe9]{display:-webkit-box;display:-ms-flexbox;display:flex}.selectgroup>.option[data-v-7abc7fe9]:first-of-type{border-top-left-radius:10px;border-bottom-left-radius:10px}.selectgroup>.option[data-v-7abc7fe9]: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 +@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-6bbf3b79]{-ms-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}form[data-v-6bbf3b79]{position:relative;top:50%;width:250px;display:table;margin:-150px auto 0 auto;background:#fff;border-radius:4px}.legend[data-v-6bbf3b79]{position:relative;text-align:center;width:100%;display:block;background:#ff7052;padding:15px;color:#fff;font-size:20px}.legend[data-v-6bbf3b79]:after{content:"";opacity:.06;top:0;left:0;bottom:0;right:0;position:absolute}.input[data-v-6bbf3b79]{position:relative;width:90%;margin:15px auto}.input span[data-v-6bbf3b79]{position:absolute;display:block;color:#d4d4d4;left:10px;top:8px;font-size:20px}.input input[data-v-6bbf3b79]{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-6bbf3b79]:focus{padding:10px 5px 10px 10px;outline:0;border-color:#ff7052}.submit[data-v-6bbf3b79]{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-6bbf3b79]:focus,.submit[data-v-6bbf3b79]:hover{background:#ff7052;color:#fff;outline:0}.feedback[data-v-6bbf3b79]{position:absolute;bottom:-70px;width:100%;text-align:center;color:#fff;background:#c71585;padding:10px 0;font-size:12px}.feedback[data-v-6bbf3b79]: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-5ecfceea]{display:none}.directory>.file[data-v-5ecfceea],.directory>.folder[data-v-5ecfceea]{display:block}.folder[data-v-5ecfceea]:hover{font-weight:700;cursor:pointer}.folder:hover>[data-v-5ecfceea]{font-weight:400}#menuContainer[data-v-5ecfceea]{position:absolute;z-index:20;top:0;left:0;height:100%;width:100%;pointer-events:none}#menu[data-v-5ecfceea]{height:100%;max-width:200px}#locations-menu[data-v-5ecfceea],#menu[data-v-5ecfceea]{position:absolute;top:0;left:0;z-index:21;background-color:#fa5a5a;overflow:auto;pointer-events:auto}#locations-menu[data-v-5ecfceea]{max-height:100px;width:100%}#locations-menu>div[data-v-5ecfceea]{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%}#locations-menu>div>div[data-v-5ecfceea]{background-color:#fff;text-align:center;line-height:100px;width:100px;border-right:1px solid #82c8a0}#locations-menu>div>div[data-v-5ecfceea]:hover{cursor:pointer;background-color:#82c8a0}.actionButton[data-v-5ecfceea]{position:absolute;right:0;margin:5px;margin-right:10px;padding:0}.accordion[data-v-5ecfceea]{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-5ecfceea],.accordion[data-v-5ecfceea]:hover{background-color:#82c8a0}.accordion-panel[data-v-5ecfceea]{background-color:#fff;display:none;overflow:hidden;min-height:2em}.accordion-subpanel[data-v-5ecfceea]{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-5ecfceea]{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-5ecfceea]:hover{background-color:#82c8a0}#exitButton[data-v-5ecfceea]{position:fixed;bottom:0;width:100%}#radialmenu[data-v-5ecfceea]{position:absolute;z-index:20;width:0;height:0;pointer-events:auto}.rm-list-dm #rm-locations svg[data-v-5ecfceea]{margin-left:50px}.rm-list-dm #rm-settings svg[data-v-5ecfceea]{margin-bottom:50px}.rm-wrapper[data-v-5ecfceea]{position:relative;width:200px;height:200px;top:-100px;left:-100px}.rm-wrapper .rm-topper[data-v-5ecfceea]{pointer-events:none;text-align:center;line-height:50px;font-size:25px}.rm-wrapper .rm-toggler[data-v-5ecfceea],.rm-wrapper .rm-topper[data-v-5ecfceea]{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-5ecfceea],.rm-wrapper .rm-topper .rm-list[data-v-5ecfceea]{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-5ecfceea]{-webkit-transform:rotate(135deg)!important;transform:rotate(135deg)!important}.rm-wrapper .rm-toggler:hover .rm-list[data-v-5ecfceea],.rm-wrapper .rm-topper:hover .rm-list[data-v-5ecfceea]{opacity:1}.rm-wrapper .rm-toggler .rm-list .rm-item[data-v-5ecfceea],.rm-wrapper .rm-topper .rm-list .rm-item[data-v-5ecfceea]{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-5ecfceea]:hover,.rm-wrapper .rm-topper .rm-list .rm-item[data-v-5ecfceea]:hover{background-color:#82c8a0}.rm-wrapper .rm-toggler .rm-list .rm-item:hover a[data-v-5ecfceea],.rm-wrapper .rm-topper .rm-list .rm-item:hover a[data-v-5ecfceea]{color:#fff}.rm-wrapper .rm-toggler .rm-list .rm-item a[data-v-5ecfceea],.rm-wrapper .rm-topper .rm-list .rm-item a[data-v-5ecfceea]{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-5ecfceea],.settings-leave-active[data-v-5ecfceea]{-webkit-transition:width .5s;transition:width .5s}.settings-enter[data-v-5ecfceea],.settings-leave-to[data-v-5ecfceea]{width:0}.settings-enter-to[data-v-5ecfceea],.settings-leave[data-v-5ecfceea]{width:200px}.locations-enter-active[data-v-5ecfceea],.locations-leave-active[data-v-5ecfceea]{-webkit-transition:height .5s;transition:height .5s}.locations-enter[data-v-5ecfceea],.locations-leave-to[data-v-5ecfceea]{height:0}.locations-enter-to[data-v-5ecfceea],.locations-leave[data-v-5ecfceea]{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-078b3b76]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.header-close[data-v-078b3b76]{position:absolute;top:5px;right:5px}.modal-body[data-v-078b3b76]{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-078b3b76],.modal-body[data-v-078b3b76]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.colours[data-v-078b3b76]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header[data-v-078b3b76]{line-height:.1em;margin:20px 0 15px}.header[data-v-078b3b76]:after{position:absolute;right:5px;width:75%;border-bottom:1px solid #000;content:""}.spanrow[data-v-078b3b76]{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-7111f3f6]{border:1px solid #82c8a0}.ContextMenu ul li[data-v-7111f3f6]{border-bottom:1px solid #82c8a0}.ContextMenu ul li[data-v-7111f3f6]:hover{background-color:#82c8a0}canvas[data-v-66ccc134]{grid-column:label/end;justify-self:center}.modal-header[data-v-66ccc134]{background-color:#ff7052;padding:10px;font-size:20px;font-weight:700;cursor:move}.modal-body[data-v-66ccc134]{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-66ccc134]{padding-top:0;padding:10px;text-align:right}.colours[data-v-66ccc134]{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-7abc7fe9]{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-7abc7fe9],.option[data-v-7abc7fe9]:hover{background-color:#82c8a0}.selectgroup[data-v-7abc7fe9]{display:-webkit-box;display:-ms-flexbox;display:flex}.selectgroup>.option[data-v-7abc7fe9]:first-of-type{border-top-left-radius:10px;border-bottom-left-radius:10px}.selectgroup>.option[data-v-7abc7fe9]: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/js/app-legacy.e427aa98.js b/server/static/js/app-legacy.e427aa98.js deleted file mode 100644 index 61eb8f6f1..000000000 --- a/server/static/js/app-legacy.e427aa98.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){}getCorner(e){return""}visibleInCanvas(e){return!0}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("5050"),s=i("a68b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("9b4d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7111f3f6",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){},"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.isFile(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("d7f0"),s=i("1eee");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cfc1");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"6bbf3b79",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){d=0,h=0;let s=0;const a=n.layerManager.getLayer("draw");if(void 0===a)return;const l=a.ctx;i&&l.clearRect(0,0,2e3,1e3),l.lineJoin="round",l.lineJoin="round";const p=new o.EdgeIterator(e);while(p.valid)p.next(),p.collect();p.collect();do{p.edge.first.vertices[r.ccw(p.edge.second)].point,p.edge.first.vertices[r.cw(p.edge.second)].point;h++;do{p.next(),p.collect()}while(p.valid)}while(null!==p.pos);for(const n of e.triangles){if(n.isInfinite())continue;s++;const e=[];l.fillStyle="red",void 0!==n.vertices[0]&&(e.push(n.vertices[0].point),l.beginPath(),l.arc(c(n.vertices[0].point[0],t),u(n.vertices[0].point[1],t),5,0,2*Math.PI),l.closePath(),l.fill()),void 0!==n.vertices[1]&&(e.push(n.vertices[1].point),l.arc(c(n.vertices[1].point[0],t),u(n.vertices[1].point[1],t),5,0,2*Math.PI),l.closePath(),l.fill()),void 0!==n.vertices[2]&&(e.push(n.vertices[2].point),l.arc(c(n.vertices[2].point[0],t),u(n.vertices[2].point[1],t),5,0,2*Math.PI),l.closePath(),l.fill()),l.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(l,n.vertices[0].point,n.vertices[1].point,n.constraints[2],t),void 0!==n.vertices[1]&&void 0!==n.vertices[2]&&f(l,n.vertices[1].point,n.vertices[2].point,n.constraints[0],t),void 0!==n.vertices[2]&&void 0!==n.vertices[0]&&f(l,n.vertices[2].point,n.vertices[0].point,n.constraints[1],t)}console.log(`Edges: ${d}/${h}`),console.log(`Faces: ${s}`)}window.DP=a,window.DPL=l,window.DPT=p},1298: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})},"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},"160b":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})},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("6f83"),s=i("8cd4");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("9c5c");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"21f210ea",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},"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");function h(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 h=new n.GlobalPoint(e.x,e.y);if("rect"===e.type_){const t=e;i=new u.Rect(h,t.width,t.height,t.fill_colour,t.stroke_colour,t.uuid)}else if("circle"===e.type_){const t=e;i=new r.Circle(h,t.radius,t.fill_colour,t.stroke_colour,t.uuid)}else if("circulartoken"===e.type_){const t=e;i=new a.CircularToken(h,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(h,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(h,t.points.map(e=>new n.GlobalPoint(e.x,e.y)),t.line_width,t.stroke_colour,t.uuid)}else if("text"===e.type_){const t=e;i=new d.Text(h,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,h,t.width,t.height,t.uuid),n.onload=(()=>{s.layerManager.getLayer(e.layer).invalidate(!1)})}}return i.fromDict(e),i}t.createShapeFromDict=h},"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("6f92"),c=i("f10f"),u=i("92b1");class d{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)}visibleInCanvas(e){return!1}invalidate(e){const t=l.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(){const e=this,t=c.gameStore.visionBlockers.indexOf(this.uuid);let i=!1;this.visionObstruction&&-1===t?(c.gameStore.visionBlockers.push(this.uuid),i=!0):!this.visionObstruction&&t>=0&&(c.gameStore.visionBlockers.splice(t,1),i=!0),i&&c.gameStore.recalculateBV(),this.auras.forEach(t=>{const i=c.gameStore.visionSources,n=i.findIndex(e=>e.aura===t.uuid);t.visionSource&&-1===n?i.push({shape:e.uuid,aura:t.uuid}):!t.visionSource&&n>=0&&i.splice(n,1)});for(let n=c.gameStore.visionSources.length-1;n>=0;n--){const t=c.gameStore.visionSources[n];t.shape===e.uuid&&(e.auras.some(e=>e.uuid===t.aura&&e.visionSource)||c.gameStore.visionSources.splice(n,1))}}setMovementBlock(e){this.movementObstruction=e||!1;const t=c.gameStore.movementblockers.indexOf(this.uuid);this.movementObstruction&&-1===t?c.gameStore.movementblockers.push(this.uuid):!this.movementObstruction&&t>=0&&c.gameStore.movementblockers.splice(t,1)}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=c.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?c.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&c.gameStore.ownedtokens.splice(e,1)}}ownedBy(e){return void 0===e&&(e=c.gameStore.username),c.gameStore.IS_DM||this.owners.includes(e)}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(u.g2lx(t.topLeft.x)-5,u.g2ly(t.topLeft.y)-5,u.g2lz(t.w)+10,u.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const n=u.g2l(this.center()),o=u.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(n.x,n.y,u.g2lr(i.value),n.x,n.y,u.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:!c.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=l.layerManager.getLayer(this.layer),n=l.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}))}}t.Shape=d},"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("496c")),o=n.__importDefault(i("ea6a")),r=i("4a5b"),a=i("0bc6"),l=i("8f0a"),c=i("6f92"),u=i("b2ed"),d=i("f10f"),h=i("2838"),f=i("92b1"),p=i("5a5c"),g=n.__importDefault(i("65d9"));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 l.GlobalPoint(-1e3,-1e3);let y=class extends o.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizeDirection="",this.deltaChanged=!1,this.dragRay=new l.Ray(new l.LocalPoint(0,0),new l.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new u.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(d.gameStore.username)||this.selectionHelper.owners.push(d.gameStore.username);const i=p.getMouse(e),n=f.l2g(i);let s,o=!1;s=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let a=s.length-1;a>=0;a--){const e=s[a];if(!e.ownedBy())continue;const c=e.getBoundingBox().getCorner(n);if(void 0!==c){t.selection=[e],r.getRef("selectionInfo").shape=e,this.mode=v.Resize,this.resizeDirection=c,t.invalidate(!0),o=!0;break}if(e.contains(n)){const n=e;-1===t.selection.indexOf(n)&&(t.selection=[n],r.getRef("selectionInfo").shape=n),this.mode=v.Drag;const s=f.g2l(n.refPoint);this.dragRay=new l.Ray(s,i.subtract(s)),t.invalidate(!0),o=!0;break}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)r.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=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=p.getMouse(e),n=f.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 l.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=f.g2l(t.selection[t.selection.length-1].refPoint),o=s.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/d.gameStore.zoomFactor);const l=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!d.gameStore.IS_DM))for(const e of t.selection)e.uuid!==this.selectionHelper.uuid&&(r=h.calculateDelta(r,e),r!==l&&(this.deltaChanged=!0));for(const e of t.selection)e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.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.resizeDirection,i),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1);else for(const e of t.selection){const t=e.getBoundingBox(),i=n;t.inCorner(i,"nw")?document.body.style.cursor="nw-resize":t.inCorner(i,"ne")?document.body.style.cursor="ne-resize":t.inCorner(i,"se")?document.body.style.cursor="se-resize":t.inCorner(i,"sw")?document.body.style.cursor="sw-resize":document.body.style.cursor="default"}}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.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===f.g2lx(i.refPoint.x)&&this.dragRay.origin.y===f.g2ly(i.refPoint.y))return;!d.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(d.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.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===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.layerManager.getLayer(),i=p.getMouse(e),n=f.l2g(i);for(const s of t.selection)if(s.contains(n))return t.selection=[s],r.getRef("selectionInfo").shape=s,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,s);this.$refs.selectcontext.open(e)}};y=n.__decorate([g.default({components:{SelectContext:s.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");function r(e,t,i){void 0===i&&(i=[]);const a=t.getBoundingBox(),l=a.offset(e);let c=!1;for(const r of o.gameStore.movementblockers){if(i.includes(r))continue;const t=s.layerManager.UUIDMap.get(r),o=t.getBoundingBox();let u=o.intersectsWithInner(l);if(!u){const t=n.Ray.fromPoints(a.topLeft.add(e.normalize()),l.topLeft),i=t.direction.inverse(),s=[i.x<0,i.y<0];u=o.intersectP(t,i,s).hit}if(u){const t=o.center(),s=a.center(),l=s.subtract(t),u=new n.Vector(1,0),d=new n.Vector(0,1);let h=l.dot(u),f=l.dot(d);h>o.w/2&&(h=o.w/2),h<-o.w/2&&(h=-o.w/2),f>o.h/2&&(f=o.h/2),f<-o.h/2&&(f=-o.h/2);const p=t.add(u.multiply(h)).add(d.multiply(f));p.x===a.topLeft.x||p.x===a.topRight.x?e=new n.Vector(0,e.y):p.y===a.topLeft.y||p.y===a.botLeft.y?e=new n.Vector(e.x,0):p.xa.topRight.x?e=new n.Vector(p.x-a.topRight.x,e.y):p.ya.botLeft.y&&(e=new n.Vector(e.x,p.y-a.botLeft.y)),c=!0,i.push(r);break}}return c&&(e=r(e,t,i)),e}t.calculateDelta=r},"28b6":function(e,t,i){"use strict";var n=i("ee96"),s=i.n(n);s.a},"2b48":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("f10f");function o(){n.socket.emit("Client.Options.Set",{locationOptions:{panX:s.gameStore.panX,panY:s.gameStore.panY,zoomFactor:s.gameStore.zoomFactor}})}t.sendClientOptions=o},"2baf":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("60a3"),a=i("4a5b");let l=class extends s.default{constructor(){super(...arguments),this.showImage=null}get folders(){return Object.keys(this.asset).filter(e=>!["__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 l.layerManager.layers.filter(e=>e.selectable&&(c.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return l.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()}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},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()});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 d=c.getUnitDistance(u.value+u.dim),h=t.center(),f=c.g2l(h),p=new a.Circle(h,d);if(!p.visibleInCanvas(e.canvas))continue;let g=-1;const v=new Path2D;let m;v.moveTo(f.x,f.y);for(let s=0;s<2*Math.PI;s+=r.Settings.angleSteps/180*Math.PI){const t=new n.GlobalPoint(h.x+d*Math.cos(s),h.y+d*Math.sin(s));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(h.x),c.g2ly(h.y)),i.lineTo(c.g2lx(t.x),c.g2ly(t.y)),i.stroke());const o=n.Ray.fromPoints(h,t),a=l.gameStore.BV.intersect(o);if(0===s&&(m=a.hit?a.intersect:t),a.hit)-1!==g&&(v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,s),g=-1),v.lineTo(c.g2lx(a.intersect.x),c.g2ly(a.intersect.y));else if(-1===g){g=s;const i=c.g2l(t);e.lineTo(i.x,i.y)}}if(-1===g?v.lineTo(c.g2lx(m.x),c.g2ly(m.y)):v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(f.x,f.y,c.g2lr(u.value),f.x,f.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(v)}u.lastPath=v}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=d},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},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("df15"),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]<=t[0]&&e[1]<=t[1]}function v(e,t){return g(e,t)?n.Sign.SMALLER:p(e,t)?n.Sign.EQUAL:n.Sign.LARGER}function m(e,t,i,s){const o=t[0]-e[0],r=t[1]-e[1],a=i[0]-e[0],l=i[1]-e[1],c=s[0]-e[0],d=s[1]-e[1],h=s[0]-t[0],f=s[1]-t[1],p=i[0]-t[0],g=i[1]-t[1],v=u(o*d-r*c,c*h+d*f,o*l-r*a,a*p+l*g);let m=Math.abs(o),y=Math.abs(r);const b=Math.abs(a),_=Math.abs(l),S=Math.abs(h),w=Math.abs(f),x=Math.abs(c),M=Math.abs(d),C=Math.abs(p),L=Math.abs(g);if(my&&([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+n]}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)}}}}t.cw=s,t.ccw=o,t.edgeInfo=r,t.collinearBetween=a,t.orientation=c,t.determinant=u,t.hasInexactNegativeOrientation=d,t.sideOfOrientedCircle=h,t.xyEqual=p,t.xySmaller=g,t.xyCompare=v,t.intersection=_,function(e){e[e["NO_INTERSECTION"]=0]="NO_INTERSECTION",e[e["POINT"]=1]="POINT",e[e["SEGMENT"]=2]="SEGMENT"}(S||(S={}))},"4b01":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("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})},"4bc3":function(e,t,i){"use strict";i.r(t);var n=i("2baf"),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},5050:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return void 0!==e.getActiveLayer()?i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.getLayers().length>1?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")])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"52a8":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("60a3");let a=class extends s.default{constructor(){super(...arguments),this.positioned=!1,this.offsetX=0,this.offsetY=0,this.screenX=0,this.screenY=0,this.dragging=!1}mounted(){this.updatePosition()}updated(){this.updatePosition()}close(e){this.$emit("close")}updatePosition(){if(!this.positioned){const e=this.$refs.container;if(0===e.offsetWidth&&0===e.offsetHeight)return;this.$refs.container.style.left=(window.innerWidth-e.offsetWidth)/2+"px",this.$refs.container.style.top=(window.innerHeight-e.offsetHeight)/2+"px",this.positioned=!0}}dragStart(e){null!==e&&null!==e.dataTransfer&&(e.dataTransfer.setData("Hack",""),e.dataTransfer.setDragImage(this.$refs.container,e.offsetX,e.offsetY),this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.screenX=e.screenX,this.screenY=e.screenY,this.dragging=!0)}dragEnd(e){this.dragging=!1;let t=e.clientX-this.offsetX,i=e.clientY-this.offsetY;0===e.clientX&&0===e.clientY&&0===e.pageX&&0===e.pageY&&(t=parseInt(this.$refs.container.style.left,10)-(this.screenX-e.screenX),i=parseInt(this.$refs.container.style.top,10)-(this.screenY-e.screenY)),t<0&&(t=0),t>window.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}asDict(){return Object.assign(this.getBaseDict(),{line_width:this.lineWidth,points:this._points.map(e=>({x:e.x,y:e.y}))})}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.y,i=this.refPoint.x,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._points.includes(e)}center(e){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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("605b"),s=i("6f8d");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cec8");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7abc7fe9",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.owners.push(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("574e"),f=i("b2ed"),p=i("f10f"),g=i("92b1"),v=i("5a5c");let m=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=g.getUnitDistance(p.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:g.getUnitDistance(this.unitSize)/8}get IS_DM(){return p.gameStore.IS_DM}get unitSize(){return p.gameStore.unitSize}get useGrid(){return p.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=!0,this.startPoint=g.l2g(v.getMouse(e)),"square"===this.shapeSelect)this.shape=new f.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);else if("circle"===this.shapeSelect)this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);else{if("paint-brush"!==this.shapeSelect)return;this.shape=new h.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour}"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.owners.push(p.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),p.gameStore.visionBlockers.push(this.shape.uuid),t.addShape(this.shape,!0,!1),this.onDeselect(),this.onSelect()}else console.log("No active layer!")}onMouseMove(e){const t=g.l2g(v.getMouse(e)),i=this.getLayer();void 0!==i?(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&&("square"===this.shapeSelect?(this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint.x=Math.min(this.startPoint.x,t.x),this.shape.refPoint.y=Math.min(this.startPoint.y,t.y)):"circle"===this.shapeSelect?this.shape.r=t.subtract(this.startPoint).length():"paint-brush"===this.shapeSelect&&this.shape._points.push(t),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&p.gameStore.recalculateBV(!0),i.invalidate(!1))):console.log("No active layer!")}onMouseUp(e){this.active&&null!==this.shape&&(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.shape.visionObstruction&&p.gameStore.recalculateBV(),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)}};n.__decorate([o.Watch("fillColour")],m.prototype,"onFillChange",null),n.__decorate([o.Watch("modeSelect")],m.prototype,"onModeUpdate",null),m=n.__decorate([s.default({components:{"color-picker":r.default}})],m),t.default=m},"5e17":function(e,t,i){},"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.x,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){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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},"605b":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})},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){},"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),this.type="assetrect",this.src="",void 0!==s&&(this.uuid=s),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,window.TDS=this.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];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=Math.round(Math.random()),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},"6f83":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:"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}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",[e._v("BVH")]),i("option",[e._v("Triangle")])])],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})},"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.x=Math.round(a.refPoint.x/e)*e,a.refPoint.y=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("1298"),s=i("778b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("d71e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"66ccc134",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),n=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const o=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,n*=e.keyCode<=38?-1:1;let r=new a.Vector(i,n);if(!e.shiftKey||!c.gameStore.IS_DM)for(const e of o)r=u.calculateDelta(r,e);for(const e of o)e.refPoint.x+=r.x,e.refPoint.y+=r.y,e.refPoint.x%t===0&&e.refPoint.y%t===0||e.snapToGrid(),s.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1});l.layerManager.getLayer().invalidate(!1)}else c.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),c.gameStore.increasePanY(n*(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},"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},8095:function(e,t,i){},"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");class s{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 s(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),o=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new s(new n.GlobalPoint(t,o),i-t,r-o)}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(e){if(void 0===e)return this.topLeft.add(new n.Vector(this.w/2,this.h/2));this.topLeft.x=e.x-this.w/2,this.topLeft.y=e.y-this.h/2}inCorner(e,t){const i=Math.min(6,this.w/2)/2;switch(t){case"ne":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"nw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"sw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;case"se":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}getMaxExtent(){return this.w>this.h?0:1}}t.BoundingRect=s},"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}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}}t.Point=s;class o extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}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(1/this.x,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)}}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("f10f"),h=i("6f92");let f=class extends s.default{constructor(){super(...arguments),this.visible={settings:!1,locations:!1}}get useGrid(){return d.gameStore.useGrid}set useGrid(e){d.gameStore.setUseGrid({useGrid:e,sync:!0})}get fullFOW(){return d.gameStore.fullFOW}set fullFOW(e){d.gameStore.setFullFOW({fullFOW:e,sync:!0})}get fowOpacity(){return d.gameStore.fowOpacity}set fowOpacity(e){"number"===typeof e&&d.gameStore.setFOWOpacity({fowOpacity:e,sync:!0})}get fowLOS(){return d.gameStore.fowLOS}set fowLOS(e){d.gameStore.setLineOfSight({fowLOS:e,sync:!0})}get unitSize(){return d.gameStore.unitSize}set unitSize(e){"number"===typeof e&&d.gameStore.setUnitSize({unitSize:e,sync:!0})}get gridSize(){return d.gameStore.gridSize}set gridSize(e){"number"===typeof e&&d.gameStore.setGridSize({gridSize:e,sync:!0})}get gridColour(){return d.gameStore.gridColour}set gridColour(e){d.gameStore.setGridColour({colour:e,sync:!0})}get fowColour(){return d.gameStore.fowColour}set fowColour(e){d.gameStore.setFOWColour({colour:e,sync:!0})}get rulerColour(){return d.gameStore.rulerColour}set rulerColour(e){d.gameStore.setRulerColour({colour: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()};d.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||(d.gameStore.setVisionMode(t),d.gameStore.recalculateBV(),h.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("4a5b"),s=i("4aee");let o;var r,a;function l(){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"}(r=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"}(a||(a={}));class c{constructor(...e){this.vertices=[],this.neighbours=[null,null,null],this.constraints=[!1,!1,!1],this.uuid=n.uuidv4(),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(o):this.vertices[s.ccw(e)].infinite||this.vertices[s.cw(e)].infinite}}t.Triangle=c;class u{constructor(e){this.infinite=!1,this.uuid=n.uuidv4(),this._point=e}get point(){return this._point}set point(e){this._point=e,this.infinite=!1}}t.Vertex=u;class d{constructor(e,t){if(this.v=e,this.t=t,null===e?this.t=null:null===t&&(this.t=e.triangle),null==this.t||this.t.dimension<1)this.ri=0,this.v=null,this.t=null;else{const t=this.t.indexV(e);2===this.t.dimension?this.ri=s.ccw(t):this.ri=2}this._ri=this.ri,this._v=this.v,this._t=this.t}get valid(){return null!==this.t&&null!==this.v}next(){let e=this.t.indexV(this.v);return 1===this.t.dimension?this.t=this.t.neighbours[0===e?1:0]:(this.t=this.t.neighbours[s.ccw(e)],e=this.t.indexV(this.v),this.ri=s.ccw(e)),this.ri!==this._ri||this.v!==this._v||this.t!==this._t}}t.EdgeCirculator=d;class h{constructor(e){if(this.i=0,this.edge=new g,this._es=0,this.tds=e,this.edge.second=0,e.dimension<=0)this.pos=null;else{this.pos=e.triangles[0],1===e.dimension&&(this.edge.second=2);while(null!==this.pos&&!this.associatedEdge())throw new Error("[poi");1===e.dimension&&(this._es=2)}}get valid(){return(null!==this.pos||this._es!==this.edge.second)&&this.pos.isInfinite(this.edge.second)}next(){do{this.increment()}while(null!==this.pos&&!this.associatedEdge())}collect(){return this.edge.first=this.pos,this.edge}associatedEdge(){return 1===this.tds.dimension||this.tds.triangles.indexOf(this.pos)t!==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 u(l());return e.infinite=!0,e}get finiteEdge(){if(this.dimension<1)throw new Error("aspo");const e=new h(this);while(e.valid)e.next();return e.collect()}insertDimUp(e=new u,t=!0){const i=this.createVertex();let n,s;switch(this.dimension++,this.dimension){case 0:n=this.triangles[0],s=new c(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 c).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;o{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},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){},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},af26:function(e,t,i){},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},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)if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;const s=i.center(),o=l.g2l(s);for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const r=Math.cos(i),c=Math.sin(i),d=new n.Ray(s,new n.Vector(r,c)),h=a.gameStore.BV.intersect(d);h.hit?(-1!==e&&(t.arc(o.x,o.y,u,e,i),e=-1),t.lineTo(l.g2lx(h.intersect.x),l.g2ly(h.intersect.y))):-1===e&&(t.lineTo(o.x+u*r,o.y+u*c),e=i)}-1!==e?t.arc(o.x,o.y,u,e,2*Math.PI):t.closePath(),t.fill()}else try{const n=c.computeVisibility(i.center());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){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(),e.setMovementBlock(e.movementObstruction),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}),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)}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.recalculateBV(),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);const s=Math.min(6,n.w/2);t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e)})}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))}onShapeMove(e){e.checkVisionSources(),e.visionObstruction&&a.gameStore.recalculateBV(),this.invalidate(!1)}}t.Layer=c},baeb: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})},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},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}inCorner(e,t){switch(t){case"ne":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"nw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"sw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;case"se":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}center(e){if(void 0===e)return this.refPoint.add(new n.Vector(this.w/2,this.h/2));this.refPoint.x=e.x-this.w/2,this.refPoint.y=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.x=Math.round(this.refPoint.x/e)*e,this.refPoint.y=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;"nw"===e?(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)):"ne"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint.y=l.l2gy(t.y)):"se"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y)):"sw"===e&&(this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint.x=l.l2gx(t.x)),this.w/=i,this.h/=i,this.w<0&&(this.refPoint.x+=this.w,this.w=Math.abs(this.w)),this.h<0&&(this.refPoint.y+=this.h,this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var n=i("baeb"),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){},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");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({template:""})],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)},ccf8:function(e,t,i){},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},cec8:function(e,t,i){"use strict";var n=i("d749"),s=i.n(n);s.a},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("1216"),s=i("d6be"),o=i("98ef"),r=i("4aee");function a(e,t=0,i=!1){const o=[e.x,e.y],r=[],a=s.PA_CDT.locate(o,null).loc;return null===a?(console.error("Triangle not found"),[]):(r.push(a.vertices[1].point),a.isConstrained(0)||l(o,a.vertices[2].point,a.vertices[1].point,a,0,r),r.push(a.vertices[2].point),a.isConstrained(1)||l(o,a.vertices[0].point,a.vertices[2].point,a,1,r),r.push(a.vertices[0].point),a.isConstrained(2)||l(o,a.vertices[1].point,a.vertices[0].point,a,2,r),i&&n.drawPolygon(r,"red"),r)}function l(e,t,i,n,s,a){const u=n.neighbours[s],d=u.indexT(n),h=r.ccw(d),f=r.cw(d),p=u.vertices[d],g=u.vertices[f],v=u.vertices[h],m=[u,h],y=[u,f],b=r.orientation(e,i,p.point),_=r.orientation(e,t,p.point);if(b===o.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&a.push(c(e,i,p.point,g.point)),_===o.Sign.COUNTERCLOCKWISE&&a.push(c(e,t,p.point,g.point));else{if(_===o.Sign.COUNTERCLOCKWISE)return l(e,t,i,u,h,a);l(e,p.point,i,u,h,a)}if(b!==o.Sign.CLOCKWISE&&_!==o.Sign.COUNTERCLOCKWISE&&a.push(p.point),_===o.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===o.Sign.CLOCKWISE&&a.push(c(e,i,p.point,v.point)),void(t!==v.point&&a.push(c(e,t,p.point,v.point)))):b===o.Sign.CLOCKWISE?l(e,t,i,u,f,a):l(e,t,p.point,u,f,a)}function c(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=a},cfc1:function(e,t,i){"use strict";var n=i("5e17"),s=i.n(n);s.a},d065:function(e,t,i){"use strict";i.r(t);var n=i("4b01"),s=i("f8b3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("2f43");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"078b3b76",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},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("6f92"),l=i("5e7c"),c=i("0180"),u=i("f10f"),d=i("92b1"),h=i("5a5c");let f=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=a.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=d.l2g(h.getMouse(e)),this.ruler=new l.Line(this.startPoint,this.startPoint,3,u.gameStore.rulerColour),this.text=new c.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.owners.push(u.gameStore.username),this.text.owners.push(u.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=a.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=d.l2g(h.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),l=Math.round(Math.sqrt(Math.pow(s,2)+Math.pow(o,2))*u.gameStore.unitSize/u.gameStore.gridSize)+" ft",c=Math.atan2(n*o,s),f=Math.min(this.startPoint.x,i.x)+s/2,p=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint.x=f,this.text.refPoint.y=p,this.text.text=l,this.text.angle=c,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=a.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!")}};f=n.__decorate([s.default],f),t.RulerTool=f},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=!1){const i=new o.CDT;for(const t of s.gameStore.visionBlockers){const s=n.layerManager.UUIDMap.get(t);if(!e||s.visibleInCanvas(n.layerManager.getLayer().canvas))for(let e=0;ee===this.shape.uuid)),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)):(d.gameStore.annotations.push(this.shape.uuid),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){const i=this.shape.owners.findIndex(e=>e===t);i>=0?this.shape.owners.splice(i,1,e.target.value):this.shape.owners.push(e.target.value),this.updateShape(d.gameStore.fowLOS)}removeOwner(e){const t=this.shape.owners.findIndex(t=>t===e);this.shape.owners.splice(t,1),this.updateShape(d.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=d.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?d.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&d.gameStore.visionSources.splice(t,1),u.layerManager.invalidateLight(),this.updateShape(!0)}updateAuraColour(e,t){const i=u.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}};n.__decorate([h.Prop()],f.prototype,"shape",void 0),f=n.__decorate([o.default({components:{Modal:a.default,"color-picker":r.default}})],f),t.default=f},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("f9e5"),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},df15: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})},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.isFile(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.selected=[]}},()=>{}),this.close())}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e198:function(e,t,i){},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},e756:function(e,t,i){},e914:function(e,t,i){"use strict";i.r(t);var n=i("160b"),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"}get selectedLayer(){return this.layers[this.selectedLayerIndex]}setVisionMode(e){this.visionMode=e}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}recalculateBV(e=!1){if(this.boardInitialized)if("triangle"===this.visionMode)d.triangulate(e);else{let e=!1,i=0;while(!e){e=!0;try{this.BV=Object.freeze(new c.BoundingVolume(this.visionBlockers))}catch(t){if(e=!1,i++,i>10)return void console.error(t)}}}}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)}}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.commit("recalculateBV")}};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,"recalculateBV",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,"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},f9e5: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})},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})}),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.setBoardInitialized(!0),c.gameStore.recalculateBV()}),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.e427aa98.js.map \ No newline at end of file diff --git a/server/static/js/app-legacy.e427aa98.js.map b/server/static/js/app-legacy.e427aa98.js.map deleted file mode 100644 index d3bd1bc76..000000000 --- a/server/static/js/app-legacy.e427aa98.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/createtoken_modal.vue?ed6e","webpack:///./src/game/ui/tools/createtoken_modal.vue?3856","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/assetManager/manager.vue?3cb9","webpack:///./src/assetManager/manager.vue?1f53","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/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/game/ui/selection/edit_dialog.vue?03e8","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/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","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/selection/edit_dialog.vue?391c","webpack:///./src/game/ui/selection/edit_dialog.vue?057b","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/shapecontext.vue?ab76","webpack:///./src/game/ui/selection/shapecontext.vue?3b0d","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/draw.vue?d046","webpack:///./src/game/ui/tools/draw.vue?57e4","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/menu/menu.vue?ed47","webpack:///./src/game/ui/menu/menu.vue?6a3f","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/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/ui/selection/shapecontext.vue?6173","webpack:///./src/game/ui/menu/menu.vue?0d5b","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/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/manager.vue?a11e","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/ui/tools/select.vue?2a55","webpack:///./src/game/ui/tools/select.vue?b488","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/menu/asset_node.vue?be10","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","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/ui/tools/draw.vue?6d03","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/auth/login.vue?5f02","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","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/game/ui/tools/createtoken_modal.vue?41c9","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/auth/login.vue?12cd","webpack:///./src/auth/login.vue?7cce","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/assetManager/contextMenu.vue?d089","webpack:///./src/assetManager/contextMenu.vue?b4b1","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/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/game/ui/tools/map.vue?7416","webpack:///./src/game/ui/tools/map.vue?9024","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","resizeDir","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","__webpack_exports__","_shapecontext_vue_vue_type_template_id_7111f3f6_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","isFile","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","includes","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_6bbf3b79_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","T","clearRect","ei","EdgeIterator","valid","collect","edge","first","vertices","ccw","second","cw","pos","triangles","isInfinite","po","arc","PI","fill","constraints","console","log","DP","DPL","DPT","render","_vm","_h","$createElement","_c","_self","attrs","visible","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","_v","for","directives","rawName","expression","id","domProps","input","composing","update:color","borderColour","ref","height","submit","staticRenderFns","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","gameStore","IS_DM","group","source","has_img","effects","index","Infinity","dragover","preventDefault","moveDrag","drop","stopPropagation","stopDrag","_l","dir","_s","multiple","hidden","change","title","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","staticStyle","font-size","_e","class","inode-selected","select","contextmenu","cm","open","startDrag","src","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","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_21f210ea_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","createShapeFromDict","shape","dummy","UUIDMap","has","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","asset","img","Image","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","skipLightUpdate","self","obstructionIndex","visionBlockers","changeBV","recalculateBV","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","ownedBy","ownedtokens","username","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","is_token","JSON","stringify","aurasFromServer","parse","bbox","getBoundingBox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","mask","updateNote","$set","style","calcHeight","removeNote","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","resizeDirection","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","corner","getCorner","getRef","Resize","Drag","localRefPoint","subtract","GroupSelect","endPoint","abs","og","direction","delta","multiply","ogDelta","calculateDelta","asDict","redraw","temporary","resize","bb","gm","inCorner","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","selectcontext","SelectContext","done","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","blockerBBox","found","intersectsWithInner","ray","fromPoints","normalize","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_078b3b76_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_078b3b76_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_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","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","ContextMenu","openEditDialog","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__","script","componentNormalizer","settings_1","FOWLayer","isVisionLayer","preFogShapes","idx","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","visibleInCanvas","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","fowLOS","drawImage","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","pow","targetX","targetY","round","resizedir","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","v","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","createElement","appendChild","getContext","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_d4f084a4___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","orientation","Sign","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","ZERO","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","LEFT_TURN","RIGHT_TURN","segSegDoIntersectContained","intersection","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","grid-column","updateShape","grid-column-start","checked","setToken","Array","isArray","_i","$$a","$$el","$$c","$$v","$$i","setVisionBlocker","setMovementBlocker","owner","placeholder","updateOwner","removeOwner","modifiers","number","_n","$forceUpdate","opacity","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_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","getLayers","background-color","setLayer","moveToBack","moveToFront","getInitiativeWord","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","Boolean","destination","href","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_7abc7fe9_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","opposite","fowColour","fowOpacity","colorpicker_vue_1","modal_vue_1","CreateTokenModal","updatePreview","newValue","oldValue","unitSize","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","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","onDeselect","onSelect","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","mid","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","--detailRight","--detailArrow","option-selected","max-width","_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","neighbours","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","isConstrained","triangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","removeConstrainedEdge","dimension","indf","locateInfo","locate","iLocate","insertb","lt","li","flipAround","propagatingFlip","depth","isFlipable","maxDepth","ni","flip","e1","e2","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","prev","th","marchLocate1D","marchLocate2D","ff","iv","pqt","Triangle","leftFirst","o0","o1","o2","sum","nTurns","settings","locations","rm-list-dm","_m","enter","rm","transition","settingsClick","overflow-y","overflow-x","assets","createNote","openNote","notes","step","readonly","invitationCode","rulerColour","changeVisionMode","text-decoration","changeLocation","createLocation","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","l2gz","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_66ccc134_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","event_bus_1","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","EventBus","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","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","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","sw","owned","joined","createRoom","newSessionName","tag","getPointDistance","Point","vec","scale","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","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","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","vertex","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","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","node_1","BoundingVolume","totalNodes","buildData","orderedPrims","nodes","_a","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7111f3f6_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_7111f3f6_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_21f210ea_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_21f210ea_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","move","localPos","fakeSetData","disabled","$store","state","game","updateOrder","model","callback","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","lazy","notAllowed","owns","syncInitiative","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","setTurn","nextTurn","LoadComponent","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","te_1","FOWPlayersLayer","skipPlayerFOW","drctx","maxLength","tokenId","visionMode","computeVisibility","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","destinationIndex","oldIdx","sign","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","topright","botleft","coreVisible","mx","my","_select_vue_vue_type_template_id_0ed49b21___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__","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__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7abc7fe9_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_7abc7fe9_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","draw_1","pa_1","it","drawt","Q","rawOutput","PA_CDT","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_6bbf3b79_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_6bbf3b79_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_edit_dialog_vue_vue_type_template_id_078b3b76_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","ruler","diffsign","xdiff","ydiff","label","atan2","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","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_66ccc134_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_66ccc134_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_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","focusin","focusout","login","required","visibility","register","EditDialog","addEmpty","hadAnnotation","an","ownerIndex","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_f93438ce___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","rename","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","_manager_vue_vue_type_template_id_d1ce9748___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","$off","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","freeze","isDM","success","tries","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","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","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,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X,MAC5C6V,EAAQ5J,EAAAO,aAAaC,SAAS+K,EAAM3B,OAC1CA,EAAM0P,eAAe/N,EAAOlc,EAAK6X,OAAO,KAE5C9L,EAAAf,OAAO0J,GAAG,qBAAuB1U,IAC7B,MAAMkc,EAAQvL,EAAAO,aAAakL,QAAQ1Z,IAAI1C,EAAK0E,WAC9BoI,IAAVoP,GACJA,EAAM6N,UAAU/pB,EAAKua,OAAO,KAEhCxO,EAAAf,OAAO0J,GAAG,eAAiB1U,IACvBgvC,EAAAY,YAAY3W,YAAYj5B,KAE5B+L,EAAAf,OAAO0J,GAAG,aAAeyM,IACrBA,EAAOvC,QAAQ1C,IACX,IAAKvL,EAAAO,aAAakL,QAAQC,IAAIH,EAAMxX,MAEhC,YADAmP,QAAQC,IAAI,kDAGhB,IAAKnD,EAAAO,aAAasJ,SAAS0B,EAAM3B,OAE7B,YADA1G,QAAQC,uDAAuDoI,EAAM3B,SAGzE,MAAM0zC,EAAYt9C,EAAAO,aAAakL,QAAQ1Z,IAAIwZ,EAAMxX,MACjDiM,EAAAO,aAAaC,SAAS+K,EAAM3B,OAAQ0R,YAAYgiC,GAAW","file":"static/js/app-legacy.e427aa98.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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, 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=7111f3f6&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=7111f3f6&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 \"7111f3f6\",\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.isFile(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--) assetStore.selected.push(inodes[i]);\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=6bbf3b79&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=6bbf3b79&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 \"6bbf3b79\",\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) {\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 (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 // console.log(`Edge: (*) ${fromP} > ${toP}`);\n // } else console.log(`Edge: ${fromP} > ${toP}`);\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 // 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 console.log(`Edges: ${I}/${J}`);\n console.log(`Faces: ${T}`);\n}\n\n(window).DP = drawPolygon;\n(window).DPL = drawPolygonL;\n(window).DPT = drawPolygonT;\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=66ccc134&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!./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","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=d1ce9748&\"","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=21f210ea&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=21f210ea&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 \"21f210ea\",\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 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\";\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_ === \"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 } 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 type: string;\n // The unique ID of this shape\n 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 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 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 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 abstract getCorner(point: GlobalPoint): string | undefined;\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(resizeDir: string, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources() {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let changeBV = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n changeBV = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n changeBV = true;\n }\n if (changeBV) gameStore.recalculateBV();\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) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n if (this.movementObstruction && obstructionIndex === -1) gameStore.movementblockers.push(this.uuid);\n else if (!this.movementObstruction && obstructionIndex >= 0)\n gameStore.movementblockers.splice(obstructionIndex, 1);\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 ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this.owners.includes(username);\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","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 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 { 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, g2lx, g2ly, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\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 resizeDirection = \"\";\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.owners.push(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 const corner = shape.getBoundingBox().getCorner(globalMouse);\n\n // Resize case, a corner is selected\n if (corner !== undefined) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n this.resizeDirection = corner;\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.recalculateBV(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.resizeDirection, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateBV(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n }\n } else {\n for (const sel of layer.selection) {\n const bb = sel.getBoundingBox();\n const gm = globalMouse;\n if (bb.inCorner(gm, \"nw\")) {\n document.body.style.cursor = \"nw-resize\";\n } else if (bb.inCorner(gm, \"ne\")) {\n document.body.style.cursor = \"ne-resize\";\n } else if (bb.inCorner(gm, \"se\")) {\n document.body.style.cursor = \"se-resize\";\n } else if (bb.inCorner(gm, \"sw\")) {\n document.body.style.cursor = \"sw-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n }\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.recalculateBV();\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.recalculateBV();\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)) {\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}\n","import { Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\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 (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}\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 this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n\n @Mutation\n isFile(inode: number): boolean {\n return this.files.includes(inode);\n }\n}\n\nexport const assetStore = getModule(AssetStore);\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!./edit_dialog.vue?vue&type=style&index=0&id=078b3b76&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=078b3b76&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!./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\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 { 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}\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","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\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean): void {\n super.addShape(shape, sync, temporary);\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 // 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 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\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 }\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&\"","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 inCorner(point: GlobalPoint, corner: string) {\n return false; // TODO\n }\n getCorner(point: GlobalPoint) {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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 true;\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(resizedir: string, 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.x = Math.min(this.startPoint.x, endPoint.x);\n this.rect.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\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=d4f084a4&\"\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[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 + y];\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","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('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=078b3b76&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!./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&\"","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\")])]):_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=7111f3f6&scoped=true&\"","\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 } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\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 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 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.y;\n let miny: number = this.refPoint.x;\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._points.includes(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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=7abc7fe9&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=7abc7fe9&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 \"7abc7fe9\",\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.owners.push(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 { MultiLine } from \"@/game/shapes/multiline\";\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\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"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 this.active = true;\n this.startPoint = l2g(getMouse(event));\n if (this.shapeSelect === \"square\")\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"circle\")\n this.shape = new Circle(this.startPoint.clone(), this.helperSize, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"paint-brush\") {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n } else return;\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.owners.push(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n gameStore.visionBlockers.push(this.shape.uuid);\n layer.addShape(this.shape, true, false);\n\n // Push brushhelper to back\n this.onDeselect();\n this.onSelect();\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 if (this.shapeSelect === \"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.x = Math.min(this.startPoint.x, endPoint.x);\n this.shape.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\n } else if (this.shapeSelect === \"circle\") {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n } else if (this.shapeSelect === \"paint-brush\") {\n (this.shape)._points.push(endPoint);\n }\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateBV(true);\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n if (this.shape.visionObstruction) gameStore.recalculateBV();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\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 }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly } 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.x, 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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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","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=7abc7fe9&scoped=true&\"","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);\n if (uuid !== undefined) this.uuid = 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 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 (window).TDS = this.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 const pi = intersection(pa, pb, pc, pd);\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.first) < &(*e2.first))\n || ( (&(*e1.first) == &(*e2.first)) && (ind1 < ind2)));*/\n // TODO: This is not proper.\n // console.error(\"This has to be done correctly\");\n return 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 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 = 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","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\":\"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}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',[_vm._v(\"BVH\")]),_c('option',[_vm._v(\"Triangle\")])])],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=21f210ea&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!./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.x = Math.round(asset.refPoint.x / gs) * gs;\n asset.refPoint.y = Math.round(asset.refPoint.y / gs) * gs;\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=66ccc134&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=66ccc134&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 \"66ccc134\",\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) delta = calculateDelta(delta, sel);\n }\n for (const sel of selection) {\n sel.refPoint.x += delta.x;\n sel.refPoint.y += delta.y;\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 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&\"","\n\n\n\n\n\n\n\n\n\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\";\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 center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n this.topLeft.x = centerPoint.x - this.w / 2;\n this.topLeft.y = centerPoint.y - this.h / 2;\n }\n inCorner(point: GlobalPoint, corner: string) {\n const sw = Math.min(6, this.w / 2) / 2;\n switch (corner) {\n case \"ne\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"nw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"sw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n case \"se\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\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 x: number;\n y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\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}\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}\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) {\n return this.x * other.x + this.y * other.y;\n }\n inverse() {\n return new Vector(1 / this.x, 1 / this.y);\n }\n length() {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize() {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse() {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number) {\n return new Vector(this.x * scale, this.y * scale);\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\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 { gameStore } from \"@/game/store\";\nimport { layerManager } from \"@/game/layers/manager\";\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 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(value);\n gameStore.recalculateBV();\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 { uuidv4 } from \"@/core/utils\";\nimport { CDT } from \"./cdt\";\nimport { ccw, cw, orientation } 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 uuid = uuidv4();\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\nexport class Vertex {\n infinite = false;\n private _point: Point | undefined;\n triangle: Triangle | undefined;\n uuid = uuidv4();\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","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 try {\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n } catch {\n console.warn(`Shape ${shape.type} - ${shape.uuid} cannot be used for vision blocking !!!`);\n shape.visionObstruction = false;\n gameStore.visionBlockers.splice(i, 1);\n throw new Error();\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 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=7111f3f6&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=7111f3f6&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=21f210ea&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=21f210ea&scoped=true&lang=css&\"","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.move && shape.visionObstruction) gameStore.recalculateBV();\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","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&\"","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/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.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, 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 if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n const center = token.center();\n const lcenter = g2l(center);\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 try {\n const polygon = computeVisibility(token.center());\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): 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();\n shape.setMovementBlock(shape.movementObstruction);\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 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);\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.recalculateBV();\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 const sw = Math.min(6, bb.w / 2);\n\n // topright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // topleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // botright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\n // botleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\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 onShapeMove(shape: Shape): void {\n shape.checkVisionSources();\n if (shape.visionObstruction) gameStore.recalculateBV();\n this.invalidate(false);\n }\n}\n","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=0ed49b21&\"","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 { 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 inCorner(point: GlobalPoint, corner: string) {\n switch (corner) {\n case \"ne\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"nw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"sw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n case \"se\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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.x = centerPoint.x - this.w / 2;\n this.refPoint.y = 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.x = Math.round(this.refPoint.x / gs) * gs;\n this.refPoint.y = 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(resizedir: string, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n if (resizedir === \"nw\") {\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 } else if (resizedir === \"ne\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint.y = l2gy(point.y);\n } else if (resizedir === \"se\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n } else if (resizedir === \"sw\") {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint.x = l2gx(point.x);\n }\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint.x += this.w;\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint.y += this.h;\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=0ed49b21&\"\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","\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\n@Component({ template: \"\" })\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}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule {\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 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=7abc7fe9&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=7abc7fe9&scoped=true&lang=css&\"","import { GlobalPoint } from \"@/game/geom\";\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, it = 0, drawt = false): number[][] {\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT.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","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=6bbf3b79&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=6bbf3b79&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=078b3b76&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=078b3b76&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 \"078b3b76\",\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\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(\"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.owners.push(gameStore.username);\n this.text.owners.push(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.x = xmid;\n this.text.refPoint.y = 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 = new CDT();\n\nexport function triangulate(partial: boolean = false) {\n const cdt = new CDT();\n for (const sh of gameStore.visionBlockers) {\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 PA_CDT = 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!./createtoken_modal.vue?vue&type=style&index=0&id=66ccc134&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=66ccc134&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!./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&\"","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\",\"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\",\"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=6bbf3b79&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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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 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 { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { Prop } from \"vue-property-decorator\";\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 updated() {\n this.addEmpty();\n }\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.owners.push(\"\");\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) {\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\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 const ownerIndex = this.shape.owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this.shape.owners.splice(ownerIndex, 1, event.target.value);\n else this.shape.owners.push(event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n const ownerIndex = this.shape.owners.findIndex(o => o === value);\n this.shape.owners.splice(ownerIndex, 1);\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=f93438ce&\"\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('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=d4f084a4&\"","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 AssetManager from \"@/assetManager/manager.vue\";\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.isFile(sel)) assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.selected = [];\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 { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=d1ce9748&\"\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 {\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\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n @Mutation\n setVisionMode(visionMode: \"bvh\" | \"triangle\") {\n this.visionMode = visionMode;\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 recalculateBV(partial = false) {\n // TODO: This needs to be cleaned up..\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(partial);\n else {\n let success = false;\n let tries = 0;\n while (!success) {\n success = true;\n try {\n this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n } catch (error) {\n success = false;\n tries++;\n if (tries > 10) {\n console.error(error);\n return;\n }\n }\n }\n }\n }\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 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.commit(\"recalculateBV\");\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 (_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=f93438ce&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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});\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.setBoardInitialized(true);\n gameStore.recalculateBV();\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-legacy.e9743101.js b/server/static/js/app-legacy.e9743101.js new file mode 100644 index 000000000..8ff8197c5 --- /dev/null +++ b/server/static/js/app-legacy.e9743101.js @@ -0,0 +1,2 @@ +(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){}getCorner(e){return""}visibleInCanvas(e){return!0}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("5050"),s=i("a68b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("9b4d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7111f3f6",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},"0a4e":function(e,t,i){"use strict";var n=i("1b04"),s=i.n(n);s.a},"0a75":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.isFile(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("d7f0"),s=i("1eee");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cfc1");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"6bbf3b79",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},1298: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})},"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},"160b":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})},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("ce6a"),s=i("8cd4");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("0a4e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"5ecfceea",null);a.options.__file="menu.vue",t["default"]=a.exports},"1b04":function(e,t,i){},"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},"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");function h(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 h=new n.GlobalPoint(e.x,e.y);if("rect"===e.type_){const t=e;i=new u.Rect(h,t.width,t.height,t.fill_colour,t.stroke_colour,t.uuid)}else if("circle"===e.type_){const t=e;i=new r.Circle(h,t.radius,t.fill_colour,t.stroke_colour,t.uuid)}else if("circulartoken"===e.type_){const t=e;i=new a.CircularToken(h,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(h,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(h,t.points.map(e=>new n.GlobalPoint(e.x,e.y)),t.line_width,t.stroke_colour,t.uuid)}else if("text"===e.type_){const t=e;i=new d.Text(h,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,h,t.width,t.height,t.uuid),n.onload=(()=>{s.layerManager.getLayer(e.layer).invalidate(!1)})}}return i.fromDict(e),i}t.createShapeFromDict=h},"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("6f92"),c=i("f10f"),u=i("92b1");class d{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)}visibleInCanvas(e){return!1}invalidate(e){const t=l.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(){const e=this,t=c.gameStore.visionBlockers.indexOf(this.uuid);let i=!1;this.visionObstruction&&-1===t?(c.gameStore.visionBlockers.push(this.uuid),i=!0):!this.visionObstruction&&t>=0&&(c.gameStore.visionBlockers.splice(t,1),i=!0),i&&c.gameStore.recalculateBV(),this.auras.forEach(t=>{const i=c.gameStore.visionSources,n=i.findIndex(e=>e.aura===t.uuid);t.visionSource&&-1===n?i.push({shape:e.uuid,aura:t.uuid}):!t.visionSource&&n>=0&&i.splice(n,1)});for(let n=c.gameStore.visionSources.length-1;n>=0;n--){const t=c.gameStore.visionSources[n];t.shape===e.uuid&&(e.auras.some(e=>e.uuid===t.aura&&e.visionSource)||c.gameStore.visionSources.splice(n,1))}}setMovementBlock(e){this.movementObstruction=e||!1;const t=c.gameStore.movementblockers.indexOf(this.uuid);this.movementObstruction&&-1===t?c.gameStore.movementblockers.push(this.uuid):!this.movementObstruction&&t>=0&&c.gameStore.movementblockers.splice(t,1)}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=c.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?c.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&c.gameStore.ownedtokens.splice(e,1)}}ownedBy(e){return void 0===e&&(e=c.gameStore.username),c.gameStore.IS_DM||this.owners.includes(e)}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(u.g2lx(t.topLeft.x)-5,u.g2ly(t.topLeft.y)-5,u.g2lz(t.w)+10,u.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const n=u.g2l(this.center()),o=u.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(n.x,n.y,u.g2lr(i.value),n.x,n.y,u.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:!c.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=l.layerManager.getLayer(this.layer),n=l.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}))}}t.Shape=d},"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("496c")),o=n.__importDefault(i("ea6a")),r=i("4a5b"),a=i("0bc6"),l=i("8f0a"),c=i("6f92"),u=i("b2ed"),d=i("f10f"),h=i("2838"),f=i("92b1"),p=i("5a5c"),g=n.__importDefault(i("65d9"));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 l.GlobalPoint(-1e3,-1e3);let y=class extends o.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizeDirection="",this.deltaChanged=!1,this.dragRay=new l.Ray(new l.LocalPoint(0,0),new l.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new u.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(d.gameStore.username)||this.selectionHelper.owners.push(d.gameStore.username);const i=p.getMouse(e),n=f.l2g(i);let s,o=!1;s=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let a=s.length-1;a>=0;a--){const e=s[a];if(!e.ownedBy())continue;const c=e.getBoundingBox().getCorner(n);if(void 0!==c){t.selection=[e],r.getRef("selectionInfo").shape=e,this.mode=v.Resize,this.resizeDirection=c,t.invalidate(!0),o=!0;break}if(e.contains(n)){const n=e;-1===t.selection.indexOf(n)&&(t.selection=[n],r.getRef("selectionInfo").shape=n),this.mode=v.Drag;const s=f.g2l(n.refPoint);this.dragRay=new l.Ray(s,i.subtract(s)),t.invalidate(!0),o=!0;break}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)r.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=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=p.getMouse(e),n=f.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 l.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=f.g2l(t.selection[t.selection.length-1].refPoint),o=s.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/d.gameStore.zoomFactor);const l=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!d.gameStore.IS_DM))for(const e of t.selection)e.uuid!==this.selectionHelper.uuid&&(r=h.calculateDelta(r,e),r!==l&&(this.deltaChanged=!0));for(const e of t.selection)e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.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.resizeDirection,i),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1);else for(const e of t.selection){const t=e.getBoundingBox(),i=n;t.inCorner(i,"nw")?document.body.style.cursor="nw-resize":t.inCorner(i,"ne")?document.body.style.cursor="ne-resize":t.inCorner(i,"se")?document.body.style.cursor="se-resize":t.inCorner(i,"sw")?document.body.style.cursor="sw-resize":document.body.style.cursor="default"}}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.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===f.g2lx(i.refPoint.x)&&this.dragRay.origin.y===f.g2ly(i.refPoint.y))return;!d.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(d.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.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===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.layerManager.getLayer(),i=p.getMouse(e),n=f.l2g(i);for(const s of t.selection)if(s.contains(n))return t.selection=[s],r.getRef("selectionInfo").shape=s,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,s);this.$refs.selectcontext.open(e)}};y=n.__decorate([g.default({components:{SelectContext:s.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");function r(e,t,i){void 0===i&&(i=[]);const a=t.getBoundingBox(),l=a.offset(e);let c=!1;for(const r of o.gameStore.movementblockers){if(i.includes(r))continue;const t=s.layerManager.UUIDMap.get(r),o=t.getBoundingBox();let u=o.intersectsWithInner(l);if(!u){const t=n.Ray.fromPoints(a.topLeft.add(e.normalize()),l.topLeft),i=t.direction.inverse(),s=[i.x<0,i.y<0];u=o.intersectP(t,i,s).hit}if(u){const t=o.center(),s=a.center(),l=s.subtract(t),u=new n.Vector(1,0),d=new n.Vector(0,1);let h=l.dot(u),f=l.dot(d);h>o.w/2&&(h=o.w/2),h<-o.w/2&&(h=-o.w/2),f>o.h/2&&(f=o.h/2),f<-o.h/2&&(f=-o.h/2);const p=t.add(u.multiply(h)).add(d.multiply(f));p.x===a.topLeft.x||p.x===a.topRight.x?e=new n.Vector(0,e.y):p.y===a.topLeft.y||p.y===a.botLeft.y?e=new n.Vector(e.x,0):p.xa.topRight.x?e=new n.Vector(p.x-a.topRight.x,e.y):p.ya.botLeft.y&&(e=new n.Vector(e.x,p.y-a.botLeft.y)),c=!0,i.push(r);break}}return c&&(e=r(e,t,i)),e}t.calculateDelta=r},"28b6":function(e,t,i){"use strict";var n=i("ee96"),s=i.n(n);s.a},"2b48":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("f10f");function o(){n.socket.emit("Client.Options.Set",{locationOptions:{panX:s.gameStore.panX,panY:s.gameStore.panY,zoomFactor:s.gameStore.zoomFactor}})}t.sendClientOptions=o},"2baf":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("60a3"),a=i("4a5b");let l=class extends s.default{constructor(){super(...arguments),this.showImage=null}get folders(){return Object.keys(this.asset).filter(e=>!["__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 l.layerManager.layers.filter(e=>e.selectable&&(c.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return l.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()}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},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()});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 d=c.getUnitDistance(u.value+u.dim),h=t.center(),f=c.g2l(h),p=new a.Circle(h,d);if(!p.visibleInCanvas(e.canvas))continue;let g=-1;const v=new Path2D;let m;v.moveTo(f.x,f.y);for(let s=0;s<2*Math.PI;s+=r.Settings.angleSteps/180*Math.PI){const t=new n.GlobalPoint(h.x+d*Math.cos(s),h.y+d*Math.sin(s));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(h.x),c.g2ly(h.y)),i.lineTo(c.g2lx(t.x),c.g2ly(t.y)),i.stroke());const o=n.Ray.fromPoints(h,t),a=l.gameStore.BV.intersect(o);if(0===s&&(m=a.hit?a.intersect:t),a.hit)-1!==g&&(v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,s),g=-1),v.lineTo(c.g2lx(a.intersect.x),c.g2ly(a.intersect.y));else if(-1===g){g=s;const i=c.g2l(t);e.lineTo(i.x,i.y)}}if(-1===g?v.lineTo(c.g2lx(m.x),c.g2ly(m.y)):v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(f.x,f.y,c.g2lr(u.value),f.x,f.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(v)}u.lastPath=v}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=d},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},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("df15"),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;e-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("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})},"4bc3":function(e,t,i){"use strict";i.r(t);var n=i("2baf"),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},5050:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return void 0!==e.getActiveLayer()?i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.getLayers().length>1?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")])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"52a8":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("60a3");let a=class extends s.default{constructor(){super(...arguments),this.positioned=!1,this.offsetX=0,this.offsetY=0,this.screenX=0,this.screenY=0,this.dragging=!1}mounted(){this.updatePosition()}updated(){this.updatePosition()}close(e){this.$emit("close")}updatePosition(){if(!this.positioned){const e=this.$refs.container;if(0===e.offsetWidth&&0===e.offsetHeight)return;this.$refs.container.style.left=(window.innerWidth-e.offsetWidth)/2+"px",this.$refs.container.style.top=(window.innerHeight-e.offsetHeight)/2+"px",this.positioned=!0}}dragStart(e){null!==e&&null!==e.dataTransfer&&(e.dataTransfer.setData("Hack",""),e.dataTransfer.setDragImage(this.$refs.container,e.offsetX,e.offsetY),this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.screenX=e.screenX,this.screenY=e.screenY,this.dragging=!0)}dragEnd(e){this.dragging=!1;let t=e.clientX-this.offsetX,i=e.clientY-this.offsetY;0===e.clientX&&0===e.clientY&&0===e.pageX&&0===e.pageY&&(t=parseInt(this.$refs.container.style.left,10)-(this.screenX-e.screenX),i=parseInt(this.$refs.container.style.top,10)-(this.screenY-e.screenY)),t<0&&(t=0),t>window.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}asDict(){return Object.assign(this.getBaseDict(),{line_width:this.lineWidth,points:this._points.map(e=>({x:e.x,y:e.y}))})}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.y,i=this.refPoint.x,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._points.includes(e)}center(e){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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("605b"),s=i("6f8d");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cec8");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7abc7fe9",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.owners.push(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("574e"),f=i("b2ed"),p=i("f10f"),g=i("92b1"),v=i("5a5c");let m=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=g.getUnitDistance(p.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:g.getUnitDistance(this.unitSize)/8}get IS_DM(){return p.gameStore.IS_DM}get unitSize(){return p.gameStore.unitSize}get useGrid(){return p.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=!0,this.startPoint=g.l2g(v.getMouse(e)),"square"===this.shapeSelect)this.shape=new f.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);else if("circle"===this.shapeSelect)this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);else{if("paint-brush"!==this.shapeSelect)return;this.shape=new h.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour}"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.owners.push(p.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),p.gameStore.visionBlockers.push(this.shape.uuid),t.addShape(this.shape,!0,!1),this.onDeselect(),this.onSelect()}else console.log("No active layer!")}onMouseMove(e){const t=g.l2g(v.getMouse(e)),i=this.getLayer();void 0!==i?(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&&("square"===this.shapeSelect?(this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint.x=Math.min(this.startPoint.x,t.x),this.shape.refPoint.y=Math.min(this.startPoint.y,t.y)):"circle"===this.shapeSelect?this.shape.r=t.subtract(this.startPoint).length():"paint-brush"===this.shapeSelect&&this.shape._points.push(t),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&p.gameStore.recalculateBV(!0),i.invalidate(!1))):console.log("No active layer!")}onMouseUp(e){this.active&&null!==this.shape&&(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.shape.visionObstruction&&p.gameStore.recalculateBV(),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)}};n.__decorate([o.Watch("fillColour")],m.prototype,"onFillChange",null),n.__decorate([o.Watch("modeSelect")],m.prototype,"onModeUpdate",null),m=n.__decorate([s.default({components:{"color-picker":r.default}})],m),t.default=m},"5e17":function(e,t,i){},"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.x,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){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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},"605b":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})},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){},"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),this.type="assetrect",this.src="",void 0!==s&&(this.uuid=s),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,window.TDS=this.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.x=Math.round(a.refPoint.x/e)*e,a.refPoint.y=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("1298"),s=i("778b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("d71e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"66ccc134",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),n=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const o=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,n*=e.keyCode<=38?-1:1;let r=new a.Vector(i,n);if(!e.shiftKey||!c.gameStore.IS_DM)for(const e of o)r=u.calculateDelta(r,e);for(const e of o)e.refPoint.x+=r.x,e.refPoint.y+=r.y,e.refPoint.x%t===0&&e.refPoint.y%t===0||e.snapToGrid(),s.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1});l.layerManager.getLayer().invalidate(!1)}else c.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),c.gameStore.increasePanY(n*(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},"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},8095:function(e,t,i){},"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");class s{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 s(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),o=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new s(new n.GlobalPoint(t,o),i-t,r-o)}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(e){if(void 0===e)return this.topLeft.add(new n.Vector(this.w/2,this.h/2));this.topLeft.x=e.x-this.w/2,this.topLeft.y=e.y-this.h/2}inCorner(e,t){const i=Math.min(6,this.w/2)/2;switch(t){case"ne":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"nw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"sw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;case"se":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}getMaxExtent(){return this.w>this.h?0:1}}t.BoundingRect=s},"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}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}}t.Point=s;class o extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}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(1/this.x,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)}}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})}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(t),h.gameStore.recalculateBV(),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}}l._counter=0,t.Triangle=l;class c{constructor(e){this.infinite=!1,this._point=e}get point(){return this._point}set point(e){this._point=e,this.infinite=!1}}t.Vertex=c;class u{constructor(e,t){if(this.v=e,this.t=t,null===e?this.t=null:null===t&&(this.t=e.triangle),null==this.t||this.t.dimension<1)this.ri=0,this.v=null,this.t=null;else{const t=this.t.indexV(e);2===this.t.dimension?this.ri=n.ccw(t):this.ri=2}this._ri=this.ri,this._v=this.v,this._t=this.t}get valid(){return null!==this.t&&null!==this.v}next(){let e=this.t.indexV(this.v);return 1===this.t.dimension?this.t=this.t.neighbours[0===e?1:0]:(this.t=this.t.neighbours[n.ccw(e)],e=this.t.indexV(this.v),this.ri=n.ccw(e)),this.ri!==this._ri||this.v!==this._v||this.t!==this._t}}t.EdgeCirculator=u;class d{constructor(e){if(this.i=0,this.edge=new p,this._es=0,this.tds=e,this.edge.second=0,e.dimension<=0)this.pos=null;else{this.pos=e.triangles[0],1===e.dimension&&(this.edge.second=2);while(null!==this.pos&&!this.associatedEdge())throw new Error("[poi");1===e.dimension&&(this._es=2)}}get valid(){return(null!==this.pos||this._es!==this.edge.second)&&this.pos.isInfinite(this.edge.second)}next(){do{this.increment()}while(null!==this.pos&&!this.associatedEdge())}collect(){return this.edge.first=this.pos,this.edge}associatedEdge(){return 1===this.tds.dimension||this.tds.triangles.indexOf(this.pos)t!==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;o{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},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){},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},af26:function(e,t,i){},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},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)if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;const s=i.center(),o=l.g2l(s);for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const r=Math.cos(i),c=Math.sin(i),d=new n.Ray(s,new n.Vector(r,c)),h=a.gameStore.BV.intersect(d);h.hit?(-1!==e&&(t.arc(o.x,o.y,u,e,i),e=-1),t.lineTo(l.g2lx(h.intersect.x),l.g2ly(h.intersect.y))):-1===e&&(t.lineTo(o.x+u*r,o.y+u*c),e=i)}-1!==e?t.arc(o.x,o.y,u,e,2*Math.PI):t.closePath(),t.fill()}else try{const n=c.computeVisibility(i.center());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){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(),e.setMovementBlock(e.movementObstruction),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}),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)}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.recalculateBV(),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);const s=Math.min(6,n.w/2);t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e)})}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))}onShapeMove(e){e.checkVisionSources(),e.visionObstruction&&a.gameStore.recalculateBV(),this.invalidate(!1)}}t.Layer=c},baeb: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})},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},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}inCorner(e,t){switch(t){case"ne":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"nw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"sw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;case"se":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}center(e){if(void 0===e)return this.refPoint.add(new n.Vector(this.w/2,this.h/2));this.refPoint.x=e.x-this.w/2,this.refPoint.y=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.x=Math.round(this.refPoint.x/e)*e,this.refPoint.y=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;"nw"===e?(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)):"ne"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint.y=l.l2gy(t.y)):"se"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y)):"sw"===e&&(this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint.x=l.l2gx(t.x)),this.w/=i,this.h/=i,this.w<0&&(this.refPoint.x+=this.w,this.w=Math.abs(this.w)),this.h<0&&(this.refPoint.y+=this.h,this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var n=i("baeb"),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){},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");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({template:""})],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},ce6a: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:"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}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",[e._v("BVH")]),i("option",[e._v("Triangle")])])],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})},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},cec8:function(e,t,i){"use strict";var n=i("d749"),s=i.n(n);s.a},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("1216"),s=i("d6be"),o=i("98ef"),r=i("4aee");function a(e,t=0,i=!1){const o=[e.x,e.y],r=[],a=s.PA_CDT.locate(o,null).loc;return null===a?(console.error("Triangle not found"),[]):(r.push(a.vertices[1].point),a.isConstrained(0)||l(o,a.vertices[2].point,a.vertices[1].point,a,0,r),r.push(a.vertices[2].point),a.isConstrained(1)||l(o,a.vertices[0].point,a.vertices[2].point,a,1,r),r.push(a.vertices[0].point),a.isConstrained(2)||l(o,a.vertices[1].point,a.vertices[0].point,a,2,r),i&&n.drawPolygon(r,"red"),r)}function l(e,t,i,n,s,a){const u=n.neighbours[s],d=u.indexT(n),h=r.ccw(d),f=r.cw(d),p=u.vertices[d],g=u.vertices[f],v=u.vertices[h],m=[u,h],y=[u,f],b=r.orientation(e,i,p.point),_=r.orientation(e,t,p.point);if(b===o.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&a.push(c(e,i,p.point,g.point)),_===o.Sign.COUNTERCLOCKWISE&&a.push(c(e,t,p.point,g.point));else{if(_===o.Sign.COUNTERCLOCKWISE)return l(e,t,i,u,h,a);l(e,p.point,i,u,h,a)}if(b!==o.Sign.CLOCKWISE&&_!==o.Sign.COUNTERCLOCKWISE&&a.push(p.point),_===o.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===o.Sign.CLOCKWISE&&a.push(c(e,i,p.point,v.point)),void(t!==v.point&&a.push(c(e,t,p.point,v.point)))):b===o.Sign.CLOCKWISE?l(e,t,i,u,f,a):l(e,t,p.point,u,f,a)}function c(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=a},cfc1:function(e,t,i){"use strict";var n=i("5e17"),s=i.n(n);s.a},d065:function(e,t,i){"use strict";i.r(t);var n=i("4b01"),s=i("f8b3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("2f43");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"078b3b76",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},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("6f92"),l=i("5e7c"),c=i("0180"),u=i("f10f"),d=i("92b1"),h=i("5a5c");let f=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=a.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=d.l2g(h.getMouse(e)),this.ruler=new l.Line(this.startPoint,this.startPoint,3,u.gameStore.rulerColour),this.text=new c.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.owners.push(u.gameStore.username),this.text.owners.push(u.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=a.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=d.l2g(h.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),l=Math.round(Math.sqrt(Math.pow(s,2)+Math.pow(o,2))*u.gameStore.unitSize/u.gameStore.gridSize)+" ft",c=Math.atan2(n*o,s),f=Math.min(this.startPoint.x,i.x)+s/2,p=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint.x=f,this.text.refPoint.y=p,this.text.text=l,this.text.angle=c,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=a.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!")}};f=n.__decorate([s.default],f),t.RulerTool=f},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=!1){const i=new o.CDT;for(const t of s.gameStore.visionBlockers){const s=n.layerManager.UUIDMap.get(t);if(!e||s.visibleInCanvas(n.layerManager.getLayer().canvas))for(let e=0;ee===this.shape.uuid)),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)):(d.gameStore.annotations.push(this.shape.uuid),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){const i=this.shape.owners.findIndex(e=>e===t);i>=0?this.shape.owners.splice(i,1,e.target.value):this.shape.owners.push(e.target.value),this.updateShape(d.gameStore.fowLOS)}removeOwner(e){const t=this.shape.owners.findIndex(t=>t===e);this.shape.owners.splice(t,1),this.updateShape(d.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=d.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?d.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&d.gameStore.visionSources.splice(t,1),u.layerManager.invalidateLight(),this.updateShape(!0)}updateAuraColour(e,t){const i=u.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}};n.__decorate([h.Prop()],f.prototype,"shape",void 0),f=n.__decorate([o.default({components:{Modal:a.default,"color-picker":r.default}})],f),t.default=f},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("f9e5"),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},df15: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})},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.isFile(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.selected=[]}},()=>{}),this.close())}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e198:function(e,t,i){},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},e756:function(e,t,i){},e914:function(e,t,i){"use strict";i.r(t);var n=i("160b"),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"}get selectedLayer(){return this.layers[this.selectedLayerIndex]}setVisionMode(e){this.visionMode=e}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}recalculateBV(e=!1){if(this.boardInitialized)if("triangle"===this.visionMode)d.triangulate(e);else{let e=!1,i=0;while(!e){e=!0;try{this.BV=Object.freeze(new c.BoundingVolume(this.visionBlockers))}catch(t){if(e=!1,i++,i>10)return void console.error(t)}}}}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)}}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.commit("recalculateBV")}};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,"recalculateBV",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,"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},f9e5: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})},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})}),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.setBoardInitialized(!0),c.gameStore.recalculateBV()}),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.e9743101.js.map \ No newline at end of file diff --git a/server/static/js/app-legacy.e9743101.js.map b/server/static/js/app-legacy.e9743101.js.map new file mode 100644 index 000000000..dcfe49af0 --- /dev/null +++ b/server/static/js/app-legacy.e9743101.js.map @@ -0,0 +1 @@ +{"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/ui/menu/menu.vue?4fd1","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/createtoken_modal.vue?ed6e","webpack:///./src/game/ui/tools/createtoken_modal.vue?3856","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/assetManager/manager.vue?3cb9","webpack:///./src/assetManager/manager.vue?1f53","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/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/game/ui/selection/edit_dialog.vue?03e8","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/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","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/selection/edit_dialog.vue?391c","webpack:///./src/game/ui/selection/edit_dialog.vue?057b","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/shapecontext.vue?ab76","webpack:///./src/game/ui/selection/shapecontext.vue?3b0d","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/draw.vue?d046","webpack:///./src/game/ui/tools/draw.vue?57e4","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/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/ui/selection/shapecontext.vue?6173","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/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/manager.vue?a11e","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/ui/tools/select.vue?2a55","webpack:///./src/game/ui/tools/select.vue?b488","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/menu/asset_node.vue?be10","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","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/game/ui/menu/menu.vue?28ea","webpack:///./src/game/ui/menu/menu.vue?16da","webpack:///./src/invitation/invitation.ts","webpack:///./src/core/components/modals/prompt.vue","webpack:///./src/game/ui/tools/draw.vue?6d03","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/auth/login.vue?5f02","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","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/game/ui/tools/createtoken_modal.vue?41c9","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/auth/login.vue?12cd","webpack:///./src/auth/login.vue?7cce","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/assetManager/contextMenu.vue?d089","webpack:///./src/assetManager/contextMenu.vue?b4b1","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/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/game/ui/tools/map.vue?7416","webpack:///./src/game/ui/tools/map.vue?9024","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","resizeDir","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","__webpack_exports__","_shapecontext_vue_vue_type_template_id_7111f3f6_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__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_5ecfceea_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_5ecfceea_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","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","isFile","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","includes","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_6bbf3b79_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","render","_vm","_h","$createElement","_c","_self","attrs","visible","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","_v","for","directives","rawName","expression","id","domProps","input","composing","update:color","borderColour","ref","height","submit","staticRenderFns","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","gameStore","IS_DM","group","source","has_img","effects","index","dragover","preventDefault","moveDrag","drop","stopPropagation","stopDrag","_l","dir","_s","multiple","hidden","change","title","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","staticStyle","font-size","_e","class","inode-selected","select","contextmenu","cm","open","startDrag","src","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","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_5ecfceea_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","createShapeFromDict","shape","dummy","UUIDMap","has","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","asset","img","Image","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","skipLightUpdate","self","obstructionIndex","visionBlockers","changeBV","recalculateBV","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","ownedBy","ownedtokens","username","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","is_token","JSON","stringify","aurasFromServer","parse","bbox","getBoundingBox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","mask","updateNote","$set","style","calcHeight","removeNote","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","resizeDirection","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","corner","getCorner","getRef","Resize","Drag","localRefPoint","subtract","GroupSelect","endPoint","abs","og","direction","delta","multiply","ogDelta","calculateDelta","asDict","redraw","temporary","resize","bb","gm","inCorner","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","selectcontext","SelectContext","done","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","blockerBBox","found","intersectsWithInner","ray","fromPoints","normalize","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_078b3b76_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_078b3b76_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_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","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","ContextMenu","openEditDialog","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__","script","componentNormalizer","settings_1","FOWLayer","isVisionLayer","preFogShapes","idx","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","visibleInCanvas","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","fowLOS","drawImage","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","pow","targetX","targetY","round","resizedir","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","v","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","createElement","appendChild","getContext","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_d4f084a4___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","orientation","Sign","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","ZERO","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","LEFT_TURN","RIGHT_TURN","segSegDoIntersectContained","intersection","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","grid-column","updateShape","grid-column-start","checked","setToken","Array","isArray","_i","$$a","$$el","$$c","$$v","$$i","setVisionBlocker","setMovementBlocker","owner","placeholder","updateOwner","removeOwner","modifiers","number","_n","$forceUpdate","opacity","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_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","getLayers","background-color","setLayer","moveToBack","moveToFront","getInitiativeWord","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","Boolean","destination","href","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_7abc7fe9_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","opposite","fowColour","fowOpacity","colorpicker_vue_1","modal_vue_1","CreateTokenModal","updatePreview","newValue","oldValue","unitSize","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","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","onDeselect","onSelect","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","mid","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","--detailRight","--detailArrow","option-selected","max-width","_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","neighbours","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","isConstrained","triangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","BoundingBox","dilate","overlaps","removeConstrainedEdge","dimension","indf","locateInfo","locate","iLocate","insertb","lt","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","prev","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","l2gz","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_66ccc134_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","event_bus_1","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","EventBus","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","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","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","sw","owned","joined","_m","createRoom","newSessionName","tag","getPointDistance","Point","vec","scale","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","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","settings","locations","setUseGrid","setFullFOW","setFOWOpacity","setLineOfSight","setUnitSize","setGridSize","setGridColour","setFOWColour","rulerColour","setRulerColour","nextElementSibling","newNote","openNote","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","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","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","_a","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7111f3f6_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_7111f3f6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","move","localPos","fakeSetData","disabled","$store","state","game","updateOrder","model","callback","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","lazy","notAllowed","owns","syncInitiative","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","setTurn","nextTurn","LoadComponent","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","te_1","FOWPlayersLayer","skipPlayerFOW","drctx","maxLength","tokenId","visionMode","computeVisibility","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","destinationIndex","oldIdx","sign","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","topright","botleft","coreVisible","mx","my","_select_vue_vue_type_template_id_0ed49b21___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__","createtokendialog","Logout","CoreStore","init","App_vue_1","router_1","config","productionTip","devtools","performance","$mount","props","rm-list-dm","enter","rm","transition","settingsClick","overflow-y","overflow-x","assets","createNote","notes","step","readonly","invitationCode","changeVisionMode","text-decoration","changeLocation","createLocation","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__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7abc7fe9_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_7abc7fe9_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","draw_1","pa_1","it","drawt","Q","rawOutput","PA_CDT","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_6bbf3b79_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_6bbf3b79_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_edit_dialog_vue_vue_type_template_id_078b3b76_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","ruler","diffsign","xdiff","ydiff","label","atan2","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","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_66ccc134_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_66ccc134_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_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","focusin","focusout","login","required","visibility","register","EditDialog","addEmpty","hadAnnotation","an","ownerIndex","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_f93438ce___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","rename","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","_manager_vue_vue_type_template_id_d1ce9748___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","$off","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","freeze","isDM","success","tries","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","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","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,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,KA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YzV,YAAY15B,KAE5BiM,EAAAf,OAAO8J,GAAG,aAAewM,IACrBA,EAAOvC,QAAQ1C,IACX,IAAK1L,EAAAO,aAAaqL,QAAQC,IAAIH,EAAM7X,MAEhC,YADAkP,QAAQC,IAAI,kDAGhB,IAAKhD,EAAAO,aAAayJ,SAAS0B,EAAM3B,OAE7B,YADAhH,QAAQC,uDAAuD0I,EAAM3B,SAGzE,MAAMo0C,EAAYn+C,EAAAO,aAAaqL,QAAQ/Z,IAAI6Z,EAAM7X,MACjDmM,EAAAO,aAAaC,SAASkL,EAAM3B,OAAQ0R,YAAY0iC,GAAW","file":"static/js/app-legacy.e9743101.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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, 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=7111f3f6&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=7111f3f6&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 \"7111f3f6\",\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 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=5ecfceea&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=5ecfceea&scoped=true&lang=css&\"","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.isFile(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--) assetStore.selected.push(inodes[i]);\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=6bbf3b79&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=6bbf3b79&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 \"6bbf3b79\",\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","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=66ccc134&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!./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","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=d1ce9748&\"","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=5ecfceea&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=5ecfceea&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 \"5ecfceea\",\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 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\";\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_ === \"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 } 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 type: string;\n // The unique ID of this shape\n 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 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 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 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 abstract getCorner(point: GlobalPoint): string | undefined;\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(resizeDir: string, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources() {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let changeBV = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n changeBV = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n changeBV = true;\n }\n if (changeBV) gameStore.recalculateBV();\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) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n if (this.movementObstruction && obstructionIndex === -1) gameStore.movementblockers.push(this.uuid);\n else if (!this.movementObstruction && obstructionIndex >= 0)\n gameStore.movementblockers.splice(obstructionIndex, 1);\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 ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this.owners.includes(username);\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","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 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 { 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, g2lx, g2ly, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\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 resizeDirection = \"\";\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.owners.push(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 const corner = shape.getBoundingBox().getCorner(globalMouse);\n\n // Resize case, a corner is selected\n if (corner !== undefined) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n this.resizeDirection = corner;\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.recalculateBV(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.resizeDirection, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateBV(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n }\n } else {\n for (const sel of layer.selection) {\n const bb = sel.getBoundingBox();\n const gm = globalMouse;\n if (bb.inCorner(gm, \"nw\")) {\n document.body.style.cursor = \"nw-resize\";\n } else if (bb.inCorner(gm, \"ne\")) {\n document.body.style.cursor = \"ne-resize\";\n } else if (bb.inCorner(gm, \"se\")) {\n document.body.style.cursor = \"se-resize\";\n } else if (bb.inCorner(gm, \"sw\")) {\n document.body.style.cursor = \"sw-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n }\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.recalculateBV();\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.recalculateBV();\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)) {\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}\n","import { Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\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 (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}\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 this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n\n @Mutation\n isFile(inode: number): boolean {\n return this.files.includes(inode);\n }\n}\n\nexport const assetStore = getModule(AssetStore);\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!./edit_dialog.vue?vue&type=style&index=0&id=078b3b76&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=078b3b76&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!./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\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 { 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}\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","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\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean): void {\n super.addShape(shape, sync, temporary);\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 // 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 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\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 }\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&\"","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 inCorner(point: GlobalPoint, corner: string) {\n return false; // TODO\n }\n getCorner(point: GlobalPoint) {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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 true;\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(resizedir: string, 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.x = Math.min(this.startPoint.x, endPoint.x);\n this.rect.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\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=d4f084a4&\"\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","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('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=078b3b76&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!./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&\"","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\")])]):_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=7111f3f6&scoped=true&\"","\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 } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\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 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 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.y;\n let miny: number = this.refPoint.x;\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._points.includes(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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=7abc7fe9&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=7abc7fe9&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 \"7abc7fe9\",\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.owners.push(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 { MultiLine } from \"@/game/shapes/multiline\";\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\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"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 this.active = true;\n this.startPoint = l2g(getMouse(event));\n if (this.shapeSelect === \"square\")\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"circle\")\n this.shape = new Circle(this.startPoint.clone(), this.helperSize, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"paint-brush\") {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n } else return;\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.owners.push(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n gameStore.visionBlockers.push(this.shape.uuid);\n layer.addShape(this.shape, true, false);\n\n // Push brushhelper to back\n this.onDeselect();\n this.onSelect();\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 if (this.shapeSelect === \"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.x = Math.min(this.startPoint.x, endPoint.x);\n this.shape.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\n } else if (this.shapeSelect === \"circle\") {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n } else if (this.shapeSelect === \"paint-brush\") {\n (this.shape)._points.push(endPoint);\n }\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateBV(true);\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n if (this.shape.visionObstruction) gameStore.recalculateBV();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\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 }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly } 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.x, 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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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","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=7abc7fe9&scoped=true&\"","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);\n if (uuid !== undefined) this.uuid = 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 (window).TDS = this.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.x = Math.round(asset.refPoint.x / gs) * gs;\n asset.refPoint.y = Math.round(asset.refPoint.y / gs) * gs;\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=66ccc134&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=66ccc134&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 \"66ccc134\",\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) delta = calculateDelta(delta, sel);\n }\n for (const sel of selection) {\n sel.refPoint.x += delta.x;\n sel.refPoint.y += delta.y;\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 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&\"","\n\n\n\n\n\n\n\n\n\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\";\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 center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n this.topLeft.x = centerPoint.x - this.w / 2;\n this.topLeft.y = centerPoint.y - this.h / 2;\n }\n inCorner(point: GlobalPoint, corner: string) {\n const sw = Math.min(6, this.w / 2) / 2;\n switch (corner) {\n case \"ne\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"nw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"sw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n case \"se\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\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 x: number;\n y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\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}\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}\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) {\n return this.x * other.x + this.y * other.y;\n }\n inverse() {\n return new Vector(1 / this.x, 1 / this.y);\n }\n length() {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize() {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse() {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number) {\n return new Vector(this.x * scale, this.y * scale);\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\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 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(value);\n gameStore.recalculateBV();\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\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 try {\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n } catch {\n console.warn(`Shape ${shape.type} - ${shape.uuid} cannot be used for vision blocking !!!`);\n shape.visionObstruction = false;\n gameStore.visionBlockers.splice(i, 1);\n throw new Error();\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 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=7111f3f6&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=7111f3f6&scoped=true&lang=css&\"","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.move && shape.visionObstruction) gameStore.recalculateBV();\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","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&\"","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/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.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, 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 if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n const center = token.center();\n const lcenter = g2l(center);\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 try {\n const polygon = computeVisibility(token.center());\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): 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();\n shape.setMovementBlock(shape.movementObstruction);\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 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);\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.recalculateBV();\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 const sw = Math.min(6, bb.w / 2);\n\n // topright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // topleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // botright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\n // botleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\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 onShapeMove(shape: Shape): void {\n shape.checkVisionSources();\n if (shape.visionObstruction) gameStore.recalculateBV();\n this.invalidate(false);\n }\n}\n","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=0ed49b21&\"","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 { 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 inCorner(point: GlobalPoint, corner: string) {\n switch (corner) {\n case \"ne\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"nw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"sw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n case \"se\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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.x = centerPoint.x - this.w / 2;\n this.refPoint.y = 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.x = Math.round(this.refPoint.x / gs) * gs;\n this.refPoint.y = 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(resizedir: string, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n if (resizedir === \"nw\") {\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 } else if (resizedir === \"ne\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint.y = l2gy(point.y);\n } else if (resizedir === \"se\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n } else if (resizedir === \"sw\") {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint.x = l2gx(point.x);\n }\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint.x += this.w;\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint.y += this.h;\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=0ed49b21&\"\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","\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\n@Component({ template: \"\" })\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}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule {\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","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\":\"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}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',[_vm._v(\"BVH\")]),_c('option',[_vm._v(\"Triangle\")])])],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=5ecfceea&scoped=true&\"","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 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=7abc7fe9&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=7abc7fe9&scoped=true&lang=css&\"","import { GlobalPoint } from \"@/game/geom\";\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, it = 0, drawt = false): number[][] {\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT.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","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=6bbf3b79&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=6bbf3b79&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=078b3b76&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=078b3b76&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 \"078b3b76\",\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\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(\"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.owners.push(gameStore.username);\n this.text.owners.push(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.x = xmid;\n this.text.refPoint.y = 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 = new CDT();\n\nexport function triangulate(partial: boolean = false) {\n const cdt = new CDT();\n for (const sh of gameStore.visionBlockers) {\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 PA_CDT = 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!./createtoken_modal.vue?vue&type=style&index=0&id=66ccc134&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=66ccc134&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!./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&\"","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\",\"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\",\"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=6bbf3b79&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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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 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 { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { Prop } from \"vue-property-decorator\";\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 updated() {\n this.addEmpty();\n }\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.owners.push(\"\");\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) {\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\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 const ownerIndex = this.shape.owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this.shape.owners.splice(ownerIndex, 1, event.target.value);\n else this.shape.owners.push(event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n const ownerIndex = this.shape.owners.findIndex(o => o === value);\n this.shape.owners.splice(ownerIndex, 1);\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=f93438ce&\"\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('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=d4f084a4&\"","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 AssetManager from \"@/assetManager/manager.vue\";\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.isFile(sel)) assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.selected = [];\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 { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=d1ce9748&\"\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 {\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\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n @Mutation\n setVisionMode(visionMode: \"bvh\" | \"triangle\") {\n this.visionMode = visionMode;\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 recalculateBV(partial = false) {\n // TODO: This needs to be cleaned up..\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(partial);\n else {\n let success = false;\n let tries = 0;\n while (!success) {\n success = true;\n try {\n this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n } catch (error) {\n success = false;\n tries++;\n if (tries > 10) {\n console.error(error);\n return;\n }\n }\n }\n }\n }\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 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.commit(\"recalculateBV\");\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 (_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=f93438ce&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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});\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.setBoardInitialized(true);\n gameStore.recalculateBV();\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.e427aa98.js b/server/static/js/app.e427aa98.js deleted file mode 100644 index 06007470b..000000000 --- a/server/static/js/app.e427aa98.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){}getCorner(e){return""}visibleInCanvas(e){return!0}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("5050"),s=i("a68b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("9b4d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7111f3f6",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){},"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.isFile(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("d7f0"),s=i("1eee");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cfc1");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"6bbf3b79",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){d=0,h=0;let s=0;const a=n.layerManager.getLayer("draw");if(void 0===a)return;const l=a.ctx;i&&l.clearRect(0,0,2e3,1e3),l.lineJoin="round",l.lineJoin="round";const p=new o.EdgeIterator(e);while(p.valid)p.next(),p.collect();p.collect();do{p.edge.first.vertices[r.ccw(p.edge.second)].point,p.edge.first.vertices[r.cw(p.edge.second)].point;h++;do{p.next(),p.collect()}while(p.valid)}while(null!==p.pos);for(const n of e.triangles){if(n.isInfinite())continue;s++;const e=[];l.fillStyle="red",void 0!==n.vertices[0]&&(e.push(n.vertices[0].point),l.beginPath(),l.arc(c(n.vertices[0].point[0],t),u(n.vertices[0].point[1],t),5,0,2*Math.PI),l.closePath(),l.fill()),void 0!==n.vertices[1]&&(e.push(n.vertices[1].point),l.arc(c(n.vertices[1].point[0],t),u(n.vertices[1].point[1],t),5,0,2*Math.PI),l.closePath(),l.fill()),void 0!==n.vertices[2]&&(e.push(n.vertices[2].point),l.arc(c(n.vertices[2].point[0],t),u(n.vertices[2].point[1],t),5,0,2*Math.PI),l.closePath(),l.fill()),l.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(l,n.vertices[0].point,n.vertices[1].point,n.constraints[2],t),void 0!==n.vertices[1]&&void 0!==n.vertices[2]&&f(l,n.vertices[1].point,n.vertices[2].point,n.constraints[0],t),void 0!==n.vertices[2]&&void 0!==n.vertices[0]&&f(l,n.vertices[2].point,n.vertices[0].point,n.constraints[1],t)}console.log(`Edges: ${d}/${h}`),console.log(`Faces: ${s}`)}window.DP=a,window.DPL=l,window.DPT=p},1298: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})},"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},"160b":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})},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("6f83"),s=i("8cd4");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("9c5c");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"21f210ea",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},"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");function h(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 h=new n.GlobalPoint(e.x,e.y);if("rect"===e.type_){const t=e;i=new u.Rect(h,t.width,t.height,t.fill_colour,t.stroke_colour,t.uuid)}else if("circle"===e.type_){const t=e;i=new r.Circle(h,t.radius,t.fill_colour,t.stroke_colour,t.uuid)}else if("circulartoken"===e.type_){const t=e;i=new a.CircularToken(h,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(h,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(h,t.points.map(e=>new n.GlobalPoint(e.x,e.y)),t.line_width,t.stroke_colour,t.uuid)}else if("text"===e.type_){const t=e;i=new d.Text(h,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,h,t.width,t.height,t.uuid),n.onload=(()=>{s.layerManager.getLayer(e.layer).invalidate(!1)})}}return i.fromDict(e),i}t.createShapeFromDict=h},"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("6f92"),c=i("f10f"),u=i("92b1");class d{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)}visibleInCanvas(e){return!1}invalidate(e){const t=l.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(){const e=this,t=c.gameStore.visionBlockers.indexOf(this.uuid);let i=!1;this.visionObstruction&&-1===t?(c.gameStore.visionBlockers.push(this.uuid),i=!0):!this.visionObstruction&&t>=0&&(c.gameStore.visionBlockers.splice(t,1),i=!0),i&&c.gameStore.recalculateBV(),this.auras.forEach(t=>{const i=c.gameStore.visionSources,n=i.findIndex(e=>e.aura===t.uuid);t.visionSource&&-1===n?i.push({shape:e.uuid,aura:t.uuid}):!t.visionSource&&n>=0&&i.splice(n,1)});for(let n=c.gameStore.visionSources.length-1;n>=0;n--){const t=c.gameStore.visionSources[n];t.shape===e.uuid&&(e.auras.some(e=>e.uuid===t.aura&&e.visionSource)||c.gameStore.visionSources.splice(n,1))}}setMovementBlock(e){this.movementObstruction=e||!1;const t=c.gameStore.movementblockers.indexOf(this.uuid);this.movementObstruction&&-1===t?c.gameStore.movementblockers.push(this.uuid):!this.movementObstruction&&t>=0&&c.gameStore.movementblockers.splice(t,1)}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=c.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?c.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&c.gameStore.ownedtokens.splice(e,1)}}ownedBy(e){return void 0===e&&(e=c.gameStore.username),c.gameStore.IS_DM||this.owners.includes(e)}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(u.g2lx(t.topLeft.x)-5,u.g2ly(t.topLeft.y)-5,u.g2lz(t.w)+10,u.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const n=u.g2l(this.center()),o=u.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(n.x,n.y,u.g2lr(i.value),n.x,n.y,u.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:!c.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=l.layerManager.getLayer(this.layer),n=l.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}))}}t.Shape=d},"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("496c")),o=n.__importDefault(i("ea6a")),r=i("4a5b"),a=i("0bc6"),l=i("8f0a"),c=i("6f92"),u=i("b2ed"),d=i("f10f"),h=i("2838"),f=i("92b1"),p=i("5a5c"),g=n.__importDefault(i("65d9"));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 l.GlobalPoint(-1e3,-1e3);let y=class extends o.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizeDirection="",this.deltaChanged=!1,this.dragRay=new l.Ray(new l.LocalPoint(0,0),new l.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new u.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(d.gameStore.username)||this.selectionHelper.owners.push(d.gameStore.username);const i=p.getMouse(e),n=f.l2g(i);let s,o=!1;s=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let a=s.length-1;a>=0;a--){const e=s[a];if(!e.ownedBy())continue;const c=e.getBoundingBox().getCorner(n);if(void 0!==c){t.selection=[e],r.getRef("selectionInfo").shape=e,this.mode=v.Resize,this.resizeDirection=c,t.invalidate(!0),o=!0;break}if(e.contains(n)){const n=e;-1===t.selection.indexOf(n)&&(t.selection=[n],r.getRef("selectionInfo").shape=n),this.mode=v.Drag;const s=f.g2l(n.refPoint);this.dragRay=new l.Ray(s,i.subtract(s)),t.invalidate(!0),o=!0;break}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)r.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=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=p.getMouse(e),n=f.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 l.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=f.g2l(t.selection[t.selection.length-1].refPoint),o=s.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/d.gameStore.zoomFactor);const l=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!d.gameStore.IS_DM))for(const e of t.selection)e.uuid!==this.selectionHelper.uuid&&(r=h.calculateDelta(r,e),r!==l&&(this.deltaChanged=!0));for(const e of t.selection)e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.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.resizeDirection,i),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1);else for(const e of t.selection){const t=e.getBoundingBox(),i=n;t.inCorner(i,"nw")?document.body.style.cursor="nw-resize":t.inCorner(i,"ne")?document.body.style.cursor="ne-resize":t.inCorner(i,"se")?document.body.style.cursor="se-resize":t.inCorner(i,"sw")?document.body.style.cursor="sw-resize":document.body.style.cursor="default"}}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.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===f.g2lx(i.refPoint.x)&&this.dragRay.origin.y===f.g2ly(i.refPoint.y))return;!d.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(d.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.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===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.layerManager.getLayer(),i=p.getMouse(e),n=f.l2g(i);for(const s of t.selection)if(s.contains(n))return t.selection=[s],r.getRef("selectionInfo").shape=s,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,s);this.$refs.selectcontext.open(e)}};y=n.__decorate([g.default({components:{SelectContext:s.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");function r(e,t,i){void 0===i&&(i=[]);const a=t.getBoundingBox(),l=a.offset(e);let c=!1;for(const r of o.gameStore.movementblockers){if(i.includes(r))continue;const t=s.layerManager.UUIDMap.get(r),o=t.getBoundingBox();let u=o.intersectsWithInner(l);if(!u){const t=n.Ray.fromPoints(a.topLeft.add(e.normalize()),l.topLeft),i=t.direction.inverse(),s=[i.x<0,i.y<0];u=o.intersectP(t,i,s).hit}if(u){const t=o.center(),s=a.center(),l=s.subtract(t),u=new n.Vector(1,0),d=new n.Vector(0,1);let h=l.dot(u),f=l.dot(d);h>o.w/2&&(h=o.w/2),h<-o.w/2&&(h=-o.w/2),f>o.h/2&&(f=o.h/2),f<-o.h/2&&(f=-o.h/2);const p=t.add(u.multiply(h)).add(d.multiply(f));p.x===a.topLeft.x||p.x===a.topRight.x?e=new n.Vector(0,e.y):p.y===a.topLeft.y||p.y===a.botLeft.y?e=new n.Vector(e.x,0):p.xa.topRight.x?e=new n.Vector(p.x-a.topRight.x,e.y):p.ya.botLeft.y&&(e=new n.Vector(e.x,p.y-a.botLeft.y)),c=!0,i.push(r);break}}return c&&(e=r(e,t,i)),e}t.calculateDelta=r},"28b6":function(e,t,i){"use strict";var n=i("ee96"),s=i.n(n);s.a},"2b48":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("f10f");function o(){n.socket.emit("Client.Options.Set",{locationOptions:{panX:s.gameStore.panX,panY:s.gameStore.panY,zoomFactor:s.gameStore.zoomFactor}})}t.sendClientOptions=o},"2baf":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("60a3"),a=i("4a5b");let l=class extends s.default{constructor(){super(...arguments),this.showImage=null}get folders(){return Object.keys(this.asset).filter(e=>!["__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 l.layerManager.layers.filter(e=>e.selectable&&(c.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return l.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()}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},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()});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 d=c.getUnitDistance(u.value+u.dim),h=t.center(),f=c.g2l(h),p=new a.Circle(h,d);if(!p.visibleInCanvas(e.canvas))continue;let g=-1;const v=new Path2D;let m;v.moveTo(f.x,f.y);for(let s=0;s<2*Math.PI;s+=r.Settings.angleSteps/180*Math.PI){const t=new n.GlobalPoint(h.x+d*Math.cos(s),h.y+d*Math.sin(s));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(h.x),c.g2ly(h.y)),i.lineTo(c.g2lx(t.x),c.g2ly(t.y)),i.stroke());const o=n.Ray.fromPoints(h,t),a=l.gameStore.BV.intersect(o);if(0===s&&(m=a.hit?a.intersect:t),a.hit)-1!==g&&(v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,s),g=-1),v.lineTo(c.g2lx(a.intersect.x),c.g2ly(a.intersect.y));else if(-1===g){g=s;const i=c.g2l(t);e.lineTo(i.x,i.y)}}if(-1===g?v.lineTo(c.g2lx(m.x),c.g2ly(m.y)):v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(f.x,f.y,c.g2lr(u.value),f.x,f.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(v)}u.lastPath=v}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=d},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},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("df15"),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]<=t[0]&&e[1]<=t[1]}function v(e,t){return g(e,t)?n.Sign.SMALLER:p(e,t)?n.Sign.EQUAL:n.Sign.LARGER}function m(e,t,i,s){const o=t[0]-e[0],r=t[1]-e[1],a=i[0]-e[0],l=i[1]-e[1],c=s[0]-e[0],d=s[1]-e[1],h=s[0]-t[0],f=s[1]-t[1],p=i[0]-t[0],g=i[1]-t[1],v=u(o*d-r*c,c*h+d*f,o*l-r*a,a*p+l*g);let m=Math.abs(o),y=Math.abs(r);const b=Math.abs(a),_=Math.abs(l),S=Math.abs(h),w=Math.abs(f),x=Math.abs(c),M=Math.abs(d),C=Math.abs(p),L=Math.abs(g);if(my&&([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+n]}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)}}}}t.cw=s,t.ccw=o,t.edgeInfo=r,t.collinearBetween=a,t.orientation=c,t.determinant=u,t.hasInexactNegativeOrientation=d,t.sideOfOrientedCircle=h,t.xyEqual=p,t.xySmaller=g,t.xyCompare=v,t.intersection=_,function(e){e[e["NO_INTERSECTION"]=0]="NO_INTERSECTION",e[e["POINT"]=1]="POINT",e[e["SEGMENT"]=2]="SEGMENT"}(S||(S={}))},"4b01":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("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})},"4bc3":function(e,t,i){"use strict";i.r(t);var n=i("2baf"),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},5050:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return void 0!==e.getActiveLayer()?i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.getLayers().length>1?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")])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"52a8":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("60a3");let a=class extends s.default{constructor(){super(...arguments),this.positioned=!1,this.offsetX=0,this.offsetY=0,this.screenX=0,this.screenY=0,this.dragging=!1}mounted(){this.updatePosition()}updated(){this.updatePosition()}close(e){this.$emit("close")}updatePosition(){if(!this.positioned){const e=this.$refs.container;if(0===e.offsetWidth&&0===e.offsetHeight)return;this.$refs.container.style.left=(window.innerWidth-e.offsetWidth)/2+"px",this.$refs.container.style.top=(window.innerHeight-e.offsetHeight)/2+"px",this.positioned=!0}}dragStart(e){null!==e&&null!==e.dataTransfer&&(e.dataTransfer.setData("Hack",""),e.dataTransfer.setDragImage(this.$refs.container,e.offsetX,e.offsetY),this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.screenX=e.screenX,this.screenY=e.screenY,this.dragging=!0)}dragEnd(e){this.dragging=!1;let t=e.clientX-this.offsetX,i=e.clientY-this.offsetY;0===e.clientX&&0===e.clientY&&0===e.pageX&&0===e.pageY&&(t=parseInt(this.$refs.container.style.left,10)-(this.screenX-e.screenX),i=parseInt(this.$refs.container.style.top,10)-(this.screenY-e.screenY)),t<0&&(t=0),t>window.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}asDict(){return Object.assign(this.getBaseDict(),{line_width:this.lineWidth,points:this._points.map(e=>({x:e.x,y:e.y}))})}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.y,i=this.refPoint.x,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._points.includes(e)}center(e){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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("605b"),s=i("6f8d");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cec8");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7abc7fe9",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.owners.push(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("574e"),f=i("b2ed"),p=i("f10f"),g=i("92b1"),v=i("5a5c");let m=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=g.getUnitDistance(p.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:g.getUnitDistance(this.unitSize)/8}get IS_DM(){return p.gameStore.IS_DM}get unitSize(){return p.gameStore.unitSize}get useGrid(){return p.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=!0,this.startPoint=g.l2g(v.getMouse(e)),"square"===this.shapeSelect)this.shape=new f.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);else if("circle"===this.shapeSelect)this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);else{if("paint-brush"!==this.shapeSelect)return;this.shape=new h.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour}"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.owners.push(p.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),p.gameStore.visionBlockers.push(this.shape.uuid),t.addShape(this.shape,!0,!1),this.onDeselect(),this.onSelect()}else console.log("No active layer!")}onMouseMove(e){const t=g.l2g(v.getMouse(e)),i=this.getLayer();void 0!==i?(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&&("square"===this.shapeSelect?(this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint.x=Math.min(this.startPoint.x,t.x),this.shape.refPoint.y=Math.min(this.startPoint.y,t.y)):"circle"===this.shapeSelect?this.shape.r=t.subtract(this.startPoint).length():"paint-brush"===this.shapeSelect&&this.shape._points.push(t),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&p.gameStore.recalculateBV(!0),i.invalidate(!1))):console.log("No active layer!")}onMouseUp(e){this.active&&null!==this.shape&&(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.shape.visionObstruction&&p.gameStore.recalculateBV(),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)}};n.__decorate([o.Watch("fillColour")],m.prototype,"onFillChange",null),n.__decorate([o.Watch("modeSelect")],m.prototype,"onModeUpdate",null),m=n.__decorate([s.default({components:{"color-picker":r.default}})],m),t.default=m},"5e17":function(e,t,i){},"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.x,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){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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},"605b":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})},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){},"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),this.type="assetrect",this.src="",void 0!==s&&(this.uuid=s),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,window.TDS=this.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];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=Math.round(Math.random()),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},"6f83":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:"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}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",[e._v("BVH")]),i("option",[e._v("Triangle")])])],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})},"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.x=Math.round(a.refPoint.x/e)*e,a.refPoint.y=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("1298"),s=i("778b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("d71e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"66ccc134",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),n=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const o=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,n*=e.keyCode<=38?-1:1;let r=new a.Vector(i,n);if(!e.shiftKey||!c.gameStore.IS_DM)for(const e of o)r=u.calculateDelta(r,e);for(const e of o)e.refPoint.x+=r.x,e.refPoint.y+=r.y,e.refPoint.x%t===0&&e.refPoint.y%t===0||e.snapToGrid(),s.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1});l.layerManager.getLayer().invalidate(!1)}else c.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),c.gameStore.increasePanY(n*(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},"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},8095:function(e,t,i){},"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");class s{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 s(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),o=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new s(new n.GlobalPoint(t,o),i-t,r-o)}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(e){if(void 0===e)return this.topLeft.add(new n.Vector(this.w/2,this.h/2));this.topLeft.x=e.x-this.w/2,this.topLeft.y=e.y-this.h/2}inCorner(e,t){const i=Math.min(6,this.w/2)/2;switch(t){case"ne":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"nw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"sw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;case"se":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}getMaxExtent(){return this.w>this.h?0:1}}t.BoundingRect=s},"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}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}}t.Point=s;class o extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}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(1/this.x,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)}}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("f10f"),h=i("6f92");let f=class extends s.default{constructor(){super(...arguments),this.visible={settings:!1,locations:!1}}get useGrid(){return d.gameStore.useGrid}set useGrid(e){d.gameStore.setUseGrid({useGrid:e,sync:!0})}get fullFOW(){return d.gameStore.fullFOW}set fullFOW(e){d.gameStore.setFullFOW({fullFOW:e,sync:!0})}get fowOpacity(){return d.gameStore.fowOpacity}set fowOpacity(e){"number"===typeof e&&d.gameStore.setFOWOpacity({fowOpacity:e,sync:!0})}get fowLOS(){return d.gameStore.fowLOS}set fowLOS(e){d.gameStore.setLineOfSight({fowLOS:e,sync:!0})}get unitSize(){return d.gameStore.unitSize}set unitSize(e){"number"===typeof e&&d.gameStore.setUnitSize({unitSize:e,sync:!0})}get gridSize(){return d.gameStore.gridSize}set gridSize(e){"number"===typeof e&&d.gameStore.setGridSize({gridSize:e,sync:!0})}get gridColour(){return d.gameStore.gridColour}set gridColour(e){d.gameStore.setGridColour({colour:e,sync:!0})}get fowColour(){return d.gameStore.fowColour}set fowColour(e){d.gameStore.setFOWColour({colour:e,sync:!0})}get rulerColour(){return d.gameStore.rulerColour}set rulerColour(e){d.gameStore.setRulerColour({colour: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()};d.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||(d.gameStore.setVisionMode(t),d.gameStore.recalculateBV(),h.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("4a5b"),s=i("4aee");let o;var r,a;function l(){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"}(r=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"}(a||(a={}));class c{constructor(...e){this.vertices=[],this.neighbours=[null,null,null],this.constraints=[!1,!1,!1],this.uuid=n.uuidv4(),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(o):this.vertices[s.ccw(e)].infinite||this.vertices[s.cw(e)].infinite}}t.Triangle=c;class u{constructor(e){this.infinite=!1,this.uuid=n.uuidv4(),this._point=e}get point(){return this._point}set point(e){this._point=e,this.infinite=!1}}t.Vertex=u;class d{constructor(e,t){if(this.v=e,this.t=t,null===e?this.t=null:null===t&&(this.t=e.triangle),null==this.t||this.t.dimension<1)this.ri=0,this.v=null,this.t=null;else{const t=this.t.indexV(e);2===this.t.dimension?this.ri=s.ccw(t):this.ri=2}this._ri=this.ri,this._v=this.v,this._t=this.t}get valid(){return null!==this.t&&null!==this.v}next(){let e=this.t.indexV(this.v);return 1===this.t.dimension?this.t=this.t.neighbours[0===e?1:0]:(this.t=this.t.neighbours[s.ccw(e)],e=this.t.indexV(this.v),this.ri=s.ccw(e)),this.ri!==this._ri||this.v!==this._v||this.t!==this._t}}t.EdgeCirculator=d;class h{constructor(e){if(this.i=0,this.edge=new g,this._es=0,this.tds=e,this.edge.second=0,e.dimension<=0)this.pos=null;else{this.pos=e.triangles[0],1===e.dimension&&(this.edge.second=2);while(null!==this.pos&&!this.associatedEdge())throw new Error("[poi");1===e.dimension&&(this._es=2)}}get valid(){return(null!==this.pos||this._es!==this.edge.second)&&this.pos.isInfinite(this.edge.second)}next(){do{this.increment()}while(null!==this.pos&&!this.associatedEdge())}collect(){return this.edge.first=this.pos,this.edge}associatedEdge(){return 1===this.tds.dimension||this.tds.triangles.indexOf(this.pos)t!==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 u(l());return e.infinite=!0,e}get finiteEdge(){if(this.dimension<1)throw new Error("aspo");const e=new h(this);while(e.valid)e.next();return e.collect()}insertDimUp(e=new u,t=!0){const i=this.createVertex();let n,s;switch(this.dimension++,this.dimension){case 0:n=this.triangles[0],s=new c(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 c).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;o{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},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){},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},af26:function(e,t,i){},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},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)if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;const s=i.center(),o=l.g2l(s);for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const r=Math.cos(i),c=Math.sin(i),d=new n.Ray(s,new n.Vector(r,c)),h=a.gameStore.BV.intersect(d);h.hit?(-1!==e&&(t.arc(o.x,o.y,u,e,i),e=-1),t.lineTo(l.g2lx(h.intersect.x),l.g2ly(h.intersect.y))):-1===e&&(t.lineTo(o.x+u*r,o.y+u*c),e=i)}-1!==e?t.arc(o.x,o.y,u,e,2*Math.PI):t.closePath(),t.fill()}else try{const n=c.computeVisibility(i.center());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){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(),e.setMovementBlock(e.movementObstruction),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}),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)}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.recalculateBV(),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);const s=Math.min(6,n.w/2);t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e)})}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))}onShapeMove(e){e.checkVisionSources(),e.visionObstruction&&a.gameStore.recalculateBV(),this.invalidate(!1)}}t.Layer=c},baeb: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})},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},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}inCorner(e,t){switch(t){case"ne":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"nw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"sw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;case"se":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}center(e){if(void 0===e)return this.refPoint.add(new n.Vector(this.w/2,this.h/2));this.refPoint.x=e.x-this.w/2,this.refPoint.y=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.x=Math.round(this.refPoint.x/e)*e,this.refPoint.y=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;"nw"===e?(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)):"ne"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint.y=l.l2gy(t.y)):"se"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y)):"sw"===e&&(this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint.x=l.l2gx(t.x)),this.w/=i,this.h/=i,this.w<0&&(this.refPoint.x+=this.w,this.w=Math.abs(this.w)),this.h<0&&(this.refPoint.y+=this.h,this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var n=i("baeb"),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){},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");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({template:""})],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)},ccf8:function(e,t,i){},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},cec8:function(e,t,i){"use strict";var n=i("d749"),s=i.n(n);s.a},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("1216"),s=i("d6be"),o=i("98ef"),r=i("4aee");function a(e,t=0,i=!1){const o=[e.x,e.y],r=[],a=s.PA_CDT.locate(o,null).loc;return null===a?(console.error("Triangle not found"),[]):(r.push(a.vertices[1].point),a.isConstrained(0)||l(o,a.vertices[2].point,a.vertices[1].point,a,0,r),r.push(a.vertices[2].point),a.isConstrained(1)||l(o,a.vertices[0].point,a.vertices[2].point,a,1,r),r.push(a.vertices[0].point),a.isConstrained(2)||l(o,a.vertices[1].point,a.vertices[0].point,a,2,r),i&&n.drawPolygon(r,"red"),r)}function l(e,t,i,n,s,a){const u=n.neighbours[s],d=u.indexT(n),h=r.ccw(d),f=r.cw(d),p=u.vertices[d],g=u.vertices[f],v=u.vertices[h],m=[u,h],y=[u,f],b=r.orientation(e,i,p.point),_=r.orientation(e,t,p.point);if(b===o.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&a.push(c(e,i,p.point,g.point)),_===o.Sign.COUNTERCLOCKWISE&&a.push(c(e,t,p.point,g.point));else{if(_===o.Sign.COUNTERCLOCKWISE)return l(e,t,i,u,h,a);l(e,p.point,i,u,h,a)}if(b!==o.Sign.CLOCKWISE&&_!==o.Sign.COUNTERCLOCKWISE&&a.push(p.point),_===o.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===o.Sign.CLOCKWISE&&a.push(c(e,i,p.point,v.point)),void(t!==v.point&&a.push(c(e,t,p.point,v.point)))):b===o.Sign.CLOCKWISE?l(e,t,i,u,f,a):l(e,t,p.point,u,f,a)}function c(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=a},cfc1:function(e,t,i){"use strict";var n=i("5e17"),s=i.n(n);s.a},d065:function(e,t,i){"use strict";i.r(t);var n=i("4b01"),s=i("f8b3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("2f43");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"078b3b76",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},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("6f92"),l=i("5e7c"),c=i("0180"),u=i("f10f"),d=i("92b1"),h=i("5a5c");let f=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=a.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=d.l2g(h.getMouse(e)),this.ruler=new l.Line(this.startPoint,this.startPoint,3,u.gameStore.rulerColour),this.text=new c.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.owners.push(u.gameStore.username),this.text.owners.push(u.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=a.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=d.l2g(h.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),l=Math.round(Math.sqrt(Math.pow(s,2)+Math.pow(o,2))*u.gameStore.unitSize/u.gameStore.gridSize)+" ft",c=Math.atan2(n*o,s),f=Math.min(this.startPoint.x,i.x)+s/2,p=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint.x=f,this.text.refPoint.y=p,this.text.text=l,this.text.angle=c,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=a.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!")}};f=n.__decorate([s.default],f),t.RulerTool=f},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=!1){const i=new o.CDT;for(const t of s.gameStore.visionBlockers){const s=n.layerManager.UUIDMap.get(t);if(!e||s.visibleInCanvas(n.layerManager.getLayer().canvas))for(let e=0;ee===this.shape.uuid)),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)):(d.gameStore.annotations.push(this.shape.uuid),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){const i=this.shape.owners.findIndex(e=>e===t);i>=0?this.shape.owners.splice(i,1,e.target.value):this.shape.owners.push(e.target.value),this.updateShape(d.gameStore.fowLOS)}removeOwner(e){const t=this.shape.owners.findIndex(t=>t===e);this.shape.owners.splice(t,1),this.updateShape(d.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=d.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?d.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&d.gameStore.visionSources.splice(t,1),u.layerManager.invalidateLight(),this.updateShape(!0)}updateAuraColour(e,t){const i=u.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}};n.__decorate([h.Prop()],f.prototype,"shape",void 0),f=n.__decorate([o.default({components:{Modal:a.default,"color-picker":r.default}})],f),t.default=f},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("f9e5"),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},df15: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})},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.isFile(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.selected=[]}},()=>{}),this.close())}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e198:function(e,t,i){},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},e756:function(e,t,i){},e914:function(e,t,i){"use strict";i.r(t);var n=i("160b"),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"}get selectedLayer(){return this.layers[this.selectedLayerIndex]}setVisionMode(e){this.visionMode=e}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}recalculateBV(e=!1){if(this.boardInitialized)if("triangle"===this.visionMode)d.triangulate(e);else{let e=!1,i=0;while(!e){e=!0;try{this.BV=Object.freeze(new c.BoundingVolume(this.visionBlockers))}catch(t){if(e=!1,i++,i>10)return void console.error(t)}}}}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)}}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.commit("recalculateBV")}};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,"recalculateBV",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,"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},f9e5: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})},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})}),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.setBoardInitialized(!0),c.gameStore.recalculateBV()}),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.e427aa98.js.map \ No newline at end of file diff --git a/server/static/js/app.e427aa98.js.map b/server/static/js/app.e427aa98.js.map deleted file mode 100644 index e5109cc00..000000000 --- a/server/static/js/app.e427aa98.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/createtoken_modal.vue?ed6e","webpack:///./src/game/ui/tools/createtoken_modal.vue?3856","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/assetManager/manager.vue?3cb9","webpack:///./src/assetManager/manager.vue?1f53","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/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/game/ui/selection/edit_dialog.vue?03e8","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/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","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/selection/edit_dialog.vue?391c","webpack:///./src/game/ui/selection/edit_dialog.vue?057b","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/shapecontext.vue?ab76","webpack:///./src/game/ui/selection/shapecontext.vue?3b0d","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/draw.vue?d046","webpack:///./src/game/ui/tools/draw.vue?57e4","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/menu/menu.vue?ed47","webpack:///./src/game/ui/menu/menu.vue?6a3f","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/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/ui/selection/shapecontext.vue?6173","webpack:///./src/game/ui/menu/menu.vue?0d5b","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/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/manager.vue?a11e","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/ui/tools/select.vue?2a55","webpack:///./src/game/ui/tools/select.vue?b488","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/menu/asset_node.vue?be10","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","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/ui/tools/draw.vue?6d03","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/auth/login.vue?5f02","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","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/game/ui/tools/createtoken_modal.vue?41c9","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/auth/login.vue?12cd","webpack:///./src/auth/login.vue?7cce","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/assetManager/contextMenu.vue?d089","webpack:///./src/assetManager/contextMenu.vue?b4b1","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/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/game/ui/tools/map.vue?7416","webpack:///./src/game/ui/tools/map.vue?9024","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","resizeDir","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","__webpack_exports__","_shapecontext_vue_vue_type_template_id_7111f3f6_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","isFile","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","includes","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_6bbf3b79_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","T","clearRect","ei","EdgeIterator","valid","collect","edge","first","vertices","ccw","second","cw","pos","triangles","isInfinite","po","arc","PI","fill","constraints","console","log","DP","DPL","DPT","render","_vm","_h","$createElement","_c","_self","attrs","visible","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","_v","for","directives","rawName","expression","id","domProps","input","composing","update:color","borderColour","ref","height","submit","staticRenderFns","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","gameStore","IS_DM","group","source","has_img","effects","index","Infinity","dragover","preventDefault","moveDrag","drop","stopPropagation","stopDrag","_l","dir","_s","multiple","hidden","change","title","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","staticStyle","font-size","_e","class","inode-selected","select","contextmenu","cm","open","startDrag","src","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","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_21f210ea_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","createShapeFromDict","shape","dummy","UUIDMap","has","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","asset","img","Image","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","skipLightUpdate","self","obstructionIndex","visionBlockers","changeBV","recalculateBV","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","ownedBy","ownedtokens","username","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","is_token","JSON","stringify","aurasFromServer","parse","bbox","getBoundingBox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","mask","updateNote","$set","style","calcHeight","removeNote","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","resizeDirection","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","corner","getCorner","getRef","Resize","Drag","localRefPoint","subtract","GroupSelect","endPoint","abs","og","direction","delta","multiply","ogDelta","calculateDelta","asDict","redraw","temporary","resize","bb","gm","inCorner","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","selectcontext","SelectContext","done","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","blockerBBox","found","intersectsWithInner","ray","fromPoints","normalize","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_078b3b76_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_078b3b76_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_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","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","ContextMenu","openEditDialog","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__","script","componentNormalizer","settings_1","FOWLayer","isVisionLayer","preFogShapes","idx","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","visibleInCanvas","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","fowLOS","drawImage","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","pow","targetX","targetY","round","resizedir","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","v","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","createElement","appendChild","getContext","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_d4f084a4___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","orientation","Sign","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","ZERO","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","LEFT_TURN","RIGHT_TURN","segSegDoIntersectContained","intersection","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","grid-column","updateShape","grid-column-start","checked","setToken","Array","isArray","_i","$$a","$$el","$$c","$$v","$$i","setVisionBlocker","setMovementBlocker","owner","placeholder","updateOwner","removeOwner","modifiers","number","_n","$forceUpdate","opacity","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_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","getLayers","background-color","setLayer","moveToBack","moveToFront","getInitiativeWord","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","Boolean","destination","href","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_7abc7fe9_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","opposite","fowColour","fowOpacity","colorpicker_vue_1","modal_vue_1","CreateTokenModal","updatePreview","newValue","oldValue","unitSize","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","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","onDeselect","onSelect","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","mid","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","--detailRight","--detailArrow","option-selected","max-width","_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","neighbours","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","isConstrained","triangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","removeConstrainedEdge","dimension","indf","locateInfo","locate","iLocate","insertb","lt","li","flipAround","propagatingFlip","depth","isFlipable","maxDepth","ni","flip","e1","e2","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","prev","th","marchLocate1D","marchLocate2D","ff","iv","pqt","Triangle","leftFirst","o0","o1","o2","sum","nTurns","settings","locations","rm-list-dm","_m","enter","rm","transition","settingsClick","overflow-y","overflow-x","assets","createNote","openNote","notes","step","readonly","invitationCode","rulerColour","changeVisionMode","text-decoration","changeLocation","createLocation","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","l2gz","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_66ccc134_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","event_bus_1","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","EventBus","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","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","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","sw","owned","joined","createRoom","newSessionName","tag","getPointDistance","Point","vec","scale","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","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","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","vertex","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","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","node_1","BoundingVolume","totalNodes","buildData","orderedPrims","nodes","_a","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7111f3f6_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_7111f3f6_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_21f210ea_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_21f210ea_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","move","localPos","fakeSetData","disabled","$store","state","game","updateOrder","model","callback","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","lazy","notAllowed","owns","syncInitiative","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","setTurn","nextTurn","LoadComponent","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","te_1","FOWPlayersLayer","skipPlayerFOW","drctx","maxLength","tokenId","visionMode","computeVisibility","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","destinationIndex","oldIdx","sign","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","topright","botleft","coreVisible","mx","my","_select_vue_vue_type_template_id_0ed49b21___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__","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__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7abc7fe9_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_7abc7fe9_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","draw_1","pa_1","it","drawt","Q","rawOutput","PA_CDT","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_6bbf3b79_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_6bbf3b79_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_edit_dialog_vue_vue_type_template_id_078b3b76_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","ruler","diffsign","xdiff","ydiff","label","atan2","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","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_66ccc134_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_66ccc134_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_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","focusin","focusout","login","required","visibility","register","EditDialog","addEmpty","hadAnnotation","an","ownerIndex","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_f93438ce___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","rename","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","_manager_vue_vue_type_template_id_d1ce9748___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","$off","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","freeze","isDM","success","tries","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","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","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,EANA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xa,EAAKkc,MAAM3B,OAElC,YADA1G,QAAQC,uDAAuD9T,EAAKkc,MAAM3B,SAG9E,MAAM2B,EAAQvL,EAAAO,aAAakL,QAAQ1Z,IAAI1C,EAAKkc,MAAMxX,MAC5C6V,EAAQ5J,EAAAO,aAAaC,SAAS+K,EAAM3B,OAC1CA,EAAM0P,eAAe/N,EAAOlc,EAAK6X,OAAO,KAE5C9L,EAAAf,OAAO0J,GAAG,qBAAuB1U,IAC7B,MAAMkc,EAAQvL,EAAAO,aAAakL,QAAQ1Z,IAAI1C,EAAK0E,WAC9BoI,IAAVoP,GACJA,EAAM6N,UAAU/pB,EAAKua,OAAO,KAEhCxO,EAAAf,OAAO0J,GAAG,eAAiB1U,IACvBgvC,EAAAY,YAAY3W,YAAYj5B,KAE5B+L,EAAAf,OAAO0J,GAAG,aAAeyM,IACrBA,EAAOvC,QAAQ1C,IACX,IAAKvL,EAAAO,aAAakL,QAAQC,IAAIH,EAAMxX,MAEhC,YADAmP,QAAQC,IAAI,kDAGhB,IAAKnD,EAAAO,aAAasJ,SAAS0B,EAAM3B,OAE7B,YADA1G,QAAQC,uDAAuDoI,EAAM3B,SAGzE,MAAM0zC,EAAYt9C,EAAAO,aAAakL,QAAQ1Z,IAAIwZ,EAAMxX,MACjDiM,EAAAO,aAAaC,SAAS+K,EAAM3B,OAAQ0R,YAAYgiC,GAAW","file":"static/js/app.e427aa98.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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, 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=7111f3f6&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=7111f3f6&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 \"7111f3f6\",\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.isFile(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--) assetStore.selected.push(inodes[i]);\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=6bbf3b79&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=6bbf3b79&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 \"6bbf3b79\",\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) {\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 (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 // console.log(`Edge: (*) ${fromP} > ${toP}`);\n // } else console.log(`Edge: ${fromP} > ${toP}`);\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 // 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 console.log(`Edges: ${I}/${J}`);\n console.log(`Faces: ${T}`);\n}\n\n(window).DP = drawPolygon;\n(window).DPL = drawPolygonL;\n(window).DPT = drawPolygonT;\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=66ccc134&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!./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","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=d1ce9748&\"","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=21f210ea&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=21f210ea&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 \"21f210ea\",\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 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\";\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_ === \"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 } 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 type: string;\n // The unique ID of this shape\n 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 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 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 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 abstract getCorner(point: GlobalPoint): string | undefined;\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(resizeDir: string, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources() {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let changeBV = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n changeBV = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n changeBV = true;\n }\n if (changeBV) gameStore.recalculateBV();\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) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n if (this.movementObstruction && obstructionIndex === -1) gameStore.movementblockers.push(this.uuid);\n else if (!this.movementObstruction && obstructionIndex >= 0)\n gameStore.movementblockers.splice(obstructionIndex, 1);\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 ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this.owners.includes(username);\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","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 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 { 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, g2lx, g2ly, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\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 resizeDirection = \"\";\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.owners.push(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 const corner = shape.getBoundingBox().getCorner(globalMouse);\n\n // Resize case, a corner is selected\n if (corner !== undefined) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n this.resizeDirection = corner;\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.recalculateBV(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.resizeDirection, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateBV(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n }\n } else {\n for (const sel of layer.selection) {\n const bb = sel.getBoundingBox();\n const gm = globalMouse;\n if (bb.inCorner(gm, \"nw\")) {\n document.body.style.cursor = \"nw-resize\";\n } else if (bb.inCorner(gm, \"ne\")) {\n document.body.style.cursor = \"ne-resize\";\n } else if (bb.inCorner(gm, \"se\")) {\n document.body.style.cursor = \"se-resize\";\n } else if (bb.inCorner(gm, \"sw\")) {\n document.body.style.cursor = \"sw-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n }\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.recalculateBV();\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.recalculateBV();\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)) {\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}\n","import { Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\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 (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}\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 this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n\n @Mutation\n isFile(inode: number): boolean {\n return this.files.includes(inode);\n }\n}\n\nexport const assetStore = getModule(AssetStore);\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!./edit_dialog.vue?vue&type=style&index=0&id=078b3b76&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=078b3b76&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!./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\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 { 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}\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","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\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean): void {\n super.addShape(shape, sync, temporary);\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 // 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 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\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 }\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&\"","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 inCorner(point: GlobalPoint, corner: string) {\n return false; // TODO\n }\n getCorner(point: GlobalPoint) {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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 true;\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(resizedir: string, 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.x = Math.min(this.startPoint.x, endPoint.x);\n this.rect.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\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=d4f084a4&\"\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[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 + y];\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","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('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=078b3b76&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!./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&\"","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\")])]):_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=7111f3f6&scoped=true&\"","\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 } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\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 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 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.y;\n let miny: number = this.refPoint.x;\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._points.includes(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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=7abc7fe9&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=7abc7fe9&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 \"7abc7fe9\",\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.owners.push(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 { MultiLine } from \"@/game/shapes/multiline\";\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\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"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 this.active = true;\n this.startPoint = l2g(getMouse(event));\n if (this.shapeSelect === \"square\")\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"circle\")\n this.shape = new Circle(this.startPoint.clone(), this.helperSize, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"paint-brush\") {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n } else return;\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.owners.push(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n gameStore.visionBlockers.push(this.shape.uuid);\n layer.addShape(this.shape, true, false);\n\n // Push brushhelper to back\n this.onDeselect();\n this.onSelect();\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 if (this.shapeSelect === \"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.x = Math.min(this.startPoint.x, endPoint.x);\n this.shape.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\n } else if (this.shapeSelect === \"circle\") {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n } else if (this.shapeSelect === \"paint-brush\") {\n (this.shape)._points.push(endPoint);\n }\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateBV(true);\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n if (this.shape.visionObstruction) gameStore.recalculateBV();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\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 }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly } 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.x, 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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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","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=7abc7fe9&scoped=true&\"","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);\n if (uuid !== undefined) this.uuid = 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 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 (window).TDS = this.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 const pi = intersection(pa, pb, pc, pd);\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.first) < &(*e2.first))\n || ( (&(*e1.first) == &(*e2.first)) && (ind1 < ind2)));*/\n // TODO: This is not proper.\n // console.error(\"This has to be done correctly\");\n return 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 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 = 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","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\":\"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}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',[_vm._v(\"BVH\")]),_c('option',[_vm._v(\"Triangle\")])])],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=21f210ea&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!./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.x = Math.round(asset.refPoint.x / gs) * gs;\n asset.refPoint.y = Math.round(asset.refPoint.y / gs) * gs;\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=66ccc134&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=66ccc134&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 \"66ccc134\",\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) delta = calculateDelta(delta, sel);\n }\n for (const sel of selection) {\n sel.refPoint.x += delta.x;\n sel.refPoint.y += delta.y;\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 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&\"","\n\n\n\n\n\n\n\n\n\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\";\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 center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n this.topLeft.x = centerPoint.x - this.w / 2;\n this.topLeft.y = centerPoint.y - this.h / 2;\n }\n inCorner(point: GlobalPoint, corner: string) {\n const sw = Math.min(6, this.w / 2) / 2;\n switch (corner) {\n case \"ne\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"nw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"sw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n case \"se\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\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 x: number;\n y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\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}\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}\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) {\n return this.x * other.x + this.y * other.y;\n }\n inverse() {\n return new Vector(1 / this.x, 1 / this.y);\n }\n length() {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize() {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse() {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number) {\n return new Vector(this.x * scale, this.y * scale);\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\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 { gameStore } from \"@/game/store\";\nimport { layerManager } from \"@/game/layers/manager\";\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 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(value);\n gameStore.recalculateBV();\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 { uuidv4 } from \"@/core/utils\";\nimport { CDT } from \"./cdt\";\nimport { ccw, cw, orientation } 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 uuid = uuidv4();\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\nexport class Vertex {\n infinite = false;\n private _point: Point | undefined;\n triangle: Triangle | undefined;\n uuid = uuidv4();\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","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 try {\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n } catch {\n console.warn(`Shape ${shape.type} - ${shape.uuid} cannot be used for vision blocking !!!`);\n shape.visionObstruction = false;\n gameStore.visionBlockers.splice(i, 1);\n throw new Error();\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 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=7111f3f6&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=7111f3f6&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=21f210ea&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=21f210ea&scoped=true&lang=css&\"","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.move && shape.visionObstruction) gameStore.recalculateBV();\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","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&\"","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/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.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, 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 if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n const center = token.center();\n const lcenter = g2l(center);\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 try {\n const polygon = computeVisibility(token.center());\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): 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();\n shape.setMovementBlock(shape.movementObstruction);\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 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);\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.recalculateBV();\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 const sw = Math.min(6, bb.w / 2);\n\n // topright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // topleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // botright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\n // botleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\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 onShapeMove(shape: Shape): void {\n shape.checkVisionSources();\n if (shape.visionObstruction) gameStore.recalculateBV();\n this.invalidate(false);\n }\n}\n","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=0ed49b21&\"","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 { 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 inCorner(point: GlobalPoint, corner: string) {\n switch (corner) {\n case \"ne\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"nw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"sw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n case \"se\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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.x = centerPoint.x - this.w / 2;\n this.refPoint.y = 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.x = Math.round(this.refPoint.x / gs) * gs;\n this.refPoint.y = 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(resizedir: string, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n if (resizedir === \"nw\") {\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 } else if (resizedir === \"ne\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint.y = l2gy(point.y);\n } else if (resizedir === \"se\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n } else if (resizedir === \"sw\") {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint.x = l2gx(point.x);\n }\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint.x += this.w;\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint.y += this.h;\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=0ed49b21&\"\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","\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\n@Component({ template: \"\" })\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}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule {\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 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=7abc7fe9&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=7abc7fe9&scoped=true&lang=css&\"","import { GlobalPoint } from \"@/game/geom\";\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, it = 0, drawt = false): number[][] {\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT.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","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=6bbf3b79&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=6bbf3b79&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=078b3b76&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=078b3b76&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 \"078b3b76\",\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\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(\"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.owners.push(gameStore.username);\n this.text.owners.push(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.x = xmid;\n this.text.refPoint.y = 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 = new CDT();\n\nexport function triangulate(partial: boolean = false) {\n const cdt = new CDT();\n for (const sh of gameStore.visionBlockers) {\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 PA_CDT = 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!./createtoken_modal.vue?vue&type=style&index=0&id=66ccc134&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=66ccc134&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!./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&\"","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\",\"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\",\"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=6bbf3b79&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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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 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 { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { Prop } from \"vue-property-decorator\";\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 updated() {\n this.addEmpty();\n }\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.owners.push(\"\");\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) {\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\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 const ownerIndex = this.shape.owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this.shape.owners.splice(ownerIndex, 1, event.target.value);\n else this.shape.owners.push(event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n const ownerIndex = this.shape.owners.findIndex(o => o === value);\n this.shape.owners.splice(ownerIndex, 1);\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=f93438ce&\"\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('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=d4f084a4&\"","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 AssetManager from \"@/assetManager/manager.vue\";\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.isFile(sel)) assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.selected = [];\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 { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=d1ce9748&\"\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 {\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\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n @Mutation\n setVisionMode(visionMode: \"bvh\" | \"triangle\") {\n this.visionMode = visionMode;\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 recalculateBV(partial = false) {\n // TODO: This needs to be cleaned up..\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(partial);\n else {\n let success = false;\n let tries = 0;\n while (!success) {\n success = true;\n try {\n this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n } catch (error) {\n success = false;\n tries++;\n if (tries > 10) {\n console.error(error);\n return;\n }\n }\n }\n }\n }\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 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.commit(\"recalculateBV\");\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 (_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=f93438ce&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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});\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.setBoardInitialized(true);\n gameStore.recalculateBV();\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.e9743101.js b/server/static/js/app.e9743101.js new file mode 100644 index 000000000..1496354e4 --- /dev/null +++ b/server/static/js/app.e9743101.js @@ -0,0 +1,2 @@ +(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){}getCorner(e){return""}visibleInCanvas(e){return!0}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("5050"),s=i("a68b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("9b4d");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7111f3f6",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},"0a4e":function(e,t,i){"use strict";var n=i("1b04"),s=i.n(n);s.a},"0a75":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.isFile(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("d7f0"),s=i("1eee");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cfc1");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"6bbf3b79",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},1298: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})},"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},"160b":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})},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("ce6a"),s=i("8cd4");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("0a4e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"5ecfceea",null);a.options.__file="menu.vue",t["default"]=a.exports},"1b04":function(e,t,i){},"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},"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");function h(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 h=new n.GlobalPoint(e.x,e.y);if("rect"===e.type_){const t=e;i=new u.Rect(h,t.width,t.height,t.fill_colour,t.stroke_colour,t.uuid)}else if("circle"===e.type_){const t=e;i=new r.Circle(h,t.radius,t.fill_colour,t.stroke_colour,t.uuid)}else if("circulartoken"===e.type_){const t=e;i=new a.CircularToken(h,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(h,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(h,t.points.map(e=>new n.GlobalPoint(e.x,e.y)),t.line_width,t.stroke_colour,t.uuid)}else if("text"===e.type_){const t=e;i=new d.Text(h,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,h,t.width,t.height,t.uuid),n.onload=(()=>{s.layerManager.getLayer(e.layer).invalidate(!1)})}}return i.fromDict(e),i}t.createShapeFromDict=h},"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("6f92"),c=i("f10f"),u=i("92b1");class d{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)}visibleInCanvas(e){return!1}invalidate(e){const t=l.layerManager.getLayer(this.layer);t&&t.invalidate(e)}checkVisionSources(){const e=this,t=c.gameStore.visionBlockers.indexOf(this.uuid);let i=!1;this.visionObstruction&&-1===t?(c.gameStore.visionBlockers.push(this.uuid),i=!0):!this.visionObstruction&&t>=0&&(c.gameStore.visionBlockers.splice(t,1),i=!0),i&&c.gameStore.recalculateBV(),this.auras.forEach(t=>{const i=c.gameStore.visionSources,n=i.findIndex(e=>e.aura===t.uuid);t.visionSource&&-1===n?i.push({shape:e.uuid,aura:t.uuid}):!t.visionSource&&n>=0&&i.splice(n,1)});for(let n=c.gameStore.visionSources.length-1;n>=0;n--){const t=c.gameStore.visionSources[n];t.shape===e.uuid&&(e.auras.some(e=>e.uuid===t.aura&&e.visionSource)||c.gameStore.visionSources.splice(n,1))}}setMovementBlock(e){this.movementObstruction=e||!1;const t=c.gameStore.movementblockers.indexOf(this.uuid);this.movementObstruction&&-1===t?c.gameStore.movementblockers.push(this.uuid):!this.movementObstruction&&t>=0&&c.gameStore.movementblockers.splice(t,1)}setIsToken(e){if(this.isToken=e,this.ownedBy()){const e=c.gameStore.ownedtokens.indexOf(this.uuid);this.isToken&&-1===e?c.gameStore.ownedtokens.push(this.uuid):!this.isToken&&e>=0&&c.gameStore.ownedtokens.splice(e,1)}}ownedBy(e){return void 0===e&&(e=c.gameStore.username),c.gameStore.IS_DM||this.owners.includes(e)}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(u.g2lx(t.topLeft.x)-5,u.g2ly(t.topLeft.y)-5,u.g2lz(t.w)+10,u.g2lz(t.h)+10)}}drawAuras(e){for(const i of this.auras){if(0===i.value&&0===i.dim)return;e.beginPath();const n=u.g2l(this.center()),o=u.g2lr(i.value+i.dim);if(0===i.dim)e.fillStyle=i.colour;else{const t=e.createRadialGradient(n.x,n.y,u.g2lr(i.value),n.x,n.y,u.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:!c.gameStore.IS_DM,group:!1,source:this.name,has_img:!1,effects:[],index:1/0}}moveLayer(e,t){const i=l.layerManager.getLayer(this.layer),n=l.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}))}}t.Shape=d},"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("496c")),o=n.__importDefault(i("ea6a")),r=i("4a5b"),a=i("0bc6"),l=i("8f0a"),c=i("6f92"),u=i("b2ed"),d=i("f10f"),h=i("2838"),f=i("92b1"),p=i("5a5c"),g=n.__importDefault(i("65d9"));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 l.GlobalPoint(-1e3,-1e3);let y=class extends o.default{constructor(){super(...arguments),this.name="Select",this.showContextMenu=!1,this.active=!1,this.mode=v.Noop,this.resizeDirection="",this.deltaChanged=!1,this.dragRay=new l.Ray(new l.LocalPoint(0,0),new l.Vector(0,0)),this.selectionStartPoint=m,this.selectionHelper=new u.Rect(m,0,0)}created(){this.selectionHelper.globalCompositeOperation="source-over"}onMouseDown(e){const t=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");this.selectionHelper.owners.includes(d.gameStore.username)||this.selectionHelper.owners.push(d.gameStore.username);const i=p.getMouse(e),n=f.l2g(i);let s,o=!1;s=t.selection.length?t.shapes.concat(t.selection):t.shapes;for(let a=s.length-1;a>=0;a--){const e=s[a];if(!e.ownedBy())continue;const c=e.getBoundingBox().getCorner(n);if(void 0!==c){t.selection=[e],r.getRef("selectionInfo").shape=e,this.mode=v.Resize,this.resizeDirection=c,t.invalidate(!0),o=!0;break}if(e.contains(n)){const n=e;-1===t.selection.indexOf(n)&&(t.selection=[n],r.getRef("selectionInfo").shape=n),this.mode=v.Drag;const s=f.g2l(n.refPoint);this.dragRay=new l.Ray(s,i.subtract(s)),t.invalidate(!0),o=!0;break}}if(!o){this.mode=v.GroupSelect;for(const e of t.selection)r.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=c.layerManager.getLayer();if(void 0===t)return void console.log("No active layer!");const i=p.getMouse(e),n=f.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 l.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=f.g2l(t.selection[t.selection.length-1].refPoint),o=s.add(this.dragRay.direction);let r=i.subtract(o).multiply(1/d.gameStore.zoomFactor);const l=r;if(this.mode===v.Drag){if("tokens"===t.name&&(!e.shiftKey||!d.gameStore.IS_DM))for(const e of t.selection)e.uuid!==this.selectionHelper.uuid&&(r=h.calculateDelta(r,e),r!==l&&(this.deltaChanged=!0));for(const e of t.selection)e.refPoint=e.refPoint.add(r),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.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.resizeDirection,i),e!==this.selectionHelper&&(e.visionObstruction&&d.gameStore.recalculateBV(!0),a.socket.emit("Shape.Update",{shape:e.asDict(),redraw:!0,temporary:!0})),t.invalidate(!1);else for(const e of t.selection){const t=e.getBoundingBox(),i=n;t.inCorner(i,"nw")?document.body.style.cursor="nw-resize":t.inCorner(i,"ne")?document.body.style.cursor="ne-resize":t.inCorner(i,"se")?document.body.style.cursor="se-resize":t.inCorner(i,"sw")?document.body.style.cursor="sw-resize":document.body.style.cursor="default"}}else document.body.style.cursor="default"}onMouseUp(e){if(!this.active)return;if(void 0===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.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===f.g2lx(i.refPoint.x)&&this.dragRay.origin.y===f.g2ly(i.refPoint.y))return;!d.gameStore.useGrid||e.altKey||this.deltaChanged||i.snapToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.socket.emit("Shape.Update",{shape:i.asDict(),redraw:!0,temporary:!1})),t.invalidate(!1)}this.mode===v.Resize&&(d.gameStore.useGrid&&!e.altKey&&i.resizeToGrid(),i!==this.selectionHelper&&(i.visionObstruction&&d.gameStore.recalculateBV(),a.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===c.layerManager.getLayer())return void console.log("No active layer!");const t=c.layerManager.getLayer(),i=p.getMouse(e),n=f.l2g(i);for(const s of t.selection)if(s.contains(n))return t.selection=[s],r.getRef("selectionInfo").shape=s,t.invalidate(!0),void this.$parent.$refs.shapecontext.open(e,s);this.$refs.selectcontext.open(e)}};y=n.__decorate([g.default({components:{SelectContext:s.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");function r(e,t,i){void 0===i&&(i=[]);const a=t.getBoundingBox(),l=a.offset(e);let c=!1;for(const r of o.gameStore.movementblockers){if(i.includes(r))continue;const t=s.layerManager.UUIDMap.get(r),o=t.getBoundingBox();let u=o.intersectsWithInner(l);if(!u){const t=n.Ray.fromPoints(a.topLeft.add(e.normalize()),l.topLeft),i=t.direction.inverse(),s=[i.x<0,i.y<0];u=o.intersectP(t,i,s).hit}if(u){const t=o.center(),s=a.center(),l=s.subtract(t),u=new n.Vector(1,0),d=new n.Vector(0,1);let h=l.dot(u),f=l.dot(d);h>o.w/2&&(h=o.w/2),h<-o.w/2&&(h=-o.w/2),f>o.h/2&&(f=o.h/2),f<-o.h/2&&(f=-o.h/2);const p=t.add(u.multiply(h)).add(d.multiply(f));p.x===a.topLeft.x||p.x===a.topRight.x?e=new n.Vector(0,e.y):p.y===a.topLeft.y||p.y===a.botLeft.y?e=new n.Vector(e.x,0):p.xa.topRight.x?e=new n.Vector(p.x-a.topRight.x,e.y):p.ya.botLeft.y&&(e=new n.Vector(e.x,p.y-a.botLeft.y)),c=!0,i.push(r);break}}return c&&(e=r(e,t,i)),e}t.calculateDelta=r},"28b6":function(e,t,i){"use strict";var n=i("ee96"),s=i.n(n);s.a},"2b48":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("0bc6"),s=i("f10f");function o(){n.socket.emit("Client.Options.Set",{locationOptions:{panX:s.gameStore.panX,panY:s.gameStore.panY,zoomFactor:s.gameStore.zoomFactor}})}t.sendClientOptions=o},"2baf":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("60a3"),a=i("4a5b");let l=class extends s.default{constructor(){super(...arguments),this.showImage=null}get folders(){return Object.keys(this.asset).filter(e=>!["__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 l.layerManager.layers.filter(e=>e.selectable&&(c.gameStore.IS_DM||e.playerEditable))}getActiveLayer(){return l.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()}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},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()});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 d=c.getUnitDistance(u.value+u.dim),h=t.center(),f=c.g2l(h),p=new a.Circle(h,d);if(!p.visibleInCanvas(e.canvas))continue;let g=-1;const v=new Path2D;let m;v.moveTo(f.x,f.y);for(let s=0;s<2*Math.PI;s+=r.Settings.angleSteps/180*Math.PI){const t=new n.GlobalPoint(h.x+d*Math.cos(s),h.y+d*Math.sin(s));r.Settings.drawAngleLines&&(i.beginPath(),i.moveTo(c.g2lx(h.x),c.g2ly(h.y)),i.lineTo(c.g2lx(t.x),c.g2ly(t.y)),i.stroke());const o=n.Ray.fromPoints(h,t),a=l.gameStore.BV.intersect(o);if(0===s&&(m=a.hit?a.intersect:t),a.hit)-1!==g&&(v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,s),g=-1),v.lineTo(c.g2lx(a.intersect.x),c.g2ly(a.intersect.y));else if(-1===g){g=s;const i=c.g2l(t);e.lineTo(i.x,i.y)}}if(-1===g?v.lineTo(c.g2lx(m.x),c.g2ly(m.y)):v.arc(f.x,f.y,c.g2lr(u.value+u.dim),g,2*Math.PI),l.gameStore.fullFOW){if(u.dim>0){const t=e.createRadialGradient(f.x,f.y,c.g2lr(u.value),f.x,f.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(v)}u.lastPath=v}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=d},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},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("df15"),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;e-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("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})},"4bc3":function(e,t,i){"use strict";i.r(t);var n=i("2baf"),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},5050:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return void 0!==e.getActiveLayer()?i("ContextMenu",{attrs:{visible:e.visible,left:e.x+"px",top:e.y+"px"},on:{close:e.close}},[e.getLayers().length>1?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")])]):e._e()},s=[];i.d(t,"a",function(){return n}),i.d(t,"b",function(){return s})},"52a8":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("60a3");let a=class extends s.default{constructor(){super(...arguments),this.positioned=!1,this.offsetX=0,this.offsetY=0,this.screenX=0,this.screenY=0,this.dragging=!1}mounted(){this.updatePosition()}updated(){this.updatePosition()}close(e){this.$emit("close")}updatePosition(){if(!this.positioned){const e=this.$refs.container;if(0===e.offsetWidth&&0===e.offsetHeight)return;this.$refs.container.style.left=(window.innerWidth-e.offsetWidth)/2+"px",this.$refs.container.style.top=(window.innerHeight-e.offsetHeight)/2+"px",this.positioned=!0}}dragStart(e){null!==e&&null!==e.dataTransfer&&(e.dataTransfer.setData("Hack",""),e.dataTransfer.setDragImage(this.$refs.container,e.offsetX,e.offsetY),this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.screenX=e.screenX,this.screenY=e.screenY,this.dragging=!0)}dragEnd(e){this.dragging=!1;let t=e.clientX-this.offsetX,i=e.clientY-this.offsetY;0===e.clientX&&0===e.clientY&&0===e.pageX&&0===e.pageY&&(t=parseInt(this.$refs.container.style.left,10)-(this.screenX-e.screenX),i=parseInt(this.$refs.container.style.top,10)-(this.screenY-e.screenY)),t<0&&(t=0),t>window.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}asDict(){return Object.assign(this.getBaseDict(),{line_width:this.lineWidth,points:this._points.map(e=>({x:e.x,y:e.y}))})}get points(){return this._points.map(e=>[e.x,e.y])}getBoundingBox(){let e=this.refPoint.x,t=this.refPoint.y,i=this.refPoint.x,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._points.includes(e)}center(e){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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("605b"),s=i("6f8d");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("cec8");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"7abc7fe9",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.owners.push(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("574e"),f=i("b2ed"),p=i("f10f"),g=i("92b1"),v=i("5a5c");let m=class extends a.default{constructor(){super(...arguments),this.name="Draw",this.active=!1,this.startPoint=null,this.shape=null,this.brushHelper=null,this.fillColour="rgba(0, 0, 0, 1)",this.borderColour="rgba(255, 255, 255, 0)",this.shapeSelect="square",this.shapes=["square","circle","paint-brush"],this.modeSelect="normal",this.modes=["normal","reveal","hide"],this.brushSize=g.getUnitDistance(p.gameStore.unitSize)}get helperSize(){return"paint-brush"===this.shapeSelect?this.brushSize/2:g.getUnitDistance(this.unitSize)/8}get IS_DM(){return p.gameStore.IS_DM}get unitSize(){return p.gameStore.unitSize}get useGrid(){return p.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=!0,this.startPoint=g.l2g(v.getMouse(e)),"square"===this.shapeSelect)this.shape=new f.Rect(this.startPoint.clone(),0,0,this.fillColour,this.borderColour);else if("circle"===this.shapeSelect)this.shape=new d.Circle(this.startPoint.clone(),this.helperSize,this.fillColour,this.borderColour);else{if("paint-brush"!==this.shapeSelect)return;this.shape=new h.MultiLine(this.startPoint.clone(),[],this.brushSize),this.shape.fillColour=this.fillColour}"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.owners.push(p.gameStore.username),"fow"===t.name&&"normal"===this.modeSelect&&(this.shape.visionObstruction=!0,this.shape.movementObstruction=!0),p.gameStore.visionBlockers.push(this.shape.uuid),t.addShape(this.shape,!0,!1),this.onDeselect(),this.onSelect()}else console.log("No active layer!")}onMouseMove(e){const t=g.l2g(v.getMouse(e)),i=this.getLayer();void 0!==i?(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&&("square"===this.shapeSelect?(this.shape.w=Math.abs(t.x-this.startPoint.x),this.shape.h=Math.abs(t.y-this.startPoint.y),this.shape.refPoint.x=Math.min(this.startPoint.x,t.x),this.shape.refPoint.y=Math.min(this.startPoint.y,t.y)):"circle"===this.shapeSelect?this.shape.r=t.subtract(this.startPoint).length():"paint-brush"===this.shapeSelect&&this.shape._points.push(t),l.socket.emit("Shape.Update",{shape:this.shape.asDict(),redraw:!0,temporary:!0}),this.shape.visionObstruction&&p.gameStore.recalculateBV(!0),i.invalidate(!1))):console.log("No active layer!")}onMouseUp(e){this.active&&null!==this.shape&&(!e.altKey&&this.useGrid&&this.shape.resizeToGrid(),this.shape.visionObstruction&&p.gameStore.recalculateBV(),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)}};n.__decorate([o.Watch("fillColour")],m.prototype,"onFillChange",null),n.__decorate([o.Watch("modeSelect")],m.prototype,"onModeUpdate",null),m=n.__decorate([s.default({components:{"color-picker":r.default}})],m),t.default=m},"5e17":function(e,t,i){},"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.x,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){}getCorner(e){return""}visibleInCanvas(e){return!0}snapToGrid(){}resizeToGrid(){}resize(e,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},"605b":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})},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){},"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),this.type="assetrect",this.src="",void 0!==s&&(this.uuid=s),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,window.TDS=this.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.x=Math.round(a.refPoint.x/e)*e,a.refPoint.y=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("1298"),s=i("778b");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("d71e");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"66ccc134",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),n=t*(e.keyCode%2?0:1);if(l.layerManager.hasSelection()){const o=l.layerManager.getSelection();i*=e.keyCode<=38?-1:1,n*=e.keyCode<=38?-1:1;let r=new a.Vector(i,n);if(!e.shiftKey||!c.gameStore.IS_DM)for(const e of o)r=u.calculateDelta(r,e);for(const e of o)e.refPoint.x+=r.x,e.refPoint.y+=r.y,e.refPoint.x%t===0&&e.refPoint.y%t===0||e.snapToGrid(),s.socket.emit("Shape.Position.Update",{shape:e.asDict(),redraw:!0,temporary:!1});l.layerManager.getLayer().invalidate(!1)}else c.gameStore.increasePanX(i*(e.keyCode<=38?1:-1)),c.gameStore.increasePanY(n*(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},"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},8095:function(e,t,i){},"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");class s{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 s(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),o=Math.min(this.topLeft.y,e.topLeft.y),r=Math.max(this.botLeft.y,e.botLeft.y);return new s(new n.GlobalPoint(t,o),i-t,r-o)}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(e){if(void 0===e)return this.topLeft.add(new n.Vector(this.w/2,this.h/2));this.topLeft.x=e.x-this.w/2,this.topLeft.y=e.y-this.h/2}inCorner(e,t){const i=Math.min(6,this.w/2)/2;switch(t){case"ne":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"nw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.topLeft.y-i<=e.y&&e.y<=this.topLeft.y+i;case"sw":return this.topLeft.x-i<=e.x&&e.x<=this.topLeft.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;case"se":return this.topRight.x-i<=e.x&&e.x<=this.topRight.x+i&&this.botLeft.y-i<=e.y&&e.y<=this.botLeft.y+i;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}getMaxExtent(){return this.w>this.h?0:1}}t.BoundingRect=s},"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}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}}t.Point=s;class o extends s{add(e){return super.add(e)}subtract(e){return super.subtract(e)}clone(){return super.clone()}}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(1/this.x,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)}}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})}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(t),h.gameStore.recalculateBV(),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}}l._counter=0,t.Triangle=l;class c{constructor(e){this.infinite=!1,this._point=e}get point(){return this._point}set point(e){this._point=e,this.infinite=!1}}t.Vertex=c;class u{constructor(e,t){if(this.v=e,this.t=t,null===e?this.t=null:null===t&&(this.t=e.triangle),null==this.t||this.t.dimension<1)this.ri=0,this.v=null,this.t=null;else{const t=this.t.indexV(e);2===this.t.dimension?this.ri=n.ccw(t):this.ri=2}this._ri=this.ri,this._v=this.v,this._t=this.t}get valid(){return null!==this.t&&null!==this.v}next(){let e=this.t.indexV(this.v);return 1===this.t.dimension?this.t=this.t.neighbours[0===e?1:0]:(this.t=this.t.neighbours[n.ccw(e)],e=this.t.indexV(this.v),this.ri=n.ccw(e)),this.ri!==this._ri||this.v!==this._v||this.t!==this._t}}t.EdgeCirculator=u;class d{constructor(e){if(this.i=0,this.edge=new p,this._es=0,this.tds=e,this.edge.second=0,e.dimension<=0)this.pos=null;else{this.pos=e.triangles[0],1===e.dimension&&(this.edge.second=2);while(null!==this.pos&&!this.associatedEdge())throw new Error("[poi");1===e.dimension&&(this._es=2)}}get valid(){return(null!==this.pos||this._es!==this.edge.second)&&this.pos.isInfinite(this.edge.second)}next(){do{this.increment()}while(null!==this.pos&&!this.associatedEdge())}collect(){return this.edge.first=this.pos,this.edge}associatedEdge(){return 1===this.tds.dimension||this.tds.triangles.indexOf(this.pos)t!==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;o{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},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){},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},af26:function(e,t,i){},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},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)if("bvh"===a.gameStore.visionMode){t.beginPath();let e=-1;const s=i.center(),o=l.g2l(s);for(let i=0;i<2*Math.PI;i+=r.Settings.angleSteps/2/180*Math.PI){const r=Math.cos(i),c=Math.sin(i),d=new n.Ray(s,new n.Vector(r,c)),h=a.gameStore.BV.intersect(d);h.hit?(-1!==e&&(t.arc(o.x,o.y,u,e,i),e=-1),t.lineTo(l.g2lx(h.intersect.x),l.g2ly(h.intersect.y))):-1===e&&(t.lineTo(o.x+u*r,o.y+u*c),e=i)}-1!==e?t.arc(o.x,o.y,u,e,2*Math.PI):t.closePath(),t.fill()}else try{const n=c.computeVisibility(i.center());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){void 0===i&&(i=!1),e.layer=this.name,this.shapes.push(e),o.layerManager.UUIDMap.set(e.uuid,e),e.checkVisionSources(),e.setMovementBlock(e.movementObstruction),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}),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)}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.recalculateBV(),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);const s=Math.min(6,n.w/2);t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.topLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topRight.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e),t.fillRect(l.g2lx(n.topLeft.x-s/2),l.g2ly(n.botLeft.y-s/2),s*e,s*e)})}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))}onShapeMove(e){e.checkVisionSources(),e.visionObstruction&&a.gameStore.recalculateBV(),this.invalidate(!1)}}t.Layer=c},baeb: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})},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},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}inCorner(e,t){switch(t){case"ne":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"nw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y-3<=e.y&&e.y<=this.refPoint.y+3;case"sw":return this.refPoint.x-3<=e.x&&e.x<=this.refPoint.x+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;case"se":return this.refPoint.x+this.w-3<=e.x&&e.x<=this.refPoint.x+this.w+3&&this.refPoint.y+this.h-3<=e.y&&e.y<=this.refPoint.y+this.h+3;default:return!1}}getCorner(e){return this.inCorner(e,"ne")?"ne":this.inCorner(e,"nw")?"nw":this.inCorner(e,"se")?"se":this.inCorner(e,"sw")?"sw":void 0}center(e){if(void 0===e)return this.refPoint.add(new n.Vector(this.w/2,this.h/2));this.refPoint.x=e.x-this.w/2,this.refPoint.y=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.x=Math.round(this.refPoint.x/e)*e,this.refPoint.y=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;"nw"===e?(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)):"ne"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=l.g2ly(this.refPoint.y)+this.h*i-t.y,this.refPoint.y=l.l2gy(t.y)):"se"===e?(this.w=t.x-l.g2lx(this.refPoint.x),this.h=t.y-l.g2ly(this.refPoint.y)):"sw"===e&&(this.w=l.g2lx(this.refPoint.x)+this.w*i-t.x,this.h=t.y-l.g2ly(this.refPoint.y),this.refPoint.x=l.l2gx(t.x)),this.w/=i,this.h/=i,this.w<0&&(this.refPoint.x+=this.w,this.w=Math.abs(this.w)),this.h<0&&(this.refPoint.y+=this.h,this.h=Math.abs(this.h))}}t.BaseRect=c},c277:function(e,t,i){"use strict";i.r(t);var n=i("baeb"),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){},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");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({template:""})],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},ce6a: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:"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}}}),i("label",{attrs:{for:"visionMode"}},[e._v("Vision Mode:")]),i("select",{attrs:{id:"visionMode"},on:{change:e.changeVisionMode}},[i("option",[e._v("BVH")]),i("option",[e._v("Triangle")])])],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})},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},cec8:function(e,t,i){"use strict";var n=i("d749"),s=i.n(n);s.a},cee3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i("1216"),s=i("d6be"),o=i("98ef"),r=i("4aee");function a(e,t=0,i=!1){const o=[e.x,e.y],r=[],a=s.PA_CDT.locate(o,null).loc;return null===a?(console.error("Triangle not found"),[]):(r.push(a.vertices[1].point),a.isConstrained(0)||l(o,a.vertices[2].point,a.vertices[1].point,a,0,r),r.push(a.vertices[2].point),a.isConstrained(1)||l(o,a.vertices[0].point,a.vertices[2].point,a,1,r),r.push(a.vertices[0].point),a.isConstrained(2)||l(o,a.vertices[1].point,a.vertices[0].point,a,2,r),i&&n.drawPolygon(r,"red"),r)}function l(e,t,i,n,s,a){const u=n.neighbours[s],d=u.indexT(n),h=r.ccw(d),f=r.cw(d),p=u.vertices[d],g=u.vertices[f],v=u.vertices[h],m=[u,h],y=[u,f],b=r.orientation(e,i,p.point),_=r.orientation(e,t,p.point);if(b===o.Sign.COUNTERCLOCKWISE)if(m[0].isConstrained(m[1]))i!==g.point&&a.push(c(e,i,p.point,g.point)),_===o.Sign.COUNTERCLOCKWISE&&a.push(c(e,t,p.point,g.point));else{if(_===o.Sign.COUNTERCLOCKWISE)return l(e,t,i,u,h,a);l(e,p.point,i,u,h,a)}if(b!==o.Sign.CLOCKWISE&&_!==o.Sign.COUNTERCLOCKWISE&&a.push(p.point),_===o.Sign.CLOCKWISE)return y[0].isConstrained(y[1])?(b===o.Sign.CLOCKWISE&&a.push(c(e,i,p.point,v.point)),void(t!==v.point&&a.push(c(e,t,p.point,v.point)))):b===o.Sign.CLOCKWISE?l(e,t,i,u,f,a):l(e,t,p.point,u,f,a)}function c(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=a},cfc1:function(e,t,i){"use strict";var n=i("5e17"),s=i.n(n);s.a},d065:function(e,t,i){"use strict";i.r(t);var n=i("4b01"),s=i("f8b3");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("2f43");var r=i("2877"),a=Object(r["a"])(s["default"],n["a"],n["b"],!1,null,"078b3b76",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},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("6f92"),l=i("5e7c"),c=i("0180"),u=i("f10f"),d=i("92b1"),h=i("5a5c");let f=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=a.layerManager.getLayer("draw");void 0!==t?(this.active=!0,this.startPoint=d.l2g(h.getMouse(e)),this.ruler=new l.Line(this.startPoint,this.startPoint,3,u.gameStore.rulerColour),this.text=new c.Text(this.startPoint.clone(),"","bold 20px serif"),this.ruler.owners.push(u.gameStore.username),this.text.owners.push(u.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=a.layerManager.getLayer("draw");if(void 0===t)return void console.log("No draw layer!");const i=d.l2g(h.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),l=Math.round(Math.sqrt(Math.pow(s,2)+Math.pow(o,2))*u.gameStore.unitSize/u.gameStore.gridSize)+" ft",c=Math.atan2(n*o,s),f=Math.min(this.startPoint.x,i.x)+s/2,p=Math.min(this.startPoint.y,i.y)+o/2;this.text.refPoint.x=f,this.text.refPoint.y=p,this.text.text=l,this.text.angle=c,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=a.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!")}};f=n.__decorate([s.default],f),t.RulerTool=f},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=!1){const i=new o.CDT;for(const t of s.gameStore.visionBlockers){const s=n.layerManager.UUIDMap.get(t);if(!e||s.visibleInCanvas(n.layerManager.getLayer().canvas))for(let e=0;ee===this.shape.uuid)),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)):(d.gameStore.annotations.push(this.shape.uuid),u.layerManager.hasLayer("draw")&&u.layerManager.getLayer("draw").invalidate(!0)),this.updateShape(!1)}updateOwner(e,t){const i=this.shape.owners.findIndex(e=>e===t);i>=0?this.shape.owners.splice(i,1,e.target.value):this.shape.owners.push(e.target.value),this.updateShape(d.gameStore.fowLOS)}removeOwner(e){const t=this.shape.owners.findIndex(t=>t===e);this.shape.owners.splice(t,1),this.updateShape(d.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=d.gameStore.visionSources.findIndex(t=>t.aura===e.uuid);e.visionSource&&-1===t?d.gameStore.visionSources.push({shape:this.shape.uuid,aura:e.uuid}):!e.visionSource&&t>=0&&d.gameStore.visionSources.splice(t,1),u.layerManager.invalidateLight(),this.updateShape(!0)}updateAuraColour(e,t){const i=u.layerManager.getLayer(this.shape.layer);void 0!==i&&i.invalidate(!e.visionSource)}};n.__decorate([h.Prop()],f.prototype,"shape",void 0),f=n.__decorate([o.default({components:{Modal:a.default,"color-picker":r.default}})],f),t.default=f},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("f9e5"),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},df15: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})},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.isFile(e)?l.assetStore.files.splice(l.assetStore.files.indexOf(e),1):l.assetStore.folders.splice(l.assetStore.folders.indexOf(e),1);l.assetStore.selected=[]}},()=>{}),this.close())}};u=n.__decorate([o.default({components:{ContextMenu:r.default}})],u),t.default=u},e198:function(e,t,i){},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},e756:function(e,t,i){},e914:function(e,t,i){"use strict";i.r(t);var n=i("160b"),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"}get selectedLayer(){return this.layers[this.selectedLayerIndex]}setVisionMode(e){this.visionMode=e}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}recalculateBV(e=!1){if(this.boardInitialized)if("triangle"===this.visionMode)d.triangulate(e);else{let e=!1,i=0;while(!e){e=!0;try{this.BV=Object.freeze(new c.BoundingVolume(this.visionBlockers))}catch(t){if(e=!1,i++,i>10)return void console.error(t)}}}}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)}}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.commit("recalculateBV")}};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,"recalculateBV",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,"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},f9e5: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})},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})}),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.setBoardInitialized(!0),c.gameStore.recalculateBV()}),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.e9743101.js.map \ No newline at end of file diff --git a/server/static/js/app.e9743101.js.map b/server/static/js/app.e9743101.js.map new file mode 100644 index 000000000..57ce9d67a --- /dev/null +++ b/server/static/js/app.e9743101.js.map @@ -0,0 +1 @@ +{"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/ui/menu/menu.vue?4fd1","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/createtoken_modal.vue?ed6e","webpack:///./src/game/ui/tools/createtoken_modal.vue?3856","webpack:///./src/game/ui/tools/tool.vue?5b17","webpack:///./src/game/shapes/circulartoken.ts","webpack:///./src/assetManager/manager.vue?3cb9","webpack:///./src/assetManager/manager.vue?1f53","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/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/game/ui/selection/edit_dialog.vue?03e8","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/App.vue?2e53","webpack:///./src/App.vue","webpack:///./src/game/layers/fow.ts","webpack:///./src/core/components/load.vue?18c2","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/selection/edit_dialog.vue?391c","webpack:///./src/game/ui/selection/edit_dialog.vue?057b","webpack:///./src/game/ui/menu/asset_node.vue?1f27","webpack:///./src/game/ui/selection/shapecontext.vue?ab76","webpack:///./src/game/ui/selection/shapecontext.vue?3b0d","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/draw.vue?d046","webpack:///./src/game/ui/tools/draw.vue?57e4","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/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/ui/selection/shapecontext.vue?6173","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/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/manager.vue?a11e","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/ui/tools/select.vue?2a55","webpack:///./src/game/ui/tools/select.vue?b488","webpack:///./src/game/events/mouse.ts","webpack:///./src/game/ui/menu/asset_node.vue?be10","webpack:///./src/game/shapes/baserect.ts","webpack:///./src/game/ui/tools/select.vue","webpack:///./src/dashboard/main.vue","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/game/ui/menu/menu.vue?28ea","webpack:///./src/game/ui/menu/menu.vue?16da","webpack:///./src/invitation/invitation.ts","webpack:///./src/core/components/modals/prompt.vue","webpack:///./src/game/ui/tools/draw.vue?6d03","webpack:///./src/game/visibility/te/te.ts","webpack:///./src/auth/login.vue?5f02","webpack:///./src/game/ui/selection/edit_dialog.vue","webpack:///./src/game/settings.ts","webpack:///./src/auth/login.vue?283c","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/game/ui/tools/createtoken_modal.vue?41c9","webpack:///./src/dashboard/main.vue?1359","webpack:///./src/auth/login.vue?12cd","webpack:///./src/auth/login.vue?7cce","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/assetManager/contextMenu.vue?d089","webpack:///./src/assetManager/contextMenu.vue?b4b1","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/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/game/ui/tools/map.vue?7416","webpack:///./src/game/ui/tools/map.vue?9024","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","resizeDir","lines","lineHeight","widths","measureText","width","Math","max","split","allLines","maxWidth","targetLine","words","word","testLine","metrics","testWidth","__webpack_exports__","_shapecontext_vue_vue_type_template_id_7111f3f6_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__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_5ecfceea_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_5ecfceea_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","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","isFile","indexOf","delete","event","shiftKey","inodes","start","end","ctrlKey","file","dataTransfer","setData","dropEffect","includes","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_6bbf3b79_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","render","_vm","_h","$createElement","_c","_self","attrs","visible","on","close","$event","scopedSlots","_u","fn","staticClass","draggable","dragstart","dragStart","dragend","dragEnd","_v","for","directives","rawName","expression","id","domProps","input","composing","update:color","borderColour","ref","height","submit","staticRenderFns","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","gameStore","IS_DM","group","source","has_img","effects","index","dragover","preventDefault","moveDrag","drop","stopPropagation","stopDrag","_l","dir","_s","multiple","hidden","change","title","createDirectory","prepareUpload","dblclick","changeDirectory","dragleave","leaveDrag","staticStyle","font-size","_e","class","inode-selected","select","contextmenu","cm","open","startDrag","src","geom_1","rect_1","text_1","AnnotationManager","shown","origin","GlobalPoint","annotationText","annotationRect","Rect","layer","hasLayer","warn","addShape","l2g","LocalPoint","getMaxWidth","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_5ecfceea_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","createShapeFromDict","shape","dummy","UUIDMap","has","sh","type_","fill_colour","stroke_colour","circ","token","Line","x2","y2","line_width","multiline","MultiLine","asset","img","Image","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","skipLightUpdate","self","obstructionIndex","visionBlockers","changeBV","recalculateBV","forEach","au","ls","visionSources","findIndex","aura","visionSource","some","blocksMovement","movementblockers","ownedBy","ownedtokens","username","draw_operator","movement_obstruction","vision_obstruction","aurasToServer","is_token","JSON","stringify","aurasFromServer","parse","bbox","getBoundingBox","strokeRect","topLeft","dim","loc","innerRange","g2lr","gradient","createRadialGradient","tc","addColorStop","setAlpha","lastPath","sync","oldLayer","newLayer","shapes","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","mask","updateNote","$set","style","calcHeight","removeNote","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","resizeDirection","deltaChanged","dragRay","Ray","Vector","selectionStartPoint","selectionHelper","mouse","getMouse","globalMouse","selectionStack","hit","selection","concat","corner","getCorner","getRef","Resize","Drag","localRefPoint","subtract","GroupSelect","endPoint","abs","og","direction","delta","multiply","ogDelta","calculateDelta","asDict","redraw","temporary","resize","bb","gm","inCorner","body","cursor","clearSelection","topRight","botLeft","useGrid","altKey","snapToGrid","resizeToGrid","$parent","shapecontext","selectcontext","SelectContext","done","ogSelBBox","newSelBBox","offset","refine","movementBlocker","blocker","blockerBBox","found","intersectsWithInner","ray","fromPoints","normalize","invDir","inverse","dirIsNegative","intersectP","bCenter","sCenter","ux","uy","dx","dot","dy","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_078b3b76_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_078b3b76_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_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","ShapeContext","activeLayer","pageX","pageY","layers","selectable","playerEditable","moveLayer","getActiveLayer","moveShapeOrder","initiative","addInitiative","getInitiativeRepr","ContextMenu","openEditDialog","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__","script","componentNormalizer","settings_1","FOWLayer","isVisionLayer","preFogShapes","idx","removeShape","Settings","skipLightFOW","originalOperation","dctx","drawAngleLines","drawFirstLightHit","fullFOW","lcenter","alm","light","find","auraLength","getUnitDistance","auraCircle","visibleInCanvas","lastArcAngle","Path2D","firstPoint","angleSteps","anglePoint","cos","sin","lightRay","hitResult","BV","intersect","fowLOS","drawImage","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","pow","targetX","targetY","round","resizedir","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","v","toString","capitalize","charAt","toUpperCase","getHTMLFont","element","parentElement","getComputedStyle","getPropertyValue","getHTMLTextWidth","fakeElement","createElement","appendChild","getContext","partition","arr","predicate","ret","Number","fontWidth","fixedEncodeURIComponent","str","encodeURIComponent","charCodeAt","OrderedMap","values","getComponent","activeComponent","_contextMenu_vue_vue_type_template_id_d4f084a4___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","orientation","Sign","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","ZERO","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","LEFT_TURN","RIGHT_TURN","segSegDoIntersectContained","intersection","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","grid-column","updateShape","grid-column-start","checked","setToken","Array","isArray","_i","$$a","$$el","$$c","$$v","$$i","setVisionBlocker","setMovementBlocker","owner","placeholder","updateOwner","removeOwner","modifiers","number","_n","$forceUpdate","opacity","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_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","getLayers","background-color","setLayer","moveToBack","moveToFront","getInitiativeWord","Modal","positioned","offsetX","offsetY","screenX","screenY","dragging","updatePosition","container","offsetWidth","offsetHeight","clientX","clientY","parseInt","Boolean","destination","href","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_7abc7fe9_scoped_true___WEBPACK_IMPORTED_MODULE_0__","_draw_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","opposite","fowColour","fowOpacity","colorpicker_vue_1","modal_vue_1","CreateTokenModal","updatePreview","newValue","oldValue","unitSize","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","shapeSelect","modeSelect","modes","brushSize","helperSize","onModeChange","fowLayer","normalLayer","setupBrush","onDeselect","onSelect","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","mid","detailArrow","$on","tool","onMouseDown","onMouseUp","onMouseMove","onContextMenu","--detailRight","--detailArrow","option-selected","max-width","_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","neighbours","deleteTriangle","conflictBoundaries","iN","iT","iC","current","n1","n2","ind","ind1","ind2","mirrorIndex","v0","v1","v2","newlf","createTriangle","isConstrained","triangle","vaa","vbb","aa","lfc","LineFaceCirculator","lf","rf","indexT","unshift","previousFace","currentVertex","i1","i2","vcc","vdd","pi","BoundingBox","dilate","overlaps","removeConstrainedEdge","dimension","indf","locateInfo","locate","iLocate","insertb","lt","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","prev","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","l2gz","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_66ccc134_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","event_bus_1","onKeyUp","HTMLInputElement","HTMLTextAreaElement","selectTool","EventBus","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","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","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","sw","owned","joined","_m","createRoom","newSessionName","tag","getPointDistance","Point","vec","scale","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","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","settings","locations","setUseGrid","setFullFOW","setFOWOpacity","setLineOfSight","setUnitSize","setGridSize","setGridColour","setFOWColour","rulerColour","setRulerColour","nextElementSibling","newNote","openNote","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","Vertex","_point","_ri","Edge","_es","associatedEdge","increment","tr","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","_a","recursiveBuild","compact","node","createLeaf","centroidBbox","getMaxExtent","pMid","partitionedData","flattened","stopOnFirstHit","tMin","todoOffset","nodeNum","todo","secondChildOffset","flatten","myOffset","secondOffset","primitivesOffset","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7111f3f6_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_7111f3f6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","annotation_1","GameManager","selectedTool","oldShape","redrawInitiative","checkVisionSources","setMovementBlock","setIsToken","move","localPos","fakeSetData","disabled","$store","state","game","updateOrder","model","callback","actor","flex-direction","align-items","initiative-selected","currentActor","mouseenter","toggleHighlight","lazy","notAllowed","owns","syncInitiative","createEffect","getDefaultEffect","toggleOption","removeInitiative","effect","updateEffect","turns","roundCounter","setRound","setTurn","nextTurn","LoadComponent","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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","_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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_cache_loader_dist_cjs_js_ref_12_0_node_modules_thread_loader_dist_cjs_js_node_modules_ts_loader_index_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","te_1","FOWPlayersLayer","skipPlayerFOW","drctx","maxLength","tokenId","visionMode","computeVisibility","selectionColor","selectionWidth","invalidateLight","serverShape","lsI","lbI","mbI","anI","annotationIndex","ownedIndex","ogOP","drawAuras","destinationIndex","oldIdx","sign","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","topright","botleft","coreVisible","mx","my","_select_vue_vue_type_template_id_0ed49b21___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__","createtokendialog","Logout","CoreStore","init","App_vue_1","router_1","config","productionTip","devtools","performance","$mount","props","rm-list-dm","enter","rm","transition","settingsClick","overflow-y","overflow-x","assets","createNote","notes","step","readonly","invitationCode","changeVisionMode","text-decoration","changeLocation","createLocation","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__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_7abc7fe9_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_7abc7fe9_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","draw_1","pa_1","it","drawt","Q","rawOutput","PA_CDT","expandEdge","fh","nfh","nIndex","rIndex","lIndex","nvh","rvh","lvh","re","le","ro","lo","raySegIntersection","CLOCKWISE","denominator","ua","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_6bbf3b79_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_6bbf3b79_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","_edit_dialog_vue_vue_type_template_id_078b3b76_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","ruler","diffsign","xdiff","ydiff","label","atan2","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","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_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_66ccc134_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_66ccc134_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_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","focusin","focusout","login","required","visibility","register","EditDialog","addEmpty","hadAnnotation","an","ownerIndex","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_f93438ce___WEBPACK_IMPORTED_MODULE_0__","_map_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__","rename","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","_manager_vue_vue_type_template_id_d1ce9748___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","$off","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","freeze","isDM","success","tries","oldLoc","newLoc","getGridLayer","increase","unit_size","gridLayer","use_grid","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","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,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,I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ACJA,EAAM6N,UAAUpqB,EAAK4a,OAAO,KAEhC3O,EAAAf,OAAO8J,GAAG,eAAiBhV,IACvBuuC,EAAAY,YAAYzV,YAAY15B,KAE5BiM,EAAAf,OAAO8J,GAAG,aAAewM,IACrBA,EAAOvC,QAAQ1C,IACX,IAAK1L,EAAAO,aAAaqL,QAAQC,IAAIH,EAAM7X,MAEhC,YADAkP,QAAQC,IAAI,kDAGhB,IAAKhD,EAAAO,aAAayJ,SAAS0B,EAAM3B,OAE7B,YADAhH,QAAQC,uDAAuD0I,EAAM3B,SAGzE,MAAMo0C,EAAYn+C,EAAAO,aAAaqL,QAAQ/Z,IAAI6Z,EAAM7X,MACjDmM,EAAAO,aAAaC,SAASkL,EAAM3B,OAAQ0R,YAAY0iC,GAAW","file":"static/js/app.e9743101.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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, 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=7111f3f6&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=7111f3f6&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 \"7111f3f6\",\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 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=5ecfceea&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=5ecfceea&scoped=true&lang=css&\"","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.isFile(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--) assetStore.selected.push(inodes[i]);\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=6bbf3b79&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=6bbf3b79&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 \"6bbf3b79\",\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","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=66ccc134&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!./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","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=d1ce9748&\"","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=5ecfceea&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=5ecfceea&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 \"5ecfceea\",\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 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\";\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_ === \"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 } 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 type: string;\n // The unique ID of this shape\n 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 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 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 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 abstract getCorner(point: GlobalPoint): string | undefined;\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(resizeDir: string, point: LocalPoint): void;\n\n abstract get points(): number[][];\n\n invalidate(skipLightUpdate: boolean) {\n const l = layerManager.getLayer(this.layer);\n if (l) l.invalidate(skipLightUpdate);\n }\n\n checkVisionSources() {\n const self = this;\n const obstructionIndex = gameStore.visionBlockers.indexOf(this.uuid);\n let changeBV = false;\n if (this.visionObstruction && obstructionIndex === -1) {\n gameStore.visionBlockers.push(this.uuid);\n changeBV = true;\n } else if (!this.visionObstruction && obstructionIndex >= 0) {\n gameStore.visionBlockers.splice(obstructionIndex, 1);\n changeBV = true;\n }\n if (changeBV) gameStore.recalculateBV();\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) {\n this.movementObstruction = blocksMovement || false;\n const obstructionIndex = gameStore.movementblockers.indexOf(this.uuid);\n if (this.movementObstruction && obstructionIndex === -1) gameStore.movementblockers.push(this.uuid);\n else if (!this.movementObstruction && obstructionIndex >= 0)\n gameStore.movementblockers.splice(obstructionIndex, 1);\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 ownedBy(username?: string) {\n if (username === undefined) username = gameStore.username;\n return gameStore.IS_DM || this.owners.includes(username);\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","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 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 { 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, g2lx, g2ly, l2g } from \"@/game/units\";\nimport { getMouse } from \"@/game/utils\";\nimport Component from \"vue-class-component\";\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 resizeDirection = \"\";\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.owners.push(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 const corner = shape.getBoundingBox().getCorner(globalMouse);\n\n // Resize case, a corner is selected\n if (corner !== undefined) {\n layer.selection = [shape];\n getRef(\"selectionInfo\").shape = shape;\n this.mode = SelectOperations.Resize;\n this.resizeDirection = corner;\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.recalculateBV(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.resizeDirection, mouse);\n if (sel !== this.selectionHelper) {\n if (sel.visionObstruction) gameStore.recalculateBV(true);\n socket.emit(\"Shape.Update\", { shape: sel.asDict(), redraw: true, temporary: true });\n }\n layer.invalidate(false);\n }\n } else {\n for (const sel of layer.selection) {\n const bb = sel.getBoundingBox();\n const gm = globalMouse;\n if (bb.inCorner(gm, \"nw\")) {\n document.body.style.cursor = \"nw-resize\";\n } else if (bb.inCorner(gm, \"ne\")) {\n document.body.style.cursor = \"ne-resize\";\n } else if (bb.inCorner(gm, \"se\")) {\n document.body.style.cursor = \"se-resize\";\n } else if (bb.inCorner(gm, \"sw\")) {\n document.body.style.cursor = \"sw-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n }\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.recalculateBV();\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.recalculateBV();\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)) {\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}\n","import { Ray, Vector } from \"@/game/geom\";\nimport { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\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 (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}\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 this.selected = [];\n }\n\n @Mutation\n setRoot(root: number) {\n this.root = root;\n }\n\n @Mutation\n isFile(inode: number): boolean {\n return this.files.includes(inode);\n }\n}\n\nexport const assetStore = getModule(AssetStore);\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!./edit_dialog.vue?vue&type=style&index=0&id=078b3b76&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=078b3b76&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!./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\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 { 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}\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","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\";\n\nexport class FOWLayer extends Layer {\n isVisionLayer: boolean = true;\n preFogShapes: Shape[] = [];\n\n addShape(shape: Shape, sync: boolean, temporary?: boolean): void {\n super.addShape(shape, sync, temporary);\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 // 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 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\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 }\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&\"","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 inCorner(point: GlobalPoint, corner: string) {\n return false; // TODO\n }\n getCorner(point: GlobalPoint) {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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 true;\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(resizedir: string, 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.x = Math.min(this.startPoint.x, endPoint.x);\n this.rect.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\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=d4f084a4&\"\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","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('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=078b3b76&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!./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&\"","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\")])]):_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=7111f3f6&scoped=true&\"","\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 } from \"@/game/units\";\nimport { getFogColour } from \"@/game/utils\";\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 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 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.y;\n let miny: number = this.refPoint.x;\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._points.includes(point);\n }\n\n center(): GlobalPoint;\n center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {} // TODO\n getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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=7abc7fe9&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=7abc7fe9&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 \"7abc7fe9\",\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.owners.push(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 { MultiLine } from \"@/game/shapes/multiline\";\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\n fillColour = \"rgba(0, 0, 0, 1)\";\n borderColour = \"rgba(255, 255, 255, 0)\";\n\n shapeSelect = \"square\";\n shapes = [\"square\", \"circle\", \"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 this.active = true;\n this.startPoint = l2g(getMouse(event));\n if (this.shapeSelect === \"square\")\n this.shape = new Rect(this.startPoint.clone(), 0, 0, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"circle\")\n this.shape = new Circle(this.startPoint.clone(), this.helperSize, this.fillColour, this.borderColour);\n else if (this.shapeSelect === \"paint-brush\") {\n this.shape = new MultiLine(this.startPoint.clone(), [], this.brushSize);\n this.shape.fillColour = this.fillColour;\n } else return;\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.owners.push(gameStore.username);\n if (layer.name === \"fow\" && this.modeSelect === \"normal\") {\n this.shape.visionObstruction = true;\n this.shape.movementObstruction = true;\n }\n gameStore.visionBlockers.push(this.shape.uuid);\n layer.addShape(this.shape, true, false);\n\n // Push brushhelper to back\n this.onDeselect();\n this.onSelect();\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 if (this.shapeSelect === \"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.x = Math.min(this.startPoint.x, endPoint.x);\n this.shape.refPoint.y = Math.min(this.startPoint.y, endPoint.y);\n } else if (this.shapeSelect === \"circle\") {\n (this.shape).r = endPoint.subtract(this.startPoint).length();\n } else if (this.shapeSelect === \"paint-brush\") {\n (this.shape)._points.push(endPoint);\n }\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: true });\n if (this.shape.visionObstruction) gameStore.recalculateBV(true);\n layer.invalidate(false);\n }\n onMouseUp(event: MouseEvent) {\n if (!this.active || this.shape === null) return;\n if (!event.altKey && this.useGrid) {\n this.shape.resizeToGrid();\n }\n if (this.shape.visionObstruction) gameStore.recalculateBV();\n socket.emit(\"Shape.Update\", { shape: this.shape!.asDict(), redraw: true, temporary: false });\n this.active = false;\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 }\n}\n","import { GlobalPoint, LocalPoint } from \"@/game/geom\";\nimport { BoundingRect } from \"@/game/shapes/boundingrect\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { g2lx, g2ly } 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.x, 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 getCorner(point: GlobalPoint): string | undefined {\n return \"\";\n } // TODO\n visibleInCanvas(canvas: HTMLCanvasElement): boolean {\n return true;\n } // TODO\n snapToGrid(): void {}\n resizeToGrid(): void {}\n resize(resizeDir: string, point: LocalPoint): void {}\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","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=7abc7fe9&scoped=true&\"","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);\n if (uuid !== undefined) this.uuid = 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 (window).TDS = this.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.x = Math.round(asset.refPoint.x / gs) * gs;\n asset.refPoint.y = Math.round(asset.refPoint.y / gs) * gs;\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=66ccc134&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=66ccc134&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 \"66ccc134\",\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) delta = calculateDelta(delta, sel);\n }\n for (const sel of selection) {\n sel.refPoint.x += delta.x;\n sel.refPoint.y += delta.y;\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 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&\"","\n\n\n\n\n\n\n\n\n\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\";\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 center(centerPoint: GlobalPoint): void;\n center(centerPoint?: GlobalPoint): GlobalPoint | void {\n if (centerPoint === undefined) return this.topLeft.add(new Vector(this.w / 2, this.h / 2));\n this.topLeft.x = centerPoint.x - this.w / 2;\n this.topLeft.y = centerPoint.y - this.h / 2;\n }\n inCorner(point: GlobalPoint, corner: string) {\n const sw = Math.min(6, this.w / 2) / 2;\n switch (corner) {\n case \"ne\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"nw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.topLeft.y - sw <= point.y &&\n point.y <= this.topLeft.y + sw\n );\n case \"sw\":\n return (\n this.topLeft.x - sw <= point.x &&\n point.x <= this.topLeft.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n case \"se\":\n return (\n this.topRight.x - sw <= point.x &&\n point.x <= this.topRight.x + sw &&\n this.botLeft.y - sw <= point.y &&\n point.y <= this.botLeft.y + sw\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\n }\n\n getMaxExtent() {\n return this.w > this.h ? 0 : 1;\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 x: number;\n y: number;\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\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}\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}\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) {\n return this.x * other.x + this.y * other.y;\n }\n inverse() {\n return new Vector(1 / this.x, 1 / this.y);\n }\n length() {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }\n normalize() {\n const l = this.length();\n return new Vector(this.x / l, this.y / l);\n }\n reverse() {\n return new Vector(-this.x, -this.y);\n }\n multiply(scale: number) {\n return new Vector(this.x * scale, this.y * scale);\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\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 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(value);\n gameStore.recalculateBV();\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\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 try {\n this.buildData.push({\n index: i,\n bbox: shape.getBoundingBox(),\n center: new BoundingRect(shape.center(), 0, 0),\n });\n } catch {\n console.warn(`Shape ${shape.type} - ${shape.uuid} cannot be used for vision blocking !!!`);\n shape.visionObstruction = false;\n gameStore.visionBlockers.splice(i, 1);\n throw new Error();\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 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=7111f3f6&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=7111f3f6&scoped=true&lang=css&\"","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.move && shape.visionObstruction) gameStore.recalculateBV();\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","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&\"","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/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/ts-loader/index.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, 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 if (gameStore.visionMode === \"bvh\") {\n ctx.beginPath();\n let lastArcAngle = -1;\n const center = token.center();\n const lcenter = g2l(center);\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 try {\n const polygon = computeVisibility(token.center());\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): 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();\n shape.setMovementBlock(shape.movementObstruction);\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 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);\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.recalculateBV();\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 const sw = Math.min(6, bb.w / 2);\n\n // topright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // topleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.topLeft.y - sw / 2), sw * z, sw * z);\n // botright\n ctx.fillRect(g2lx(bb.topRight.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\n // botleft\n ctx.fillRect(g2lx(bb.topLeft.x - sw / 2), g2ly(bb.botLeft.y - sw / 2), sw * z, sw * z);\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 onShapeMove(shape: Shape): void {\n shape.checkVisionSources();\n if (shape.visionObstruction) gameStore.recalculateBV();\n this.invalidate(false);\n }\n}\n","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=0ed49b21&\"","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 { 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 inCorner(point: GlobalPoint, corner: string) {\n switch (corner) {\n case \"ne\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"nw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y - 3 <= point.y &&\n point.y <= this.refPoint.y + 3\n );\n case \"sw\":\n return (\n this.refPoint.x - 3 <= point.x &&\n point.x <= this.refPoint.x + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n case \"se\":\n return (\n this.refPoint.x + this.w - 3 <= point.x &&\n point.x <= this.refPoint.x + this.w + 3 &&\n this.refPoint.y + this.h - 3 <= point.y &&\n point.y <= this.refPoint.y + this.h + 3\n );\n default:\n return false;\n }\n }\n getCorner(point: GlobalPoint): string | undefined {\n if (this.inCorner(point, \"ne\")) return \"ne\";\n else if (this.inCorner(point, \"nw\")) return \"nw\";\n else if (this.inCorner(point, \"se\")) return \"se\";\n else if (this.inCorner(point, \"sw\")) return \"sw\";\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.x = centerPoint.x - this.w / 2;\n this.refPoint.y = 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.x = Math.round(this.refPoint.x / gs) * gs;\n this.refPoint.y = 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(resizedir: string, point: LocalPoint) {\n const z = gameStore.zoomFactor;\n if (resizedir === \"nw\") {\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 } else if (resizedir === \"ne\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = g2ly(this.refPoint.y) + this.h * z - point.y;\n this.refPoint.y = l2gy(point.y);\n } else if (resizedir === \"se\") {\n this.w = point.x - g2lx(this.refPoint.x);\n this.h = point.y - g2ly(this.refPoint.y);\n } else if (resizedir === \"sw\") {\n this.w = g2lx(this.refPoint.x) + this.w * z - point.x;\n this.h = point.y - g2ly(this.refPoint.y);\n this.refPoint.x = l2gx(point.x);\n }\n this.w /= z;\n this.h /= z;\n\n if (this.w < 0) {\n this.refPoint.x += this.w;\n this.w = Math.abs(this.w);\n }\n if (this.h < 0) {\n this.refPoint.y += this.h;\n this.h = Math.abs(this.h);\n }\n }\n}\n","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=0ed49b21&\"\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","\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\n@Component({ template: \"\" })\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}\n\n@Module({ dynamic: true, store: rootStore, name: \"core\" })\nclass CoreStore extends VuexModule {\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","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\":\"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}}}),_c('label',{attrs:{\"for\":\"visionMode\"}},[_vm._v(\"Vision Mode:\")]),_c('select',{attrs:{\"id\":\"visionMode\"},on:{\"change\":_vm.changeVisionMode}},[_c('option',[_vm._v(\"BVH\")]),_c('option',[_vm._v(\"Triangle\")])])],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=5ecfceea&scoped=true&\"","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 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=7abc7fe9&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=7abc7fe9&scoped=true&lang=css&\"","import { GlobalPoint } from \"@/game/geom\";\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, it = 0, drawt = false): number[][] {\n // console.time(\"CV\");\n const Q: Point = [q.x, q.y];\n const rawOutput: number[][] = [];\n const triangle = PA_CDT.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","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=6bbf3b79&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=6bbf3b79&scoped=true&lang=css&\"","import { render, staticRenderFns } from \"./edit_dialog.vue?vue&type=template&id=078b3b76&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=078b3b76&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 \"078b3b76\",\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\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(\"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.owners.push(gameStore.username);\n this.text.owners.push(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.x = xmid;\n this.text.refPoint.y = 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 = new CDT();\n\nexport function triangulate(partial: boolean = false) {\n const cdt = new CDT();\n for (const sh of gameStore.visionBlockers) {\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 PA_CDT = 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!./createtoken_modal.vue?vue&type=style&index=0&id=66ccc134&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=66ccc134&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!./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&\"","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\",\"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\",\"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=6bbf3b79&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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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 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 { layerManager } from \"@/game/layers/manager\";\nimport { Shape } from \"@/game/shapes/shape\";\nimport { gameStore } from \"@/game/store\";\nimport { Prop } from \"vue-property-decorator\";\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 updated() {\n this.addEmpty();\n }\n addEmpty() {\n if (this.shape.owners[this.shape.owners.length - 1] !== \"\") this.shape.owners.push(\"\");\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) {\n socket.emit(\"Shape.Update\", { shape: this.shape.asDict(), redraw, temporary: false });\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 const ownerIndex = this.shape.owners.findIndex(o => o === oldValue);\n if (ownerIndex >= 0) this.shape.owners.splice(ownerIndex, 1, event.target.value);\n else this.shape.owners.push(event.target.value);\n this.updateShape(gameStore.fowLOS);\n }\n removeOwner(value: string) {\n const ownerIndex = this.shape.owners.findIndex(o => o === value);\n this.shape.owners.splice(ownerIndex, 1);\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=f93438ce&\"\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('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=d4f084a4&\"","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 AssetManager from \"@/assetManager/manager.vue\";\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.isFile(sel)) assetStore.files.splice(assetStore.files.indexOf(sel), 1);\n else assetStore.folders.splice(assetStore.folders.indexOf(sel), 1);\n }\n assetStore.selected = [];\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 { render, staticRenderFns } from \"./manager.vue?vue&type=template&id=d1ce9748&\"\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 {\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\n get selectedLayer() {\n return this.layers[this.selectedLayerIndex];\n }\n\n @Mutation\n setVisionMode(visionMode: \"bvh\" | \"triangle\") {\n this.visionMode = visionMode;\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 recalculateBV(partial = false) {\n // TODO: This needs to be cleaned up..\n if (this.boardInitialized) {\n if (this.visionMode === \"triangle\") triangulate(partial);\n else {\n let success = false;\n let tries = 0;\n while (!success) {\n success = true;\n try {\n this.BV = Object.freeze(new BoundingVolume(this.visionBlockers));\n } catch (error) {\n success = false;\n tries++;\n if (tries > 10) {\n console.error(error);\n return;\n }\n }\n }\n }\n }\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 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.commit(\"recalculateBV\");\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 (_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=f93438ce&\"","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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});\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.setBoardInitialized(true);\n gameStore.recalculateBV();\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 5aa7a3092..ec189453e 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