From df99398b743d80c6c249454fa9bacf28b03649b9 Mon Sep 17 00:00:00 2001 From: openorclose Date: Tue, 8 Jan 2019 15:01:24 +0800 Subject: [PATCH 001/111] update js-slang imports, and use null for empty list --- public/externalLibs/list.js | 330 +++++++------------ public/externalLibs/sound/soundToneMatrix.js | 4 +- public/externalLibs/sound/sounds.js | 29 -- public/externalLibs/tree.js | 5 +- public/externalLibs/visualizer/visualizer.js | 12 +- src/components/workspace/Repl.tsx | 5 +- src/mocks/context.ts | 3 +- src/utils/slangHelper.ts | 45 +-- 8 files changed, 164 insertions(+), 269 deletions(-) diff --git a/public/externalLibs/list.js b/public/externalLibs/list.js index 10388ab7e4..608ebb3474 100644 --- a/public/externalLibs/list.js +++ b/public/externalLibs/list.js @@ -3,131 +3,109 @@ // Author: Martin Henz +"use strict"; // array test works differently for Rhino and // the Firefox environment (especially Web Console) function array_test(x) { if (Array.isArray === undefined) { return x instanceof Array; - } else { + } + else { return Array.isArray(x); } } - // pair constructs a pair using a two-element array -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// LOW-LEVEL FUNCTION, NOT SOURCE function pair(x, xs) { return [x, xs]; } - // is_pair returns true iff arg is a two-element array -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// LOW-LEVEL FUNCTION, NOT SOURCE function is_pair(x) { return array_test(x) && x.length === 2; } - // head returns the first component of the given pair, // throws an exception if the argument is not a pair -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// LOW-LEVEL FUNCTION, NOT SOURCE function head(xs) { if (is_pair(xs)) { return xs[0]; - } else { - throw new Error("head(xs) expects a pair as " - + "argument xs, but encountered "+xs); + } + else { + throw new Error('head(xs) expects a pair as argument xs, but encountered ' + xs); } } - // tail returns the second component of the given pair // throws an exception if the argument is not a pair -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// LOW-LEVEL FUNCTION, NOT SOURCE function tail(xs) { if (is_pair(xs)) { return xs[1]; - } else { - throw new Error("tail(xs) expects a pair as " - + "argument xs, but encountered "+xs); } - -} - -// is_empty_list returns true if arg is [] -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT -function is_empty_list(xs) { - if (array_test(xs)) { - if (xs.length === 0) { - return true; - } else if (xs.length === 2) { - return false; - } else { - throw new Error("is_empty_list(xs) expects empty list " + - "or pair as argument xs, but encountered "+xs); - } - } else { - return false; + else { + throw new Error('tail(xs) expects a pair as argument xs, but encountered ' + xs); } } - +// is_null returns true if arg is exactly null +// LOW-LEVEL FUNCTION, NOT SOURCE +function is_null(xs) { + return xs === null; +} // is_list recurses down the list and checks that it ends with the empty list [] -// does not throw any exceptions -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// does not throw Value exceptions +// LOW-LEVEL FUNCTION, NOT SOURCE function is_list(xs) { - for ( ; ; xs = tail(xs)) { - if (is_empty_list(xs)) { - return true; - } else if (!is_pair(xs)) { + for (;; xs = tail(xs)) { + if (is_null(xs)) { + return true; + } + else if (!is_pair(xs)) { return false; } } } - // list makes a list out of its arguments -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// LOW-LEVEL FUNCTION, NOT SOURCE function list() { - var the_list = []; - for (var i = arguments.length - 1; i >= 0; i--) { - the_list = pair(arguments[i], the_list); + let theList = null; + for (let i = arguments.length - 1; i >= 0; i--) { + theList = pair(arguments[i], theList); } - return the_list; + return theList; } - // list_to_vector returns vector that contains the elements of the argument list // in the given order. // list_to_vector throws an exception if the argument is not a list -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT -function list_to_vector(lst){ - var vector = []; - while (!is_empty_list(lst)){ +// LOW-LEVEL FUNCTION, NOT SOURCE +function list_to_vector(lst) { + const vector = []; + while (!is_null(lst)) { vector.push(head(lst)); lst = tail(lst); } return vector; } - // vector_to_list returns a list that contains the elements of the argument vector // in the given order. // vector_to_list throws an exception if the argument is not a vector -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT +// LOW-LEVEL FUNCTION, NOT SOURCE function vector_to_list(vector) { - if (vector.length === 0) { - return []; - } - - var result = []; - for (var i = vector.length - 1; i >= 0; i = i - 1) { + let result = null; + for (let i = vector.length - 1; i >= 0; i = i - 1) { result = pair(vector[i], result); } return result; } - // returns the length of a given argument list // throws an exception if the argument is not a list function length(xs) { - for (var i = 0; !is_empty_list(xs); ++i) { - xs = tail(xs); + let i = 0; + while (!is_null(xs)) { + i += 1; + xs = tail(xs); } return i; } - // map applies first arg f to the elements of the second argument, // assumed to be a list. // f is applied element-by-element: @@ -135,28 +113,30 @@ function length(xs) { // map throws an exception if the second argument is not a list, // and if the second argument is a non-empty list and the first // argument is not a function. +// tslint:disable-next-line:ban-types function map(f, xs) { - return (is_empty_list(xs)) - ? [] - : pair(f(head(xs)), map(f, tail(xs))); + return is_null(xs) ? null : pair(f(head(xs)), map(f, tail(xs))); } - // build_list takes a non-negative integer n as first argument, // and a function fun as second argument. // build_list returns a list of n elements, that results from // applying fun to the numbers from 0 to n-1. +// tslint:disable-next-line:ban-types function build_list(n, fun) { - function build(i, fun, already_built) { + if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { + throw new Error('build_list(n, fun) expects a positive integer as ' + 'argument n, but encountered ' + n); + } + // tslint:disable-next-line:ban-types + function build(i, alreadyBuilt) { if (i < 0) { - return already_built; - } else { - return build(i - 1, fun, pair(fun(i), - already_built)); + return alreadyBuilt; + } + else { + return build(i - 1, pair(fun(i), alreadyBuilt)); } } - return build(n - 1, fun, []); + return build(n - 1, null); } - // for_each applies first arg fun to the elements of the list passed as // second argument. fun is applied element-by-element: // for_each(fun,[1,[2,[]]]) results in the calls fun(1) and fun(2). @@ -164,169 +144,159 @@ function build_list(n, fun) { // for_each throws an exception if the second argument is not a list, // and if the second argument is a non-empty list and the // first argument is not a function. +// tslint:disable-next-line:ban-types function for_each(fun, xs) { if (!is_list(xs)) { - throw new Error("for_each expects a list as argument xs, but " + - "encountered " + xs); + throw new Error('for_each expects a list as argument xs, but encountered ' + xs); } - for ( ; !is_empty_list(xs); xs = tail(xs)) { + for (; !is_null(xs); xs = tail(xs)) { fun(head(xs)); } return true; } - // list_to_string returns a string that represents the argument list. // It applies itself recursively on the elements of the given list. -// When it encounters a non-list, it applies toString to it. +// When it encounters a non-list, it applies stringify to it. function list_to_string(l) { - if (array_test(l) && l.length === 0) { - return "[]"; - } else { - if (!is_pair(l)){ - return l.toString(); - }else{ - return "["+list_to_string(head(l))+","+list_to_string(tail(l))+"]"; - } - } + return interop_1.stringify(l); } - // reverse reverses the argument list // reverse throws an exception if the argument is not a list. function reverse(xs) { if (!is_list(xs)) { - throw new Error("reverse(xs) expects a list as argument xs, but " + - "encountered " + xs); + throw new Error('reverse(xs) expects a list as argument xs, but encountered ' + xs); } - var result = []; - for ( ; !is_empty_list(xs); xs = tail(xs)) { + let result = null; + for (; !is_null(xs); xs = tail(xs)) { result = pair(head(xs), result); } return result; } - // append first argument list and second argument list. // In the result, the [] at the end of the first argument list // is replaced by the second argument list // append throws an exception if the first argument is not a list function append(xs, ys) { - if (is_empty_list(xs)) { + if (is_null(xs)) { return ys; - } else { + } + else { return pair(head(xs), append(tail(xs), ys)); } } - // member looks for a given first-argument element in a given // second argument list. It returns the first postfix sublist // that starts with the given element. It returns [] if the // element does not occur in the list -function member(v, xs){ - for ( ; !is_empty_list(xs); xs = tail(xs)) { +function member(v, xs) { + for (; !is_null(xs); xs = tail(xs)) { if (head(xs) === v) { return xs; } } - return []; + return null; } - // removes the first occurrence of a given first-argument element // in a given second-argument list. Returns the original list // if there is no occurrence. -function remove(v, xs){ - if (is_empty_list(xs)) { - return []; - } else { +function remove(v, xs) { + if (is_null(xs)) { + return null; + } + else { if (v === head(xs)) { return tail(xs); - } else { + } + else { return pair(head(xs), remove(v, tail(xs))); } } } - // Similar to remove. But removes all instances of v instead of just the first function remove_all(v, xs) { - if (is_empty_list(xs)) { - return []; - } else { + if (is_null(xs)) { + return null; + } + else { if (v === head(xs)) { return remove_all(v, tail(xs)); - } else { - return pair(head(xs), remove_all(v, tail(xs))) + } + else { + return pair(head(xs), remove_all(v, tail(xs))); } } } // for backwards-compatibility -var removeAll = remove_all; - // equal computes the structural equality // over its arguments -function equal(item1, item2){ +function equal(item1, item2) { if (is_pair(item1) && is_pair(item2)) { - return equal(head(item1), head(item2)) && - equal(tail(item1), tail(item2)); - } else if (array_test(item1) && item1.length === 0 && - array_test(item2) && item2.length === 0) { - return true; - } else { + return equal(head(item1), head(item2)) && equal(tail(item1), tail(item2)); + } + else { return item1 === item2; } } - // assoc treats the second argument as an association, // a list of (index,value) pairs. // assoc returns the first (index,value) pair whose // index equal (using structural equality) to the given // first argument v. Returns false if there is no such // pair -function assoc(v, xs){ - if (is_empty_list(xs)) { +function assoc(v, xs) { + if (is_null(xs)) { return false; - } else if (equal(v, head(head(xs)))) { + } + else if (equal(v, head(head(xs)))) { return head(xs); - } else { + } + else { return assoc(v, tail(xs)); } } - // filter returns the sublist of elements of given list xs // for which the given predicate function returns true. -function filter(pred, xs){ - if (is_empty_list(xs)) { +// tslint:disable-next-line:ban-types +function filter(pred, xs) { + if (is_null(xs)) { return xs; - } else { + } + else { if (pred(head(xs))) { return pair(head(xs), filter(pred, tail(xs))); - } else { + } + else { return filter(pred, tail(xs)); } } } - // enumerates numbers starting from start, // using a step size of 1, until the number // exceeds end. function enum_list(start, end) { + if (typeof start !== 'number') { + throw new Error('enum_list(start, end) expects a number as argument start, but encountered ' + start); + } + if (typeof end !== 'number') { + throw new Error('enum_list(start, end) expects a number as argument start, but encountered ' + end); + } if (start > end) { - return []; - } else { + return null; + } + else { return pair(start, enum_list(start + 1, end)); } } - // Returns the item in list lst at index n (the first item is at position 0) function list_ref(xs, n) { - if (n < 0) { - throw new Error("list_ref(xs, n) expects a positive integer as " + - "argument n, but encountered " + n); + if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { + throw new Error('list_ref(xs, n) expects a positive integer as argument n, but encountered ' + n); } - - for ( ; n > 0; --n) { + for (; n > 0; --n) { xs = tail(xs); } return head(xs); } - // accumulate applies given operation op to elements of a list // in a right-to-left order, first apply op to the last element // and an initial element, resulting in r1, then to the @@ -335,86 +305,36 @@ function list_ref(xs, n) { // list. // accumulate(op,zero,list(1,2,3)) results in // op(1, op(2, op(3, zero))) - -function accumulate(op,initial,sequence) { - if (is_empty_list(sequence)) { +function accumulate(op, initial, sequence) { + if (is_null(sequence)) { return initial; - } else { - return op(head(sequence), - accumulate(op,initial,tail(sequence))); + } + else { + return op(head(sequence), accumulate(op, initial, tail(sequence))); } } - // set_head(xs,x) changes the head of given pair xs to be x, // throws an exception if the argument is not a pair -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT - -function set_head(xs,x) { +// LOW-LEVEL FUNCTION, NOT SOURCE +function set_head(xs, x) { if (is_pair(xs)) { xs[0] = x; return undefined; - } else { - throw new Error("set_head(xs,x) expects a pair as " - + "argument xs, but encountered "+xs); + } + else { + throw new Error('set_head(xs,x) expects a pair as argument xs, but encountered ' + xs); } } - // set_tail(xs,x) changes the tail of given pair xs to be x, // throws an exception if the argument is not a pair -// LOW-LEVEL FUNCTION, NOT JEDISCRIPT - -function set_tail(xs,x) { +// LOW-LEVEL FUNCTION, NOT SOURCE +function set_tail(xs, x) { if (is_pair(xs)) { xs[1] = x; return undefined; - } else { - throw new Error("set_tail(xs,x) expects a pair as " - + "argument xs, but encountered "+xs); - } -} - -// take(xs, n) puts the first n elements of xs into a list. -function take(xs, n) { - if (n < 0) { - throw new Error("take(xs, n) expects a positive integer as " + - "argument n, but encountered " + n); } - return (n === 0) ? [] : pair(head(xs), take(tail(xs), n - 1)); -} - -// drop(xs, n) removes the first n elements from xs and returns the rest (as a list) -function drop(xs, n) { - if (n < 0) { - throw new Error("drop(xs, n) expects a positive integer as " + - "argument n, but encountered " + n); + else { + throw new Error('set_tail(xs,x) expects a pair as argument xs, but encountered ' + xs); } - return (n === 0) ? xs : drop(tail(xs), n - 1); } - -//function display(str) { -// var to_show = str; -// if (is_array(str) && str.length > 2) { -// to_show = '[' + str.toString() + ']'; -// } else if (is_array(str) && is_empty_list(str)) { -// to_show = '[]'; -// } else if (is_pair(str)) { -// to_show = ''; -// var stringize = function(item) { -// if (is_empty_list(item)) { -// return '[]'; -// } else if (is_pair(item)) { -// return '[' + stringize(head(item)) + ', ' + stringize(tail(item)) + ']'; -// } else { -// return item.toString(); -// } -// } -// to_show = stringize(str); -// } -// //process.stdout.write(to_show); -// if (typeof to_show === 'function' && to_show.toString) { -// console.log(to_show.toString()); -// } else { -// console.log(to_show); -// } -// return str; -//} +exports.set_tail = set_tail; diff --git a/public/externalLibs/sound/soundToneMatrix.js b/public/externalLibs/sound/soundToneMatrix.js index 43eb9c6acd..fe96143d39 100644 --- a/public/externalLibs/sound/soundToneMatrix.js +++ b/public/externalLibs/sound/soundToneMatrix.js @@ -538,7 +538,7 @@ function adsr(attack_time, decay_time, sustain_level, release_time) { function stacking_adsr(waveform, base_frequency, duration, list_of_envelope) { function zip(lst, n) { - if (is_empty_list(lst)) { + if (is_null(lst)) { return lst; } else { return pair(pair(n, head(lst)), zip(tail(lst), n + 1)); @@ -547,7 +547,7 @@ function stacking_adsr(waveform, base_frequency, duration, list_of_envelope) { return simultaneously(accumulate(function (x, y) { return pair((tail(x))(waveform(base_frequency * head(x), duration)), y); - }, [], zip(list_of_envelope, 1))); + }, null, zip(list_of_envelope, 1))); } // instruments for students diff --git a/public/externalLibs/sound/sounds.js b/public/externalLibs/sound/sounds.js index 76a420253b..b7aa8654a6 100644 --- a/public/externalLibs/sound/sounds.js +++ b/public/externalLibs/sound/sounds.js @@ -4,35 +4,6 @@ var FS = 32000; // Standard sampling rate for all problems // --------------------------------------------- // Fast reimplementations of the list library // --------------------------------------------- -function vector_to_list(arr) { - var xs = []; - - for (var i=arr.length-1; i>=0; i--) { - xs = pair(arr[i], xs); - } - - return xs; -} - -function list_to_vector(xs) { - var vector = []; - - while(!is_empty_list(xs)) { - vector.push(head(xs)); - xs = tail(xs); - } - - return vector; -} - -function length(xs) { - var len = 0; - while(!is_empty_list(xs)) { - len++; - xs = tail(xs); - } - return len; -} function append(xs, ys) { var v1 = list_to_vector(xs); diff --git a/public/externalLibs/tree.js b/public/externalLibs/tree.js index 350caa62f0..5d21c3c94e 100644 --- a/public/externalLibs/tree.js +++ b/public/externalLibs/tree.js @@ -5,7 +5,7 @@ // make_empty_binary_tree returns an empty list function make_empty_binary_tree() { - return []; + return null; } // checks if a given list is a valid binary tree, according to the abstraction @@ -29,7 +29,7 @@ function make_binary_tree_node(left, value, right) { // is_empty_binary_tree checks if given binary tree node is an empty list function is_empty_binary_tree(t) { - return is_empty_list(t); + return is_null(t); } // left_subtree_of returns the left subtree of a given binary tree node @@ -46,4 +46,3 @@ function value_of(t) { function right_subtree_of(t) { return list_ref(t, 2); } - \ No newline at end of file diff --git a/public/externalLibs/visualizer/visualizer.js b/public/externalLibs/visualizer/visualizer.js index a8cd439a17..6b6fb2689f 100644 --- a/public/externalLibs/visualizer/visualizer.js +++ b/public/externalLibs/visualizer/visualizer.js @@ -40,10 +40,10 @@ thisNode.data = head(lst); } // similarly for right subtree. - if (is_pair(tail(lst)) || is_list(tail(lst)) && is_empty_list(tail(lst))) { + if (is_pair(tail(lst)) || is_list(tail(lst)) && is_null(tail(lst))) { if (perms.indexOf(tail(lst)) > -1) { thisNode.rightid = perms.indexOf(tail(lst)); - } else if (!is_empty_list(tail(lst))){ + } else if (!is_null(tail(lst))){ thisNode.right = construct_tree(tail(lst)); } } else { @@ -349,7 +349,7 @@ var txtValue; var label; // text for data item #1 - if (value !== null && (!is_list(value) || !is_empty_list(value))) { + if (value !== null && (!is_list(value) || !is_null(value))) { txtValue = toText(value); label = false; if (txtValue === false) { @@ -366,7 +366,7 @@ fill :'white' }); this.image.add(txt); - } else if (is_list(value) && is_empty_list(value)) { + } else if (is_list(value) && is_null(value)) { var empty = new NodeEmpty_list( -tcon.boxWidth*tcon.vertBarPos, 0); var emptyBox = empty.getRaw(); this.image.add(emptyBox); @@ -397,7 +397,7 @@ this.image.add(line); // text need to be on top of the box background - if (value !== null && (!is_list(value) || !is_empty_list(value))) { + if (value !== null && (!is_list(value) || !is_null(value))) { txt.moveToTop(); } else if (emptyBox) { emptyBox.moveToTop(); @@ -640,7 +640,7 @@ layerList.push(layer); if (!is_pair(xs)) { - if (is_empty_list(xs)) { + if (is_null(xs)) { var display = "[ ]"; } else { var display = toText(xs, true); diff --git a/src/components/workspace/Repl.tsx b/src/components/workspace/Repl.tsx index d303448106..11c2e581c6 100644 --- a/src/components/workspace/Repl.tsx +++ b/src/components/workspace/Repl.tsx @@ -1,5 +1,6 @@ import { Card } from '@blueprintjs/core' -import { parseError, toString } from 'js-slang' +import { parseError } from 'js-slang' +import { stringify } from 'js-slang/dist/interop' import * as React from 'react' import { HotKeys } from 'react-hotkeys' @@ -93,7 +94,7 @@ const renderResult = (value: any) => { if (typeof ShapeDrawn !== 'undefined' && value instanceof ShapeDrawn) { return } else { - return toString(value) + return stringify(value) } } diff --git a/src/mocks/context.ts b/src/mocks/context.ts index 17106be5e7..6aaf16984d 100644 --- a/src/mocks/context.ts +++ b/src/mocks/context.ts @@ -1,7 +1,8 @@ import { parse } from 'acorn' import * as es from 'estree' import { createContext } from 'js-slang' -import { Closure, Context, Frame } from 'js-slang/dist/types' +import Closure from 'js-slang/dist/closure' +import { Context, Frame } from 'js-slang/dist/types' import { TypeError } from 'js-slang/dist/utils/rttc' export function mockContext(chapter = 1): Context { diff --git a/src/utils/slangHelper.ts b/src/utils/slangHelper.ts index c02cab9bbb..dc34b3d93d 100644 --- a/src/utils/slangHelper.ts +++ b/src/utils/slangHelper.ts @@ -1,6 +1,6 @@ /* tslint:disable: ban-types*/ import { createContext as createSlangContext } from 'js-slang' -import { toString } from 'js-slang/dist/interop' +import { stringify } from 'js-slang/dist/interop' import { Value } from 'js-slang/dist/types' import { handleConsoleLog } from '../actions' @@ -12,20 +12,10 @@ import { handleConsoleLog } from '../actions' * Use this file especially when attempting to create a slang Context. */ -/** - * Used to permit the declaration of the - * __SOURCE__ property. The same declaration - * exists in js-slang. - */ -declare global { - // tslint:disable-next-line:interface-name - interface Function { - __SOURCE__?: string - } -} - /** * Function that takes a value and displays it in the interpreter. + * It uses the js-slang stringify to convert values into a "nicer" + * output. e.g. [1, 2, 3] displays as [1, 2, 3]. * An action is dispatched using the redux store reference * within the global window object. * @@ -34,13 +24,29 @@ declare global { * which REPL the value shows up in. */ function display(value: Value, workspaceLocation: any) { - const output = toString(value) + const output = stringify(value) // TODO in 2019: fix this hack if (typeof (window as any).__REDUX_STORE__ !== 'undefined') { ;(window as any).__REDUX_STORE__.dispatch(handleConsoleLog(output, workspaceLocation)) } + return value +} + +/** + * Function that takes a value and displays it in the interpreter. + * The value is displayed however native JS would convert it to a string. + * e.g. [1, 2, 3] would be displayed as 1,2,3. + * An action is dispatched using the redux store reference + * within the global window object. + * + * @param value the value to be displayed + * @param workspaceLocation used to determine + * which REPL the value shows up in. + */ +function rawDisplay(value: Value, workspaceLocation: any) { + display(String(value), workspaceLocation) + return value } -display.__SOURCE__ = 'display(a)' /** * A function to prompt the user using a popup. @@ -49,9 +55,8 @@ display.__SOURCE__ = 'display(a)' * @param value the value to be displayed as a prompt */ function cadetPrompt(value: any) { - return prompt(toString(value)) + return prompt(stringify(value)) } -cadetPrompt.__SOURCE__ = 'prompt(a)' /** * A function to alert the user using the browser's alert() @@ -60,9 +65,8 @@ cadetPrompt.__SOURCE__ = 'prompt(a)' * @param value the value to alert the user with */ function cadetAlert(value: any) { - alert(toString(value)) + alert(stringify(value)) } -cadetAlert.__SOURCE__ = 'alert(a)' /** * A dummy function to pass into createContext. @@ -78,8 +82,6 @@ function visualiseList(list: any) { throw new Error('List visualizer is not enabled') } } -/** Follow the js-slang specification of the visualiseList symbol. */ -visualiseList.__SOURCE__ = 'draw_list(a)' /** * A wrapper around js-slang's createContext. This @@ -89,6 +91,7 @@ visualiseList.__SOURCE__ = 'draw_list(a)' export function createContext(chapter: number, externals: string[], externalContext: T) { const externalBuiltIns = { display, + rawDisplay, prompt: cadetPrompt, alert: cadetAlert, visualiseList From 3ac79251a336b944fa981830ece613300c87be4f Mon Sep 17 00:00:00 2001 From: openorclose Date: Tue, 8 Jan 2019 15:37:21 +0800 Subject: [PATCH 002/111] pass tests --- package.json | 7 +++++++ src/reducers/workspaces.ts | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0112f43429..2e20c01d2a 100644 --- a/package.json +++ b/package.json @@ -106,5 +106,12 @@ "react-scripts-ts": "^2.16.0", "react-test-renderer": "^16.3.1", "typescript": "^2.8.1" + }, + "jest": { + "moduleFileExtensions": [ + "ts", + "js", + "json" + ] } } diff --git a/src/reducers/workspaces.ts b/src/reducers/workspaces.ts index b5586c41cf..31a20e4951 100644 --- a/src/reducers/workspaces.ts +++ b/src/reducers/workspaces.ts @@ -229,9 +229,9 @@ export const reducer: Reducer = ( } case HANDLE_CONSOLE_LOG: /* Possible cases: - * (1) state[location].output === [], i.e. state[location].output[-1] === undefined - * (2) state[location].output[-1] is not RunningOutput - * (3) state[location].output[-1] is RunningOutput */ + * (1) state[location].output === [], i.e. state[location].output[-1] === undefined + * (2) state[location].output[-1] is not RunningOutput + * (3) state[location].output[-1] is RunningOutput */ lastOutput = state[location].output.slice(-1)[0] if (lastOutput === undefined || lastOutput.type !== 'running') { newOutput = state[location].output.concat({ From 083e10071f101067944f345a73e503221bd203df Mon Sep 17 00:00:00 2001 From: openorclose Date: Tue, 8 Jan 2019 15:41:04 +0800 Subject: [PATCH 003/111] pass tests --- package.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/package.json b/package.json index 2e20c01d2a..0112f43429 100644 --- a/package.json +++ b/package.json @@ -106,12 +106,5 @@ "react-scripts-ts": "^2.16.0", "react-test-renderer": "^16.3.1", "typescript": "^2.8.1" - }, - "jest": { - "moduleFileExtensions": [ - "ts", - "js", - "json" - ] } } From e42bccf6686a5fb17109a8590510d5290b90bfdc Mon Sep 17 00:00:00 2001 From: Open Close Date: Mon, 4 Feb 2019 22:28:48 +0800 Subject: [PATCH 004/111] format all external libraries with prettier --- README.md | 11 +- package.json | 3 +- public/externalLibs/graphics/gl-matrix.js | 7843 +++++++++-------- public/externalLibs/graphics/webGLcurve.js | 112 +- public/externalLibs/graphics/webGLgraphics.js | 684 +- public/externalLibs/graphics/webGLhi_graph.js | 177 +- .../externalLibs/graphics/webGLhi_graph_ce.js | 344 +- public/externalLibs/graphics/webGLrune.js | 622 +- public/externalLibs/index.js | 50 +- public/externalLibs/list.js | 379 +- public/externalLibs/pe_library.js | 90 +- public/externalLibs/sound/riffwave.js | 207 +- public/externalLibs/sound/soundToneMatrix.js | 567 +- public/externalLibs/sound/sounds.js | 605 +- public/externalLibs/streams/stream.js | 292 +- public/externalLibs/tree.js | 32 +- public/externalLibs/visualizer/KineticJS.js | 4983 ++++++++++- public/externalLibs/visualizer/visualizer.js | 1197 +-- src/actions/interpreter.ts | 2 +- src/components/workspace/Repl.tsx | 2 +- src/mocks/context.ts | 6 +- src/reducers/states.ts | 2 +- src/sagas/index.ts | 2 +- src/utils/slangHelper.ts | 4 +- yarn.lock | 1552 +--- 25 files changed, 11797 insertions(+), 7971 deletions(-) diff --git a/README.md b/README.md index 40078b3100..9e03b3e1df 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ -# Cadet Frontend +# TESTING Cadet Frontend, 1920 js-slang + +1. Follow the instructions on js-slang to transpile your own copy +2. Edit line 41 of package.json to link to the dist directory of your js-slang: + +`"js-slang": "file:../openorclosejsslang/dist",` + + + +## Original Readme below [![Build Status](https://travis-ci.org/source-academy/cadet-frontend.svg?branch=master)](https://travis-ci.org/source-academy/cadet-frontend) [![Coverage Status](https://coveralls.io/repos/github/source-academy/cadet-frontend/badge.svg?branch=travis)](https://coveralls.io/github/source-academy/cadet-frontend?branch=travis) diff --git a/package.json b/package.json index 0112f43429..c8620f0e31 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ }, "dependencies": { "acorn": "^5.7.1", + "acorn-walk": "^6.1.1", "ag-grid": "^18.0.1", "ag-grid-react": "^18.0.0", "astring": "^1.3.0", @@ -37,7 +38,7 @@ "draft-js": "^0.10.5", "flexboxgrid": "^6.3.1", "flexboxgrid-helpers": "^1.1.3", - "js-slang": "0.1.19", + "js-slang": "file:../openorclosejsslang/dist", "lodash": "^4.17.10", "lz-string": "^1.4.4", "moment": "^2.22.2", diff --git a/public/externalLibs/graphics/gl-matrix.js b/public/externalLibs/graphics/gl-matrix.js index 80290173ba..0146d11207 100644 --- a/public/externalLibs/graphics/gl-matrix.js +++ b/public/externalLibs/graphics/gl-matrix.js @@ -27,14 +27,13 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +;(function(_global) { + 'use strict' -(function(_global) { - "use strict"; + var shim = {} + shim.exports = typeof window !== 'undefined' ? window : _global - var shim = {}; - shim.exports = typeof(window) !== 'undefined' ? window : _global; - - (function(exports) { + ;(function(exports) { /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -57,50 +56,48 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + if (!GLMAT_EPSILON) { + var GLMAT_EPSILON = 0.000001 + } -if(!GLMAT_EPSILON) { - var GLMAT_EPSILON = 0.000001; -} - -if(!GLMAT_ARRAY_TYPE) { - var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array; -} - -if(!GLMAT_RANDOM) { - var GLMAT_RANDOM = Math.random; -} + if (!GLMAT_ARRAY_TYPE) { + var GLMAT_ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array + } -/** - * @class Common utilities - * @name glMatrix - */ -var glMatrix = {}; + if (!GLMAT_RANDOM) { + var GLMAT_RANDOM = Math.random + } -/** - * Sets the type of array used when creating new vectors and matrices - * - * @param {Type} type Array type, such as Float32Array or Array - */ -glMatrix.setMatrixArrayType = function(type) { - GLMAT_ARRAY_TYPE = type; -} + /** + * @class Common utilities + * @name glMatrix + */ + var glMatrix = {} + + /** + * Sets the type of array used when creating new vectors and matrices + * + * @param {Type} type Array type, such as Float32Array or Array + */ + glMatrix.setMatrixArrayType = function(type) { + GLMAT_ARRAY_TYPE = type + } -if(typeof(exports) !== 'undefined') { - exports.glMatrix = glMatrix; -} + if (typeof exports !== 'undefined') { + exports.glMatrix = glMatrix + } -var degree = Math.PI / 180; + var degree = Math.PI / 180 -/** -* Convert Degree To Radian -* -* @param {Number} Angle in Degrees -*/ -glMatrix.toRadian = function(a){ - return a * degree; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + /** + * Convert Degree To Radian + * + * @param {Number} Angle in Degrees + */ + glMatrix.toRadian = function(a) { + return a * degree + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -122,512 +119,513 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 2 Dimensional Vector - * @name vec2 - */ - -var vec2 = {}; - -/** - * Creates a new, empty vec2 - * - * @returns {vec2} a new 2D vector - */ -vec2.create = function() { - var out = new GLMAT_ARRAY_TYPE(2); - out[0] = 0; - out[1] = 0; - return out; -}; - -/** - * Creates a new vec2 initialized with values from an existing vector - * - * @param {vec2} a vector to clone - * @returns {vec2} a new 2D vector - */ -vec2.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(2); - out[0] = a[0]; - out[1] = a[1]; - return out; -}; - -/** - * Creates a new vec2 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} a new 2D vector - */ -vec2.fromValues = function(x, y) { - var out = new GLMAT_ARRAY_TYPE(2); - out[0] = x; - out[1] = y; - return out; -}; - -/** - * Copy the values from one vec2 to another - * - * @param {vec2} out the receiving vector - * @param {vec2} a the source vector - * @returns {vec2} out - */ -vec2.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - return out; -}; - -/** - * Set the components of a vec2 to the given values - * - * @param {vec2} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @returns {vec2} out - */ -vec2.set = function(out, x, y) { - out[0] = x; - out[1] = y; - return out; -}; - -/** - * Adds two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.add = function(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - return out; -}; - -/** - * Subtracts vector b from vector a - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.subtract = function(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - return out; -}; - -/** - * Alias for {@link vec2.subtract} - * @function - */ -vec2.sub = vec2.subtract; + /** + * @class 2 Dimensional Vector + * @name vec2 + */ + + var vec2 = {} + + /** + * Creates a new, empty vec2 + * + * @returns {vec2} a new 2D vector + */ + vec2.create = function() { + var out = new GLMAT_ARRAY_TYPE(2) + out[0] = 0 + out[1] = 0 + return out + } -/** - * Multiplies two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.multiply = function(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - return out; -}; + /** + * Creates a new vec2 initialized with values from an existing vector + * + * @param {vec2} a vector to clone + * @returns {vec2} a new 2D vector + */ + vec2.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(2) + out[0] = a[0] + out[1] = a[1] + return out + } -/** - * Alias for {@link vec2.multiply} - * @function - */ -vec2.mul = vec2.multiply; + /** + * Creates a new vec2 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} a new 2D vector + */ + vec2.fromValues = function(x, y) { + var out = new GLMAT_ARRAY_TYPE(2) + out[0] = x + out[1] = y + return out + } -/** - * Divides two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.divide = function(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - return out; -}; + /** + * Copy the values from one vec2 to another + * + * @param {vec2} out the receiving vector + * @param {vec2} a the source vector + * @returns {vec2} out + */ + vec2.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + return out + } -/** - * Alias for {@link vec2.divide} - * @function - */ -vec2.div = vec2.divide; + /** + * Set the components of a vec2 to the given values + * + * @param {vec2} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @returns {vec2} out + */ + vec2.set = function(out, x, y) { + out[0] = x + out[1] = y + return out + } -/** - * Returns the minimum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.min = function(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - return out; -}; + /** + * Adds two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ + vec2.add = function(out, a, b) { + out[0] = a[0] + b[0] + out[1] = a[1] + b[1] + return out + } -/** - * Returns the maximum of two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec2} out - */ -vec2.max = function(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - return out; -}; + /** + * Subtracts vector b from vector a + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ + vec2.subtract = function(out, a, b) { + out[0] = a[0] - b[0] + out[1] = a[1] - b[1] + return out + } -/** - * Scales a vec2 by a scalar number - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec2} out - */ -vec2.scale = function(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - return out; -}; + /** + * Alias for {@link vec2.subtract} + * @function + */ + vec2.sub = vec2.subtract + + /** + * Multiplies two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ + vec2.multiply = function(out, a, b) { + out[0] = a[0] * b[0] + out[1] = a[1] * b[1] + return out + } -/** - * Adds two vec2's after scaling the second operand by a scalar value - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec2} out - */ -vec2.scaleAndAdd = function(out, a, b, scale) { - out[0] = a[0] + (b[0] * scale); - out[1] = a[1] + (b[1] * scale); - return out; -}; + /** + * Alias for {@link vec2.multiply} + * @function + */ + vec2.mul = vec2.multiply + + /** + * Divides two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ + vec2.divide = function(out, a, b) { + out[0] = a[0] / b[0] + out[1] = a[1] / b[1] + return out + } -/** - * Calculates the euclidian distance between two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} distance between a and b - */ -vec2.distance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return Math.sqrt(x*x + y*y); -}; + /** + * Alias for {@link vec2.divide} + * @function + */ + vec2.div = vec2.divide + + /** + * Returns the minimum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ + vec2.min = function(out, a, b) { + out[0] = Math.min(a[0], b[0]) + out[1] = Math.min(a[1], b[1]) + return out + } -/** - * Alias for {@link vec2.distance} - * @function - */ -vec2.dist = vec2.distance; + /** + * Returns the maximum of two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec2} out + */ + vec2.max = function(out, a, b) { + out[0] = Math.max(a[0], b[0]) + out[1] = Math.max(a[1], b[1]) + return out + } -/** - * Calculates the squared euclidian distance between two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} squared distance between a and b - */ -vec2.squaredDistance = function(a, b) { - var x = b[0] - a[0], - y = b[1] - a[1]; - return x*x + y*y; -}; + /** + * Scales a vec2 by a scalar number + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec2} out + */ + vec2.scale = function(out, a, b) { + out[0] = a[0] * b + out[1] = a[1] * b + return out + } -/** - * Alias for {@link vec2.squaredDistance} - * @function - */ -vec2.sqrDist = vec2.squaredDistance; + /** + * Adds two vec2's after scaling the second operand by a scalar value + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec2} out + */ + vec2.scaleAndAdd = function(out, a, b, scale) { + out[0] = a[0] + b[0] * scale + out[1] = a[1] + b[1] * scale + return out + } -/** - * Calculates the length of a vec2 - * - * @param {vec2} a vector to calculate length of - * @returns {Number} length of a - */ -vec2.length = function (a) { - var x = a[0], - y = a[1]; - return Math.sqrt(x*x + y*y); -}; + /** + * Calculates the euclidian distance between two vec2's + * + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {Number} distance between a and b + */ + vec2.distance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1] + return Math.sqrt(x * x + y * y) + } -/** - * Alias for {@link vec2.length} - * @function - */ -vec2.len = vec2.length; + /** + * Alias for {@link vec2.distance} + * @function + */ + vec2.dist = vec2.distance + + /** + * Calculates the squared euclidian distance between two vec2's + * + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {Number} squared distance between a and b + */ + vec2.squaredDistance = function(a, b) { + var x = b[0] - a[0], + y = b[1] - a[1] + return x * x + y * y + } -/** - * Calculates the squared length of a vec2 - * - * @param {vec2} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -vec2.squaredLength = function (a) { - var x = a[0], - y = a[1]; - return x*x + y*y; -}; + /** + * Alias for {@link vec2.squaredDistance} + * @function + */ + vec2.sqrDist = vec2.squaredDistance + + /** + * Calculates the length of a vec2 + * + * @param {vec2} a vector to calculate length of + * @returns {Number} length of a + */ + vec2.length = function(a) { + var x = a[0], + y = a[1] + return Math.sqrt(x * x + y * y) + } -/** - * Alias for {@link vec2.squaredLength} - * @function - */ -vec2.sqrLen = vec2.squaredLength; + /** + * Alias for {@link vec2.length} + * @function + */ + vec2.len = vec2.length + + /** + * Calculates the squared length of a vec2 + * + * @param {vec2} a vector to calculate squared length of + * @returns {Number} squared length of a + */ + vec2.squaredLength = function(a) { + var x = a[0], + y = a[1] + return x * x + y * y + } -/** - * Negates the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to negate - * @returns {vec2} out - */ -vec2.negate = function(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - return out; -}; + /** + * Alias for {@link vec2.squaredLength} + * @function + */ + vec2.sqrLen = vec2.squaredLength + + /** + * Negates the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to negate + * @returns {vec2} out + */ + vec2.negate = function(out, a) { + out[0] = -a[0] + out[1] = -a[1] + return out + } -/** - * Returns the inverse of the components of a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to invert - * @returns {vec2} out - */ -vec2.inverse = function(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - return out; -}; + /** + * Returns the inverse of the components of a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to invert + * @returns {vec2} out + */ + vec2.inverse = function(out, a) { + out[0] = 1.0 / a[0] + out[1] = 1.0 / a[1] + return out + } -/** - * Normalize a vec2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a vector to normalize - * @returns {vec2} out - */ -vec2.normalize = function(out, a) { - var x = a[0], - y = a[1]; - var len = x*x + y*y; - if (len > 0) { + /** + * Normalize a vec2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a vector to normalize + * @returns {vec2} out + */ + vec2.normalize = function(out, a) { + var x = a[0], + y = a[1] + var len = x * x + y * y + if (len > 0) { //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; + len = 1 / Math.sqrt(len) + out[0] = a[0] * len + out[1] = a[1] * len + } + return out } - return out; -}; - -/** - * Calculates the dot product of two vec2's - * - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {Number} dot product of a and b - */ -vec2.dot = function (a, b) { - return a[0] * b[0] + a[1] * b[1]; -}; -/** - * Computes the cross product of two vec2's - * Note that the cross product must by definition produce a 3D vector - * - * @param {vec3} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @returns {vec3} out - */ -vec2.cross = function(out, a, b) { - var z = a[0] * b[1] - a[1] * b[0]; - out[0] = out[1] = 0; - out[2] = z; - return out; -}; + /** + * Calculates the dot product of two vec2's + * + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {Number} dot product of a and b + */ + vec2.dot = function(a, b) { + return a[0] * b[0] + a[1] * b[1] + } -/** - * Performs a linear interpolation between two vec2's - * - * @param {vec2} out the receiving vector - * @param {vec2} a the first operand - * @param {vec2} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {vec2} out - */ -vec2.lerp = function (out, a, b, t) { - var ax = a[0], - ay = a[1]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - return out; -}; + /** + * Computes the cross product of two vec2's + * Note that the cross product must by definition produce a 3D vector + * + * @param {vec3} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @returns {vec3} out + */ + vec2.cross = function(out, a, b) { + var z = a[0] * b[1] - a[1] * b[0] + out[0] = out[1] = 0 + out[2] = z + return out + } -/** - * Generates a random vector with the given scale - * - * @param {vec2} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec2} out - */ -vec2.random = function (out, scale) { - scale = scale || 1.0; - var r = GLMAT_RANDOM() * 2.0 * Math.PI; - out[0] = Math.cos(r) * scale; - out[1] = Math.sin(r) * scale; - return out; -}; + /** + * Performs a linear interpolation between two vec2's + * + * @param {vec2} out the receiving vector + * @param {vec2} a the first operand + * @param {vec2} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {vec2} out + */ + vec2.lerp = function(out, a, b, t) { + var ax = a[0], + ay = a[1] + out[0] = ax + t * (b[0] - ax) + out[1] = ay + t * (b[1] - ay) + return out + } -/** - * Transforms the vec2 with a mat2 - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat2} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat2 = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y; - out[1] = m[1] * x + m[3] * y; - return out; -}; + /** + * Generates a random vector with the given scale + * + * @param {vec2} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns {vec2} out + */ + vec2.random = function(out, scale) { + scale = scale || 1.0 + var r = GLMAT_RANDOM() * 2.0 * Math.PI + out[0] = Math.cos(r) * scale + out[1] = Math.sin(r) * scale + return out + } -/** - * Transforms the vec2 with a mat2d - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat2d} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat2d = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[2] * y + m[4]; - out[1] = m[1] * x + m[3] * y + m[5]; - return out; -}; + /** + * Transforms the vec2 with a mat2 + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat2} m matrix to transform with + * @returns {vec2} out + */ + vec2.transformMat2 = function(out, a, m) { + var x = a[0], + y = a[1] + out[0] = m[0] * x + m[2] * y + out[1] = m[1] * x + m[3] * y + return out + } -/** - * Transforms the vec2 with a mat3 - * 3rd vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat3} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat3 = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[3] * y + m[6]; - out[1] = m[1] * x + m[4] * y + m[7]; - return out; -}; + /** + * Transforms the vec2 with a mat2d + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat2d} m matrix to transform with + * @returns {vec2} out + */ + vec2.transformMat2d = function(out, a, m) { + var x = a[0], + y = a[1] + out[0] = m[0] * x + m[2] * y + m[4] + out[1] = m[1] * x + m[3] * y + m[5] + return out + } -/** - * Transforms the vec2 with a mat4 - * 3rd vector component is implicitly '0' - * 4th vector component is implicitly '1' - * - * @param {vec2} out the receiving vector - * @param {vec2} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec2} out - */ -vec2.transformMat4 = function(out, a, m) { - var x = a[0], - y = a[1]; - out[0] = m[0] * x + m[4] * y + m[12]; - out[1] = m[1] * x + m[5] * y + m[13]; - return out; -}; + /** + * Transforms the vec2 with a mat3 + * 3rd vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat3} m matrix to transform with + * @returns {vec2} out + */ + vec2.transformMat3 = function(out, a, m) { + var x = a[0], + y = a[1] + out[0] = m[0] * x + m[3] * y + m[6] + out[1] = m[1] * x + m[4] * y + m[7] + return out + } -/** - * Perform some operation over an array of vec2s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -vec2.forEach = (function() { - var vec = vec2.create(); + /** + * Transforms the vec2 with a mat4 + * 3rd vector component is implicitly '0' + * 4th vector component is implicitly '1' + * + * @param {vec2} out the receiving vector + * @param {vec2} a the vector to transform + * @param {mat4} m matrix to transform with + * @returns {vec2} out + */ + vec2.transformMat4 = function(out, a, m) { + var x = a[0], + y = a[1] + out[0] = m[0] * x + m[4] * y + m[12] + out[1] = m[1] * x + m[5] * y + m[13] + return out + } - return function(a, stride, offset, count, fn, arg) { - var i, l; - if(!stride) { - stride = 2; + /** + * Perform some operation over an array of vec2s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ + vec2.forEach = (function() { + var vec = vec2.create() + + return function(a, stride, offset, count, fn, arg) { + var i, l + if (!stride) { + stride = 2 } - if(!offset) { - offset = 0; + if (!offset) { + offset = 0 } - - if(count) { - l = Math.min((count * stride) + offset, a.length); + + if (count) { + l = Math.min(count * stride + offset, a.length) } else { - l = a.length; + l = a.length } - for(i = offset; i < l; i += stride) { - vec[0] = a[i]; vec[1] = a[i+1]; - fn(vec, vec, arg); - a[i] = vec[0]; a[i+1] = vec[1]; + for (i = offset; i < l; i += stride) { + vec[0] = a[i] + vec[1] = a[i + 1] + fn(vec, vec, arg) + a[i] = vec[0] + a[i + 1] = vec[1] } - - return a; - }; -})(); -/** - * Returns a string representation of a vector - * - * @param {vec2} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -vec2.str = function (a) { - return 'vec2(' + a[0] + ', ' + a[1] + ')'; -}; - -if(typeof(exports) !== 'undefined') { - exports.vec2 = vec2; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + return a + } + })() + + /** + * Returns a string representation of a vector + * + * @param {vec2} vec vector to represent as a string + * @returns {String} string representation of the vector + */ + vec2.str = function(a) { + return 'vec2(' + a[0] + ', ' + a[1] + ')' + } + + if (typeof exports !== 'undefined') { + exports.vec2 = vec2 + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -649,646 +647,663 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 3 Dimensional Vector - * @name vec3 - */ - -var vec3 = {}; - -/** - * Creates a new, empty vec3 - * - * @returns {vec3} a new 3D vector - */ -vec3.create = function() { - var out = new GLMAT_ARRAY_TYPE(3); - out[0] = 0; - out[1] = 0; - out[2] = 0; - return out; -}; - -/** - * Creates a new vec3 initialized with values from an existing vector - * - * @param {vec3} a vector to clone - * @returns {vec3} a new 3D vector - */ -vec3.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(3); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; -}; - -/** - * Creates a new vec3 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} a new 3D vector - */ -vec3.fromValues = function(x, y, z) { - var out = new GLMAT_ARRAY_TYPE(3); - out[0] = x; - out[1] = y; - out[2] = z; - return out; -}; - -/** - * Copy the values from one vec3 to another - * - * @param {vec3} out the receiving vector - * @param {vec3} a the source vector - * @returns {vec3} out - */ -vec3.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - return out; -}; + /** + * @class 3 Dimensional Vector + * @name vec3 + */ + + var vec3 = {} + + /** + * Creates a new, empty vec3 + * + * @returns {vec3} a new 3D vector + */ + vec3.create = function() { + var out = new GLMAT_ARRAY_TYPE(3) + out[0] = 0 + out[1] = 0 + out[2] = 0 + return out + } -/** - * Set the components of a vec3 to the given values - * - * @param {vec3} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @returns {vec3} out - */ -vec3.set = function(out, x, y, z) { - out[0] = x; - out[1] = y; - out[2] = z; - return out; -}; + /** + * Creates a new vec3 initialized with values from an existing vector + * + * @param {vec3} a vector to clone + * @returns {vec3} a new 3D vector + */ + vec3.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(3) + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + return out + } -/** - * Adds two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.add = function(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - return out; -}; + /** + * Creates a new vec3 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} a new 3D vector + */ + vec3.fromValues = function(x, y, z) { + var out = new GLMAT_ARRAY_TYPE(3) + out[0] = x + out[1] = y + out[2] = z + return out + } -/** - * Subtracts vector b from vector a - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.subtract = function(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - return out; -}; + /** + * Copy the values from one vec3 to another + * + * @param {vec3} out the receiving vector + * @param {vec3} a the source vector + * @returns {vec3} out + */ + vec3.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + return out + } -/** - * Alias for {@link vec3.subtract} - * @function - */ -vec3.sub = vec3.subtract; + /** + * Set the components of a vec3 to the given values + * + * @param {vec3} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @returns {vec3} out + */ + vec3.set = function(out, x, y, z) { + out[0] = x + out[1] = y + out[2] = z + return out + } -/** - * Multiplies two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.multiply = function(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - return out; -}; + /** + * Adds two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.add = function(out, a, b) { + out[0] = a[0] + b[0] + out[1] = a[1] + b[1] + out[2] = a[2] + b[2] + return out + } -/** - * Alias for {@link vec3.multiply} - * @function - */ -vec3.mul = vec3.multiply; + /** + * Subtracts vector b from vector a + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.subtract = function(out, a, b) { + out[0] = a[0] - b[0] + out[1] = a[1] - b[1] + out[2] = a[2] - b[2] + return out + } -/** - * Divides two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.divide = function(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - return out; -}; + /** + * Alias for {@link vec3.subtract} + * @function + */ + vec3.sub = vec3.subtract + + /** + * Multiplies two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.multiply = function(out, a, b) { + out[0] = a[0] * b[0] + out[1] = a[1] * b[1] + out[2] = a[2] * b[2] + return out + } -/** - * Alias for {@link vec3.divide} - * @function - */ -vec3.div = vec3.divide; + /** + * Alias for {@link vec3.multiply} + * @function + */ + vec3.mul = vec3.multiply + + /** + * Divides two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.divide = function(out, a, b) { + out[0] = a[0] / b[0] + out[1] = a[1] / b[1] + out[2] = a[2] / b[2] + return out + } -/** - * Returns the minimum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.min = function(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - return out; -}; + /** + * Alias for {@link vec3.divide} + * @function + */ + vec3.div = vec3.divide + + /** + * Returns the minimum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.min = function(out, a, b) { + out[0] = Math.min(a[0], b[0]) + out[1] = Math.min(a[1], b[1]) + out[2] = Math.min(a[2], b[2]) + return out + } -/** - * Returns the maximum of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.max = function(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - return out; -}; + /** + * Returns the maximum of two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.max = function(out, a, b) { + out[0] = Math.max(a[0], b[0]) + out[1] = Math.max(a[1], b[1]) + out[2] = Math.max(a[2], b[2]) + return out + } -/** - * Scales a vec3 by a scalar number - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec3} out - */ -vec3.scale = function(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - return out; -}; + /** + * Scales a vec3 by a scalar number + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec3} out + */ + vec3.scale = function(out, a, b) { + out[0] = a[0] * b + out[1] = a[1] * b + out[2] = a[2] * b + return out + } -/** - * Adds two vec3's after scaling the second operand by a scalar value - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec3} out - */ -vec3.scaleAndAdd = function(out, a, b, scale) { - out[0] = a[0] + (b[0] * scale); - out[1] = a[1] + (b[1] * scale); - out[2] = a[2] + (b[2] * scale); - return out; -}; + /** + * Adds two vec3's after scaling the second operand by a scalar value + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec3} out + */ + vec3.scaleAndAdd = function(out, a, b, scale) { + out[0] = a[0] + b[0] * scale + out[1] = a[1] + b[1] * scale + out[2] = a[2] + b[2] * scale + return out + } -/** - * Calculates the euclidian distance between two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} distance between a and b - */ -vec3.distance = function(a, b) { - var x = b[0] - a[0], + /** + * Calculates the euclidian distance between two vec3's + * + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {Number} distance between a and b + */ + vec3.distance = function(a, b) { + var x = b[0] - a[0], y = b[1] - a[1], - z = b[2] - a[2]; - return Math.sqrt(x*x + y*y + z*z); -}; - -/** - * Alias for {@link vec3.distance} - * @function - */ -vec3.dist = vec3.distance; + z = b[2] - a[2] + return Math.sqrt(x * x + y * y + z * z) + } -/** - * Calculates the squared euclidian distance between two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} squared distance between a and b - */ -vec3.squaredDistance = function(a, b) { - var x = b[0] - a[0], + /** + * Alias for {@link vec3.distance} + * @function + */ + vec3.dist = vec3.distance + + /** + * Calculates the squared euclidian distance between two vec3's + * + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {Number} squared distance between a and b + */ + vec3.squaredDistance = function(a, b) { + var x = b[0] - a[0], y = b[1] - a[1], - z = b[2] - a[2]; - return x*x + y*y + z*z; -}; - -/** - * Alias for {@link vec3.squaredDistance} - * @function - */ -vec3.sqrDist = vec3.squaredDistance; + z = b[2] - a[2] + return x * x + y * y + z * z + } -/** - * Calculates the length of a vec3 - * - * @param {vec3} a vector to calculate length of - * @returns {Number} length of a - */ -vec3.length = function (a) { - var x = a[0], + /** + * Alias for {@link vec3.squaredDistance} + * @function + */ + vec3.sqrDist = vec3.squaredDistance + + /** + * Calculates the length of a vec3 + * + * @param {vec3} a vector to calculate length of + * @returns {Number} length of a + */ + vec3.length = function(a) { + var x = a[0], y = a[1], - z = a[2]; - return Math.sqrt(x*x + y*y + z*z); -}; - -/** - * Alias for {@link vec3.length} - * @function - */ -vec3.len = vec3.length; + z = a[2] + return Math.sqrt(x * x + y * y + z * z) + } -/** - * Calculates the squared length of a vec3 - * - * @param {vec3} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -vec3.squaredLength = function (a) { - var x = a[0], + /** + * Alias for {@link vec3.length} + * @function + */ + vec3.len = vec3.length + + /** + * Calculates the squared length of a vec3 + * + * @param {vec3} a vector to calculate squared length of + * @returns {Number} squared length of a + */ + vec3.squaredLength = function(a) { + var x = a[0], y = a[1], - z = a[2]; - return x*x + y*y + z*z; -}; - -/** - * Alias for {@link vec3.squaredLength} - * @function - */ -vec3.sqrLen = vec3.squaredLength; + z = a[2] + return x * x + y * y + z * z + } -/** - * Negates the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to negate - * @returns {vec3} out - */ -vec3.negate = function(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - return out; -}; + /** + * Alias for {@link vec3.squaredLength} + * @function + */ + vec3.sqrLen = vec3.squaredLength + + /** + * Negates the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to negate + * @returns {vec3} out + */ + vec3.negate = function(out, a) { + out[0] = -a[0] + out[1] = -a[1] + out[2] = -a[2] + return out + } -/** - * Returns the inverse of the components of a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to invert - * @returns {vec3} out - */ -vec3.inverse = function(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - return out; -}; + /** + * Returns the inverse of the components of a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to invert + * @returns {vec3} out + */ + vec3.inverse = function(out, a) { + out[0] = 1.0 / a[0] + out[1] = 1.0 / a[1] + out[2] = 1.0 / a[2] + return out + } -/** - * Normalize a vec3 - * - * @param {vec3} out the receiving vector - * @param {vec3} a vector to normalize - * @returns {vec3} out - */ -vec3.normalize = function(out, a) { - var x = a[0], + /** + * Normalize a vec3 + * + * @param {vec3} out the receiving vector + * @param {vec3} a vector to normalize + * @returns {vec3} out + */ + vec3.normalize = function(out, a) { + var x = a[0], y = a[1], - z = a[2]; - var len = x*x + y*y + z*z; - if (len > 0) { + z = a[2] + var len = x * x + y * y + z * z + if (len > 0) { //TODO: evaluate use of glm_invsqrt here? - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; + len = 1 / Math.sqrt(len) + out[0] = a[0] * len + out[1] = a[1] * len + out[2] = a[2] * len + } + return out } - return out; -}; - -/** - * Calculates the dot product of two vec3's - * - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {Number} dot product of a and b - */ -vec3.dot = function (a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -}; - -/** - * Computes the cross product of two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @returns {vec3} out - */ -vec3.cross = function(out, a, b) { - var ax = a[0], ay = a[1], az = a[2], - bx = b[0], by = b[1], bz = b[2]; - out[0] = ay * bz - az * by; - out[1] = az * bx - ax * bz; - out[2] = ax * by - ay * bx; - return out; -}; + /** + * Calculates the dot product of two vec3's + * + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {Number} dot product of a and b + */ + vec3.dot = function(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + } -/** - * Performs a linear interpolation between two vec3's - * - * @param {vec3} out the receiving vector - * @param {vec3} a the first operand - * @param {vec3} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {vec3} out - */ -vec3.lerp = function (out, a, b, t) { - var ax = a[0], + /** + * Computes the cross product of two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @returns {vec3} out + */ + vec3.cross = function(out, a, b) { + var ax = a[0], ay = a[1], - az = a[2]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - return out; -}; - -/** - * Generates a random vector with the given scale - * - * @param {vec3} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec3} out - */ -vec3.random = function (out, scale) { - scale = scale || 1.0; - - var r = GLMAT_RANDOM() * 2.0 * Math.PI; - var z = (GLMAT_RANDOM() * 2.0) - 1.0; - var zScale = Math.sqrt(1.0-z*z) * scale; - - out[0] = Math.cos(r) * zScale; - out[1] = Math.sin(r) * zScale; - out[2] = z * scale; - return out; -}; + az = a[2], + bx = b[0], + by = b[1], + bz = b[2] + + out[0] = ay * bz - az * by + out[1] = az * bx - ax * bz + out[2] = ax * by - ay * bx + return out + } -/** - * Transforms the vec3 with a mat4. - * 4th vector component is implicitly '1' - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec3} out - */ -vec3.transformMat4 = function(out, a, m) { - var x = a[0], y = a[1], z = a[2], - w = m[3] * x + m[7] * y + m[11] * z + m[15]; - w = w || 1.0; - out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return out; -}; + /** + * Performs a linear interpolation between two vec3's + * + * @param {vec3} out the receiving vector + * @param {vec3} a the first operand + * @param {vec3} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {vec3} out + */ + vec3.lerp = function(out, a, b, t) { + var ax = a[0], + ay = a[1], + az = a[2] + out[0] = ax + t * (b[0] - ax) + out[1] = ay + t * (b[1] - ay) + out[2] = az + t * (b[2] - az) + return out + } -/** - * Transforms the vec3 with a mat3. - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {mat4} m the 3x3 matrix to transform with - * @returns {vec3} out - */ -vec3.transformMat3 = function(out, a, m) { - var x = a[0], y = a[1], z = a[2]; - out[0] = x * m[0] + y * m[3] + z * m[6]; - out[1] = x * m[1] + y * m[4] + z * m[7]; - out[2] = x * m[2] + y * m[5] + z * m[8]; - return out; -}; + /** + * Generates a random vector with the given scale + * + * @param {vec3} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns {vec3} out + */ + vec3.random = function(out, scale) { + scale = scale || 1.0 + + var r = GLMAT_RANDOM() * 2.0 * Math.PI + var z = GLMAT_RANDOM() * 2.0 - 1.0 + var zScale = Math.sqrt(1.0 - z * z) * scale + + out[0] = Math.cos(r) * zScale + out[1] = Math.sin(r) * zScale + out[2] = z * scale + return out + } -/** - * Transforms the vec3 with a quat - * - * @param {vec3} out the receiving vector - * @param {vec3} a the vector to transform - * @param {quat} q quaternion to transform with - * @returns {vec3} out - */ -vec3.transformQuat = function(out, a, q) { - // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + /** + * Transforms the vec3 with a mat4. + * 4th vector component is implicitly '1' + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to transform + * @param {mat4} m matrix to transform with + * @returns {vec3} out + */ + vec3.transformMat4 = function(out, a, m) { + var x = a[0], + y = a[1], + z = a[2], + w = m[3] * x + m[7] * y + m[11] * z + m[15] + w = w || 1.0 + out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w + out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w + out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w + return out + } - var x = a[0], y = a[1], z = a[2], - qx = q[0], qy = q[1], qz = q[2], qw = q[3], + /** + * Transforms the vec3 with a mat3. + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to transform + * @param {mat4} m the 3x3 matrix to transform with + * @returns {vec3} out + */ + vec3.transformMat3 = function(out, a, m) { + var x = a[0], + y = a[1], + z = a[2] + out[0] = x * m[0] + y * m[3] + z * m[6] + out[1] = x * m[1] + y * m[4] + z * m[7] + out[2] = x * m[2] + y * m[5] + z * m[8] + return out + } + /** + * Transforms the vec3 with a quat + * + * @param {vec3} out the receiving vector + * @param {vec3} a the vector to transform + * @param {quat} q quaternion to transform with + * @returns {vec3} out + */ + vec3.transformQuat = function(out, a, q) { + // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + + var x = a[0], + y = a[1], + z = a[2], + qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3], // calculate quat * vec ix = qw * x + qy * z - qz * y, iy = qw * y + qz * x - qx * z, iz = qw * z + qx * y - qy * x, - iw = -qx * x - qy * y - qz * z; + iw = -qx * x - qy * y - qz * z - // calculate result * inverse quat - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return out; -}; - -/** - * Rotate a 3D vector around the x-axis - * @param {vec3} out The receiving vec3 - * @param {vec3} a The vec3 point to rotate - * @param {vec3} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec3} out - */ -vec3.rotateX = function(out, a, b, c){ - var p = [], r=[]; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[0]; - r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c); - r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c); - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -}; + // calculate result * inverse quat + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx + return out + } -/** - * Rotate a 3D vector around the y-axis - * @param {vec3} out The receiving vec3 - * @param {vec3} a The vec3 point to rotate - * @param {vec3} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec3} out - */ -vec3.rotateY = function(out, a, b, c){ - var p = [], r=[]; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c); - r[1] = p[1]; - r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c); - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -}; + /** + * Rotate a 3D vector around the x-axis + * @param {vec3} out The receiving vec3 + * @param {vec3} a The vec3 point to rotate + * @param {vec3} b The origin of the rotation + * @param {Number} c The angle of rotation + * @returns {vec3} out + */ + vec3.rotateX = function(out, a, b, c) { + var p = [], + r = [] + //Translate point to the origin + p[0] = a[0] - b[0] + p[1] = a[1] - b[1] + p[2] = a[2] - b[2] + + //perform rotation + r[0] = p[0] + r[1] = p[1] * Math.cos(c) - p[2] * Math.sin(c) + r[2] = p[1] * Math.sin(c) + p[2] * Math.cos(c) + + //translate to correct position + out[0] = r[0] + b[0] + out[1] = r[1] + b[1] + out[2] = r[2] + b[2] + + return out + } -/** - * Rotate a 3D vector around the z-axis - * @param {vec3} out The receiving vec3 - * @param {vec3} a The vec3 point to rotate - * @param {vec3} b The origin of the rotation - * @param {Number} c The angle of rotation - * @returns {vec3} out - */ -vec3.rotateZ = function(out, a, b, c){ - var p = [], r=[]; - //Translate point to the origin - p[0] = a[0] - b[0]; - p[1] = a[1] - b[1]; - p[2] = a[2] - b[2]; - - //perform rotation - r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c); - r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c); - r[2] = p[2]; - - //translate to correct position - out[0] = r[0] + b[0]; - out[1] = r[1] + b[1]; - out[2] = r[2] + b[2]; - - return out; -}; + /** + * Rotate a 3D vector around the y-axis + * @param {vec3} out The receiving vec3 + * @param {vec3} a The vec3 point to rotate + * @param {vec3} b The origin of the rotation + * @param {Number} c The angle of rotation + * @returns {vec3} out + */ + vec3.rotateY = function(out, a, b, c) { + var p = [], + r = [] + //Translate point to the origin + p[0] = a[0] - b[0] + p[1] = a[1] - b[1] + p[2] = a[2] - b[2] + + //perform rotation + r[0] = p[2] * Math.sin(c) + p[0] * Math.cos(c) + r[1] = p[1] + r[2] = p[2] * Math.cos(c) - p[0] * Math.sin(c) + + //translate to correct position + out[0] = r[0] + b[0] + out[1] = r[1] + b[1] + out[2] = r[2] + b[2] + + return out + } -/** - * Perform some operation over an array of vec3s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -vec3.forEach = (function() { - var vec = vec3.create(); + /** + * Rotate a 3D vector around the z-axis + * @param {vec3} out The receiving vec3 + * @param {vec3} a The vec3 point to rotate + * @param {vec3} b The origin of the rotation + * @param {Number} c The angle of rotation + * @returns {vec3} out + */ + vec3.rotateZ = function(out, a, b, c) { + var p = [], + r = [] + //Translate point to the origin + p[0] = a[0] - b[0] + p[1] = a[1] - b[1] + p[2] = a[2] - b[2] + + //perform rotation + r[0] = p[0] * Math.cos(c) - p[1] * Math.sin(c) + r[1] = p[0] * Math.sin(c) + p[1] * Math.cos(c) + r[2] = p[2] + + //translate to correct position + out[0] = r[0] + b[0] + out[1] = r[1] + b[1] + out[2] = r[2] + b[2] + + return out + } - return function(a, stride, offset, count, fn, arg) { - var i, l; - if(!stride) { - stride = 3; + /** + * Perform some operation over an array of vec3s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ + vec3.forEach = (function() { + var vec = vec3.create() + + return function(a, stride, offset, count, fn, arg) { + var i, l + if (!stride) { + stride = 3 } - if(!offset) { - offset = 0; + if (!offset) { + offset = 0 } - - if(count) { - l = Math.min((count * stride) + offset, a.length); + + if (count) { + l = Math.min(count * stride + offset, a.length) } else { - l = a.length; + l = a.length } - for(i = offset; i < l; i += stride) { - vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; - fn(vec, vec, arg); - a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; + for (i = offset; i < l; i += stride) { + vec[0] = a[i] + vec[1] = a[i + 1] + vec[2] = a[i + 2] + fn(vec, vec, arg) + a[i] = vec[0] + a[i + 1] = vec[1] + a[i + 2] = vec[2] } - - return a; - }; -})(); -/** - * Get the angle between two 3D vectors - * @param {vec3} a The first operand - * @param {vec3} b The second operand - * @returns {Number} The angle in radians - */ -vec3.angle = function(a, b) { - - var tempA = vec3.fromValues(a[0], a[1], a[2]); - var tempB = vec3.fromValues(b[0], b[1], b[2]); - - vec3.normalize(tempA, tempA); - vec3.normalize(tempB, tempB); - - var cosine = vec3.dot(tempA, tempB); - - if(cosine > 1.0){ - return 0; - } else { - return Math.acos(cosine); - } -}; + return a + } + })() + + /** + * Get the angle between two 3D vectors + * @param {vec3} a The first operand + * @param {vec3} b The second operand + * @returns {Number} The angle in radians + */ + vec3.angle = function(a, b) { + var tempA = vec3.fromValues(a[0], a[1], a[2]) + var tempB = vec3.fromValues(b[0], b[1], b[2]) + + vec3.normalize(tempA, tempA) + vec3.normalize(tempB, tempB) + + var cosine = vec3.dot(tempA, tempB) + + if (cosine > 1.0) { + return 0 + } else { + return Math.acos(cosine) + } + } -/** - * Returns a string representation of a vector - * - * @param {vec3} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -vec3.str = function (a) { - return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')'; -}; - -if(typeof(exports) !== 'undefined') { - exports.vec3 = vec3; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + /** + * Returns a string representation of a vector + * + * @param {vec3} vec vector to represent as a string + * @returns {String} string representation of the vector + */ + vec3.str = function(a) { + return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')' + } + + if (typeof exports !== 'undefined') { + exports.vec3 = vec3 + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -1310,525 +1325,537 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 4 Dimensional Vector - * @name vec4 - */ - -var vec4 = {}; - -/** - * Creates a new, empty vec4 - * - * @returns {vec4} a new 4D vector - */ -vec4.create = function() { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 0; - return out; -}; - -/** - * Creates a new vec4 initialized with values from an existing vector - * - * @param {vec4} a vector to clone - * @returns {vec4} a new 4D vector - */ -vec4.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; - -/** - * Creates a new vec4 initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} a new 4D vector - */ -vec4.fromValues = function(x, y, z, w) { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; -}; - -/** - * Copy the values from one vec4 to another - * - * @param {vec4} out the receiving vector - * @param {vec4} a the source vector - * @returns {vec4} out - */ -vec4.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; + /** + * @class 4 Dimensional Vector + * @name vec4 + */ + + var vec4 = {} + + /** + * Creates a new, empty vec4 + * + * @returns {vec4} a new 4D vector + */ + vec4.create = function() { + var out = new GLMAT_ARRAY_TYPE(4) + out[0] = 0 + out[1] = 0 + out[2] = 0 + out[3] = 0 + return out + } -/** - * Set the components of a vec4 to the given values - * - * @param {vec4} out the receiving vector - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {vec4} out - */ -vec4.set = function(out, x, y, z, w) { - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = w; - return out; -}; + /** + * Creates a new vec4 initialized with values from an existing vector + * + * @param {vec4} a vector to clone + * @returns {vec4} a new 4D vector + */ + vec4.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(4) + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + return out + } -/** - * Adds two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.add = function(out, a, b) { - out[0] = a[0] + b[0]; - out[1] = a[1] + b[1]; - out[2] = a[2] + b[2]; - out[3] = a[3] + b[3]; - return out; -}; + /** + * Creates a new vec4 initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} a new 4D vector + */ + vec4.fromValues = function(x, y, z, w) { + var out = new GLMAT_ARRAY_TYPE(4) + out[0] = x + out[1] = y + out[2] = z + out[3] = w + return out + } -/** - * Subtracts vector b from vector a - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.subtract = function(out, a, b) { - out[0] = a[0] - b[0]; - out[1] = a[1] - b[1]; - out[2] = a[2] - b[2]; - out[3] = a[3] - b[3]; - return out; -}; + /** + * Copy the values from one vec4 to another + * + * @param {vec4} out the receiving vector + * @param {vec4} a the source vector + * @returns {vec4} out + */ + vec4.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + return out + } -/** - * Alias for {@link vec4.subtract} - * @function - */ -vec4.sub = vec4.subtract; + /** + * Set the components of a vec4 to the given values + * + * @param {vec4} out the receiving vector + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {vec4} out + */ + vec4.set = function(out, x, y, z, w) { + out[0] = x + out[1] = y + out[2] = z + out[3] = w + return out + } -/** - * Multiplies two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.multiply = function(out, a, b) { - out[0] = a[0] * b[0]; - out[1] = a[1] * b[1]; - out[2] = a[2] * b[2]; - out[3] = a[3] * b[3]; - return out; -}; + /** + * Adds two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ + vec4.add = function(out, a, b) { + out[0] = a[0] + b[0] + out[1] = a[1] + b[1] + out[2] = a[2] + b[2] + out[3] = a[3] + b[3] + return out + } -/** - * Alias for {@link vec4.multiply} - * @function - */ -vec4.mul = vec4.multiply; + /** + * Subtracts vector b from vector a + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ + vec4.subtract = function(out, a, b) { + out[0] = a[0] - b[0] + out[1] = a[1] - b[1] + out[2] = a[2] - b[2] + out[3] = a[3] - b[3] + return out + } -/** - * Divides two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.divide = function(out, a, b) { - out[0] = a[0] / b[0]; - out[1] = a[1] / b[1]; - out[2] = a[2] / b[2]; - out[3] = a[3] / b[3]; - return out; -}; + /** + * Alias for {@link vec4.subtract} + * @function + */ + vec4.sub = vec4.subtract + + /** + * Multiplies two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ + vec4.multiply = function(out, a, b) { + out[0] = a[0] * b[0] + out[1] = a[1] * b[1] + out[2] = a[2] * b[2] + out[3] = a[3] * b[3] + return out + } -/** - * Alias for {@link vec4.divide} - * @function - */ -vec4.div = vec4.divide; + /** + * Alias for {@link vec4.multiply} + * @function + */ + vec4.mul = vec4.multiply + + /** + * Divides two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ + vec4.divide = function(out, a, b) { + out[0] = a[0] / b[0] + out[1] = a[1] / b[1] + out[2] = a[2] / b[2] + out[3] = a[3] / b[3] + return out + } -/** - * Returns the minimum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.min = function(out, a, b) { - out[0] = Math.min(a[0], b[0]); - out[1] = Math.min(a[1], b[1]); - out[2] = Math.min(a[2], b[2]); - out[3] = Math.min(a[3], b[3]); - return out; -}; + /** + * Alias for {@link vec4.divide} + * @function + */ + vec4.div = vec4.divide + + /** + * Returns the minimum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ + vec4.min = function(out, a, b) { + out[0] = Math.min(a[0], b[0]) + out[1] = Math.min(a[1], b[1]) + out[2] = Math.min(a[2], b[2]) + out[3] = Math.min(a[3], b[3]) + return out + } -/** - * Returns the maximum of two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {vec4} out - */ -vec4.max = function(out, a, b) { - out[0] = Math.max(a[0], b[0]); - out[1] = Math.max(a[1], b[1]); - out[2] = Math.max(a[2], b[2]); - out[3] = Math.max(a[3], b[3]); - return out; -}; + /** + * Returns the maximum of two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {vec4} out + */ + vec4.max = function(out, a, b) { + out[0] = Math.max(a[0], b[0]) + out[1] = Math.max(a[1], b[1]) + out[2] = Math.max(a[2], b[2]) + out[3] = Math.max(a[3], b[3]) + return out + } -/** - * Scales a vec4 by a scalar number - * - * @param {vec4} out the receiving vector - * @param {vec4} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {vec4} out - */ -vec4.scale = function(out, a, b) { - out[0] = a[0] * b; - out[1] = a[1] * b; - out[2] = a[2] * b; - out[3] = a[3] * b; - return out; -}; + /** + * Scales a vec4 by a scalar number + * + * @param {vec4} out the receiving vector + * @param {vec4} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {vec4} out + */ + vec4.scale = function(out, a, b) { + out[0] = a[0] * b + out[1] = a[1] * b + out[2] = a[2] * b + out[3] = a[3] * b + return out + } -/** - * Adds two vec4's after scaling the second operand by a scalar value - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @param {Number} scale the amount to scale b by before adding - * @returns {vec4} out - */ -vec4.scaleAndAdd = function(out, a, b, scale) { - out[0] = a[0] + (b[0] * scale); - out[1] = a[1] + (b[1] * scale); - out[2] = a[2] + (b[2] * scale); - out[3] = a[3] + (b[3] * scale); - return out; -}; + /** + * Adds two vec4's after scaling the second operand by a scalar value + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @param {Number} scale the amount to scale b by before adding + * @returns {vec4} out + */ + vec4.scaleAndAdd = function(out, a, b, scale) { + out[0] = a[0] + b[0] * scale + out[1] = a[1] + b[1] * scale + out[2] = a[2] + b[2] * scale + out[3] = a[3] + b[3] * scale + return out + } -/** - * Calculates the euclidian distance between two vec4's - * - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {Number} distance between a and b - */ -vec4.distance = function(a, b) { - var x = b[0] - a[0], + /** + * Calculates the euclidian distance between two vec4's + * + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {Number} distance between a and b + */ + vec4.distance = function(a, b) { + var x = b[0] - a[0], y = b[1] - a[1], z = b[2] - a[2], - w = b[3] - a[3]; - return Math.sqrt(x*x + y*y + z*z + w*w); -}; - -/** - * Alias for {@link vec4.distance} - * @function - */ -vec4.dist = vec4.distance; + w = b[3] - a[3] + return Math.sqrt(x * x + y * y + z * z + w * w) + } -/** - * Calculates the squared euclidian distance between two vec4's - * - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {Number} squared distance between a and b - */ -vec4.squaredDistance = function(a, b) { - var x = b[0] - a[0], + /** + * Alias for {@link vec4.distance} + * @function + */ + vec4.dist = vec4.distance + + /** + * Calculates the squared euclidian distance between two vec4's + * + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {Number} squared distance between a and b + */ + vec4.squaredDistance = function(a, b) { + var x = b[0] - a[0], y = b[1] - a[1], z = b[2] - a[2], - w = b[3] - a[3]; - return x*x + y*y + z*z + w*w; -}; - -/** - * Alias for {@link vec4.squaredDistance} - * @function - */ -vec4.sqrDist = vec4.squaredDistance; + w = b[3] - a[3] + return x * x + y * y + z * z + w * w + } -/** - * Calculates the length of a vec4 - * - * @param {vec4} a vector to calculate length of - * @returns {Number} length of a - */ -vec4.length = function (a) { - var x = a[0], + /** + * Alias for {@link vec4.squaredDistance} + * @function + */ + vec4.sqrDist = vec4.squaredDistance + + /** + * Calculates the length of a vec4 + * + * @param {vec4} a vector to calculate length of + * @returns {Number} length of a + */ + vec4.length = function(a) { + var x = a[0], y = a[1], z = a[2], - w = a[3]; - return Math.sqrt(x*x + y*y + z*z + w*w); -}; - -/** - * Alias for {@link vec4.length} - * @function - */ -vec4.len = vec4.length; + w = a[3] + return Math.sqrt(x * x + y * y + z * z + w * w) + } -/** - * Calculates the squared length of a vec4 - * - * @param {vec4} a vector to calculate squared length of - * @returns {Number} squared length of a - */ -vec4.squaredLength = function (a) { - var x = a[0], + /** + * Alias for {@link vec4.length} + * @function + */ + vec4.len = vec4.length + + /** + * Calculates the squared length of a vec4 + * + * @param {vec4} a vector to calculate squared length of + * @returns {Number} squared length of a + */ + vec4.squaredLength = function(a) { + var x = a[0], y = a[1], z = a[2], - w = a[3]; - return x*x + y*y + z*z + w*w; -}; - -/** - * Alias for {@link vec4.squaredLength} - * @function - */ -vec4.sqrLen = vec4.squaredLength; + w = a[3] + return x * x + y * y + z * z + w * w + } -/** - * Negates the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to negate - * @returns {vec4} out - */ -vec4.negate = function(out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = -a[3]; - return out; -}; + /** + * Alias for {@link vec4.squaredLength} + * @function + */ + vec4.sqrLen = vec4.squaredLength + + /** + * Negates the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to negate + * @returns {vec4} out + */ + vec4.negate = function(out, a) { + out[0] = -a[0] + out[1] = -a[1] + out[2] = -a[2] + out[3] = -a[3] + return out + } -/** - * Returns the inverse of the components of a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to invert - * @returns {vec4} out - */ -vec4.inverse = function(out, a) { - out[0] = 1.0 / a[0]; - out[1] = 1.0 / a[1]; - out[2] = 1.0 / a[2]; - out[3] = 1.0 / a[3]; - return out; -}; + /** + * Returns the inverse of the components of a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to invert + * @returns {vec4} out + */ + vec4.inverse = function(out, a) { + out[0] = 1.0 / a[0] + out[1] = 1.0 / a[1] + out[2] = 1.0 / a[2] + out[3] = 1.0 / a[3] + return out + } -/** - * Normalize a vec4 - * - * @param {vec4} out the receiving vector - * @param {vec4} a vector to normalize - * @returns {vec4} out - */ -vec4.normalize = function(out, a) { - var x = a[0], + /** + * Normalize a vec4 + * + * @param {vec4} out the receiving vector + * @param {vec4} a vector to normalize + * @returns {vec4} out + */ + vec4.normalize = function(out, a) { + var x = a[0], y = a[1], z = a[2], - w = a[3]; - var len = x*x + y*y + z*z + w*w; - if (len > 0) { - len = 1 / Math.sqrt(len); - out[0] = a[0] * len; - out[1] = a[1] * len; - out[2] = a[2] * len; - out[3] = a[3] * len; - } - return out; -}; + w = a[3] + var len = x * x + y * y + z * z + w * w + if (len > 0) { + len = 1 / Math.sqrt(len) + out[0] = a[0] * len + out[1] = a[1] * len + out[2] = a[2] * len + out[3] = a[3] * len + } + return out + } -/** - * Calculates the dot product of two vec4's - * - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @returns {Number} dot product of a and b - */ -vec4.dot = function (a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; -}; + /** + * Calculates the dot product of two vec4's + * + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @returns {Number} dot product of a and b + */ + vec4.dot = function(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + } -/** - * Performs a linear interpolation between two vec4's - * - * @param {vec4} out the receiving vector - * @param {vec4} a the first operand - * @param {vec4} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {vec4} out - */ -vec4.lerp = function (out, a, b, t) { - var ax = a[0], + /** + * Performs a linear interpolation between two vec4's + * + * @param {vec4} out the receiving vector + * @param {vec4} a the first operand + * @param {vec4} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {vec4} out + */ + vec4.lerp = function(out, a, b, t) { + var ax = a[0], ay = a[1], az = a[2], - aw = a[3]; - out[0] = ax + t * (b[0] - ax); - out[1] = ay + t * (b[1] - ay); - out[2] = az + t * (b[2] - az); - out[3] = aw + t * (b[3] - aw); - return out; -}; - -/** - * Generates a random vector with the given scale - * - * @param {vec4} out the receiving vector - * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned - * @returns {vec4} out - */ -vec4.random = function (out, scale) { - scale = scale || 1.0; - - //TODO: This is a pretty awful way of doing this. Find something better. - out[0] = GLMAT_RANDOM(); - out[1] = GLMAT_RANDOM(); - out[2] = GLMAT_RANDOM(); - out[3] = GLMAT_RANDOM(); - vec4.normalize(out, out); - vec4.scale(out, out, scale); - return out; -}; + aw = a[3] + out[0] = ax + t * (b[0] - ax) + out[1] = ay + t * (b[1] - ay) + out[2] = az + t * (b[2] - az) + out[3] = aw + t * (b[3] - aw) + return out + } -/** - * Transforms the vec4 with a mat4. - * - * @param {vec4} out the receiving vector - * @param {vec4} a the vector to transform - * @param {mat4} m matrix to transform with - * @returns {vec4} out - */ -vec4.transformMat4 = function(out, a, m) { - var x = a[0], y = a[1], z = a[2], w = a[3]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return out; -}; + /** + * Generates a random vector with the given scale + * + * @param {vec4} out the receiving vector + * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned + * @returns {vec4} out + */ + vec4.random = function(out, scale) { + scale = scale || 1.0 + + //TODO: This is a pretty awful way of doing this. Find something better. + out[0] = GLMAT_RANDOM() + out[1] = GLMAT_RANDOM() + out[2] = GLMAT_RANDOM() + out[3] = GLMAT_RANDOM() + vec4.normalize(out, out) + vec4.scale(out, out, scale) + return out + } -/** - * Transforms the vec4 with a quat - * - * @param {vec4} out the receiving vector - * @param {vec4} a the vector to transform - * @param {quat} q quaternion to transform with - * @returns {vec4} out - */ -vec4.transformQuat = function(out, a, q) { - var x = a[0], y = a[1], z = a[2], - qx = q[0], qy = q[1], qz = q[2], qw = q[3], + /** + * Transforms the vec4 with a mat4. + * + * @param {vec4} out the receiving vector + * @param {vec4} a the vector to transform + * @param {mat4} m matrix to transform with + * @returns {vec4} out + */ + vec4.transformMat4 = function(out, a, m) { + var x = a[0], + y = a[1], + z = a[2], + w = a[3] + out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w + out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w + out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w + out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w + return out + } + /** + * Transforms the vec4 with a quat + * + * @param {vec4} out the receiving vector + * @param {vec4} a the vector to transform + * @param {quat} q quaternion to transform with + * @returns {vec4} out + */ + vec4.transformQuat = function(out, a, q) { + var x = a[0], + y = a[1], + z = a[2], + qx = q[0], + qy = q[1], + qz = q[2], + qw = q[3], // calculate quat * vec ix = qw * x + qy * z - qz * y, iy = qw * y + qz * x - qx * z, iz = qw * z + qx * y - qy * x, - iw = -qx * x - qy * y - qz * z; - - // calculate result * inverse quat - out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy; - out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz; - out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return out; -}; + iw = -qx * x - qy * y - qz * z -/** - * Perform some operation over an array of vec4s. - * - * @param {Array} a the array of vectors to iterate over - * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed - * @param {Number} offset Number of elements to skip at the beginning of the array - * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array - * @param {Function} fn Function to call for each vector in the array - * @param {Object} [arg] additional argument to pass to fn - * @returns {Array} a - * @function - */ -vec4.forEach = (function() { - var vec = vec4.create(); + // calculate result * inverse quat + out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy + out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz + out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx + return out + } - return function(a, stride, offset, count, fn, arg) { - var i, l; - if(!stride) { - stride = 4; + /** + * Perform some operation over an array of vec4s. + * + * @param {Array} a the array of vectors to iterate over + * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed + * @param {Number} offset Number of elements to skip at the beginning of the array + * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array + * @param {Function} fn Function to call for each vector in the array + * @param {Object} [arg] additional argument to pass to fn + * @returns {Array} a + * @function + */ + vec4.forEach = (function() { + var vec = vec4.create() + + return function(a, stride, offset, count, fn, arg) { + var i, l + if (!stride) { + stride = 4 } - if(!offset) { - offset = 0; + if (!offset) { + offset = 0 } - - if(count) { - l = Math.min((count * stride) + offset, a.length); + + if (count) { + l = Math.min(count * stride + offset, a.length) } else { - l = a.length; + l = a.length } - for(i = offset; i < l; i += stride) { - vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3]; - fn(vec, vec, arg); - a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3]; + for (i = offset; i < l; i += stride) { + vec[0] = a[i] + vec[1] = a[i + 1] + vec[2] = a[i + 2] + vec[3] = a[i + 3] + fn(vec, vec, arg) + a[i] = vec[0] + a[i + 1] = vec[1] + a[i + 2] = vec[2] + a[i + 3] = vec[3] } - - return a; - }; -})(); -/** - * Returns a string representation of a vector - * - * @param {vec4} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -vec4.str = function (a) { - return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; -}; - -if(typeof(exports) !== 'undefined') { - exports.vec4 = vec4; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + return a + } + })() + + /** + * Returns a string representation of a vector + * + * @param {vec4} vec vector to represent as a string + * @returns {String} string representation of the vector + */ + vec4.str = function(a) { + return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')' + } + + if (typeof exports !== 'undefined') { + exports.vec4 = vec4 + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -1850,250 +1877,266 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 2x2 Matrix - * @name mat2 - */ - -var mat2 = {}; - -/** - * Creates a new identity mat2 - * - * @returns {mat2} a new 2x2 matrix - */ -mat2.create = function() { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; - -/** - * Creates a new mat2 initialized with values from an existing matrix - * - * @param {mat2} a matrix to clone - * @returns {mat2} a new 2x2 matrix - */ -mat2.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; + /** + * @class 2x2 Matrix + * @name mat2 + */ + + var mat2 = {} + + /** + * Creates a new identity mat2 + * + * @returns {mat2} a new 2x2 matrix + */ + mat2.create = function() { + var out = new GLMAT_ARRAY_TYPE(4) + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 1 + return out + } -/** - * Copy the values from one mat2 to another - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - return out; -}; + /** + * Creates a new mat2 initialized with values from an existing matrix + * + * @param {mat2} a matrix to clone + * @returns {mat2} a new 2x2 matrix + */ + mat2.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(4) + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + return out + } -/** - * Set a mat2 to the identity matrix - * - * @param {mat2} out the receiving matrix - * @returns {mat2} out - */ -mat2.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; + /** + * Copy the values from one mat2 to another + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ + mat2.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + return out + } -/** - * Transpose the values of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.transpose = function(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a1 = a[1]; - out[1] = a[2]; - out[2] = a1; - } else { - out[0] = a[0]; - out[1] = a[2]; - out[2] = a[1]; - out[3] = a[3]; - } - - return out; -}; + /** + * Set a mat2 to the identity matrix + * + * @param {mat2} out the receiving matrix + * @returns {mat2} out + */ + mat2.identity = function(out) { + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 1 + return out + } -/** - * Inverts a mat2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.invert = function(out, a) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], + /** + * Transpose the values of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ + mat2.transpose = function(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a1 = a[1] + out[1] = a[2] + out[2] = a1 + } else { + out[0] = a[0] + out[1] = a[2] + out[2] = a[1] + out[3] = a[3] + } + + return out + } + /** + * Inverts a mat2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ + mat2.invert = function(out, a) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], // Calculate the determinant - det = a0 * a3 - a2 * a1; - - if (!det) { - return null; - } - det = 1.0 / det; - - out[0] = a3 * det; - out[1] = -a1 * det; - out[2] = -a2 * det; - out[3] = a0 * det; + det = a0 * a3 - a2 * a1 - return out; -}; + if (!det) { + return null + } + det = 1.0 / det -/** - * Calculates the adjugate of a mat2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the source matrix - * @returns {mat2} out - */ -mat2.adjoint = function(out, a) { - // Caching this value is nessecary if out == a - var a0 = a[0]; - out[0] = a[3]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a0; + out[0] = a3 * det + out[1] = -a1 * det + out[2] = -a2 * det + out[3] = a0 * det - return out; -}; + return out + } -/** - * Calculates the determinant of a mat2 - * - * @param {mat2} a the source matrix - * @returns {Number} determinant of a - */ -mat2.determinant = function (a) { - return a[0] * a[3] - a[2] * a[1]; -}; + /** + * Calculates the adjugate of a mat2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the source matrix + * @returns {mat2} out + */ + mat2.adjoint = function(out, a) { + // Caching this value is nessecary if out == a + var a0 = a[0] + out[0] = a[3] + out[1] = -a[1] + out[2] = -a[2] + out[3] = a0 + + return out + } -/** - * Multiplies two mat2's - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the first operand - * @param {mat2} b the second operand - * @returns {mat2} out - */ -mat2.multiply = function (out, a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - return out; -}; + /** + * Calculates the determinant of a mat2 + * + * @param {mat2} a the source matrix + * @returns {Number} determinant of a + */ + mat2.determinant = function(a) { + return a[0] * a[3] - a[2] * a[1] + } -/** - * Alias for {@link mat2.multiply} - * @function - */ -mat2.mul = mat2.multiply; + /** + * Multiplies two mat2's + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the first operand + * @param {mat2} b the second operand + * @returns {mat2} out + */ + mat2.multiply = function(out, a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3] + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3] + out[0] = a0 * b0 + a2 * b1 + out[1] = a1 * b0 + a3 * b1 + out[2] = a0 * b2 + a2 * b3 + out[3] = a1 * b2 + a3 * b3 + return out + } -/** - * Rotates a mat2 by the given angle - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2} out - */ -mat2.rotate = function (out, a, rad) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], + /** + * Alias for {@link mat2.multiply} + * @function + */ + mat2.mul = mat2.multiply + + /** + * Rotates a mat2 by the given angle + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2} out + */ + mat2.rotate = function(out, a, rad) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], s = Math.sin(rad), - c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - return out; -}; + c = Math.cos(rad) + out[0] = a0 * c + a2 * s + out[1] = a1 * c + a3 * s + out[2] = a0 * -s + a2 * c + out[3] = a1 * -s + a3 * c + return out + } -/** - * Scales the mat2 by the dimensions in the given vec2 - * - * @param {mat2} out the receiving matrix - * @param {mat2} a the matrix to rotate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat2} out - **/ -mat2.scale = function(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], - v0 = v[0], v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - return out; -}; + /** + * Scales the mat2 by the dimensions in the given vec2 + * + * @param {mat2} out the receiving matrix + * @param {mat2} a the matrix to rotate + * @param {vec2} v the vec2 to scale the matrix by + * @returns {mat2} out + **/ + mat2.scale = function(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + v0 = v[0], + v1 = v[1] + out[0] = a0 * v0 + out[1] = a1 * v0 + out[2] = a2 * v1 + out[3] = a3 * v1 + return out + } -/** - * Returns a string representation of a mat2 - * - * @param {mat2} mat matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat2.str = function (a) { - return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; -}; + /** + * Returns a string representation of a mat2 + * + * @param {mat2} mat matrix to represent as a string + * @returns {String} string representation of the matrix + */ + mat2.str = function(a) { + return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')' + } -/** - * Returns Frobenius norm of a mat2 - * - * @param {mat2} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat2.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2))) -}; + /** + * Returns Frobenius norm of a mat2 + * + * @param {mat2} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + mat2.frob = function(a) { + return Math.sqrt( + Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + ) + } -/** - * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix - * @param {mat2} L the lower triangular matrix - * @param {mat2} D the diagonal matrix - * @param {mat2} U the upper triangular matrix - * @param {mat2} a the input matrix to factorize - */ + /** + * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix + * @param {mat2} L the lower triangular matrix + * @param {mat2} D the diagonal matrix + * @param {mat2} U the upper triangular matrix + * @param {mat2} a the input matrix to factorize + */ + + mat2.LDU = function(L, D, U, a) { + L[2] = a[2] / a[0] + U[0] = a[0] + U[1] = a[1] + U[3] = a[3] - L[2] * U[1] + return [L, D, U] + } -mat2.LDU = function (L, D, U, a) { - L[2] = a[2]/a[0]; - U[0] = a[0]; - U[1] = a[1]; - U[3] = a[3] - L[2] * U[1]; - return [L, D, U]; -}; - -if(typeof(exports) !== 'undefined') { - exports.mat2 = mat2; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + if (typeof exports !== 'undefined') { + exports.mat2 = mat2 + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -2115,243 +2158,281 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 2x3 Matrix - * @name mat2d - * - * @description - * A mat2d contains six elements defined as: - *
- * [a, c, tx,
- *  b, d, ty]
- * 
- * This is a short form for the 3x3 matrix: - *
- * [a, c, tx,
- *  b, d, ty,
- *  0, 0, 1]
- * 
- * The last row is ignored so the array is shorter and operations are faster. - */ - -var mat2d = {}; - -/** - * Creates a new identity mat2d - * - * @returns {mat2d} a new 2x3 matrix - */ -mat2d.create = function() { - var out = new GLMAT_ARRAY_TYPE(6); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; -}; - -/** - * Creates a new mat2d initialized with values from an existing matrix - * - * @param {mat2d} a matrix to clone - * @returns {mat2d} a new 2x3 matrix - */ -mat2d.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(6); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; -}; - -/** - * Copy the values from one mat2d to another - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the source matrix - * @returns {mat2d} out - */ -mat2d.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - return out; -}; - -/** - * Set a mat2d to the identity matrix - * - * @param {mat2d} out the receiving matrix - * @returns {mat2d} out - */ -mat2d.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 1; - out[4] = 0; - out[5] = 0; - return out; -}; - -/** - * Inverts a mat2d - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the source matrix - * @returns {mat2d} out - */ -mat2d.invert = function(out, a) { - var aa = a[0], ab = a[1], ac = a[2], ad = a[3], - atx = a[4], aty = a[5]; + /** + * @class 2x3 Matrix + * @name mat2d + * + * @description + * A mat2d contains six elements defined as: + *
+     * [a, c, tx,
+     *  b, d, ty]
+     * 
+ * This is a short form for the 3x3 matrix: + *
+     * [a, c, tx,
+     *  b, d, ty,
+     *  0, 0, 1]
+     * 
+ * The last row is ignored so the array is shorter and operations are faster. + */ + + var mat2d = {} + + /** + * Creates a new identity mat2d + * + * @returns {mat2d} a new 2x3 matrix + */ + mat2d.create = function() { + var out = new GLMAT_ARRAY_TYPE(6) + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 1 + out[4] = 0 + out[5] = 0 + return out + } - var det = aa * ad - ab * ac; - if(!det){ - return null; + /** + * Creates a new mat2d initialized with values from an existing matrix + * + * @param {mat2d} a matrix to clone + * @returns {mat2d} a new 2x3 matrix + */ + mat2d.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(6) + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[4] = a[4] + out[5] = a[5] + return out } - det = 1.0 / det; - out[0] = ad * det; - out[1] = -ab * det; - out[2] = -ac * det; - out[3] = aa * det; - out[4] = (ac * aty - ad * atx) * det; - out[5] = (ab * atx - aa * aty) * det; - return out; -}; + /** + * Copy the values from one mat2d to another + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the source matrix + * @returns {mat2d} out + */ + mat2d.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[4] = a[4] + out[5] = a[5] + return out + } -/** - * Calculates the determinant of a mat2d - * - * @param {mat2d} a the source matrix - * @returns {Number} determinant of a - */ -mat2d.determinant = function (a) { - return a[0] * a[3] - a[1] * a[2]; -}; + /** + * Set a mat2d to the identity matrix + * + * @param {mat2d} out the receiving matrix + * @returns {mat2d} out + */ + mat2d.identity = function(out) { + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 1 + out[4] = 0 + out[5] = 0 + return out + } -/** - * Multiplies two mat2d's - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the first operand - * @param {mat2d} b the second operand - * @returns {mat2d} out - */ -mat2d.multiply = function (out, a, b) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5]; - out[0] = a0 * b0 + a2 * b1; - out[1] = a1 * b0 + a3 * b1; - out[2] = a0 * b2 + a2 * b3; - out[3] = a1 * b2 + a3 * b3; - out[4] = a0 * b4 + a2 * b5 + a4; - out[5] = a1 * b4 + a3 * b5 + a5; - return out; -}; + /** + * Inverts a mat2d + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the source matrix + * @returns {mat2d} out + */ + mat2d.invert = function(out, a) { + var aa = a[0], + ab = a[1], + ac = a[2], + ad = a[3], + atx = a[4], + aty = a[5] + + var det = aa * ad - ab * ac + if (!det) { + return null + } + det = 1.0 / det + + out[0] = ad * det + out[1] = -ab * det + out[2] = -ac * det + out[3] = aa * det + out[4] = (ac * aty - ad * atx) * det + out[5] = (ab * atx - aa * aty) * det + return out + } -/** - * Alias for {@link mat2d.multiply} - * @function - */ -mat2d.mul = mat2d.multiply; + /** + * Calculates the determinant of a mat2d + * + * @param {mat2d} a the source matrix + * @returns {Number} determinant of a + */ + mat2d.determinant = function(a) { + return a[0] * a[3] - a[1] * a[2] + } + /** + * Multiplies two mat2d's + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the first operand + * @param {mat2d} b the second operand + * @returns {mat2d} out + */ + mat2d.multiply = function(out, a, b) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5] + out[0] = a0 * b0 + a2 * b1 + out[1] = a1 * b0 + a3 * b1 + out[2] = a0 * b2 + a2 * b3 + out[3] = a1 * b2 + a3 * b3 + out[4] = a0 * b4 + a2 * b5 + a4 + out[5] = a1 * b4 + a3 * b5 + a5 + return out + } -/** - * Rotates a mat2d by the given angle - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat2d} out - */ -mat2d.rotate = function (out, a, rad) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], + /** + * Alias for {@link mat2d.multiply} + * @function + */ + mat2d.mul = mat2d.multiply + + /** + * Rotates a mat2d by the given angle + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat2d} out + */ + mat2d.rotate = function(out, a, rad) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], s = Math.sin(rad), - c = Math.cos(rad); - out[0] = a0 * c + a2 * s; - out[1] = a1 * c + a3 * s; - out[2] = a0 * -s + a2 * c; - out[3] = a1 * -s + a3 * c; - out[4] = a4; - out[5] = a5; - return out; -}; + c = Math.cos(rad) + out[0] = a0 * c + a2 * s + out[1] = a1 * c + a3 * s + out[2] = a0 * -s + a2 * c + out[3] = a1 * -s + a3 * c + out[4] = a4 + out[5] = a5 + return out + } -/** - * Scales the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to translate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat2d} out - **/ -mat2d.scale = function(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - v0 = v[0], v1 = v[1]; - out[0] = a0 * v0; - out[1] = a1 * v0; - out[2] = a2 * v1; - out[3] = a3 * v1; - out[4] = a4; - out[5] = a5; - return out; -}; + /** + * Scales the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to translate + * @param {vec2} v the vec2 to scale the matrix by + * @returns {mat2d} out + **/ + mat2d.scale = function(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + v0 = v[0], + v1 = v[1] + out[0] = a0 * v0 + out[1] = a1 * v0 + out[2] = a2 * v1 + out[3] = a3 * v1 + out[4] = a4 + out[5] = a5 + return out + } -/** - * Translates the mat2d by the dimensions in the given vec2 - * - * @param {mat2d} out the receiving matrix - * @param {mat2d} a the matrix to translate - * @param {vec2} v the vec2 to translate the matrix by - * @returns {mat2d} out - **/ -mat2d.translate = function(out, a, v) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], - v0 = v[0], v1 = v[1]; - out[0] = a0; - out[1] = a1; - out[2] = a2; - out[3] = a3; - out[4] = a0 * v0 + a2 * v1 + a4; - out[5] = a1 * v0 + a3 * v1 + a5; - return out; -}; + /** + * Translates the mat2d by the dimensions in the given vec2 + * + * @param {mat2d} out the receiving matrix + * @param {mat2d} a the matrix to translate + * @param {vec2} v the vec2 to translate the matrix by + * @returns {mat2d} out + **/ + mat2d.translate = function(out, a, v) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + a4 = a[4], + a5 = a[5], + v0 = v[0], + v1 = v[1] + out[0] = a0 + out[1] = a1 + out[2] = a2 + out[3] = a3 + out[4] = a0 * v0 + a2 * v1 + a4 + out[5] = a1 * v0 + a3 * v1 + a5 + return out + } -/** - * Returns a string representation of a mat2d - * - * @param {mat2d} a matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat2d.str = function (a) { - return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + - a[3] + ', ' + a[4] + ', ' + a[5] + ')'; -}; + /** + * Returns a string representation of a mat2d + * + * @param {mat2d} a matrix to represent as a string + * @returns {String} string representation of the matrix + */ + mat2d.str = function(a) { + return ( + 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + a[4] + ', ' + a[5] + ')' + ) + } -/** - * Returns Frobenius norm of a mat2d - * - * @param {mat2d} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat2d.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1)) -}; - -if(typeof(exports) !== 'undefined') { - exports.mat2d = mat2d; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + /** + * Returns Frobenius norm of a mat2d + * + * @param {mat2d} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + mat2d.frob = function(a) { + return Math.sqrt( + Math.pow(a[0], 2) + + Math.pow(a[1], 2) + + Math.pow(a[2], 2) + + Math.pow(a[3], 2) + + Math.pow(a[4], 2) + + Math.pow(a[5], 2) + + 1 + ) + } + + if (typeof exports !== 'undefined') { + exports.mat2d = mat2d + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -2373,373 +2454,421 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 3x3 Matrix - * @name mat3 - */ - -var mat3 = {}; - -/** - * Creates a new identity mat3 - * - * @returns {mat3} a new 3x3 matrix - */ -mat3.create = function() { - var out = new GLMAT_ARRAY_TYPE(9); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -}; - -/** - * Copies the upper-left 3x3 values into the given mat3. - * - * @param {mat3} out the receiving 3x3 matrix - * @param {mat4} a the source 4x4 matrix - * @returns {mat3} out - */ -mat3.fromMat4 = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - return out; -}; + /** + * @class 3x3 Matrix + * @name mat3 + */ + + var mat3 = {} + + /** + * Creates a new identity mat3 + * + * @returns {mat3} a new 3x3 matrix + */ + mat3.create = function() { + var out = new GLMAT_ARRAY_TYPE(9) + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 1 + out[5] = 0 + out[6] = 0 + out[7] = 0 + out[8] = 1 + return out + } -/** - * Creates a new mat3 initialized with values from an existing matrix - * - * @param {mat3} a matrix to clone - * @returns {mat3} a new 3x3 matrix - */ -mat3.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(9); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -}; + /** + * Copies the upper-left 3x3 values into the given mat3. + * + * @param {mat3} out the receiving 3x3 matrix + * @param {mat4} a the source 4x4 matrix + * @returns {mat3} out + */ + mat3.fromMat4 = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[4] + out[4] = a[5] + out[5] = a[6] + out[6] = a[8] + out[7] = a[9] + out[8] = a[10] + return out + } -/** - * Copy the values from one mat3 to another - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -}; + /** + * Creates a new mat3 initialized with values from an existing matrix + * + * @param {mat3} a matrix to clone + * @returns {mat3} a new 3x3 matrix + */ + mat3.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(9) + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[4] = a[4] + out[5] = a[5] + out[6] = a[6] + out[7] = a[7] + out[8] = a[8] + return out + } -/** - * Set a mat3 to the identity matrix - * - * @param {mat3} out the receiving matrix - * @returns {mat3} out - */ -mat3.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - return out; -}; + /** + * Copy the values from one mat3 to another + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ + mat3.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[4] = a[4] + out[5] = a[5] + out[6] = a[6] + out[7] = a[7] + out[8] = a[8] + return out + } -/** - * Transpose the values of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.transpose = function(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], a02 = a[2], a12 = a[5]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a01; - out[5] = a[7]; - out[6] = a02; - out[7] = a12; - } else { - out[0] = a[0]; - out[1] = a[3]; - out[2] = a[6]; - out[3] = a[1]; - out[4] = a[4]; - out[5] = a[7]; - out[6] = a[2]; - out[7] = a[5]; - out[8] = a[8]; - } - - return out; -}; + /** + * Set a mat3 to the identity matrix + * + * @param {mat3} out the receiving matrix + * @returns {mat3} out + */ + mat3.identity = function(out) { + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 1 + out[5] = 0 + out[6] = 0 + out[7] = 0 + out[8] = 1 + return out + } -/** - * Inverts a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.invert = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], + /** + * Transpose the values of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ + mat3.transpose = function(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], + a02 = a[2], + a12 = a[5] + out[1] = a[3] + out[2] = a[6] + out[3] = a01 + out[5] = a[7] + out[6] = a02 + out[7] = a12 + } else { + out[0] = a[0] + out[1] = a[3] + out[2] = a[6] + out[3] = a[1] + out[4] = a[4] + out[5] = a[7] + out[6] = a[2] + out[7] = a[5] + out[8] = a[8] + } + + return out + } + /** + * Inverts a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ + mat3.invert = function(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], b01 = a22 * a11 - a12 * a21, b11 = -a22 * a10 + a12 * a20, b21 = a21 * a10 - a11 * a20, - // Calculate the determinant - det = a00 * b01 + a01 * b11 + a02 * b21; - - if (!det) { - return null; + det = a00 * b01 + a01 * b11 + a02 * b21 + + if (!det) { + return null + } + det = 1.0 / det + + out[0] = b01 * det + out[1] = (-a22 * a01 + a02 * a21) * det + out[2] = (a12 * a01 - a02 * a11) * det + out[3] = b11 * det + out[4] = (a22 * a00 - a02 * a20) * det + out[5] = (-a12 * a00 + a02 * a10) * det + out[6] = b21 * det + out[7] = (-a21 * a00 + a01 * a20) * det + out[8] = (a11 * a00 - a01 * a10) * det + return out } - det = 1.0 / det; - - out[0] = b01 * det; - out[1] = (-a22 * a01 + a02 * a21) * det; - out[2] = (a12 * a01 - a02 * a11) * det; - out[3] = b11 * det; - out[4] = (a22 * a00 - a02 * a20) * det; - out[5] = (-a12 * a00 + a02 * a10) * det; - out[6] = b21 * det; - out[7] = (-a21 * a00 + a01 * a20) * det; - out[8] = (a11 * a00 - a01 * a10) * det; - return out; -}; - -/** - * Calculates the adjugate of a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the source matrix - * @returns {mat3} out - */ -mat3.adjoint = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8]; - - out[0] = (a11 * a22 - a12 * a21); - out[1] = (a02 * a21 - a01 * a22); - out[2] = (a01 * a12 - a02 * a11); - out[3] = (a12 * a20 - a10 * a22); - out[4] = (a00 * a22 - a02 * a20); - out[5] = (a02 * a10 - a00 * a12); - out[6] = (a10 * a21 - a11 * a20); - out[7] = (a01 * a20 - a00 * a21); - out[8] = (a00 * a11 - a01 * a10); - return out; -}; - -/** - * Calculates the determinant of a mat3 - * - * @param {mat3} a the source matrix - * @returns {Number} determinant of a - */ -mat3.determinant = function (a) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8]; - - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); -}; - -/** - * Multiplies two mat3's - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the first operand - * @param {mat3} b the second operand - * @returns {mat3} out - */ -mat3.multiply = function (out, a, b) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], - - b00 = b[0], b01 = b[1], b02 = b[2], - b10 = b[3], b11 = b[4], b12 = b[5], - b20 = b[6], b21 = b[7], b22 = b[8]; - - out[0] = b00 * a00 + b01 * a10 + b02 * a20; - out[1] = b00 * a01 + b01 * a11 + b02 * a21; - out[2] = b00 * a02 + b01 * a12 + b02 * a22; - - out[3] = b10 * a00 + b11 * a10 + b12 * a20; - out[4] = b10 * a01 + b11 * a11 + b12 * a21; - out[5] = b10 * a02 + b11 * a12 + b12 * a22; - out[6] = b20 * a00 + b21 * a10 + b22 * a20; - out[7] = b20 * a01 + b21 * a11 + b22 * a21; - out[8] = b20 * a02 + b21 * a12 + b22 * a22; - return out; -}; + /** + * Calculates the adjugate of a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the source matrix + * @returns {mat3} out + */ + mat3.adjoint = function(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8] + + out[0] = a11 * a22 - a12 * a21 + out[1] = a02 * a21 - a01 * a22 + out[2] = a01 * a12 - a02 * a11 + out[3] = a12 * a20 - a10 * a22 + out[4] = a00 * a22 - a02 * a20 + out[5] = a02 * a10 - a00 * a12 + out[6] = a10 * a21 - a11 * a20 + out[7] = a01 * a20 - a00 * a21 + out[8] = a00 * a11 - a01 * a10 + return out + } -/** - * Alias for {@link mat3.multiply} - * @function - */ -mat3.mul = mat3.multiply; + /** + * Calculates the determinant of a mat3 + * + * @param {mat3} a the source matrix + * @returns {Number} determinant of a + */ + mat3.determinant = function(a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8] + + return ( + a00 * (a22 * a11 - a12 * a21) + + a01 * (-a22 * a10 + a12 * a20) + + a02 * (a21 * a10 - a11 * a20) + ) + } -/** - * Translate a mat3 by the given vector - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to translate - * @param {vec2} v vector to translate by - * @returns {mat3} out - */ -mat3.translate = function(out, a, v) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], - x = v[0], y = v[1]; - - out[0] = a00; - out[1] = a01; - out[2] = a02; - - out[3] = a10; - out[4] = a11; - out[5] = a12; - - out[6] = x * a00 + y * a10 + a20; - out[7] = x * a01 + y * a11 + a21; - out[8] = x * a02 + y * a12 + a22; - return out; -}; + /** + * Multiplies two mat3's + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the first operand + * @param {mat3} b the second operand + * @returns {mat3} out + */ + mat3.multiply = function(out, a, b) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + b00 = b[0], + b01 = b[1], + b02 = b[2], + b10 = b[3], + b11 = b[4], + b12 = b[5], + b20 = b[6], + b21 = b[7], + b22 = b[8] + + out[0] = b00 * a00 + b01 * a10 + b02 * a20 + out[1] = b00 * a01 + b01 * a11 + b02 * a21 + out[2] = b00 * a02 + b01 * a12 + b02 * a22 + + out[3] = b10 * a00 + b11 * a10 + b12 * a20 + out[4] = b10 * a01 + b11 * a11 + b12 * a21 + out[5] = b10 * a02 + b11 * a12 + b12 * a22 + + out[6] = b20 * a00 + b21 * a10 + b22 * a20 + out[7] = b20 * a01 + b21 * a11 + b22 * a21 + out[8] = b20 * a02 + b21 * a12 + b22 * a22 + return out + } -/** - * Rotates a mat3 by the given angle - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat3} out - */ -mat3.rotate = function (out, a, rad) { - var a00 = a[0], a01 = a[1], a02 = a[2], - a10 = a[3], a11 = a[4], a12 = a[5], - a20 = a[6], a21 = a[7], a22 = a[8], + /** + * Alias for {@link mat3.multiply} + * @function + */ + mat3.mul = mat3.multiply + + /** + * Translate a mat3 by the given vector + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to translate + * @param {vec2} v vector to translate by + * @returns {mat3} out + */ + mat3.translate = function(out, a, v) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], + x = v[0], + y = v[1] + + out[0] = a00 + out[1] = a01 + out[2] = a02 + + out[3] = a10 + out[4] = a11 + out[5] = a12 + + out[6] = x * a00 + y * a10 + a20 + out[7] = x * a01 + y * a11 + a21 + out[8] = x * a02 + y * a12 + a22 + return out + } + /** + * Rotates a mat3 by the given angle + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat3} out + */ + mat3.rotate = function(out, a, rad) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + a20 = a[6], + a21 = a[7], + a22 = a[8], s = Math.sin(rad), - c = Math.cos(rad); + c = Math.cos(rad) - out[0] = c * a00 + s * a10; - out[1] = c * a01 + s * a11; - out[2] = c * a02 + s * a12; + out[0] = c * a00 + s * a10 + out[1] = c * a01 + s * a11 + out[2] = c * a02 + s * a12 - out[3] = c * a10 - s * a00; - out[4] = c * a11 - s * a01; - out[5] = c * a12 - s * a02; + out[3] = c * a10 - s * a00 + out[4] = c * a11 - s * a01 + out[5] = c * a12 - s * a02 - out[6] = a20; - out[7] = a21; - out[8] = a22; - return out; -}; + out[6] = a20 + out[7] = a21 + out[8] = a22 + return out + } -/** - * Scales the mat3 by the dimensions in the given vec2 - * - * @param {mat3} out the receiving matrix - * @param {mat3} a the matrix to rotate - * @param {vec2} v the vec2 to scale the matrix by - * @returns {mat3} out - **/ -mat3.scale = function(out, a, v) { - var x = v[0], y = v[1]; - - out[0] = x * a[0]; - out[1] = x * a[1]; - out[2] = x * a[2]; - - out[3] = y * a[3]; - out[4] = y * a[4]; - out[5] = y * a[5]; - - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - return out; -}; + /** + * Scales the mat3 by the dimensions in the given vec2 + * + * @param {mat3} out the receiving matrix + * @param {mat3} a the matrix to rotate + * @param {vec2} v the vec2 to scale the matrix by + * @returns {mat3} out + **/ + mat3.scale = function(out, a, v) { + var x = v[0], + y = v[1] + + out[0] = x * a[0] + out[1] = x * a[1] + out[2] = x * a[2] + + out[3] = y * a[3] + out[4] = y * a[4] + out[5] = y * a[5] + + out[6] = a[6] + out[7] = a[7] + out[8] = a[8] + return out + } -/** - * Copies the values from a mat2d into a mat3 - * - * @param {mat3} out the receiving matrix - * @param {mat2d} a the matrix to copy - * @returns {mat3} out - **/ -mat3.fromMat2d = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = 0; - - out[3] = a[2]; - out[4] = a[3]; - out[5] = 0; - - out[6] = a[4]; - out[7] = a[5]; - out[8] = 1; - return out; -}; + /** + * Copies the values from a mat2d into a mat3 + * + * @param {mat3} out the receiving matrix + * @param {mat2d} a the matrix to copy + * @returns {mat3} out + **/ + mat3.fromMat2d = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = 0 + + out[3] = a[2] + out[4] = a[3] + out[5] = 0 + + out[6] = a[4] + out[7] = a[5] + out[8] = 1 + return out + } -/** -* Calculates a 3x3 matrix from the given quaternion -* -* @param {mat3} out mat3 receiving operation result -* @param {quat} q Quaternion to create matrix from -* -* @returns {mat3} out -*/ -mat3.fromQuat = function (out, q) { - var x = q[0], y = q[1], z = q[2], w = q[3], + /** + * Calculates a 3x3 matrix from the given quaternion + * + * @param {mat3} out mat3 receiving operation result + * @param {quat} q Quaternion to create matrix from + * + * @returns {mat3} out + */ + mat3.fromQuat = function(out, q) { + var x = q[0], + y = q[1], + z = q[2], + w = q[3], x2 = x + x, y2 = y + y, z2 = z + z, - xx = x * x2, yx = y * x2, yy = y * y2, @@ -2748,37 +2877,48 @@ mat3.fromQuat = function (out, q) { zz = z * z2, wx = w * x2, wy = w * y2, - wz = w * z2; - - out[0] = 1 - yy - zz; - out[3] = yx - wz; - out[6] = zx + wy; + wz = w * z2 - out[1] = yx + wz; - out[4] = 1 - xx - zz; - out[7] = zy - wx; + out[0] = 1 - yy - zz + out[3] = yx - wz + out[6] = zx + wy - out[2] = zx - wy; - out[5] = zy + wx; - out[8] = 1 - xx - yy; + out[1] = yx + wz + out[4] = 1 - xx - zz + out[7] = zy - wx - return out; -}; + out[2] = zx - wy + out[5] = zy + wx + out[8] = 1 - xx - yy -/** -* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix -* -* @param {mat3} out mat3 receiving operation result -* @param {mat4} a Mat4 to derive the normal matrix from -* -* @returns {mat3} out -*/ -mat3.normalFromMat4 = function (out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], + return out + } + /** + * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix + * + * @param {mat3} out mat3 receiving operation result + * @param {mat4} a Mat4 to derive the normal matrix from + * + * @returns {mat3} out + */ + mat3.normalFromMat4 = function(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11], + a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15], b00 = a00 * a11 - a01 * a10, b01 = a00 * a12 - a02 * a10, b02 = a00 * a13 - a03 * a10, @@ -2791,58 +2931,83 @@ mat3.normalFromMat4 = function (out, a) { b09 = a21 * a32 - a22 * a31, b10 = a21 * a33 - a23 * a31, b11 = a22 * a33 - a23 * a32, - // Calculate the determinant - det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - det = 1.0 / det; + det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06 - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + if (!det) { + return null + } + det = 1.0 / det - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det - return out; -}; + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det -/** - * Returns a string representation of a mat3 - * - * @param {mat3} mat matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat3.str = function (a) { - return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + - a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + - a[6] + ', ' + a[7] + ', ' + a[8] + ')'; -}; + return out + } -/** - * Returns Frobenius norm of a mat3 - * - * @param {mat3} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat3.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2))) -}; + /** + * Returns a string representation of a mat3 + * + * @param {mat3} mat matrix to represent as a string + * @returns {String} string representation of the matrix + */ + mat3.str = function(a) { + return ( + 'mat3(' + + a[0] + + ', ' + + a[1] + + ', ' + + a[2] + + ', ' + + a[3] + + ', ' + + a[4] + + ', ' + + a[5] + + ', ' + + a[6] + + ', ' + + a[7] + + ', ' + + a[8] + + ')' + ) + } + /** + * Returns Frobenius norm of a mat3 + * + * @param {mat3} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + mat3.frob = function(a) { + return Math.sqrt( + Math.pow(a[0], 2) + + Math.pow(a[1], 2) + + Math.pow(a[2], 2) + + Math.pow(a[3], 2) + + Math.pow(a[4], 2) + + Math.pow(a[5], 2) + + Math.pow(a[6], 2) + + Math.pow(a[7], 2) + + Math.pow(a[8], 2) + ) + } -if(typeof(exports) !== 'undefined') { - exports.mat3 = mat3; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + if (typeof exports !== 'undefined') { + exports.mat3 = mat3 + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -2864,180 +3029,194 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class 4x4 Matrix - * @name mat4 - */ - -var mat4 = {}; - -/** - * Creates a new identity mat4 - * - * @returns {mat4} a new 4x4 matrix - */ -mat4.create = function() { - var out = new GLMAT_ARRAY_TYPE(16); - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; -}; - -/** - * Creates a new mat4 initialized with values from an existing matrix - * - * @param {mat4} a matrix to clone - * @returns {mat4} a new 4x4 matrix - */ -mat4.clone = function(a) { - var out = new GLMAT_ARRAY_TYPE(16); - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; -}; + /** + * @class 4x4 Matrix + * @name mat4 + */ + + var mat4 = {} + + /** + * Creates a new identity mat4 + * + * @returns {mat4} a new 4x4 matrix + */ + mat4.create = function() { + var out = new GLMAT_ARRAY_TYPE(16) + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 0 + out[5] = 1 + out[6] = 0 + out[7] = 0 + out[8] = 0 + out[9] = 0 + out[10] = 1 + out[11] = 0 + out[12] = 0 + out[13] = 0 + out[14] = 0 + out[15] = 1 + return out + } -/** - * Copy the values from one mat4 to another - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.copy = function(out, a) { - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; -}; + /** + * Creates a new mat4 initialized with values from an existing matrix + * + * @param {mat4} a matrix to clone + * @returns {mat4} a new 4x4 matrix + */ + mat4.clone = function(a) { + var out = new GLMAT_ARRAY_TYPE(16) + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[4] = a[4] + out[5] = a[5] + out[6] = a[6] + out[7] = a[7] + out[8] = a[8] + out[9] = a[9] + out[10] = a[10] + out[11] = a[11] + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + return out + } -/** - * Set a mat4 to the identity matrix - * - * @param {mat4} out the receiving matrix - * @returns {mat4} out - */ -mat4.identity = function(out) { - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = 1; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 1; - out[11] = 0; - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; - return out; -}; + /** + * Copy the values from one mat4 to another + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ + mat4.copy = function(out, a) { + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[4] = a[4] + out[5] = a[5] + out[6] = a[6] + out[7] = a[7] + out[8] = a[8] + out[9] = a[9] + out[10] = a[10] + out[11] = a[11] + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + return out + } -/** - * Transpose the values of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.transpose = function(out, a) { - // If we are transposing ourselves we can skip a few steps but have to cache some values - if (out === a) { - var a01 = a[1], a02 = a[2], a03 = a[3], - a12 = a[6], a13 = a[7], - a23 = a[11]; - - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a01; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a02; - out[9] = a12; - out[11] = a[14]; - out[12] = a03; - out[13] = a13; - out[14] = a23; - } else { - out[0] = a[0]; - out[1] = a[4]; - out[2] = a[8]; - out[3] = a[12]; - out[4] = a[1]; - out[5] = a[5]; - out[6] = a[9]; - out[7] = a[13]; - out[8] = a[2]; - out[9] = a[6]; - out[10] = a[10]; - out[11] = a[14]; - out[12] = a[3]; - out[13] = a[7]; - out[14] = a[11]; - out[15] = a[15]; - } - - return out; -}; + /** + * Set a mat4 to the identity matrix + * + * @param {mat4} out the receiving matrix + * @returns {mat4} out + */ + mat4.identity = function(out) { + out[0] = 1 + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 0 + out[5] = 1 + out[6] = 0 + out[7] = 0 + out[8] = 0 + out[9] = 0 + out[10] = 1 + out[11] = 0 + out[12] = 0 + out[13] = 0 + out[14] = 0 + out[15] = 1 + return out + } -/** - * Inverts a mat4 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.invert = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], + /** + * Transpose the values of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ + mat4.transpose = function(out, a) { + // If we are transposing ourselves we can skip a few steps but have to cache some values + if (out === a) { + var a01 = a[1], + a02 = a[2], + a03 = a[3], + a12 = a[6], + a13 = a[7], + a23 = a[11] + + out[1] = a[4] + out[2] = a[8] + out[3] = a[12] + out[4] = a01 + out[6] = a[9] + out[7] = a[13] + out[8] = a02 + out[9] = a12 + out[11] = a[14] + out[12] = a03 + out[13] = a13 + out[14] = a23 + } else { + out[0] = a[0] + out[1] = a[4] + out[2] = a[8] + out[3] = a[12] + out[4] = a[1] + out[5] = a[5] + out[6] = a[9] + out[7] = a[13] + out[8] = a[2] + out[9] = a[6] + out[10] = a[10] + out[11] = a[14] + out[12] = a[3] + out[13] = a[7] + out[14] = a[11] + out[15] = a[15] + } + + return out + } + /** + * Inverts a mat4 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ + mat4.invert = function(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11], + a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15], b00 = a00 * a11 - a01 * a10, b01 = a00 * a12 - a02 * a10, b02 = a00 * a13 - a03 * a10, @@ -3050,79 +3229,157 @@ mat4.invert = function(out, a) { b09 = a21 * a32 - a22 * a31, b10 = a21 * a33 - a23 * a31, b11 = a22 * a33 - a23 * a32, - // Calculate the determinant - det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) { - return null; - } - det = 1.0 / det; - - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; - out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; - out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; - out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; - out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; - out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; - out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; - - return out; -}; - -/** - * Calculates the adjugate of a mat4 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the source matrix - * @returns {mat4} out - */ -mat4.adjoint = function(out, a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - - out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)); - out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)); - out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)); - out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)); - out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)); - out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)); - out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)); - out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)); - out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)); - out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)); - out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)); - out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)); - out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)); - out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)); - out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)); - out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11)); - return out; -}; + det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06 + + if (!det) { + return null + } + det = 1.0 / det + + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det + out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det + out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det + out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det + out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det + out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det + out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det + out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det + out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det + out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det + out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det + out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det + out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det + out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det + out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det + out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det + + return out + } -/** - * Calculates the determinant of a mat4 - * - * @param {mat4} a the source matrix - * @returns {Number} determinant of a - */ -mat4.determinant = function (a) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15], + /** + * Calculates the adjugate of a mat4 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the source matrix + * @returns {mat4} out + */ + mat4.adjoint = function(out, a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11], + a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15] + + out[0] = + a11 * (a22 * a33 - a23 * a32) - + a21 * (a12 * a33 - a13 * a32) + + a31 * (a12 * a23 - a13 * a22) + out[1] = -( + a01 * (a22 * a33 - a23 * a32) - + a21 * (a02 * a33 - a03 * a32) + + a31 * (a02 * a23 - a03 * a22) + ) + out[2] = + a01 * (a12 * a33 - a13 * a32) - + a11 * (a02 * a33 - a03 * a32) + + a31 * (a02 * a13 - a03 * a12) + out[3] = -( + a01 * (a12 * a23 - a13 * a22) - + a11 * (a02 * a23 - a03 * a22) + + a21 * (a02 * a13 - a03 * a12) + ) + out[4] = -( + a10 * (a22 * a33 - a23 * a32) - + a20 * (a12 * a33 - a13 * a32) + + a30 * (a12 * a23 - a13 * a22) + ) + out[5] = + a00 * (a22 * a33 - a23 * a32) - + a20 * (a02 * a33 - a03 * a32) + + a30 * (a02 * a23 - a03 * a22) + out[6] = -( + a00 * (a12 * a33 - a13 * a32) - + a10 * (a02 * a33 - a03 * a32) + + a30 * (a02 * a13 - a03 * a12) + ) + out[7] = + a00 * (a12 * a23 - a13 * a22) - + a10 * (a02 * a23 - a03 * a22) + + a20 * (a02 * a13 - a03 * a12) + out[8] = + a10 * (a21 * a33 - a23 * a31) - + a20 * (a11 * a33 - a13 * a31) + + a30 * (a11 * a23 - a13 * a21) + out[9] = -( + a00 * (a21 * a33 - a23 * a31) - + a20 * (a01 * a33 - a03 * a31) + + a30 * (a01 * a23 - a03 * a21) + ) + out[10] = + a00 * (a11 * a33 - a13 * a31) - + a10 * (a01 * a33 - a03 * a31) + + a30 * (a01 * a13 - a03 * a11) + out[11] = -( + a00 * (a11 * a23 - a13 * a21) - + a10 * (a01 * a23 - a03 * a21) + + a20 * (a01 * a13 - a03 * a11) + ) + out[12] = -( + a10 * (a21 * a32 - a22 * a31) - + a20 * (a11 * a32 - a12 * a31) + + a30 * (a11 * a22 - a12 * a21) + ) + out[13] = + a00 * (a21 * a32 - a22 * a31) - + a20 * (a01 * a32 - a02 * a31) + + a30 * (a01 * a22 - a02 * a21) + out[14] = -( + a00 * (a11 * a32 - a12 * a31) - + a10 * (a01 * a32 - a02 * a31) + + a30 * (a01 * a12 - a02 * a11) + ) + out[15] = + a00 * (a11 * a22 - a12 * a21) - + a10 * (a01 * a22 - a02 * a21) + + a20 * (a01 * a12 - a02 * a11) + return out + } + /** + * Calculates the determinant of a mat4 + * + * @param {mat4} a the source matrix + * @returns {Number} determinant of a + */ + mat4.determinant = function(a) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11], + a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15], b00 = a00 * a11 - a01 * a10, b01 = a00 * a12 - a02 * a10, b02 = a00 * a13 - a03 * a10, @@ -3134,199 +3391,291 @@ mat4.determinant = function (a) { b08 = a20 * a33 - a23 * a30, b09 = a21 * a32 - a22 * a31, b10 = a21 * a33 - a23 * a31, - b11 = a22 * a33 - a23 * a32; - - // Calculate the determinant - return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; -}; + b11 = a22 * a33 - a23 * a32 -/** - * Multiplies two mat4's - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the first operand - * @param {mat4} b the second operand - * @returns {mat4} out - */ -mat4.multiply = function (out, a, b) { - var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3], - a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7], - a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11], - a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; - - // Cache only the current line of the second matrix - var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; - out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - - b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7]; - out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - - b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11]; - out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - - b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15]; - out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30; - out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31; - out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32; - out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; - return out; -}; + // Calculate the determinant + return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06 + } -/** - * Alias for {@link mat4.multiply} - * @function - */ -mat4.mul = mat4.multiply; + /** + * Multiplies two mat4's + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the first operand + * @param {mat4} b the second operand + * @returns {mat4} out + */ + mat4.multiply = function(out, a, b) { + var a00 = a[0], + a01 = a[1], + a02 = a[2], + a03 = a[3], + a10 = a[4], + a11 = a[5], + a12 = a[6], + a13 = a[7], + a20 = a[8], + a21 = a[9], + a22 = a[10], + a23 = a[11], + a30 = a[12], + a31 = a[13], + a32 = a[14], + a33 = a[15] + + // Cache only the current line of the second matrix + var b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3] + out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30 + out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31 + out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32 + out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33 + + b0 = b[4] + b1 = b[5] + b2 = b[6] + b3 = b[7] + out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30 + out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31 + out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32 + out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33 + + b0 = b[8] + b1 = b[9] + b2 = b[10] + b3 = b[11] + out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30 + out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31 + out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32 + out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33 + + b0 = b[12] + b1 = b[13] + b2 = b[14] + b3 = b[15] + out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30 + out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31 + out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32 + out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33 + return out + } -/** - * Translate a mat4 by the given vector - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to translate - * @param {vec3} v vector to translate by - * @returns {mat4} out - */ -mat4.translate = function (out, a, v) { - var x = v[0], y = v[1], z = v[2], - a00, a01, a02, a03, - a10, a11, a12, a13, - a20, a21, a22, a23; - - if (a === out) { - out[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; - out[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; - out[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; - out[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; - } else { - a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3]; - a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7]; - a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11]; - - out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03; - out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13; - out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23; - - out[12] = a00 * x + a10 * y + a20 * z + a[12]; - out[13] = a01 * x + a11 * y + a21 * z + a[13]; - out[14] = a02 * x + a12 * y + a22 * z + a[14]; - out[15] = a03 * x + a13 * y + a23 * z + a[15]; - } - - return out; -}; + /** + * Alias for {@link mat4.multiply} + * @function + */ + mat4.mul = mat4.multiply + + /** + * Translate a mat4 by the given vector + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to translate + * @param {vec3} v vector to translate by + * @returns {mat4} out + */ + mat4.translate = function(out, a, v) { + var x = v[0], + y = v[1], + z = v[2], + a00, + a01, + a02, + a03, + a10, + a11, + a12, + a13, + a20, + a21, + a22, + a23 + + if (a === out) { + out[12] = a[0] * x + a[4] * y + a[8] * z + a[12] + out[13] = a[1] * x + a[5] * y + a[9] * z + a[13] + out[14] = a[2] * x + a[6] * y + a[10] * z + a[14] + out[15] = a[3] * x + a[7] * y + a[11] * z + a[15] + } else { + a00 = a[0] + a01 = a[1] + a02 = a[2] + a03 = a[3] + a10 = a[4] + a11 = a[5] + a12 = a[6] + a13 = a[7] + a20 = a[8] + a21 = a[9] + a22 = a[10] + a23 = a[11] + + out[0] = a00 + out[1] = a01 + out[2] = a02 + out[3] = a03 + out[4] = a10 + out[5] = a11 + out[6] = a12 + out[7] = a13 + out[8] = a20 + out[9] = a21 + out[10] = a22 + out[11] = a23 + + out[12] = a00 * x + a10 * y + a20 * z + a[12] + out[13] = a01 * x + a11 * y + a21 * z + a[13] + out[14] = a02 * x + a12 * y + a22 * z + a[14] + out[15] = a03 * x + a13 * y + a23 * z + a[15] + } + + return out + } -/** - * Scales the mat4 by the dimensions in the given vec3 - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to scale - * @param {vec3} v the vec3 to scale the matrix by - * @returns {mat4} out - **/ -mat4.scale = function(out, a, v) { - var x = v[0], y = v[1], z = v[2]; - - out[0] = a[0] * x; - out[1] = a[1] * x; - out[2] = a[2] * x; - out[3] = a[3] * x; - out[4] = a[4] * y; - out[5] = a[5] * y; - out[6] = a[6] * y; - out[7] = a[7] * y; - out[8] = a[8] * z; - out[9] = a[9] * z; - out[10] = a[10] * z; - out[11] = a[11] * z; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - return out; -}; + /** + * Scales the mat4 by the dimensions in the given vec3 + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to scale + * @param {vec3} v the vec3 to scale the matrix by + * @returns {mat4} out + **/ + mat4.scale = function(out, a, v) { + var x = v[0], + y = v[1], + z = v[2] + + out[0] = a[0] * x + out[1] = a[1] * x + out[2] = a[2] * x + out[3] = a[3] * x + out[4] = a[4] * y + out[5] = a[5] * y + out[6] = a[6] * y + out[7] = a[7] * y + out[8] = a[8] * z + out[9] = a[9] * z + out[10] = a[10] * z + out[11] = a[11] * z + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + return out + } -/** - * Rotates a mat4 by the given angle - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @param {vec3} axis the axis to rotate around - * @returns {mat4} out - */ -mat4.rotate = function (out, a, rad, axis) { - var x = axis[0], y = axis[1], z = axis[2], + /** + * Rotates a mat4 by the given angle + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @param {vec3} axis the axis to rotate around + * @returns {mat4} out + */ + mat4.rotate = function(out, a, rad, axis) { + var x = axis[0], + y = axis[1], + z = axis[2], len = Math.sqrt(x * x + y * y + z * z), - s, c, t, - a00, a01, a02, a03, - a10, a11, a12, a13, - a20, a21, a22, a23, - b00, b01, b02, - b10, b11, b12, - b20, b21, b22; - - if (Math.abs(len) < GLMAT_EPSILON) { return null; } - - len = 1 / len; - x *= len; - y *= len; - z *= len; - - s = Math.sin(rad); - c = Math.cos(rad); - t = 1 - c; - - a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3]; - a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7]; - a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11]; - - // Construct the elements of the rotation matrix - b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s; - b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s; - b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c; - - // Perform rotation-specific matrix multiplication - out[0] = a00 * b00 + a10 * b01 + a20 * b02; - out[1] = a01 * b00 + a11 * b01 + a21 * b02; - out[2] = a02 * b00 + a12 * b01 + a22 * b02; - out[3] = a03 * b00 + a13 * b01 + a23 * b02; - out[4] = a00 * b10 + a10 * b11 + a20 * b12; - out[5] = a01 * b10 + a11 * b11 + a21 * b12; - out[6] = a02 * b10 + a12 * b11 + a22 * b12; - out[7] = a03 * b10 + a13 * b11 + a23 * b12; - out[8] = a00 * b20 + a10 * b21 + a20 * b22; - out[9] = a01 * b20 + a11 * b21 + a21 * b22; - out[10] = a02 * b20 + a12 * b21 + a22 * b22; - out[11] = a03 * b20 + a13 * b21 + a23 * b22; - - if (a !== out) { // If the source and destination differ, copy the unchanged last row - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - return out; -}; + s, + c, + t, + a00, + a01, + a02, + a03, + a10, + a11, + a12, + a13, + a20, + a21, + a22, + a23, + b00, + b01, + b02, + b10, + b11, + b12, + b20, + b21, + b22 + + if (Math.abs(len) < GLMAT_EPSILON) { + return null + } + + len = 1 / len + x *= len + y *= len + z *= len + + s = Math.sin(rad) + c = Math.cos(rad) + t = 1 - c + + a00 = a[0] + a01 = a[1] + a02 = a[2] + a03 = a[3] + a10 = a[4] + a11 = a[5] + a12 = a[6] + a13 = a[7] + a20 = a[8] + a21 = a[9] + a22 = a[10] + a23 = a[11] + + // Construct the elements of the rotation matrix + b00 = x * x * t + c + b01 = y * x * t + z * s + b02 = z * x * t - y * s + b10 = x * y * t - z * s + b11 = y * y * t + c + b12 = z * y * t + x * s + b20 = x * z * t + y * s + b21 = y * z * t - x * s + b22 = z * z * t + c + + // Perform rotation-specific matrix multiplication + out[0] = a00 * b00 + a10 * b01 + a20 * b02 + out[1] = a01 * b00 + a11 * b01 + a21 * b02 + out[2] = a02 * b00 + a12 * b01 + a22 * b02 + out[3] = a03 * b00 + a13 * b01 + a23 * b02 + out[4] = a00 * b10 + a10 * b11 + a20 * b12 + out[5] = a01 * b10 + a11 * b11 + a21 * b12 + out[6] = a02 * b10 + a12 * b11 + a22 * b12 + out[7] = a03 * b10 + a13 * b11 + a23 * b12 + out[8] = a00 * b20 + a10 * b21 + a20 * b22 + out[9] = a01 * b20 + a11 * b21 + a21 * b22 + out[10] = a02 * b20 + a12 * b21 + a22 * b22 + out[11] = a03 * b20 + a13 * b21 + a23 * b22 + + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + } + return out + } -/** - * Rotates a matrix by the given angle around the X axis - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ -mat4.rotateX = function (out, a, rad) { - var s = Math.sin(rad), + /** + * Rotates a matrix by the given angle around the X axis + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + mat4.rotateX = function(out, a, rad) { + var s = Math.sin(rad), c = Math.cos(rad), a10 = a[4], a11 = a[5], @@ -3335,41 +3684,42 @@ mat4.rotateX = function (out, a, rad) { a20 = a[8], a21 = a[9], a22 = a[10], - a23 = a[11]; - - if (a !== out) { // If the source and destination differ, copy the unchanged rows - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - - // Perform axis-specific matrix multiplication - out[4] = a10 * c + a20 * s; - out[5] = a11 * c + a21 * s; - out[6] = a12 * c + a22 * s; - out[7] = a13 * c + a23 * s; - out[8] = a20 * c - a10 * s; - out[9] = a21 * c - a11 * s; - out[10] = a22 * c - a12 * s; - out[11] = a23 * c - a13 * s; - return out; -}; + a23 = a[11] + + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[0] = a[0] + out[1] = a[1] + out[2] = a[2] + out[3] = a[3] + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + } + + // Perform axis-specific matrix multiplication + out[4] = a10 * c + a20 * s + out[5] = a11 * c + a21 * s + out[6] = a12 * c + a22 * s + out[7] = a13 * c + a23 * s + out[8] = a20 * c - a10 * s + out[9] = a21 * c - a11 * s + out[10] = a22 * c - a12 * s + out[11] = a23 * c - a13 * s + return out + } -/** - * Rotates a matrix by the given angle around the Y axis - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ -mat4.rotateY = function (out, a, rad) { - var s = Math.sin(rad), + /** + * Rotates a matrix by the given angle around the Y axis + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + mat4.rotateY = function(out, a, rad) { + var s = Math.sin(rad), c = Math.cos(rad), a00 = a[0], a01 = a[1], @@ -3378,41 +3728,42 @@ mat4.rotateY = function (out, a, rad) { a20 = a[8], a21 = a[9], a22 = a[10], - a23 = a[11]; - - if (a !== out) { // If the source and destination differ, copy the unchanged rows - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - - // Perform axis-specific matrix multiplication - out[0] = a00 * c - a20 * s; - out[1] = a01 * c - a21 * s; - out[2] = a02 * c - a22 * s; - out[3] = a03 * c - a23 * s; - out[8] = a00 * s + a20 * c; - out[9] = a01 * s + a21 * c; - out[10] = a02 * s + a22 * c; - out[11] = a03 * s + a23 * c; - return out; -}; + a23 = a[11] + + if (a !== out) { + // If the source and destination differ, copy the unchanged rows + out[4] = a[4] + out[5] = a[5] + out[6] = a[6] + out[7] = a[7] + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + } + + // Perform axis-specific matrix multiplication + out[0] = a00 * c - a20 * s + out[1] = a01 * c - a21 * s + out[2] = a02 * c - a22 * s + out[3] = a03 * c - a23 * s + out[8] = a00 * s + a20 * c + out[9] = a01 * s + a21 * c + out[10] = a02 * s + a22 * c + out[11] = a03 * s + a23 * c + return out + } -/** - * Rotates a matrix by the given angle around the Z axis - * - * @param {mat4} out the receiving matrix - * @param {mat4} a the matrix to rotate - * @param {Number} rad the angle to rotate the matrix by - * @returns {mat4} out - */ -mat4.rotateZ = function (out, a, rad) { - var s = Math.sin(rad), + /** + * Rotates a matrix by the given angle around the Z axis + * + * @param {mat4} out the receiving matrix + * @param {mat4} a the matrix to rotate + * @param {Number} rad the angle to rotate the matrix by + * @returns {mat4} out + */ + mat4.rotateZ = function(out, a, rad) { + var s = Math.sin(rad), c = Math.cos(rad), a00 = a[0], a01 = a[1], @@ -3421,53 +3772,56 @@ mat4.rotateZ = function (out, a, rad) { a10 = a[4], a11 = a[5], a12 = a[6], - a13 = a[7]; - - if (a !== out) { // If the source and destination differ, copy the unchanged last row - out[8] = a[8]; - out[9] = a[9]; - out[10] = a[10]; - out[11] = a[11]; - out[12] = a[12]; - out[13] = a[13]; - out[14] = a[14]; - out[15] = a[15]; - } - - // Perform axis-specific matrix multiplication - out[0] = a00 * c + a10 * s; - out[1] = a01 * c + a11 * s; - out[2] = a02 * c + a12 * s; - out[3] = a03 * c + a13 * s; - out[4] = a10 * c - a00 * s; - out[5] = a11 * c - a01 * s; - out[6] = a12 * c - a02 * s; - out[7] = a13 * c - a03 * s; - return out; -}; + a13 = a[7] + + if (a !== out) { + // If the source and destination differ, copy the unchanged last row + out[8] = a[8] + out[9] = a[9] + out[10] = a[10] + out[11] = a[11] + out[12] = a[12] + out[13] = a[13] + out[14] = a[14] + out[15] = a[15] + } + + // Perform axis-specific matrix multiplication + out[0] = a00 * c + a10 * s + out[1] = a01 * c + a11 * s + out[2] = a02 * c + a12 * s + out[3] = a03 * c + a13 * s + out[4] = a10 * c - a00 * s + out[5] = a11 * c - a01 * s + out[6] = a12 * c - a02 * s + out[7] = a13 * c - a03 * s + return out + } -/** - * Creates a matrix from a quaternion rotation and vector translation - * This is equivalent to (but much faster than): - * - * mat4.identity(dest); - * mat4.translate(dest, vec); - * var quatMat = mat4.create(); - * quat4.toMat4(quat, quatMat); - * mat4.multiply(dest, quatMat); - * - * @param {mat4} out mat4 receiving operation result - * @param {quat4} q Rotation quaternion - * @param {vec3} v Translation vector - * @returns {mat4} out - */ -mat4.fromRotationTranslation = function (out, q, v) { - // Quaternion math - var x = q[0], y = q[1], z = q[2], w = q[3], + /** + * Creates a matrix from a quaternion rotation and vector translation + * This is equivalent to (but much faster than): + * + * mat4.identity(dest); + * mat4.translate(dest, vec); + * var quatMat = mat4.create(); + * quat4.toMat4(quat, quatMat); + * mat4.multiply(dest, quatMat); + * + * @param {mat4} out mat4 receiving operation result + * @param {quat4} q Rotation quaternion + * @param {vec3} v Translation vector + * @returns {mat4} out + */ + mat4.fromRotationTranslation = function(out, q, v) { + // Quaternion math + var x = q[0], + y = q[1], + z = q[2], + w = q[3], x2 = x + x, y2 = y + y, z2 = z + z, - xx = x * x2, xy = x * y2, xz = x * z2, @@ -3476,34 +3830,36 @@ mat4.fromRotationTranslation = function (out, q, v) { zz = z * z2, wx = w * x2, wy = w * y2, - wz = w * z2; - - out[0] = 1 - (yy + zz); - out[1] = xy + wz; - out[2] = xz - wy; - out[3] = 0; - out[4] = xy - wz; - out[5] = 1 - (xx + zz); - out[6] = yz + wx; - out[7] = 0; - out[8] = xz + wy; - out[9] = yz - wx; - out[10] = 1 - (xx + yy); - out[11] = 0; - out[12] = v[0]; - out[13] = v[1]; - out[14] = v[2]; - out[15] = 1; - - return out; -}; - -mat4.fromQuat = function (out, q) { - var x = q[0], y = q[1], z = q[2], w = q[3], + wz = w * z2 + + out[0] = 1 - (yy + zz) + out[1] = xy + wz + out[2] = xz - wy + out[3] = 0 + out[4] = xy - wz + out[5] = 1 - (xx + zz) + out[6] = yz + wx + out[7] = 0 + out[8] = xz + wy + out[9] = yz - wx + out[10] = 1 - (xx + yy) + out[11] = 0 + out[12] = v[0] + out[13] = v[1] + out[14] = v[2] + out[15] = 1 + + return out + } + + mat4.fromQuat = function(out, q) { + var x = q[0], + y = q[1], + z = q[2], + w = q[3], x2 = x + x, y2 = y + y, z2 = z + z, - xx = x * x2, yx = y * x2, yy = y * y2, @@ -3512,144 +3868,153 @@ mat4.fromQuat = function (out, q) { zz = z * z2, wx = w * x2, wy = w * y2, - wz = w * z2; + wz = w * z2 - out[0] = 1 - yy - zz; - out[1] = yx + wz; - out[2] = zx - wy; - out[3] = 0; + out[0] = 1 - yy - zz + out[1] = yx + wz + out[2] = zx - wy + out[3] = 0 - out[4] = yx - wz; - out[5] = 1 - xx - zz; - out[6] = zy + wx; - out[7] = 0; + out[4] = yx - wz + out[5] = 1 - xx - zz + out[6] = zy + wx + out[7] = 0 - out[8] = zx + wy; - out[9] = zy - wx; - out[10] = 1 - xx - yy; - out[11] = 0; + out[8] = zx + wy + out[9] = zy - wx + out[10] = 1 - xx - yy + out[11] = 0 - out[12] = 0; - out[13] = 0; - out[14] = 0; - out[15] = 1; + out[12] = 0 + out[13] = 0 + out[14] = 0 + out[15] = 1 - return out; -}; + return out + } -/** - * Generates a frustum matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {Number} left Left bound of the frustum - * @param {Number} right Right bound of the frustum - * @param {Number} bottom Bottom bound of the frustum - * @param {Number} top Top bound of the frustum - * @param {Number} near Near bound of the frustum - * @param {Number} far Far bound of the frustum - * @returns {mat4} out - */ -mat4.frustum = function (out, left, right, bottom, top, near, far) { - var rl = 1 / (right - left), + /** + * Generates a frustum matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {Number} left Left bound of the frustum + * @param {Number} right Right bound of the frustum + * @param {Number} bottom Bottom bound of the frustum + * @param {Number} top Top bound of the frustum + * @param {Number} near Near bound of the frustum + * @param {Number} far Far bound of the frustum + * @returns {mat4} out + */ + mat4.frustum = function(out, left, right, bottom, top, near, far) { + var rl = 1 / (right - left), tb = 1 / (top - bottom), - nf = 1 / (near - far); - out[0] = (near * 2) * rl; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = (near * 2) * tb; - out[6] = 0; - out[7] = 0; - out[8] = (right + left) * rl; - out[9] = (top + bottom) * tb; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = (far * near * 2) * nf; - out[15] = 0; - return out; -}; + nf = 1 / (near - far) + out[0] = near * 2 * rl + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 0 + out[5] = near * 2 * tb + out[6] = 0 + out[7] = 0 + out[8] = (right + left) * rl + out[9] = (top + bottom) * tb + out[10] = (far + near) * nf + out[11] = -1 + out[12] = 0 + out[13] = 0 + out[14] = far * near * 2 * nf + out[15] = 0 + return out + } -/** - * Generates a perspective projection matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} fovy Vertical field of view in radians - * @param {number} aspect Aspect ratio. typically viewport width/height - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ -mat4.perspective = function (out, fovy, aspect, near, far) { - var f = 1.0 / Math.tan(fovy / 2), - nf = 1 / (near - far); - out[0] = f / aspect; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = f; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = (far + near) * nf; - out[11] = -1; - out[12] = 0; - out[13] = 0; - out[14] = (2 * far * near) * nf; - out[15] = 0; - return out; -}; + /** + * Generates a perspective projection matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} fovy Vertical field of view in radians + * @param {number} aspect Aspect ratio. typically viewport width/height + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ + mat4.perspective = function(out, fovy, aspect, near, far) { + var f = 1.0 / Math.tan(fovy / 2), + nf = 1 / (near - far) + out[0] = f / aspect + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 0 + out[5] = f + out[6] = 0 + out[7] = 0 + out[8] = 0 + out[9] = 0 + out[10] = (far + near) * nf + out[11] = -1 + out[12] = 0 + out[13] = 0 + out[14] = 2 * far * near * nf + out[15] = 0 + return out + } -/** - * Generates a orthogonal projection matrix with the given bounds - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {number} left Left bound of the frustum - * @param {number} right Right bound of the frustum - * @param {number} bottom Bottom bound of the frustum - * @param {number} top Top bound of the frustum - * @param {number} near Near bound of the frustum - * @param {number} far Far bound of the frustum - * @returns {mat4} out - */ -mat4.ortho = function (out, left, right, bottom, top, near, far) { - var lr = 1 / (left - right), + /** + * Generates a orthogonal projection matrix with the given bounds + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {number} left Left bound of the frustum + * @param {number} right Right bound of the frustum + * @param {number} bottom Bottom bound of the frustum + * @param {number} top Top bound of the frustum + * @param {number} near Near bound of the frustum + * @param {number} far Far bound of the frustum + * @returns {mat4} out + */ + mat4.ortho = function(out, left, right, bottom, top, near, far) { + var lr = 1 / (left - right), bt = 1 / (bottom - top), - nf = 1 / (near - far); - out[0] = -2 * lr; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 0; - out[5] = -2 * bt; - out[6] = 0; - out[7] = 0; - out[8] = 0; - out[9] = 0; - out[10] = 2 * nf; - out[11] = 0; - out[12] = (left + right) * lr; - out[13] = (top + bottom) * bt; - out[14] = (far + near) * nf; - out[15] = 1; - return out; -}; + nf = 1 / (near - far) + out[0] = -2 * lr + out[1] = 0 + out[2] = 0 + out[3] = 0 + out[4] = 0 + out[5] = -2 * bt + out[6] = 0 + out[7] = 0 + out[8] = 0 + out[9] = 0 + out[10] = 2 * nf + out[11] = 0 + out[12] = (left + right) * lr + out[13] = (top + bottom) * bt + out[14] = (far + near) * nf + out[15] = 1 + return out + } -/** - * Generates a look-at matrix with the given eye position, focal point, and up axis - * - * @param {mat4} out mat4 frustum matrix will be written into - * @param {vec3} eye Position of the viewer - * @param {vec3} center Point the viewer is looking at - * @param {vec3} up vec3 pointing up - * @returns {mat4} out - */ -mat4.lookAt = function (out, eye, center, up) { - var x0, x1, x2, y0, y1, y2, z0, z1, z2, len, + /** + * Generates a look-at matrix with the given eye position, focal point, and up axis + * + * @param {mat4} out mat4 frustum matrix will be written into + * @param {vec3} eye Position of the viewer + * @param {vec3} center Point the viewer is looking at + * @param {vec3} up vec3 pointing up + * @returns {mat4} out + */ + mat4.lookAt = function(out, eye, center, up) { + var x0, + x1, + x2, + y0, + y1, + y2, + z0, + z1, + z2, + len, eyex = eye[0], eyey = eye[1], eyez = eye[2], @@ -3658,103 +4023,151 @@ mat4.lookAt = function (out, eye, center, up) { upz = up[2], centerx = center[0], centery = center[1], - centerz = center[2]; + centerz = center[2] - if (Math.abs(eyex - centerx) < GLMAT_EPSILON && + if ( + Math.abs(eyex - centerx) < GLMAT_EPSILON && Math.abs(eyey - centery) < GLMAT_EPSILON && - Math.abs(eyez - centerz) < GLMAT_EPSILON) { - return mat4.identity(out); - } - - z0 = eyex - centerx; - z1 = eyey - centery; - z2 = eyez - centerz; - - len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); - z0 *= len; - z1 *= len; - z2 *= len; - - x0 = upy * z2 - upz * z1; - x1 = upz * z0 - upx * z2; - x2 = upx * z1 - upy * z0; - len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); - if (!len) { - x0 = 0; - x1 = 0; - x2 = 0; - } else { - len = 1 / len; - x0 *= len; - x1 *= len; - x2 *= len; - } - - y0 = z1 * x2 - z2 * x1; - y1 = z2 * x0 - z0 * x2; - y2 = z0 * x1 - z1 * x0; - - len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); - if (!len) { - y0 = 0; - y1 = 0; - y2 = 0; - } else { - len = 1 / len; - y0 *= len; - y1 *= len; - y2 *= len; - } - - out[0] = x0; - out[1] = y0; - out[2] = z0; - out[3] = 0; - out[4] = x1; - out[5] = y1; - out[6] = z1; - out[7] = 0; - out[8] = x2; - out[9] = y2; - out[10] = z2; - out[11] = 0; - out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); - out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); - out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); - out[15] = 1; - - return out; -}; - -/** - * Returns a string representation of a mat4 - * - * @param {mat4} mat matrix to represent as a string - * @returns {String} string representation of the matrix - */ -mat4.str = function (a) { - return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' + - a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' + - a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + - a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')'; -}; + Math.abs(eyez - centerz) < GLMAT_EPSILON + ) { + return mat4.identity(out) + } + + z0 = eyex - centerx + z1 = eyey - centery + z2 = eyez - centerz + + len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2) + z0 *= len + z1 *= len + z2 *= len + + x0 = upy * z2 - upz * z1 + x1 = upz * z0 - upx * z2 + x2 = upx * z1 - upy * z0 + len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2) + if (!len) { + x0 = 0 + x1 = 0 + x2 = 0 + } else { + len = 1 / len + x0 *= len + x1 *= len + x2 *= len + } + + y0 = z1 * x2 - z2 * x1 + y1 = z2 * x0 - z0 * x2 + y2 = z0 * x1 - z1 * x0 + + len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2) + if (!len) { + y0 = 0 + y1 = 0 + y2 = 0 + } else { + len = 1 / len + y0 *= len + y1 *= len + y2 *= len + } + + out[0] = x0 + out[1] = y0 + out[2] = z0 + out[3] = 0 + out[4] = x1 + out[5] = y1 + out[6] = z1 + out[7] = 0 + out[8] = x2 + out[9] = y2 + out[10] = z2 + out[11] = 0 + out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez) + out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez) + out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez) + out[15] = 1 + + return out + } -/** - * Returns Frobenius norm of a mat4 - * - * @param {mat4} a the matrix to calculate Frobenius norm of - * @returns {Number} Frobenius norm - */ -mat4.frob = function (a) { - return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) )) -}; + /** + * Returns a string representation of a mat4 + * + * @param {mat4} mat matrix to represent as a string + * @returns {String} string representation of the matrix + */ + mat4.str = function(a) { + return ( + 'mat4(' + + a[0] + + ', ' + + a[1] + + ', ' + + a[2] + + ', ' + + a[3] + + ', ' + + a[4] + + ', ' + + a[5] + + ', ' + + a[6] + + ', ' + + a[7] + + ', ' + + a[8] + + ', ' + + a[9] + + ', ' + + a[10] + + ', ' + + a[11] + + ', ' + + a[12] + + ', ' + + a[13] + + ', ' + + a[14] + + ', ' + + a[15] + + ')' + ) + } + /** + * Returns Frobenius norm of a mat4 + * + * @param {mat4} a the matrix to calculate Frobenius norm of + * @returns {Number} Frobenius norm + */ + mat4.frob = function(a) { + return Math.sqrt( + Math.pow(a[0], 2) + + Math.pow(a[1], 2) + + Math.pow(a[2], 2) + + Math.pow(a[3], 2) + + Math.pow(a[4], 2) + + Math.pow(a[5], 2) + + Math.pow(a[6], 2) + + Math.pow(a[7], 2) + + Math.pow(a[8], 2) + + Math.pow(a[9], 2) + + Math.pow(a[10], 2) + + Math.pow(a[11], 2) + + Math.pow(a[12], 2) + + Math.pow(a[13], 2) + + Math.pow(a[14], 2) + + Math.pow(a[15], 2) + ) + } -if(typeof(exports) !== 'undefined') { - exports.mat4 = mat4; -} -; -/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. + if (typeof exports !== 'undefined') { + exports.mat4 = mat4 + } + /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -3776,526 +4189,538 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @class Quaternion - * @name quat - */ - -var quat = {}; - -/** - * Creates a new identity quat - * - * @returns {quat} a new quaternion - */ -quat.create = function() { - var out = new GLMAT_ARRAY_TYPE(4); - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; - -/** - * Sets a quaternion to represent the shortest rotation from one - * vector to another. - * - * Both vectors are assumed to be unit length. - * - * @param {quat} out the receiving quaternion. - * @param {vec3} a the initial vector - * @param {vec3} b the destination vector - * @returns {quat} out - */ -quat.rotationTo = (function() { - var tmpvec3 = vec3.create(); - var xUnitVec3 = vec3.fromValues(1,0,0); - var yUnitVec3 = vec3.fromValues(0,1,0); + /** + * @class Quaternion + * @name quat + */ + + var quat = {} + + /** + * Creates a new identity quat + * + * @returns {quat} a new quaternion + */ + quat.create = function() { + var out = new GLMAT_ARRAY_TYPE(4) + out[0] = 0 + out[1] = 0 + out[2] = 0 + out[3] = 1 + return out + } - return function(out, a, b) { - var dot = vec3.dot(a, b); + /** + * Sets a quaternion to represent the shortest rotation from one + * vector to another. + * + * Both vectors are assumed to be unit length. + * + * @param {quat} out the receiving quaternion. + * @param {vec3} a the initial vector + * @param {vec3} b the destination vector + * @returns {quat} out + */ + quat.rotationTo = (function() { + var tmpvec3 = vec3.create() + var xUnitVec3 = vec3.fromValues(1, 0, 0) + var yUnitVec3 = vec3.fromValues(0, 1, 0) + + return function(out, a, b) { + var dot = vec3.dot(a, b) if (dot < -0.999999) { - vec3.cross(tmpvec3, xUnitVec3, a); - if (vec3.length(tmpvec3) < 0.000001) - vec3.cross(tmpvec3, yUnitVec3, a); - vec3.normalize(tmpvec3, tmpvec3); - quat.setAxisAngle(out, tmpvec3, Math.PI); - return out; + vec3.cross(tmpvec3, xUnitVec3, a) + if (vec3.length(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a) + vec3.normalize(tmpvec3, tmpvec3) + quat.setAxisAngle(out, tmpvec3, Math.PI) + return out } else if (dot > 0.999999) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; + out[0] = 0 + out[1] = 0 + out[2] = 0 + out[3] = 1 + return out } else { - vec3.cross(tmpvec3, a, b); - out[0] = tmpvec3[0]; - out[1] = tmpvec3[1]; - out[2] = tmpvec3[2]; - out[3] = 1 + dot; - return quat.normalize(out, out); + vec3.cross(tmpvec3, a, b) + out[0] = tmpvec3[0] + out[1] = tmpvec3[1] + out[2] = tmpvec3[2] + out[3] = 1 + dot + return quat.normalize(out, out) } - }; -})(); - -/** - * Sets the specified quaternion with values corresponding to the given - * axes. Each axis is a vec3 and is expected to be unit length and - * perpendicular to all other specified axes. - * - * @param {vec3} view the vector representing the viewing direction - * @param {vec3} right the vector representing the local "right" direction - * @param {vec3} up the vector representing the local "up" direction - * @returns {quat} out - */ -quat.setAxes = (function() { - var matr = mat3.create(); - - return function(out, view, right, up) { - matr[0] = right[0]; - matr[3] = right[1]; - matr[6] = right[2]; - - matr[1] = up[0]; - matr[4] = up[1]; - matr[7] = up[2]; - - matr[2] = -view[0]; - matr[5] = -view[1]; - matr[8] = -view[2]; - - return quat.normalize(out, quat.fromMat3(out, matr)); - }; -})(); - -/** - * Creates a new quat initialized with values from an existing quaternion - * - * @param {quat} a quaternion to clone - * @returns {quat} a new quaternion - * @function - */ -quat.clone = vec4.clone; - -/** - * Creates a new quat initialized with the given values - * - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} a new quaternion - * @function - */ -quat.fromValues = vec4.fromValues; - -/** - * Copy the values from one quat to another - * - * @param {quat} out the receiving quaternion - * @param {quat} a the source quaternion - * @returns {quat} out - * @function - */ -quat.copy = vec4.copy; - -/** - * Set the components of a quat to the given values - * - * @param {quat} out the receiving quaternion - * @param {Number} x X component - * @param {Number} y Y component - * @param {Number} z Z component - * @param {Number} w W component - * @returns {quat} out - * @function - */ -quat.set = vec4.set; - -/** - * Set a quat to the identity quaternion - * - * @param {quat} out the receiving quaternion - * @returns {quat} out - */ -quat.identity = function(out) { - out[0] = 0; - out[1] = 0; - out[2] = 0; - out[3] = 1; - return out; -}; - -/** - * Sets a quat from the given angle and rotation axis, - * then returns it. - * - * @param {quat} out the receiving quaternion - * @param {vec3} axis the axis around which to rotate - * @param {Number} rad the angle in radians - * @returns {quat} out - **/ -quat.setAxisAngle = function(out, axis, rad) { - rad = rad * 0.5; - var s = Math.sin(rad); - out[0] = s * axis[0]; - out[1] = s * axis[1]; - out[2] = s * axis[2]; - out[3] = Math.cos(rad); - return out; -}; - -/** - * Adds two quat's - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @returns {quat} out - * @function - */ -quat.add = vec4.add; - -/** - * Multiplies two quat's - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @returns {quat} out - */ -quat.multiply = function(out, a, b) { - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bx = b[0], by = b[1], bz = b[2], bw = b[3]; - - out[0] = ax * bw + aw * bx + ay * bz - az * by; - out[1] = ay * bw + aw * by + az * bx - ax * bz; - out[2] = az * bw + aw * bz + ax * by - ay * bx; - out[3] = aw * bw - ax * bx - ay * by - az * bz; - return out; -}; - -/** - * Alias for {@link quat.multiply} - * @function - */ -quat.mul = quat.multiply; - -/** - * Scales a quat by a scalar number - * - * @param {quat} out the receiving vector - * @param {quat} a the vector to scale - * @param {Number} b amount to scale the vector by - * @returns {quat} out - * @function - */ -quat.scale = vec4.scale; - -/** - * Rotates a quaternion by the given angle about the X axis - * - * @param {quat} out quat receiving operation result - * @param {quat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ -quat.rotateX = function (out, a, rad) { - rad *= 0.5; - - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bx = Math.sin(rad), bw = Math.cos(rad); - - out[0] = ax * bw + aw * bx; - out[1] = ay * bw + az * bx; - out[2] = az * bw - ay * bx; - out[3] = aw * bw - ax * bx; - return out; -}; - -/** - * Rotates a quaternion by the given angle about the Y axis - * - * @param {quat} out quat receiving operation result - * @param {quat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ -quat.rotateY = function (out, a, rad) { - rad *= 0.5; - - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - by = Math.sin(rad), bw = Math.cos(rad); - - out[0] = ax * bw - az * by; - out[1] = ay * bw + aw * by; - out[2] = az * bw + ax * by; - out[3] = aw * bw - ay * by; - return out; -}; + } + })() + + /** + * Sets the specified quaternion with values corresponding to the given + * axes. Each axis is a vec3 and is expected to be unit length and + * perpendicular to all other specified axes. + * + * @param {vec3} view the vector representing the viewing direction + * @param {vec3} right the vector representing the local "right" direction + * @param {vec3} up the vector representing the local "up" direction + * @returns {quat} out + */ + quat.setAxes = (function() { + var matr = mat3.create() + + return function(out, view, right, up) { + matr[0] = right[0] + matr[3] = right[1] + matr[6] = right[2] + + matr[1] = up[0] + matr[4] = up[1] + matr[7] = up[2] + + matr[2] = -view[0] + matr[5] = -view[1] + matr[8] = -view[2] + + return quat.normalize(out, quat.fromMat3(out, matr)) + } + })() + + /** + * Creates a new quat initialized with values from an existing quaternion + * + * @param {quat} a quaternion to clone + * @returns {quat} a new quaternion + * @function + */ + quat.clone = vec4.clone + + /** + * Creates a new quat initialized with the given values + * + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} a new quaternion + * @function + */ + quat.fromValues = vec4.fromValues + + /** + * Copy the values from one quat to another + * + * @param {quat} out the receiving quaternion + * @param {quat} a the source quaternion + * @returns {quat} out + * @function + */ + quat.copy = vec4.copy + + /** + * Set the components of a quat to the given values + * + * @param {quat} out the receiving quaternion + * @param {Number} x X component + * @param {Number} y Y component + * @param {Number} z Z component + * @param {Number} w W component + * @returns {quat} out + * @function + */ + quat.set = vec4.set + + /** + * Set a quat to the identity quaternion + * + * @param {quat} out the receiving quaternion + * @returns {quat} out + */ + quat.identity = function(out) { + out[0] = 0 + out[1] = 0 + out[2] = 0 + out[3] = 1 + return out + } -/** - * Rotates a quaternion by the given angle about the Z axis - * - * @param {quat} out quat receiving operation result - * @param {quat} a quat to rotate - * @param {number} rad angle (in radians) to rotate - * @returns {quat} out - */ -quat.rotateZ = function (out, a, rad) { - rad *= 0.5; + /** + * Sets a quat from the given angle and rotation axis, + * then returns it. + * + * @param {quat} out the receiving quaternion + * @param {vec3} axis the axis around which to rotate + * @param {Number} rad the angle in radians + * @returns {quat} out + **/ + quat.setAxisAngle = function(out, axis, rad) { + rad = rad * 0.5 + var s = Math.sin(rad) + out[0] = s * axis[0] + out[1] = s * axis[1] + out[2] = s * axis[2] + out[3] = Math.cos(rad) + return out + } - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bz = Math.sin(rad), bw = Math.cos(rad); + /** + * Adds two quat's + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @returns {quat} out + * @function + */ + quat.add = vec4.add + + /** + * Multiplies two quat's + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @returns {quat} out + */ + quat.multiply = function(out, a, b) { + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3], + bx = b[0], + by = b[1], + bz = b[2], + bw = b[3] + + out[0] = ax * bw + aw * bx + ay * bz - az * by + out[1] = ay * bw + aw * by + az * bx - ax * bz + out[2] = az * bw + aw * bz + ax * by - ay * bx + out[3] = aw * bw - ax * bx - ay * by - az * bz + return out + } - out[0] = ax * bw + ay * bz; - out[1] = ay * bw - ax * bz; - out[2] = az * bw + aw * bz; - out[3] = aw * bw - az * bz; - return out; -}; + /** + * Alias for {@link quat.multiply} + * @function + */ + quat.mul = quat.multiply + + /** + * Scales a quat by a scalar number + * + * @param {quat} out the receiving vector + * @param {quat} a the vector to scale + * @param {Number} b amount to scale the vector by + * @returns {quat} out + * @function + */ + quat.scale = vec4.scale + + /** + * Rotates a quaternion by the given angle about the X axis + * + * @param {quat} out quat receiving operation result + * @param {quat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ + quat.rotateX = function(out, a, rad) { + rad *= 0.5 + + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3], + bx = Math.sin(rad), + bw = Math.cos(rad) + + out[0] = ax * bw + aw * bx + out[1] = ay * bw + az * bx + out[2] = az * bw - ay * bx + out[3] = aw * bw - ax * bx + return out + } -/** - * Calculates the W component of a quat from the X, Y, and Z components. - * Assumes that quaternion is 1 unit in length. - * Any existing W component will be ignored. - * - * @param {quat} out the receiving quaternion - * @param {quat} a quat to calculate W component of - * @returns {quat} out - */ -quat.calculateW = function (out, a) { - var x = a[0], y = a[1], z = a[2]; + /** + * Rotates a quaternion by the given angle about the Y axis + * + * @param {quat} out quat receiving operation result + * @param {quat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ + quat.rotateY = function(out, a, rad) { + rad *= 0.5 + + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3], + by = Math.sin(rad), + bw = Math.cos(rad) + + out[0] = ax * bw - az * by + out[1] = ay * bw + aw * by + out[2] = az * bw + ax * by + out[3] = aw * bw - ay * by + return out + } - out[0] = x; - out[1] = y; - out[2] = z; - out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)); - return out; -}; + /** + * Rotates a quaternion by the given angle about the Z axis + * + * @param {quat} out quat receiving operation result + * @param {quat} a quat to rotate + * @param {number} rad angle (in radians) to rotate + * @returns {quat} out + */ + quat.rotateZ = function(out, a, rad) { + rad *= 0.5 + + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3], + bz = Math.sin(rad), + bw = Math.cos(rad) + + out[0] = ax * bw + ay * bz + out[1] = ay * bw - ax * bz + out[2] = az * bw + aw * bz + out[3] = aw * bw - az * bz + return out + } -/** - * Calculates the dot product of two quat's - * - * @param {quat} a the first operand - * @param {quat} b the second operand - * @returns {Number} dot product of a and b - * @function - */ -quat.dot = vec4.dot; + /** + * Calculates the W component of a quat from the X, Y, and Z components. + * Assumes that quaternion is 1 unit in length. + * Any existing W component will be ignored. + * + * @param {quat} out the receiving quaternion + * @param {quat} a quat to calculate W component of + * @returns {quat} out + */ + quat.calculateW = function(out, a) { + var x = a[0], + y = a[1], + z = a[2] -/** - * Performs a linear interpolation between two quat's - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {quat} out - * @function - */ -quat.lerp = vec4.lerp; + out[0] = x + out[1] = y + out[2] = z + out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z)) + return out + } -/** - * Performs a spherical linear interpolation between two quat - * - * @param {quat} out the receiving quaternion - * @param {quat} a the first operand - * @param {quat} b the second operand - * @param {Number} t interpolation amount between the two inputs - * @returns {quat} out - */ -quat.slerp = function (out, a, b, t) { - // benchmarks: - // http://jsperf.com/quaternion-slerp-implementations - - var ax = a[0], ay = a[1], az = a[2], aw = a[3], - bx = b[0], by = b[1], bz = b[2], bw = b[3]; - - var omega, cosom, sinom, scale0, scale1; - - // calc cosine - cosom = ax * bx + ay * by + az * bz + aw * bw; - // adjust signs (if necessary) - if ( cosom < 0.0 ) { - cosom = -cosom; - bx = - bx; - by = - by; - bz = - bz; - bw = - bw; - } - // calculate coefficients - if ( (1.0 - cosom) > 0.000001 ) { + /** + * Calculates the dot product of two quat's + * + * @param {quat} a the first operand + * @param {quat} b the second operand + * @returns {Number} dot product of a and b + * @function + */ + quat.dot = vec4.dot + + /** + * Performs a linear interpolation between two quat's + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {quat} out + * @function + */ + quat.lerp = vec4.lerp + + /** + * Performs a spherical linear interpolation between two quat + * + * @param {quat} out the receiving quaternion + * @param {quat} a the first operand + * @param {quat} b the second operand + * @param {Number} t interpolation amount between the two inputs + * @returns {quat} out + */ + quat.slerp = function(out, a, b, t) { + // benchmarks: + // http://jsperf.com/quaternion-slerp-implementations + + var ax = a[0], + ay = a[1], + az = a[2], + aw = a[3], + bx = b[0], + by = b[1], + bz = b[2], + bw = b[3] + + var omega, cosom, sinom, scale0, scale1 + + // calc cosine + cosom = ax * bx + ay * by + az * bz + aw * bw + // adjust signs (if necessary) + if (cosom < 0.0) { + cosom = -cosom + bx = -bx + by = -by + bz = -bz + bw = -bw + } + // calculate coefficients + if (1.0 - cosom > 0.000001) { // standard case (slerp) - omega = Math.acos(cosom); - sinom = Math.sin(omega); - scale0 = Math.sin((1.0 - t) * omega) / sinom; - scale1 = Math.sin(t * omega) / sinom; - } else { - // "from" and "to" quaternions are very close + omega = Math.acos(cosom) + sinom = Math.sin(omega) + scale0 = Math.sin((1.0 - t) * omega) / sinom + scale1 = Math.sin(t * omega) / sinom + } else { + // "from" and "to" quaternions are very close // ... so we can do a linear interpolation - scale0 = 1.0 - t; - scale1 = t; - } - // calculate final values - out[0] = scale0 * ax + scale1 * bx; - out[1] = scale0 * ay + scale1 * by; - out[2] = scale0 * az + scale1 * bz; - out[3] = scale0 * aw + scale1 * bw; - - return out; -}; - -/** - * Calculates the inverse of a quat - * - * @param {quat} out the receiving quaternion - * @param {quat} a quat to calculate inverse of - * @returns {quat} out - */ -quat.invert = function(out, a) { - var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], - dot = a0*a0 + a1*a1 + a2*a2 + a3*a3, - invDot = dot ? 1.0/dot : 0; - - // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 - - out[0] = -a0*invDot; - out[1] = -a1*invDot; - out[2] = -a2*invDot; - out[3] = a3*invDot; - return out; -}; - -/** - * Calculates the conjugate of a quat - * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. - * - * @param {quat} out the receiving quaternion - * @param {quat} a quat to calculate conjugate of - * @returns {quat} out - */ -quat.conjugate = function (out, a) { - out[0] = -a[0]; - out[1] = -a[1]; - out[2] = -a[2]; - out[3] = a[3]; - return out; -}; - -/** - * Calculates the length of a quat - * - * @param {quat} a vector to calculate length of - * @returns {Number} length of a - * @function - */ -quat.length = vec4.length; - -/** - * Alias for {@link quat.length} - * @function - */ -quat.len = quat.length; - -/** - * Calculates the squared length of a quat - * - * @param {quat} a vector to calculate squared length of - * @returns {Number} squared length of a - * @function - */ -quat.squaredLength = vec4.squaredLength; - -/** - * Alias for {@link quat.squaredLength} - * @function - */ -quat.sqrLen = quat.squaredLength; + scale0 = 1.0 - t + scale1 = t + } + // calculate final values + out[0] = scale0 * ax + scale1 * bx + out[1] = scale0 * ay + scale1 * by + out[2] = scale0 * az + scale1 * bz + out[3] = scale0 * aw + scale1 * bw + + return out + } -/** - * Normalize a quat - * - * @param {quat} out the receiving quaternion - * @param {quat} a quaternion to normalize - * @returns {quat} out - * @function - */ -quat.normalize = vec4.normalize; + /** + * Calculates the inverse of a quat + * + * @param {quat} out the receiving quaternion + * @param {quat} a quat to calculate inverse of + * @returns {quat} out + */ + quat.invert = function(out, a) { + var a0 = a[0], + a1 = a[1], + a2 = a[2], + a3 = a[3], + dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3, + invDot = dot ? 1.0 / dot : 0 + + // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 + + out[0] = -a0 * invDot + out[1] = -a1 * invDot + out[2] = -a2 * invDot + out[3] = a3 * invDot + return out + } -/** - * Creates a quaternion from the given 3x3 rotation matrix. - * - * NOTE: The resultant quaternion is not normalized, so you should be sure - * to renormalize the quaternion yourself where necessary. - * - * @param {quat} out the receiving quaternion - * @param {mat3} m rotation matrix - * @returns {quat} out - * @function - */ -quat.fromMat3 = function(out, m) { - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - var fTrace = m[0] + m[4] + m[8]; - var fRoot; + /** + * Calculates the conjugate of a quat + * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result. + * + * @param {quat} out the receiving quaternion + * @param {quat} a quat to calculate conjugate of + * @returns {quat} out + */ + quat.conjugate = function(out, a) { + out[0] = -a[0] + out[1] = -a[1] + out[2] = -a[2] + out[3] = a[3] + return out + } - if ( fTrace > 0.0 ) { + /** + * Calculates the length of a quat + * + * @param {quat} a vector to calculate length of + * @returns {Number} length of a + * @function + */ + quat.length = vec4.length + + /** + * Alias for {@link quat.length} + * @function + */ + quat.len = quat.length + + /** + * Calculates the squared length of a quat + * + * @param {quat} a vector to calculate squared length of + * @returns {Number} squared length of a + * @function + */ + quat.squaredLength = vec4.squaredLength + + /** + * Alias for {@link quat.squaredLength} + * @function + */ + quat.sqrLen = quat.squaredLength + + /** + * Normalize a quat + * + * @param {quat} out the receiving quaternion + * @param {quat} a quaternion to normalize + * @returns {quat} out + * @function + */ + quat.normalize = vec4.normalize + + /** + * Creates a quaternion from the given 3x3 rotation matrix. + * + * NOTE: The resultant quaternion is not normalized, so you should be sure + * to renormalize the quaternion yourself where necessary. + * + * @param {quat} out the receiving quaternion + * @param {mat3} m rotation matrix + * @returns {quat} out + * @function + */ + quat.fromMat3 = function(out, m) { + // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes + // article "Quaternion Calculus and Fast Animation". + var fTrace = m[0] + m[4] + m[8] + var fRoot + + if (fTrace > 0.0) { // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math.sqrt(fTrace + 1.0); // 2w - out[3] = 0.5 * fRoot; - fRoot = 0.5/fRoot; // 1/(4w) - out[0] = (m[5]-m[7])*fRoot; - out[1] = (m[6]-m[2])*fRoot; - out[2] = (m[1]-m[3])*fRoot; - } else { + fRoot = Math.sqrt(fTrace + 1.0) // 2w + out[3] = 0.5 * fRoot + fRoot = 0.5 / fRoot // 1/(4w) + out[0] = (m[5] - m[7]) * fRoot + out[1] = (m[6] - m[2]) * fRoot + out[2] = (m[1] - m[3]) * fRoot + } else { // |w| <= 1/2 - var i = 0; - if ( m[4] > m[0] ) - i = 1; - if ( m[8] > m[i*3+i] ) - i = 2; - var j = (i+1)%3; - var k = (i+2)%3; - - fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0); - out[i] = 0.5 * fRoot; - fRoot = 0.5 / fRoot; - out[3] = (m[j*3+k] - m[k*3+j]) * fRoot; - out[j] = (m[j*3+i] + m[i*3+j]) * fRoot; - out[k] = (m[k*3+i] + m[i*3+k]) * fRoot; - } - - return out; -}; - -/** - * Returns a string representation of a quatenion - * - * @param {quat} vec vector to represent as a string - * @returns {String} string representation of the vector - */ -quat.str = function (a) { - return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')'; -}; - -if(typeof(exports) !== 'undefined') { - exports.quat = quat; -} -; - - - - - - - - - - - + var i = 0 + if (m[4] > m[0]) i = 1 + if (m[8] > m[i * 3 + i]) i = 2 + var j = (i + 1) % 3 + var k = (i + 2) % 3 + + fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0) + out[i] = 0.5 * fRoot + fRoot = 0.5 / fRoot + out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot + out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot + out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot + } + + return out + } + /** + * Returns a string representation of a quatenion + * + * @param {quat} vec vector to represent as a string + * @returns {String} string representation of the vector + */ + quat.str = function(a) { + return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')' + } - })(shim.exports); -})(this); + if (typeof exports !== 'undefined') { + exports.quat = quat + } + })(shim.exports) +})(this) diff --git a/public/externalLibs/graphics/webGLcurve.js b/public/externalLibs/graphics/webGLcurve.js index d99c50462f..87717e2e80 100644 --- a/public/externalLibs/graphics/webGLcurve.js +++ b/public/externalLibs/graphics/webGLcurve.js @@ -1,125 +1,113 @@ -var viewport_size = 600; +var viewport_size = 600 function generateCurve(scaleMode, drawMode, numPoints, func, isFullView) { - var curvePosArray = []; - var transMat = mat4.create(); + var curvePosArray = [] + var transMat = mat4.create() // initialize the min/max to extreme values - var min_x = Infinity; - var max_x = -Infinity; - var min_y = Infinity; - var max_y = -Infinity; + var min_x = Infinity + var max_x = -Infinity + var min_y = Infinity + var max_y = -Infinity function evaluator(num, func) { // func should take input of [0, 1] and output pair(x, y) // where x,y is in [0, 1] // evaluator has a side effect of recording the max/min // x and y value for adjusting the position - curvePosArray = []; + curvePosArray = [] for (var i = 0; i <= num; i += 1) { - var value = func(i / num); + var value = func(i / num) if ( typeof value !== 'object' || value.length !== 2 || typeof value[0] !== 'number' || typeof value[1] !== 'number' ) { - throw 'Expected a point, encountered ' + value; + throw 'Expected a point, encountered ' + value } - var x = value[0] * 2 - 1; - var y = value[1] * 2 - 1; - curvePosArray.push(x, y); - min_x = Math.min(min_x, x); - max_x = Math.max(max_x, x); - min_y = Math.min(min_y, y); - max_y = Math.max(max_y, y); + var x = value[0] * 2 - 1 + var y = value[1] * 2 - 1 + curvePosArray.push(x, y) + min_x = Math.min(min_x, x) + max_x = Math.max(max_x, x) + min_y = Math.min(min_y, y) + max_y = Math.max(max_y, y) } } - evaluator(numPoints, func); + evaluator(numPoints, func) if (isFullView) { - var vert_padding = 0.05 * (max_y - min_y); - min_y -= vert_padding; - max_y += vert_padding; - var horiz_padding = 0.05 * (max_x - min_x); - min_x -= horiz_padding; - max_x += horiz_padding; + var vert_padding = 0.05 * (max_y - min_y) + min_y -= vert_padding + max_y += vert_padding + var horiz_padding = 0.05 * (max_x - min_x) + min_x -= horiz_padding + max_x += horiz_padding } if (scaleMode == 'fit') { - var center = [(min_x + max_x) / 2, (min_y + max_y) / 2]; - var scale = Math.max(max_x - min_x, max_y - min_y); - mat4.scale(transMat, transMat, vec3.fromValues(2 / scale, 2 / scale, 0)); // use 2 because the value is in [-1, 1] - mat4.translate( - transMat, - transMat, - vec3.fromValues(-center[0], -center[1], 0) - ); + var center = [(min_x + max_x) / 2, (min_y + max_y) / 2] + var scale = Math.max(max_x - min_x, max_y - min_y) + mat4.scale(transMat, transMat, vec3.fromValues(2 / scale, 2 / scale, 0)) // use 2 because the value is in [-1, 1] + mat4.translate(transMat, transMat, vec3.fromValues(-center[0], -center[1], 0)) } else if (scaleMode == 'stretch') { - var center = [(min_x + max_x) / 2, (min_y + max_y) / 2]; - mat4.scale( - transMat, - transMat, - vec3.fromValues(2 / (max_x - min_x), 2 / (max_y - min_y), 0) - ); // use 2 because the value is in [-1, 1] - mat4.translate( - transMat, - transMat, - vec3.fromValues(-center[0], -center[1], 0) - ); + var center = [(min_x + max_x) / 2, (min_y + max_y) / 2] + mat4.scale(transMat, transMat, vec3.fromValues(2 / (max_x - min_x), 2 / (max_y - min_y), 0)) // use 2 because the value is in [-1, 1] + mat4.translate(transMat, transMat, vec3.fromValues(-center[0], -center[1], 0)) } else { // do nothing for normal situations } - clear_viewport(); - gl.uniformMatrix4fv(u_transformMatrix, false, transMat); - drawCurve(drawMode, curvePosArray); - return new ShapeDrawn(); + clear_viewport() + gl.uniformMatrix4fv(u_transformMatrix, false, transMat) + drawCurve(drawMode, curvePosArray) + return new ShapeDrawn() } function draw_connected(num) { return function(func) { - return generateCurve('none', 'lines', num, func); - }; + return generateCurve('none', 'lines', num, func) + } } function draw_points_on(num) { return function(func) { - return generateCurve('none', 'points', num, func); - }; + return generateCurve('none', 'points', num, func) + } } function draw_points_squeezed_to_window(num) { return function(func) { - return generateCurve('fit', 'points', num, func); - }; + return generateCurve('fit', 'points', num, func) + } } function draw_connected_squeezed_to_window(num) { return function(func) { - return generateCurve('fit', 'lines', num, func); - }; + return generateCurve('fit', 'lines', num, func) + } } function draw_connected_full_view(num) { return function(func) { - return generateCurve('stretch', 'lines', num, func, true); - }; + return generateCurve('stretch', 'lines', num, func, true) + } } function draw_connected_full_view_proportional(num) { return function(func) { - return generateCurve('fit', 'lines', num, func, true); - }; + return generateCurve('fit', 'lines', num, func, true) + } } function make_point(x, y) { - return [x, y]; + return [x, y] } function x_of(pt) { - return pt[0]; + return pt[0] } function y_of(pt) { - return pt[1]; + return pt[1] } diff --git a/public/externalLibs/graphics/webGLgraphics.js b/public/externalLibs/graphics/webGLgraphics.js index 89461707e1..5f147c5ede 100644 --- a/public/externalLibs/graphics/webGLgraphics.js +++ b/public/externalLibs/graphics/webGLgraphics.js @@ -1,5 +1,5 @@ //-----------------------Shaders------------------------------ -var shaders = {}; +var shaders = {} shaders['2d-vertex-shader'] = [ 'attribute vec4 a_position;', @@ -19,7 +19,7 @@ shaders['2d-vertex-shader'] = [ ' gl_Position.z = -gl_Position.z;', ' v_color = a_color;', '}' -].join('\n'); +].join('\n') shaders['2d-fragment-shader'] = [ 'precision mediump float;', @@ -29,7 +29,7 @@ shaders['2d-fragment-shader'] = [ 'void main() {', ' gl_FragColor = v_color;', '}' -].join('\n'); +].join('\n') shaders['3d-vertex-shader'] = [ 'attribute vec4 a_position;', @@ -53,7 +53,7 @@ shaders['3d-vertex-shader'] = [ ' v_color += color_factor * (1.0 - v_color);', ' v_color.a = 1.0;', '}' -].join('\n'); +].join('\n') shaders['3d-fragment-shader'] = [ 'precision mediump float;', @@ -63,7 +63,7 @@ shaders['3d-fragment-shader'] = [ 'void main() {', ' gl_FragColor = v_color;', '}' -].join('\n'); +].join('\n') shaders['anaglyph-vertex-shader'] = [ 'attribute vec4 a_position;', @@ -95,7 +95,7 @@ shaders['anaglyph-vertex-shader'] = [ ' v_color = u_colorFilter * v_color + 1.0 - u_colorFilter;', ' v_color.a = 1.0;', '}' -].join('\n'); +].join('\n') shaders['anaglyph-fragment-shader'] = [ 'precision mediump float;', @@ -105,7 +105,7 @@ shaders['anaglyph-fragment-shader'] = [ 'void main() {', ' gl_FragColor = v_color;', '}' -].join('\n'); +].join('\n') shaders['combine-vertex-shader'] = [ 'attribute vec4 a_position;', @@ -117,7 +117,7 @@ shaders['combine-vertex-shader'] = [ ' v_texturePosition.x = (a_position.x + 1.0) / 2.0;', ' v_texturePosition.y = (a_position.y + 1.0) / 2.0;', '}' -].join('\n'); +].join('\n') shaders['combine-fragment-shader'] = [ 'precision mediump float;', @@ -132,7 +132,7 @@ shaders['combine-fragment-shader'] = [ ' + texture2D(u_sampler_cyan, v_texturePosition) - 1.0;', ' gl_FragColor.a = 1.0;', '}' -].join('\n'); +].join('\n') shaders['copy-vertex-shader'] = [ 'attribute vec4 a_position;', @@ -144,7 +144,7 @@ shaders['copy-vertex-shader'] = [ ' v_texturePosition.x = (a_position.x + 1.0) / 2.0;', ' v_texturePosition.y = 1.0 - (a_position.y + 1.0) / 2.0;', '}' -].join('\n'); +].join('\n') shaders['copy-fragment-shader'] = [ 'precision mediump float;', @@ -156,7 +156,7 @@ shaders['copy-fragment-shader'] = [ 'void main() {', ' gl_FragColor = texture2D(u_sampler_image, v_texturePosition);', '}' -].join('\n'); +].join('\n') shaders['curve-vertex-shader'] = [ 'attribute vec2 a_position;', @@ -166,7 +166,7 @@ shaders['curve-vertex-shader'] = [ ' gl_PointSize = 2.0;', ' gl_Position = u_transformMatrix * vec4(a_position, 0, 1);', '}' -].join('\n'); +].join('\n') shaders['curve-fragment-shader'] = [ 'precision mediump float;', @@ -174,76 +174,76 @@ shaders['curve-fragment-shader'] = [ 'void main() {', ' gl_FragColor = vec4(0, 0, 0, 1);', '}' -].join('\n'); +].join('\n') //-------------------------Constants------------------------- -var antialias = 4; // common -var halfEyeDistance = 0.03; // rune 3d only +var antialias = 4 // common +var halfEyeDistance = 0.03 // rune 3d only //----------------------Global variables---------------------- // common -var gl; // the WebGL context -var curShaderProgram; // the shader program currently in use -var normalShaderProgram; // the default shader program -var vertexBuffer; -var vertexPositionAttribute; // location of a_position -var colorAttribute; // location of a_color -var canvas; // the object that is used to display webGL output +var gl // the WebGL context +var curShaderProgram // the shader program currently in use +var normalShaderProgram // the default shader program +var vertexBuffer +var vertexPositionAttribute // location of a_position +var colorAttribute // location of a_color +var canvas // the object that is used to display webGL output // rune 2d and 3d -var instance_ext; // ANGLE_instanced_arrays extension -var instanceBuffer; -var indexBuffer; -var indexSize; // number of bytes per element of index buffer -var mat1Attribute; // location of a_mat1 -var mat2Attribute; // location of a_mat2 -var mat3Attribute; // location of a_mat3 -var mat4Attribute; // location of a_mat4 +var instance_ext // ANGLE_instanced_arrays extension +var instanceBuffer +var indexBuffer +var indexSize // number of bytes per element of index buffer +var mat1Attribute // location of a_mat1 +var mat2Attribute // location of a_mat2 +var mat3Attribute // location of a_mat3 +var mat4Attribute // location of a_mat4 // rune 3d only -var anaglyphShaderProgram; -var combineShaderProgram; -var copyShaderProgram; -var u_cameraMatrix; // locatin of u_cameraMatrix -var u_colorFilter; // location of u_colorFilter -var redUniform; // location of u_sampler_red -var cyanUniform; // location of u_sampler_cyan -var u_sampler_image; -var leftCameraMatrix; // view matrix for left eye -var rightCameraMatrix; // view matrix for right eye -var leftFramebuffer; -var rightFramebuffer; -var copyTexture; +var anaglyphShaderProgram +var combineShaderProgram +var copyShaderProgram +var u_cameraMatrix // locatin of u_cameraMatrix +var u_colorFilter // location of u_colorFilter +var redUniform // location of u_sampler_red +var cyanUniform // location of u_sampler_cyan +var u_sampler_image +var leftCameraMatrix // view matrix for left eye +var rightCameraMatrix // view matrix for right eye +var leftFramebuffer +var rightFramebuffer +var copyTexture //----------------------Common functions---------------------- function open_viewport(name, horiz, vert, aa_off) { - var canvas; - canvas = open_pixmap(name, horiz, vert, aa_off); - document.body.appendChild(canvas); + var canvas + canvas = open_pixmap(name, horiz, vert, aa_off) + document.body.appendChild(canvas) canvas.setAttribute( 'style', canvas.getAttribute('style') + ' display: block; margin-left: auto; margin-right: auto; padding: 25px' - ); - return canvas; + ) + return canvas } function open_pixmap(name, horiz, vert, aa_off) { - var this_aa; + var this_aa if (aa_off) { - this_aa = 1; + this_aa = 1 } else { - this_aa = antialias; + this_aa = antialias } - var canvas = document.createElement('canvas'); - canvas.id = 'main-canvas'; + var canvas = document.createElement('canvas') + canvas.id = 'main-canvas' //this part uses actual canvas impl. - canvas.width = horiz * this_aa; - canvas.height = vert * this_aa; + canvas.width = horiz * this_aa + canvas.height = vert * this_aa //this part uses CSS scaling, in this case is downsizing. - canvas.style.width = horiz + 'px'; - canvas.style.height = vert + 'px'; - return canvas; + canvas.style.width = horiz + 'px' + canvas.style.height = vert + 'px' + return canvas } /** @@ -253,17 +253,17 @@ function open_pixmap(name, horiz, vert, aa_off) { * object in the document. */ function resetCanvas() { - canvas = document.querySelector('.rune-canvas'); + canvas = document.querySelector('.rune-canvas') if (!canvas) { - canvas = document.createElement('canvas'); - canvas.setAttribute('width', 512); - canvas.setAttribute('height', 512); - canvas.className = 'rune-canvas'; - canvas.hidden = true; - document.body.appendChild(canvas); + canvas = document.createElement('canvas') + canvas.setAttribute('width', 512) + canvas.setAttribute('height', 512) + canvas.className = 'rune-canvas' + canvas.hidden = true + document.body.appendChild(canvas) } else { - canvas.parentNode.removeChild(canvas); - resetCanvas(); + canvas.parentNode.removeChild(canvas) + resetCanvas() } } @@ -279,44 +279,39 @@ function resetCanvas() { * the gl object. */ function getReadyWebGLForCanvas(mode) { - resetCanvas(); + resetCanvas() // Get the rendering context for WebGL - gl = initWebGL(canvas); + gl = initWebGL(canvas) if (gl) { - gl.clearColor(1.0, 1.0, 1.0, 1.0); // Set clear color to white, fully opaque - gl.enable(gl.DEPTH_TEST); // Enable depth testing - gl.depthFunc(gl.LEQUAL); // Near things obscure far things + gl.clearColor(1.0, 1.0, 1.0, 1.0) // Set clear color to white, fully opaque + gl.enable(gl.DEPTH_TEST) // Enable depth testing + gl.depthFunc(gl.LEQUAL) // Near things obscure far things // Clear the color as well as the depth buffer. - clear_viewport(); + clear_viewport() //TODO: Revise this, it seems unnecessary // Align the drawable canvas in the middle - gl.viewport( - (canvas.width - canvas.height) / 2, - 0, - canvas.height, - canvas.height - ); + gl.viewport((canvas.width - canvas.height) / 2, 0, canvas.height, canvas.height) // setup a GLSL program i.e. vertex and fragment shader if (!(normalShaderProgram = initShader(mode))) { - return; + return } - curShaderProgram = normalShaderProgram; - gl.useProgram(curShaderProgram); + curShaderProgram = normalShaderProgram + gl.useProgram(curShaderProgram) // rune-specific operations if (mode === '2d' || mode === '3d') { - initRuneCommon(); - initRuneBuffer(vertices, indices); + initRuneCommon() + initRuneBuffer(vertices, indices) // rune-3d-specific operations if (mode === '3d') { - initRune3d(); + initRune3d() } } if (mode === 'curve') { - initCurveAttributes(curShaderProgram); + initCurveAttributes(curShaderProgram) } } } @@ -324,144 +319,129 @@ function getReadyWebGLForCanvas(mode) { function getReadyWebGL(mode, name, horiz, vert, aa_off) { // mode can be "2d", "3d" or "curve" // Create element - var canvas = open_viewport(name, horiz, vert, aa_off); + var canvas = open_viewport(name, horiz, vert, aa_off) // Get the rendering context for WebGL - gl = initWebGL(canvas); + gl = initWebGL(canvas) if (gl) { - gl.clearColor(1.0, 1.0, 1.0, 1.0); // Set clear color to white, fully opaque - gl.enable(gl.DEPTH_TEST); // Enable depth testing - gl.depthFunc(gl.LEQUAL); // Near things obscure far things + gl.clearColor(1.0, 1.0, 1.0, 1.0) // Set clear color to white, fully opaque + gl.enable(gl.DEPTH_TEST) // Enable depth testing + gl.depthFunc(gl.LEQUAL) // Near things obscure far things // Clear the color as well as the depth buffer. - clear_viewport(); + clear_viewport() //TODO: Revise this, it seems unnecessary // Align the drawable canvas in the middle - gl.viewport( - (canvas.width - canvas.height) / 2, - 0, - canvas.height, - canvas.height - ); + gl.viewport((canvas.width - canvas.height) / 2, 0, canvas.height, canvas.height) // setup a GLSL program i.e. vertex and fragment shader if (!(normalShaderProgram = initShader(mode))) { - return; + return } - curShaderProgram = normalShaderProgram; - gl.useProgram(curShaderProgram); + curShaderProgram = normalShaderProgram + gl.useProgram(curShaderProgram) // rune-specific operations if (mode === '2d' || mode === '3d') { - initRuneCommon(); + initRuneCommon() // rune-3d-specific operations if (mode === '3d') { - initRune3d(); + initRune3d() } } if (mode === 'curve') { - initCurveAttributes(curShaderProgram); + initCurveAttributes(curShaderProgram) } } } function initWebGL(canvas) { - var gl = null; + var gl = null try { // Try to grab the standard context. If it fails, fallback to experimental. - gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); + gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl') } catch (e) {} // If we don't have a GL context, give up now if (!gl) { - alert('Unable to initialize WebGL. Your browser may not support it.'); - gl = null; + alert('Unable to initialize WebGL. Your browser may not support it.') + gl = null } - return gl; + return gl } function initShader(programName) { - var vertexShader; - if ( - !(vertexShader = getShader(gl, programName + '-vertex-shader', 'vertex')) - ) { - return null; + var vertexShader + if (!(vertexShader = getShader(gl, programName + '-vertex-shader', 'vertex'))) { + return null } - var fragmentShader; - if ( - !(fragmentShader = getShader( - gl, - programName + '-fragment-shader', - 'fragment' - )) - ) { - return null; + var fragmentShader + if (!(fragmentShader = getShader(gl, programName + '-fragment-shader', 'fragment'))) { + return null } - var shaderProgram = gl.createProgram(); - gl.attachShader(shaderProgram, vertexShader); - gl.attachShader(shaderProgram, fragmentShader); - gl.bindAttribLocation(shaderProgram, 0, 'a_position'); - gl.linkProgram(shaderProgram); + var shaderProgram = gl.createProgram() + gl.attachShader(shaderProgram, vertexShader) + gl.attachShader(shaderProgram, fragmentShader) + gl.bindAttribLocation(shaderProgram, 0, 'a_position') + gl.linkProgram(shaderProgram) if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { - alert('Unable to initialize the shader program.'); - return null; + alert('Unable to initialize the shader program.') + return null } else { - return shaderProgram; + return shaderProgram } } function getShader(gl, id, type) { - var shader; - var theSource = shaders[id]; + var shader + var theSource = shaders[id] if (type == 'fragment') { - shader = gl.createShader(gl.FRAGMENT_SHADER); + shader = gl.createShader(gl.FRAGMENT_SHADER) } else if (type == 'vertex') { - shader = gl.createShader(gl.VERTEX_SHADER); + shader = gl.createShader(gl.VERTEX_SHADER) } else { // Unknown shader type - return null; + return null } - gl.shaderSource(shader, theSource); + gl.shaderSource(shader, theSource) - gl.compileShader(shader); + gl.compileShader(shader) if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { - alert( - 'An error occurred compiling the shaders: ' + gl.getShaderInfoLog(shader) - ); - return null; + alert('An error occurred compiling the shaders: ' + gl.getShaderInfoLog(shader)) + return null } - return shader; + return shader } function initFramebufferObject() { - var framebuffer, texture, depthBuffer; + var framebuffer, texture, depthBuffer // Define the error handling function var error = function() { - if (framebuffer) gl.deleteFramebuffer(framebuffer); - if (texture) gl.deleteTexture(texture); - if (depthBuffer) gl.deleteRenderbuffer(depthBuffer); - return null; - }; + if (framebuffer) gl.deleteFramebuffer(framebuffer) + if (texture) gl.deleteTexture(texture) + if (depthBuffer) gl.deleteRenderbuffer(depthBuffer) + return null + } // create a framebuffer object - framebuffer = gl.createFramebuffer(); + framebuffer = gl.createFramebuffer() if (!framebuffer) { - console.log('Failed to create frame buffer object'); - return error(); + console.log('Failed to create frame buffer object') + return error() } // create a texture object and set its size and parameters - texture = gl.createTexture(); + texture = gl.createTexture() if (!texture) { - console.log('Failed to create texture object'); - return error(); + console.log('Failed to create texture object') + return error() } - gl.bindTexture(gl.TEXTURE_2D, texture); + gl.bindTexture(gl.TEXTURE_2D, texture) gl.texImage2D( gl.TEXTURE_2D, 0, @@ -472,140 +452,117 @@ function initFramebufferObject() { gl.RGBA, gl.UNSIGNED_BYTE, null - ); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - framebuffer.texture = texture; + ) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) + framebuffer.texture = texture // create a renderbuffer for depth buffer - depthBuffer = gl.createRenderbuffer(); + depthBuffer = gl.createRenderbuffer() if (!depthBuffer) { - console.log('Failed to create renderbuffer object'); - return error(); + console.log('Failed to create renderbuffer object') + return error() } // bind renderbuffer object to target and set size - gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer); + gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer) gl.renderbufferStorage( gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, gl.drawingBufferWidth, gl.drawingBufferHeight - ); + ) // set the texture object to the framebuffer object - gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer); // bind to target - gl.framebufferTexture2D( - gl.FRAMEBUFFER, - gl.COLOR_ATTACHMENT0, - gl.TEXTURE_2D, - texture, - 0 - ); + gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer) // bind to target + gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0) // set the renderbuffer object to the framebuffer object - gl.framebufferRenderbuffer( - gl.FRAMEBUFFER, - gl.DEPTH_ATTACHMENT, - gl.RENDERBUFFER, - depthBuffer - ); + gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthBuffer) // check whether the framebuffer is configured correctly - var e = gl.checkFramebufferStatus(gl.FRAMEBUFFER); + var e = gl.checkFramebufferStatus(gl.FRAMEBUFFER) if (gl.FRAMEBUFFER_COMPLETE !== e) { - console.log('Frame buffer object is incomplete:' + e.toString()); - return error(); + console.log('Frame buffer object is incomplete:' + e.toString()) + return error() } // Unbind the buffer object - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - gl.bindTexture(gl.TEXTURE_2D, null); - gl.bindRenderbuffer(gl.RENDERBUFFER, null); + gl.bindFramebuffer(gl.FRAMEBUFFER, null) + gl.bindTexture(gl.TEXTURE_2D, null) + gl.bindRenderbuffer(gl.RENDERBUFFER, null) - return framebuffer; + return framebuffer } function clearFramebuffer(framebuffer) { - gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer); - clear_viewport(); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); + gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer) + clear_viewport() + gl.bindFramebuffer(gl.FRAMEBUFFER, null) } function clear_viewport() { if (!gl) { - throw new Error( - 'Please activate the Canvas component by clicking it in the sidebar' - ); + throw new Error('Please activate the Canvas component by clicking it in the sidebar') } // Clear the viewport as well as the depth buffer - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT) if (typeof clearHollusion !== 'undefined') { - clearHollusion(); + clearHollusion() } } //---------------------Rune 2d and 3d functions--------------------- function initRuneCommon() { // set up attribute locations - vertexPositionAttribute = gl.getAttribLocation( - normalShaderProgram, - 'a_position' - ); - colorAttribute = gl.getAttribLocation(normalShaderProgram, 'a_color'); - mat1Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat1'); - mat2Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat2'); - mat3Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat3'); - mat4Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat4'); - - enableInstanceAttribs(); + vertexPositionAttribute = gl.getAttribLocation(normalShaderProgram, 'a_position') + colorAttribute = gl.getAttribLocation(normalShaderProgram, 'a_color') + mat1Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat1') + mat2Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat2') + mat3Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat3') + mat4Attribute = gl.getAttribLocation(normalShaderProgram, 'a_mat4') + + enableInstanceAttribs() // set up ANGLE_instanced_array extension if (!(instance_ext = gl.getExtension('ANGLE_instanced_arrays'))) { - console.log('Unable to set up ANGLE_instanced_array extension!'); + console.log('Unable to set up ANGLE_instanced_array extension!') } } function enableInstanceAttribs() { - gl.enableVertexAttribArray(colorAttribute); - gl.enableVertexAttribArray(mat1Attribute); - gl.enableVertexAttribArray(mat2Attribute); - gl.enableVertexAttribArray(mat3Attribute); - gl.enableVertexAttribArray(mat4Attribute); + gl.enableVertexAttribArray(colorAttribute) + gl.enableVertexAttribArray(mat1Attribute) + gl.enableVertexAttribArray(mat2Attribute) + gl.enableVertexAttribArray(mat3Attribute) + gl.enableVertexAttribArray(mat4Attribute) } function disableInstanceAttribs() { - gl.disableVertexAttribArray(colorAttribute); - gl.disableVertexAttribArray(mat1Attribute); - gl.disableVertexAttribArray(mat2Attribute); - gl.disableVertexAttribArray(mat3Attribute); - gl.disableVertexAttribArray(mat4Attribute); + gl.disableVertexAttribArray(colorAttribute) + gl.disableVertexAttribArray(mat1Attribute) + gl.disableVertexAttribArray(mat2Attribute) + gl.disableVertexAttribArray(mat3Attribute) + gl.disableVertexAttribArray(mat4Attribute) } function initRuneBuffer(vertices, indices) { // vertices should be Float32Array // indices should be Uint16Array - vertexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); - gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); + vertexBuffer = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer) + gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW) // enable assignment to vertex attribute - gl.enableVertexAttribArray(vertexPositionAttribute); - - var FSIZE = vertices.BYTES_PER_ELEMENT; - gl.vertexAttribPointer( - vertexPositionAttribute, - 4, - gl.FLOAT, - false, - FSIZE * 4, - 0 - ); + gl.enableVertexAttribArray(vertexPositionAttribute) + + var FSIZE = vertices.BYTES_PER_ELEMENT + gl.vertexAttribPointer(vertexPositionAttribute, 4, gl.FLOAT, false, FSIZE * 4, 0) // Also initialize the indexBuffer - indexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer); - gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW); + indexBuffer = gl.createBuffer() + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer) + gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW) - indexSize = indices.BYTES_PER_ELEMENT; + indexSize = indices.BYTES_PER_ELEMENT } function drawRune(first, indexCount, instanceArray) { @@ -614,11 +571,11 @@ function drawRune(first, indexCount, instanceArray) { // this draw function uses the "normal" shader if (curShaderProgram !== normalShaderProgram) { - curShaderProgram = normalShaderProgram; - gl.useProgram(curShaderProgram); + curShaderProgram = normalShaderProgram + gl.useProgram(curShaderProgram) } - enableInstanceAttribs(); + enableInstanceAttribs() // due to a bug in ANGLE implementation on Windows // a new buffer need to be created everytime for a new instanceArray @@ -626,15 +583,15 @@ function drawRune(first, indexCount, instanceArray) { // delete the buffer at the end // More info about the ANGLE implementation (which helped me fix this bug) // https://code.google.com/p/angleproject/wiki/BufferImplementation - instanceBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, instanceBuffer); - gl.bufferData(gl.ARRAY_BUFFER, instanceArray, gl.STREAM_DRAW); + instanceBuffer = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, instanceBuffer) + gl.bufferData(gl.ARRAY_BUFFER, instanceArray, gl.STREAM_DRAW) - var FSIZE = instanceArray.BYTES_PER_ELEMENT; - var instanceCount = instanceArray.length / 20; + var FSIZE = instanceArray.BYTES_PER_ELEMENT + var instanceCount = instanceArray.length / 20 // pass transform matrix and color of instances - assignRuneAttributes(FSIZE); + assignRuneAttributes(FSIZE) instance_ext.drawElementsInstancedANGLE( gl.TRIANGLES, @@ -642,51 +599,23 @@ function drawRune(first, indexCount, instanceArray) { gl.UNSIGNED_SHORT, first * indexSize, instanceCount - ); + ) // delete the instance buffer - gl.deleteBuffer(instanceBuffer); + gl.deleteBuffer(instanceBuffer) } function assignRuneAttributes(FSIZE) { - gl.vertexAttribPointer(mat1Attribute, 4, gl.FLOAT, false, FSIZE * 20, 0); - instance_ext.vertexAttribDivisorANGLE(mat1Attribute, 1); - gl.vertexAttribPointer( - mat2Attribute, - 4, - gl.FLOAT, - false, - FSIZE * 20, - FSIZE * 4 - ); - instance_ext.vertexAttribDivisorANGLE(mat2Attribute, 1); - gl.vertexAttribPointer( - mat3Attribute, - 4, - gl.FLOAT, - false, - FSIZE * 20, - FSIZE * 8 - ); - instance_ext.vertexAttribDivisorANGLE(mat3Attribute, 1); - gl.vertexAttribPointer( - mat4Attribute, - 4, - gl.FLOAT, - false, - FSIZE * 20, - FSIZE * 12 - ); - instance_ext.vertexAttribDivisorANGLE(mat4Attribute, 1); - gl.vertexAttribPointer( - colorAttribute, - 4, - gl.FLOAT, - false, - FSIZE * 20, - FSIZE * 16 - ); - instance_ext.vertexAttribDivisorANGLE(colorAttribute, 1); + gl.vertexAttribPointer(mat1Attribute, 4, gl.FLOAT, false, FSIZE * 20, 0) + instance_ext.vertexAttribDivisorANGLE(mat1Attribute, 1) + gl.vertexAttribPointer(mat2Attribute, 4, gl.FLOAT, false, FSIZE * 20, FSIZE * 4) + instance_ext.vertexAttribDivisorANGLE(mat2Attribute, 1) + gl.vertexAttribPointer(mat3Attribute, 4, gl.FLOAT, false, FSIZE * 20, FSIZE * 8) + instance_ext.vertexAttribDivisorANGLE(mat3Attribute, 1) + gl.vertexAttribPointer(mat4Attribute, 4, gl.FLOAT, false, FSIZE * 20, FSIZE * 12) + instance_ext.vertexAttribDivisorANGLE(mat4Attribute, 1) + gl.vertexAttribPointer(colorAttribute, 4, gl.FLOAT, false, FSIZE * 20, FSIZE * 16) + instance_ext.vertexAttribDivisorANGLE(colorAttribute, 1) } //------------------------Rune 3d functions------------------------ @@ -698,72 +627,59 @@ function initRune3d() { (combineShaderProgram = initShader('combine')) ) ) { - console.log('Anaglyph cannot be used!'); + console.log('Anaglyph cannot be used!') } if (!(copyShaderProgram = initShader('copy'))) { - console.log('Stereogram and hollusion cannot be used!'); + console.log('Stereogram and hollusion cannot be used!') } // set up uniform locations - u_cameraMatrix = gl.getUniformLocation( - anaglyphShaderProgram, - 'u_cameraMatrix' - ); - u_colorFilter = gl.getUniformLocation(anaglyphShaderProgram, 'u_colorFilter'); - redUniform = gl.getUniformLocation(combineShaderProgram, 'u_sampler_red'); - cyanUniform = gl.getUniformLocation(combineShaderProgram, 'u_sampler_cyan'); - u_sampler_image = gl.getUniformLocation(copyShaderProgram, 'u_sampler_image'); + u_cameraMatrix = gl.getUniformLocation(anaglyphShaderProgram, 'u_cameraMatrix') + u_colorFilter = gl.getUniformLocation(anaglyphShaderProgram, 'u_colorFilter') + redUniform = gl.getUniformLocation(combineShaderProgram, 'u_sampler_red') + cyanUniform = gl.getUniformLocation(combineShaderProgram, 'u_sampler_cyan') + u_sampler_image = gl.getUniformLocation(copyShaderProgram, 'u_sampler_image') // calculate the left and right camera matrices - leftCameraMatrix = mat4.create(); + leftCameraMatrix = mat4.create() mat4.lookAt( leftCameraMatrix, vec3.fromValues(-halfEyeDistance, 0, 0), vec3.fromValues(0, 0, -0.4), vec3.fromValues(0, 1, 0) - ); - rightCameraMatrix = mat4.create(); + ) + rightCameraMatrix = mat4.create() mat4.lookAt( rightCameraMatrix, vec3.fromValues(halfEyeDistance, 0, 0), vec3.fromValues(0, 0, -0.4), vec3.fromValues(0, 1, 0) - ); + ) // set up frame buffers if ( - !( - (leftFramebuffer = initFramebufferObject()) && - (rightFramebuffer = initFramebufferObject()) - ) + !((leftFramebuffer = initFramebufferObject()) && (rightFramebuffer = initFramebufferObject())) ) { - console.log('Unable to initialize for anaglyph.'); - return; + console.log('Unable to initialize for anaglyph.') + return } // set up a texture for copying // create a texture object and set its size and parameters - copyTexture = gl.createTexture(); + copyTexture = gl.createTexture() if (!copyTexture) { - console.log('Failed to create texture object'); - return error(); + console.log('Failed to create texture object') + return error() } } -function draw3D( - first, - indexCount, - instanceArray, - cameraMatrix, - colorFilter, - framebuffer -) { +function draw3D(first, indexCount, instanceArray, cameraMatrix, colorFilter, framebuffer) { // this draw function uses the "anaglyph" shader if (curShaderProgram !== anaglyphShaderProgram) { - curShaderProgram = anaglyphShaderProgram; - gl.useProgram(curShaderProgram); + curShaderProgram = anaglyphShaderProgram + gl.useProgram(curShaderProgram) } - enableInstanceAttribs(); + enableInstanceAttribs() // due to a bug in ANGLE implementation on Windows // a new buffer need to be created everytime for a new instanceArray @@ -771,154 +687,120 @@ function draw3D( // delete the buffer at the end // More info about the ANGLE implementation (which helped me fix this bug) // https://code.google.com/p/angleproject/wiki/BufferImplementation - instanceBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, instanceBuffer); - gl.bufferData(gl.ARRAY_BUFFER, instanceArray, gl.STREAM_DRAW); + instanceBuffer = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, instanceBuffer) + gl.bufferData(gl.ARRAY_BUFFER, instanceArray, gl.STREAM_DRAW) - var FSIZE = instanceArray.BYTES_PER_ELEMENT; - var instanceCount = instanceArray.length / 20; + var FSIZE = instanceArray.BYTES_PER_ELEMENT + var instanceCount = instanceArray.length / 20 // pass transform matrix and color of instances - assignRuneAttributes(FSIZE); + assignRuneAttributes(FSIZE) // pass the camera matrix and color filter for left eye - gl.uniformMatrix4fv(u_cameraMatrix, false, cameraMatrix); - gl.uniform4fv(u_colorFilter, new Float32Array(colorFilter)); + gl.uniformMatrix4fv(u_cameraMatrix, false, cameraMatrix) + gl.uniform4fv(u_colorFilter, new Float32Array(colorFilter)) // draw left eye to frame buffer - gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer); + gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer) instance_ext.drawElementsInstancedANGLE( gl.TRIANGLES, indexCount, gl.UNSIGNED_SHORT, first * indexSize, instanceCount - ); + ) - gl.deleteBuffer(instanceBuffer); + gl.deleteBuffer(instanceBuffer) } function drawAnaglyph(first, indexCount, instanceArray) { // instanceArray should be Float32Array // instanceCount should be instanceArray.length / 20 - draw3D( - first, - indexCount, - instanceArray, - leftCameraMatrix, - [1, 0, 0, 1], - leftFramebuffer - ); - draw3D( - first, - indexCount, - instanceArray, - rightCameraMatrix, - [0, 1, 1, 1], - rightFramebuffer - ); + draw3D(first, indexCount, instanceArray, leftCameraMatrix, [1, 0, 0, 1], leftFramebuffer) + draw3D(first, indexCount, instanceArray, rightCameraMatrix, [0, 1, 1, 1], rightFramebuffer) // combine to screen - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - combine(leftFramebuffer.texture, rightFramebuffer.texture); + gl.bindFramebuffer(gl.FRAMEBUFFER, null) + combine(leftFramebuffer.texture, rightFramebuffer.texture) } function combine(texA, texB) { // this draw function uses the "combine" shader if (curShaderProgram !== combineShaderProgram) { - curShaderProgram = combineShaderProgram; - gl.useProgram(curShaderProgram); + curShaderProgram = combineShaderProgram + gl.useProgram(curShaderProgram) } - disableInstanceAttribs(); + disableInstanceAttribs() - gl.activeTexture(gl.TEXTURE0); - gl.bindTexture(gl.TEXTURE_2D, texA); - gl.uniform1i(cyanUniform, 0); + gl.activeTexture(gl.TEXTURE0) + gl.bindTexture(gl.TEXTURE_2D, texA) + gl.uniform1i(cyanUniform, 0) - gl.activeTexture(gl.TEXTURE1); - gl.bindTexture(gl.TEXTURE_2D, texB); - gl.uniform1i(redUniform, 1); + gl.activeTexture(gl.TEXTURE1) + gl.bindTexture(gl.TEXTURE_2D, texB) + gl.uniform1i(redUniform, 1) - gl.drawElements( - gl.TRIANGLES, - black_bb.count, - gl.UNSIGNED_SHORT, - indexSize * black_bb.first - ); + gl.drawElements(gl.TRIANGLES, black_bb.count, gl.UNSIGNED_SHORT, indexSize * black_bb.first) } function clearAnaglyphFramebuffer() { - clearFramebuffer(leftFramebuffer); - clearFramebuffer(rightFramebuffer); + clearFramebuffer(leftFramebuffer) + clearFramebuffer(rightFramebuffer) } function copy_viewport_webGL(src) { // this draw function uses the "copy" shader if (curShaderProgram !== copyShaderProgram) { - curShaderProgram = copyShaderProgram; - gl.useProgram(curShaderProgram); + curShaderProgram = copyShaderProgram + gl.useProgram(curShaderProgram) } - disableInstanceAttribs(); + disableInstanceAttribs() - gl.activeTexture(gl.TEXTURE2); - gl.bindTexture(gl.TEXTURE_2D, copyTexture); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.uniform1i(u_sampler_image, 2); + gl.activeTexture(gl.TEXTURE2) + gl.bindTexture(gl.TEXTURE_2D, copyTexture) + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) + gl.uniform1i(u_sampler_image, 2) - gl.drawElements( - gl.TRIANGLES, - black_bb.count, - gl.UNSIGNED_SHORT, - indexSize * black_bb.first - ); + gl.drawElements(gl.TRIANGLES, black_bb.count, gl.UNSIGNED_SHORT, indexSize * black_bb.first) } //---------------------Cheating canvas functions----------------- function copy_viewport(src, dest) { - dest.getContext('2d').clearRect(0, 0, dest.width, dest.height); - dest.getContext('2d').drawImage(src, 0, 0, dest.width, dest.height); // auto scaling + dest.getContext('2d').clearRect(0, 0, dest.width, dest.height) + dest.getContext('2d').drawImage(src, 0, 0, dest.width, dest.height) // auto scaling } //------------------------Curve functions------------------------ function initCurveAttributes(shaderProgram) { - vertexPositionAttribute = gl.getAttribLocation(shaderProgram, 'a_position'); - gl.enableVertexAttribArray(vertexPositionAttribute); - u_transformMatrix = gl.getUniformLocation(shaderProgram, 'u_transformMatrix'); + vertexPositionAttribute = gl.getAttribLocation(shaderProgram, 'a_position') + gl.enableVertexAttribArray(vertexPositionAttribute) + u_transformMatrix = gl.getUniformLocation(shaderProgram, 'u_transformMatrix') } function drawCurve(drawMode, curvePosArray) { - var magicNum = 60000; - var itemSize = 2; + var magicNum = 60000 + var itemSize = 2 for (var i = 0; i <= curvePosArray.length / magicNum / itemSize; i++) { // since webGL only supports 16bits buffer, i.e. the no. of // points in the buffer must be lower than 65535, so I take // 60000 as the "magic number" - var subArray = curvePosArray.slice( - i * magicNum * itemSize, - (i + 1) * magicNum * itemSize - ); - vertexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(subArray), gl.STATIC_DRAW); - gl.vertexAttribPointer( - vertexPositionAttribute, - itemSize, - gl.FLOAT, - false, - 0, - 0 - ); + var subArray = curvePosArray.slice(i * magicNum * itemSize, (i + 1) * magicNum * itemSize) + vertexBuffer = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer) + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(subArray), gl.STATIC_DRAW) + gl.vertexAttribPointer(vertexPositionAttribute, itemSize, gl.FLOAT, false, 0, 0) if (drawMode == 'lines') { - gl.drawArrays(gl.LINE_STRIP, 0, subArray.length / itemSize); + gl.drawArrays(gl.LINE_STRIP, 0, subArray.length / itemSize) } else { - gl.drawArrays(gl.POINTS, 0, subArray.length / itemSize); + gl.drawArrays(gl.POINTS, 0, subArray.length / itemSize) } - gl.deleteBuffer(vertexBuffer); + gl.deleteBuffer(vertexBuffer) } } diff --git a/public/externalLibs/graphics/webGLhi_graph.js b/public/externalLibs/graphics/webGLhi_graph.js index d0a440a55d..550903ff84 100644 --- a/public/externalLibs/graphics/webGLhi_graph.js +++ b/public/externalLibs/graphics/webGLhi_graph.js @@ -2,58 +2,55 @@ function compose(f, g) { return function(x) { - return f(g(x)); - }; + return f(g(x)) + } } function thrice(f) { - return compose(compose(f, f), f); + return compose(compose(f, f), f) } function identity(t) { - return t; + return t } function repeated(f, n) { if (n === 0) { - return identity; + return identity } else { - return compose(f, repeated(f, n - 1)); + return compose(f, repeated(f, n - 1)) } } // USEFUL NUMERICAL PROCEDURE function square(x) { - return x * x; + return x * x } // SOME CURVES function unit_circle(t) { - return make_point(Math.sin(2 * Math.PI * t), Math.cos(2 * Math.PI * t)); + return make_point(Math.sin(2 * Math.PI * t), Math.cos(2 * Math.PI * t)) } function unit_line(t) { - return make_point(t, 0); + return make_point(t, 0) } function unit_line_at(y) { return function(t) { - return make_point(t, y); - }; + return make_point(t, y) + } } function alternative_unit_circle(t) { - return make_point( - Math.sin(2 * Math.PI * square(t)), - Math.cos(2 * Math.PI * square(t)) - ); + return make_point(Math.sin(2 * Math.PI * square(t)), Math.cos(2 * Math.PI * square(t))) } // made available for Mission 6 function arc(t) { - return make_point(Math.sin(Math.PI * t), Math.cos(Math.PI * t)); + return make_point(Math.sin(Math.PI * t), Math.cos(Math.PI * t)) } // Curve-Transform = (Curve --> Curve) @@ -62,15 +59,15 @@ function arc(t) { function invert(curve) { return function(t) { - return curve(1 - t); - }; + return curve(1 - t) + } } function rotate_pi_over_2(curve) { return function(t) { - var ct = curve(t); - return make_point(-y_of(ct), x_of(ct)); - }; + var ct = curve(t) + return make_point(-y_of(ct), x_of(ct)) + } } // CONSTRUCTORS OF CURVE-TRANSFORMS @@ -80,52 +77,49 @@ function rotate_pi_over_2(curve) { function translate(x0, y0) { return function(curve) { return function(t) { - var ct = curve(t); - return make_point(x0 + x_of(ct), y0 + y_of(ct)); - }; - }; + var ct = curve(t) + return make_point(x0 + x_of(ct), y0 + y_of(ct)) + } + } } // ROTATE-AROUND-ORIGIN is of type (JS-Num --> Curve-Transform) function rotate_around_origin(theta) { - var cth = Math.cos(theta); - var sth = Math.sin(theta); + var cth = Math.cos(theta) + var sth = Math.sin(theta) return function(curve) { return function(t) { - var ct = curve(t); - var x = x_of(ct); - var y = y_of(ct); - return make_point(cth * x - sth * y, sth * x + cth * y); - }; - }; + var ct = curve(t) + var x = x_of(ct) + var y = y_of(ct) + return make_point(cth * x - sth * y, sth * x + cth * y) + } + } } function deriv_t(n) { - var delta_t = 1 / n; + var delta_t = 1 / n return function(curve) { return function(t) { - var ct = curve(t); - var ctdelta = curve(t + delta_t); - return make_point( - (x_of(ctdelta) - x_of(ct)) / delta_t, - (y_of(ctdelta) - y_of(ct)) / delta_t - ); - }; - }; + var ct = curve(t) + var ctdelta = curve(t + delta_t) + return make_point((x_of(ctdelta) - x_of(ct)) / delta_t, (y_of(ctdelta) - y_of(ct)) / delta_t) + } + } } function scale_x_y(a, b) { return function(curve) { return function(t) { - var ct = curve(t); - return make_point(a * x_of(ct), b * y_of(ct)); - }; - }; + var ct = curve(t) + return make_point(a * x_of(ct), b * y_of(ct)) + } + } } function scale(s) { - return scale_x_y(s, s); + return scale_x_y(s, s) } // SQUEEZE-RECTANGULAR-PORTION translates and scales a curve @@ -135,12 +129,12 @@ function scale(s) { // It is of type (JS-Num, JS-Num, JS-Num, JS-Num --> Curve-Transform). function squeeze_rectangular_portion(xlo, xhi, ylo, yhi) { - var width = xhi - xlo; - var height = yhi - ylo; + var width = xhi - xlo + var height = yhi - ylo if (width === 0 || height === 0) { - throw 'attempt to squeeze window to zero'; + throw 'attempt to squeeze window to zero' } else { - return compose(scale_x_y(1 / width, 1 / height), translate(-xlo, -ylo)); + return compose(scale_x_y(1 / width, 1 / height), translate(-xlo, -ylo)) } } @@ -150,33 +144,33 @@ function squeeze_rectangular_portion(xlo, xhi, ylo, yhi) { // only that that procedure does not allow the edges to be easily seen function squeeze_full_view(xlo, xhi, ylo, yhi) { - var width = xhi - xlo; - var height = yhi - ylo; + var width = xhi - xlo + var height = yhi - ylo if (width === 0 || height === 0) { - throw 'attempt to squeeze window to zero'; + throw 'attempt to squeeze window to zero' } else { return compose( scale_x_y(0.99 * 1 / width, 0.99 * 1 / height), translate(-(xlo - 0.01), -(ylo - 0.01)) - ); + ) } } // FULL-VIEW function full_view_proportional(xlo, xhi, ylo, yhi) { - var width = xhi - xlo; - var height = yhi - ylo; + var width = xhi - xlo + var height = yhi - ylo if (width === 0 || height === 0) { - throw 'attempt to squeeze window to zero'; + throw 'attempt to squeeze window to zero' } else { - var scale_factor = Math.min(0.9 * 1 / width, 0.9 * 1 / height); - var new_mid_x = scale_factor * (xlo + xhi) / 2; - var new_mid_y = scale_factor * (ylo + yhi) / 2; + var scale_factor = Math.min(0.9 * 1 / width, 0.9 * 1 / height) + var new_mid_x = scale_factor * (xlo + xhi) / 2 + var new_mid_y = scale_factor * (ylo + yhi) / 2 return compose( translate(0.5 - new_mid_x, 0.5 - new_mid_y), scale_x_y(scale_factor, scale_factor) - ); + ) } } @@ -188,18 +182,13 @@ function full_view_proportional(xlo, xhi, ylo, yhi) { // Behavior is unspecified on closed curves (with start-point = end-point). function put_in_standard_position(curve) { - var start_point = curve(0); - var curve_started_at_origin = translate( - -x_of(start_point), - -y_of(start_point) - )(curve); - var new_end_point = curve_started_at_origin(1); - var theta = Math.atan2(y_of(new_end_point), x_of(new_end_point)); - var curve_ended_at_x_axis = rotate_around_origin(-theta)( - curve_started_at_origin - ); - var end_point_on_x_axis = x_of(curve_ended_at_x_axis(1)); - return scale(1 / end_point_on_x_axis)(curve_ended_at_x_axis); + var start_point = curve(0) + var curve_started_at_origin = translate(-x_of(start_point), -y_of(start_point))(curve) + var new_end_point = curve_started_at_origin(1) + var theta = Math.atan2(y_of(new_end_point), x_of(new_end_point)) + var curve_ended_at_x_axis = rotate_around_origin(-theta)(curve_started_at_origin) + var end_point_on_x_axis = x_of(curve_ended_at_x_axis(1)) + return scale(1 / end_point_on_x_axis)(curve_ended_at_x_axis) } // Binary-transform = (Curve,Curve --> Curve) @@ -209,11 +198,11 @@ function put_in_standard_position(curve) { function connect_rigidly(curve1, curve2) { return function(t) { if (t < 1 / 2) { - return curve1(2 * t); + return curve1(2 * t) } else { - return curve2(2 * t - 1); + return curve2(2 * t - 1) } - }; + } } // CONNECT-ENDS makes a curve consisting of curve1 followed by @@ -228,46 +217,42 @@ function connect_rigidly(curve1, curve2) { // GOSPERIZE is a Curve-Transform function gosperize(curve) { - var scaled_curve = scale(Math.sqrt(2) / 2)(curve); + var scaled_curve = scale(Math.sqrt(2) / 2)(curve) return connect_rigidly( rotate_around_origin(Math.PI / 4)(scaled_curve), translate(0.5, 0.5)(rotate_around_origin(-Math.PI / 4)(scaled_curve)) - ); + ) } // GOSPER-CURVE is of type (JS-Num --> Curve) function gosper_curve(level) { - return repeated(gosperize, level)(unit_line); + return repeated(gosperize, level)(unit_line) } // DRAWING GOSPER CURVES function show_connected_gosper(level) { - return draw_connected(200)( - squeeze_rectangular_portion(-0.5, 1.5, -0.5, 1.5)(gosper_curve(level)) - ); + return draw_connected(200)(squeeze_rectangular_portion(-0.5, 1.5, -0.5, 1.5)(gosper_curve(level))) } function param_gosper(level, angle_at) { if (level === 0) { - return unit_line; + return unit_line } else { - return param_gosperize(angle_at(level))(param_gosper(level - 1, angle_at)); + return param_gosperize(angle_at(level))(param_gosper(level - 1, angle_at)) } } function param_gosperize(theta) { return function(curve) { - var scale_factor = 1 / Math.cos(theta) / 2; - var scaled_curve = scale(scale_factor)(curve); + var scale_factor = 1 / Math.cos(theta) / 2 + var scaled_curve = scale(scale_factor)(curve) return connect_rigidly( rotate_around_origin(theta)(scaled_curve), - translate(0.5, Math.sin(theta) * scale_factor)( - rotate_around_origin(-theta)(scaled_curve) - ) - ); - }; + translate(0.5, Math.sin(theta) * scale_factor)(rotate_around_origin(-theta)(scaled_curve)) + ) + } } // DRAGONIZE @@ -276,11 +261,9 @@ function param_gosperize(theta) { function zc_dragonize(n, curve) { if (n === 0) { - return curve; + return curve } else { - var c = zc_dragonize(n - 1, curve); - return put_in_standard_position( - connect_ends(rotate_around_origin(-Math.PI / 2)(c), c) - ); + var c = zc_dragonize(n - 1, curve) + return put_in_standard_position(connect_ends(rotate_around_origin(-Math.PI / 2)(c), c)) } } diff --git a/public/externalLibs/graphics/webGLhi_graph_ce.js b/public/externalLibs/graphics/webGLhi_graph_ce.js index 69cdc4afc1..50f5419d01 100644 --- a/public/externalLibs/graphics/webGLhi_graph_ce.js +++ b/public/externalLibs/graphics/webGLhi_graph_ce.js @@ -1,131 +1,125 @@ // USEFUL, SIMPLE, GENERAL PROCEDURES -function compose(f, g){ - return function(x){ - return f(g(x)); - } +function compose(f, g) { + return function(x) { + return f(g(x)) + } } -function thrice(f){ - return compose(compose(f, f), f); +function thrice(f) { + return compose(compose(f, f), f) } -function identity(t){ - return t; +function identity(t) { + return t } -function repeated(f, n){ - if(n === 0){ - return identity; - }else{ - return compose(f, repeated(f, n - 1)); +function repeated(f, n) { + if (n === 0) { + return identity + } else { + return compose(f, repeated(f, n - 1)) } } // USEFUL NUMERICAL PROCEDURE -function square(x){ return x * x; } +function square(x) { + return x * x +} // SOME CURVES -function unit_circle(t){ - return make_point(Math.sin(2 * Math.PI * t), - Math.cos(2 * Math.PI * t)); +function unit_circle(t) { + return make_point(Math.sin(2 * Math.PI * t), Math.cos(2 * Math.PI * t)) } -function unit_line(t){ - return make_point(t, 0); +function unit_line(t) { + return make_point(t, 0) } function unit_line_at(y) { return function(t) { - return make_point(t, y); - }; + return make_point(t, y) + } } -function alternative_unit_circle(t){ - return make_point(Math.sin(2 * Math.PI * square(t)), - Math.cos(2 * Math.PI * square(t))); +function alternative_unit_circle(t) { + return make_point(Math.sin(2 * Math.PI * square(t)), Math.cos(2 * Math.PI * square(t))) } // made available for Mission 6 -function arc(t){ - return make_point(Math.sin(Math.PI * t), - Math.cos(Math.PI * t)); +function arc(t) { + return make_point(Math.sin(Math.PI * t), Math.cos(Math.PI * t)) } // Curve-Transform = (Curve --> Curve) // SOME CURVE-TRANSFORMS -function invert(curve){ - return function(t){ - return curve(1 - t); - } +function invert(curve) { + return function(t) { + return curve(1 - t) + } } -function rotate_pi_over_2(curve){ - return function(t){ - var ct = curve(t); - return make_point(-y_of(ct), - x_of(ct)); - } +function rotate_pi_over_2(curve) { + return function(t) { + var ct = curve(t) + return make_point(-y_of(ct), x_of(ct)) + } } - // CONSTRUCTORS OF CURVE-TRANSFORMS +// CONSTRUCTORS OF CURVE-TRANSFORMS // TRANSLATE is of type (JS-Num, JS-Num --> Curve-Transform) -function translate(x0, y0){ - return function(curve){ - return function(t){ - var ct = curve(t); - return make_point(x0 + x_of(ct), - y0 + y_of(ct)); - } - } +function translate(x0, y0) { + return function(curve) { + return function(t) { + var ct = curve(t) + return make_point(x0 + x_of(ct), y0 + y_of(ct)) + } + } } // ROTATE-AROUND-ORIGIN is of type (JS-Num --> Curve-Transform) -function rotate_around_origin(theta){ - var cth = Math.cos(theta); - var sth = Math.sin(theta); - return function (curve){ - return function(t){ - var ct = curve(t); - var x = x_of(ct); - var y = y_of(ct); - return make_point((cth * x) - (sth * y), - (sth * x) + (cth * y)); - } - } +function rotate_around_origin(theta) { + var cth = Math.cos(theta) + var sth = Math.sin(theta) + return function(curve) { + return function(t) { + var ct = curve(t) + var x = x_of(ct) + var y = y_of(ct) + return make_point(cth * x - sth * y, sth * x + cth * y) + } + } } -function deriv_t(n){ - var delta_t = 1 / n; - return function (curve){ - return function(t){ - var ct = curve(t); - var ctdelta = curve(t + delta_t); - return make_point((x_of(ctdelta) - x_of(ct)) / delta_t, - (y_of(ctdelta) - y_of(ct)) / delta_t); - } - } +function deriv_t(n) { + var delta_t = 1 / n + return function(curve) { + return function(t) { + var ct = curve(t) + var ctdelta = curve(t + delta_t) + return make_point((x_of(ctdelta) - x_of(ct)) / delta_t, (y_of(ctdelta) - y_of(ct)) / delta_t) + } + } } -function scale_x_y(a, b){ - return function (curve){ - return function(t){ - var ct = curve(t); - return make_point(a * x_of(ct), - b * y_of(ct)); - } - } +function scale_x_y(a, b) { + return function(curve) { + return function(t) { + var ct = curve(t) + return make_point(a * x_of(ct), b * y_of(ct)) + } + } } -function scale(s){ - return scale_x_y(s, s); +function scale(s) { + return scale_x_y(s, s) } // SQUEEZE-RECTANGULAR-PORTION translates and scales a curve @@ -134,48 +128,49 @@ function scale(s){ // which has x, y coordinates from 0 to 1. // It is of type (JS-Num, JS-Num, JS-Num, JS-Num --> Curve-Transform). -function squeeze_rectangular_portion(xlo, xhi, ylo, yhi){ - var width = xhi - xlo; - var height = yhi - ylo; - if(width === 0 || height === 0){ - throw "attempt to squeeze window to zero"; - }else{ - return compose(scale_x_y(1 / width, - 1 / height), - translate(-xlo, -ylo)); +function squeeze_rectangular_portion(xlo, xhi, ylo, yhi) { + var width = xhi - xlo + var height = yhi - ylo + if (width === 0 || height === 0) { + throw 'attempt to squeeze window to zero' + } else { + return compose(scale_x_y(1 / width, 1 / height), translate(-xlo, -ylo)) } } - // SQUEEZE-FULL-VIEW translates and scales a curve such that // the ends are fully visible. // It is very similar to the squeeze-rectangular-portion procedure // only that that procedure does not allow the edges to be easily seen -function squeeze_full_view(xlo, xhi, ylo, yhi){ - var width = xhi - xlo; - var height = yhi - ylo; - if(width === 0 || height === 0){ - throw "attempt to squeeze window to zero"; - }else{ - return compose(scale_x_y(0.99 * 1 / width, - 0.99 * 1 / height), - translate(-(xlo - 0.01), -(ylo - 0.01))); +function squeeze_full_view(xlo, xhi, ylo, yhi) { + var width = xhi - xlo + var height = yhi - ylo + if (width === 0 || height === 0) { + throw 'attempt to squeeze window to zero' + } else { + return compose( + scale_x_y(0.99 * 1 / width, 0.99 * 1 / height), + translate(-(xlo - 0.01), -(ylo - 0.01)) + ) } } // FULL-VIEW -function full_view_proportional(xlo, xhi, ylo, yhi){ - var width = xhi - xlo; - var height = yhi - ylo; - if(width === 0 || height === 0){ - throw "attempt to squeeze window to zero"; - }else{ - var scale_factor = Math.min(0.9 * 1 / width, 0.9 * 1 / height); - var new_mid_x = scale_factor * (xlo + xhi) / 2; - var new_mid_y = scale_factor * (ylo + yhi) / 2; - return compose(translate(0.5 - new_mid_x, 0.5 - new_mid_y), scale_x_y(scale_factor, scale_factor)); +function full_view_proportional(xlo, xhi, ylo, yhi) { + var width = xhi - xlo + var height = yhi - ylo + if (width === 0 || height === 0) { + throw 'attempt to squeeze window to zero' + } else { + var scale_factor = Math.min(0.9 * 1 / width, 0.9 * 1 / height) + var new_mid_x = scale_factor * (xlo + xhi) / 2 + var new_mid_y = scale_factor * (ylo + yhi) / 2 + return compose( + translate(0.5 - new_mid_x, 0.5 - new_mid_y), + scale_x_y(scale_factor, scale_factor) + ) } } @@ -186,105 +181,112 @@ function full_view_proportional(xlo, xhi, ylo, yhi){ // its endpoint on the x axis, then scaling it to put the endpoint at (1,0). // Behavior is unspecified on closed curves (with start-point = end-point). -function put_in_standard_position(curve){ - var start_point = curve(0); - var curve_started_at_origin = translate(-x_of(start_point), -y_of(start_point))(curve); - var new_end_point = curve_started_at_origin(1); - var theta = Math.atan2(y_of(new_end_point), x_of(new_end_point)); - var curve_ended_at_x_axis = rotate_around_origin(-theta)(curve_started_at_origin); - var end_point_on_x_axis = x_of(curve_ended_at_x_axis(1)); - return scale(1 / end_point_on_x_axis)(curve_ended_at_x_axis); +function put_in_standard_position(curve) { + var start_point = curve(0) + var curve_started_at_origin = translate(-x_of(start_point), -y_of(start_point))(curve) + var new_end_point = curve_started_at_origin(1) + var theta = Math.atan2(y_of(new_end_point), x_of(new_end_point)) + var curve_ended_at_x_axis = rotate_around_origin(-theta)(curve_started_at_origin) + var end_point_on_x_axis = x_of(curve_ended_at_x_axis(1)) + return scale(1 / end_point_on_x_axis)(curve_ended_at_x_axis) } - // Binary-transform = (Curve,Curve --> Curve) +// Binary-transform = (Curve,Curve --> Curve) // CONNECT-RIGIDLY makes a curve consisting of curve1 followed by curve2. -function connect_rigidly(curve1, curve2){ - return function(t){ - if(t < 1/2){ - return curve1(2 * t); - }else{ - return curve2(2 * t - 1); - } - } +function connect_rigidly(curve1, curve2) { + return function(t) { + if (t < 1 / 2) { + return curve1(2 * t) + } else { + return curve2(2 * t - 1) + } + } } // CONNECT-ENDS makes a curve consisting of curve1 followed by // a copy of curve2 starting at the end of curve1 -function connect_ends(curve1, curve2){ - var start_point_of_curve2 = curve2(0); - var end_point_of_curve1 = curve1(1); - return connect_rigidly(curve1, - translate(x_of(end_point_of_curve1) - x_of(start_point_of_curve2), - y_of(end_point_of_curve1) - y_of(start_point_of_curve2))(curve2)); +function connect_ends(curve1, curve2) { + var start_point_of_curve2 = curve2(0) + var end_point_of_curve1 = curve1(1) + return connect_rigidly( + curve1, + translate( + x_of(end_point_of_curve1) - x_of(start_point_of_curve2), + y_of(end_point_of_curve1) - y_of(start_point_of_curve2) + )(curve2) + ) } - // function connect_ends(curve1, curve2) {...} - // FRACTAL CURVES +// FRACTAL CURVES // GOSPERIZE is a Curve-Transform -function gosperize(curve){ - var scaled_curve = scale_x_y(Math.sqrt(2) / 2, Math.sqrt(2) / 2)(curve); - return connect_rigidly(rotate_around_origin(Math.PI / 4)(scaled_curve), - translate(0.5, 0.5)(rotate_around_origin(-Math.PI / 4)(scaled_curve))); +function gosperize(curve) { + var scaled_curve = scale_x_y(Math.sqrt(2) / 2, Math.sqrt(2) / 2)(curve) + return connect_rigidly( + rotate_around_origin(Math.PI / 4)(scaled_curve), + translate(0.5, 0.5)(rotate_around_origin(-Math.PI / 4)(scaled_curve)) + ) } // GOSPER-CURVE is of type (JS-Num --> Curve) -function gosper_curve(level){ - return repeated(gosperize, level)(unit_line); +function gosper_curve(level) { + return repeated(gosperize, level)(unit_line) } - // DRAWING GOSPER CURVES +// DRAWING GOSPER CURVES -function show_connected_gosper(level){ - return draw_connected(200)(squeeze_rectangular_portion(-0.5, 1.5, -0.5, 1.5)(gosper_curve(level))); +function show_connected_gosper(level) { + return draw_connected(200)(squeeze_rectangular_portion(-0.5, 1.5, -0.5, 1.5)(gosper_curve(level))) } -function param_gosper(level, angle_at){ - if(level === 0){ - return unit_line; - }else{ - return param_gosperize(angle_at(level))(param_gosper(level - 1, angle_at)); +function param_gosper(level, angle_at) { + if (level === 0) { + return unit_line + } else { + return param_gosperize(angle_at(level))(param_gosper(level - 1, angle_at)) } } -function param_gosperize(theta){ - return function(curve){ - var scale_factor = 1 / Math.cos(theta) / 2; - var scaled_curve = scale(scale_factor)(curve); - return connect_rigidly(rotate_around_origin(theta)(scaled_curve), - translate(0.5, Math.sin(theta) * scale_factor)(rotate_around_origin(-theta)(scaled_curve))); - } +function param_gosperize(theta) { + return function(curve) { + var scale_factor = 1 / Math.cos(theta) / 2 + var scaled_curve = scale(scale_factor)(curve) + return connect_rigidly( + rotate_around_origin(theta)(scaled_curve), + translate(0.5, Math.sin(theta) * scale_factor)(rotate_around_origin(-theta)(scaled_curve)) + ) + } } - // DRAGONIZE +// DRAGONIZE // zc-dragonize is a Curve-Transform -function zc_dragonize(n, curve){ - if(n === 0){ - return curve; - }else{ - var c = zc_dragonize(n - 1, curve); - return put_in_standard_position(connect_ends(rotate_around_origin(-Math.PI / 2)(c), c)); +function zc_dragonize(n, curve) { + if (n === 0) { + return curve + } else { + var c = zc_dragonize(n - 1, curve) + return put_in_standard_position(connect_ends(rotate_around_origin(-Math.PI / 2)(c), c)) } } -function mingyu_rotate(theta) { // rotates around origin, but less efficiently - var cth = Math.cos(theta); - var sth = Math.sin(theta); - return function (curve) { - return function(t) { - var x = x_of(curve(t)); // Mingyu writes (curve t) - var y = y_of(curve(t)); // twice - return make_point((cth * x) - (sth * y), - (sth * x) + (cth * y)); - }; - }; +function mingyu_rotate(theta) { + // rotates around origin, but less efficiently + var cth = Math.cos(theta) + var sth = Math.sin(theta) + return function(curve) { + return function(t) { + var x = x_of(curve(t)) // Mingyu writes (curve t) + var y = y_of(curve(t)) // twice + return make_point(cth * x - sth * y, sth * x + cth * y) + } + } } diff --git a/public/externalLibs/graphics/webGLrune.js b/public/externalLibs/graphics/webGLrune.js index cd20f54528..8bc1ebae5b 100644 --- a/public/externalLibs/graphics/webGLrune.js +++ b/public/externalLibs/graphics/webGLrune.js @@ -1,53 +1,53 @@ -var viewport_size = 512; // This is the height of the viewport +var viewport_size = 512 // This is the height of the viewport // while a curve is approximated by a polygon, // the side of the polygon will be no longer than maxArcLength pixels -var maxArcLength = 20; +var maxArcLength = 20 /*-----------------------Some class definitions----------------------*/ function PrimaryShape(first, count) { - this.isPrimary = true; // this is a primary shape - this.first = first; // the first index in the index buffer + this.isPrimary = true // this is a primary shape + this.first = first // the first index in the index buffer // that belongs to this shape - this.count = count; // number of indices to draw the shape + this.count = count // number of indices to draw the shape } function Shape() { - this.isPrimary = false; - this.transMatrix = mat4.create(); - this.shapes = []; - this.color = undefined; + this.isPrimary = false + this.transMatrix = mat4.create() + this.shapes = [] + this.color = undefined } // set the transformation matrix related to the shape Shape.prototype.setM = function(matrix) { - this.transMatrix = matrix; -}; + this.transMatrix = matrix +} // get the transformation matrix related to the shape Shape.prototype.getM = function() { - return this.transMatrix; -}; + return this.transMatrix +} // get the sub-shapes (array) of the shape Shape.prototype.getS = function() { - return this.shapes; -}; + return this.shapes +} Shape.prototype.setS = function(shapes) { - this.shapes = shapes; -}; + this.shapes = shapes +} Shape.prototype.addS = function(shape) { - this.shapes.push(shape); -}; + this.shapes.push(shape) +} Shape.prototype.getColor = function() { - return this.color; -}; + return this.color +} Shape.prototype.setColor = function(color) { - this.color = color; -}; + this.color = color +} /*-----------------Initialize vertex and index buffer----------------*/ // vertices is an array of points @@ -119,7 +119,7 @@ var vertices = [ 0.0, 0.0, 1.0 -]; +] // indices is an array of indices, each refer to a point in vertices // (will be converted to Uint16Array later) var indices = [ @@ -161,406 +161,361 @@ var indices = [ 13, 0, 1 -]; +] function makeCircle() { // draw a polygon with many vertices to approximate a circle - var centerVerInd = 0; - var firstVer = vertices.length / 4; - var firstInd = indices.length; - var numPoints = Math.ceil(Math.PI * viewport_size / maxArcLength); + var centerVerInd = 0 + var firstVer = vertices.length / 4 + var firstInd = indices.length + var numPoints = Math.ceil(Math.PI * viewport_size / maxArcLength) // generate points and store it in the vertex buffer for (var i = 0; i < numPoints; i++) { - var angle = Math.PI * 2 * i / numPoints; - vertices.push(Math.cos(angle), Math.sin(angle), 0, 1); + var angle = Math.PI * 2 * i / numPoints + vertices.push(Math.cos(angle), Math.sin(angle), 0, 1) } // generate indices for the triangles and store in the index buffer for (var i = firstVer; i < firstVer + numPoints - 1; i++) { - indices.push(centerVerInd, i, i + 1); + indices.push(centerVerInd, i, i + 1) } - indices.push(centerVerInd, firstVer, firstVer + numPoints - 1); - var count = 3 * numPoints; - return new PrimaryShape(firstInd, count); + indices.push(centerVerInd, firstVer, firstVer + numPoints - 1) + var count = 3 * numPoints + return new PrimaryShape(firstInd, count) } function makeHeart() { - var bottomMidInd = 7; - var firstVer = vertices.length / 4; - var firstInd = indices.length; - var root2 = Math.sqrt(2); - var r = 4 / (2 + 3 * root2); - var scaleX = 1 / (r * (1 + root2 / 2)); - var numPoints = Math.ceil(Math.PI / 2 * viewport_size * r / maxArcLength); + var bottomMidInd = 7 + var firstVer = vertices.length / 4 + var firstInd = indices.length + var root2 = Math.sqrt(2) + var r = 4 / (2 + 3 * root2) + var scaleX = 1 / (r * (1 + root2 / 2)) + var numPoints = Math.ceil(Math.PI / 2 * viewport_size * r / maxArcLength) // right semi-circle - var rightCenterX = r / root2; - var rightCenterY = 1 - r; + var rightCenterX = r / root2 + var rightCenterY = 1 - r for (var i = 0; i < numPoints; i++) { - var angle = Math.PI * (-1 / 4 + i / numPoints); + var angle = Math.PI * (-1 / 4 + i / numPoints) vertices.push( (Math.cos(angle) * r + rightCenterX) * scaleX, Math.sin(angle) * r + rightCenterY, 0, 1 - ); + ) } // left semi-circle - var leftCenterX = -r / root2; - var leftCenterY = 1 - r; + var leftCenterX = -r / root2 + var leftCenterY = 1 - r for (var i = 0; i <= numPoints; i++) { - var angle = Math.PI * (1 / 4 + i / numPoints); + var angle = Math.PI * (1 / 4 + i / numPoints) vertices.push( (Math.cos(angle) * r + leftCenterX) * scaleX, Math.sin(angle) * r + leftCenterY, 0, 1 - ); + ) } // update index buffer for (var i = firstVer; i < firstVer + 2 * numPoints; i++) { - indices.push(bottomMidInd, i, i + 1); + indices.push(bottomMidInd, i, i + 1) } - var count = 3 * 2 * numPoints; - return new PrimaryShape(firstInd, count); + var count = 3 * 2 * numPoints + return new PrimaryShape(firstInd, count) } function makePentagram() { - var firstVer = vertices.length / 4; - var firstInd = indices.length; + var firstVer = vertices.length / 4 + var firstInd = indices.length - var v1 = Math.sin(Math.PI / 10); - var v2 = Math.cos(Math.PI / 10); + var v1 = Math.sin(Math.PI / 10) + var v2 = Math.cos(Math.PI / 10) - var w1 = Math.sin(3 * Math.PI / 10); - var w2 = Math.cos(3 * Math.PI / 10); + var w1 = Math.sin(3 * Math.PI / 10) + var w2 = Math.cos(3 * Math.PI / 10) - vertices.push(v2, v1, 0, 1); - vertices.push(w2, -w1, 0, 1); - vertices.push(-w2, -w1, 0, 1); - vertices.push(-v2, v1, 0, 1); - vertices.push(0, 1, 0, 1); + vertices.push(v2, v1, 0, 1) + vertices.push(w2, -w1, 0, 1) + vertices.push(-w2, -w1, 0, 1) + vertices.push(-v2, v1, 0, 1) + vertices.push(0, 1, 0, 1) for (var i = 0; i < 5; i++) { - indices.push(0, firstVer + i, firstVer + (i + 2) % 5); + indices.push(0, firstVer + i, firstVer + (i + 2) % 5) } - return new PrimaryShape(firstInd, 15); + return new PrimaryShape(firstInd, 15) } function makeRibbon() { - var firstVer = vertices.length / 4; - var firstInd = indices.length; + var firstVer = vertices.length / 4 + var firstInd = indices.length - var theta_max = 30; - var thickness = -1 / theta_max; - var unit = 0.1; + var theta_max = 30 + var thickness = -1 / theta_max + var unit = 0.1 for (var i = 0; i < theta_max; i += unit) { - vertices.push( - i / theta_max * Math.cos(i), - i / theta_max * Math.sin(i), - 0, - 1 - ); + vertices.push(i / theta_max * Math.cos(i), i / theta_max * Math.sin(i), 0, 1) vertices.push( Math.abs(Math.cos(i) * thickness) + i / theta_max * Math.cos(i), Math.abs(Math.sin(i) * thickness) + i / theta_max * Math.sin(i), 0, 1 - ); + ) } - var totalPoints = Math.ceil(theta_max / unit) * 2; + var totalPoints = Math.ceil(theta_max / unit) * 2 for (var i = firstVer; i < firstVer + totalPoints - 2; i++) { - indices.push(i, i + 1, i + 2); + indices.push(i, i + 1, i + 2) } - return new PrimaryShape(firstInd, 3 * totalPoints - 6); + return new PrimaryShape(firstInd, 3 * totalPoints - 6) } -var black_bb = new PrimaryShape(0, 6); -var blank_bb = new PrimaryShape(0, 0); -var rcross_bb = new PrimaryShape(6, 15); -var sail_bb = new PrimaryShape(21, 3); -var corner_bb = new PrimaryShape(24, 3); -var nova_bb = new PrimaryShape(27, 6); -var circle_bb = makeCircle(); -var heart_bb = makeHeart(); -var pentagram_bb = makePentagram(); -var ribbon_bb = makeRibbon(); +var black_bb = new PrimaryShape(0, 6) +var blank_bb = new PrimaryShape(0, 0) +var rcross_bb = new PrimaryShape(6, 15) +var sail_bb = new PrimaryShape(21, 3) +var corner_bb = new PrimaryShape(24, 3) +var nova_bb = new PrimaryShape(27, 6) +var circle_bb = makeCircle() +var heart_bb = makeHeart() +var pentagram_bb = makePentagram() +var ribbon_bb = makeRibbon() // convert vertices and indices to typed arrays -vertices = new Float32Array(vertices); -indices = new Uint16Array(indices); +vertices = new Float32Array(vertices) +indices = new Uint16Array(indices) /*-----------------------Drawing functions----------------------*/ function generateFlattenedShapeList(shape) { - var matStack = []; - var matrix = mat4.create(); - var shape_list = {}; + var matStack = [] + var matrix = mat4.create() + var shape_list = {} function pushMat() { - matStack.push(mat4.clone(matrix)); + matStack.push(mat4.clone(matrix)) } function popMat() { if (matStack.length == 0) { - throw 'Invalid pop matrix!'; + throw 'Invalid pop matrix!' } else { - matrix = matStack.pop(); + matrix = matStack.pop() } } function helper(shape, color) { if (shape.isPrimary) { if (shape.count === 0) { // this is blank_bb, do nothing - return; + return } if (!shape_list[shape.first]) { shape_list[shape.first] = { shape: shape, matrices: [], colors: [] - }; + } } - shape_list[shape.first].matrices.push(matrix); - shape_list[shape.first].colors.push(color || [0, 0, 0, 1]); + shape_list[shape.first].matrices.push(matrix) + shape_list[shape.first].colors.push(color || [0, 0, 0, 1]) } else { if (color === undefined && shape.getColor() !== undefined) { - color = shape.getColor(); + color = shape.getColor() } - pushMat(); - mat4.multiply(matrix, matrix, shape.getM()); - var childShapes = shape.getS(); + pushMat() + mat4.multiply(matrix, matrix, shape.getM()) + var childShapes = shape.getS() for (var i = 0; i < childShapes.length; i++) { - helper(childShapes[i], color); + helper(childShapes[i], color) } - popMat(); + popMat() } } function flatten(matrices, colors) { - var instanceArray = new Float32Array(matrices.length * 20); + var instanceArray = new Float32Array(matrices.length * 20) for (var i = 0; i < matrices.length; i++) { - instanceArray.set(matrices[i], 20 * i); - instanceArray.set(colors[i], 20 * i + 16); + instanceArray.set(matrices[i], 20 * i) + instanceArray.set(colors[i], 20 * i + 16) } - return instanceArray; + return instanceArray } - helper(shape); - var flattened_shape_list = []; + helper(shape) + var flattened_shape_list = [] // draw a white square background first flattened_shape_list.push({ shape: black_bb, - instanceArray: new Float32Array([ - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - -1, - 1, - 1, - 1, - 1, - 1 - ]) - }); + instanceArray: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1, 1, 1, 1, 1, 1]) + }) for (var key in shape_list) { if (shape_list.hasOwnProperty(key)) { - var shape = shape_list[key].shape; - var instanceArray = flatten( - shape_list[key].matrices, - shape_list[key].colors - ); - flattened_shape_list.push({ shape: shape, instanceArray: instanceArray }); + var shape = shape_list[key].shape + var instanceArray = flatten(shape_list[key].matrices, shape_list[key].colors) + flattened_shape_list.push({ shape: shape, instanceArray: instanceArray }) } } - return flattened_shape_list; + return flattened_shape_list } function drawWithWebGL(flattened_shape_list, drawFunction) { for (var i = 0; i < flattened_shape_list.length; i++) { - var shape = flattened_shape_list[i].shape; - var instanceArray = flattened_shape_list[i].instanceArray; - drawFunction(shape.first, shape.count, instanceArray); + var shape = flattened_shape_list[i].shape + var instanceArray = flattened_shape_list[i].instanceArray + drawFunction(shape.first, shape.count, instanceArray) } } function show(shape) { - clear_viewport(); - var flattened_shape_list = generateFlattenedShapeList(shape); - drawWithWebGL(flattened_shape_list, drawRune); - return new ShapeDrawn(); + clear_viewport() + var flattened_shape_list = generateFlattenedShapeList(shape) + drawWithWebGL(flattened_shape_list, drawRune) + return new ShapeDrawn() } function anaglyph(shape) { - clear_viewport(); - clearAnaglyphFramebuffer(); - var flattened_shape_list = generateFlattenedShapeList(shape); - drawWithWebGL(flattened_shape_list, drawAnaglyph); - return new ShapeDrawn(); + clear_viewport() + clearAnaglyphFramebuffer() + var flattened_shape_list = generateFlattenedShapeList(shape) + drawWithWebGL(flattened_shape_list, drawAnaglyph) + return new ShapeDrawn() } -var hollusionTimeout; +var hollusionTimeout function hollusion(shape, num) { - clear_viewport(); - var num = num > 3 ? num : 3; - var flattened_shape_list = generateFlattenedShapeList(shape); - var frame_list = []; + clear_viewport() + var num = num > 3 ? num : 3 + var flattened_shape_list = generateFlattenedShapeList(shape) + var frame_list = [] for (var j = 0; j < num; j++) { - var frame = open_pixmap('frame' + j, viewport_size, viewport_size, false); + var frame = open_pixmap('frame' + j, viewport_size, viewport_size, false) for (var i = 0; i < flattened_shape_list.length; i++) { - var shape = flattened_shape_list[i].shape; - var instanceArray = flattened_shape_list[i].instanceArray; - var cameraMatrix = mat4.create(); + var shape = flattened_shape_list[i].shape + var instanceArray = flattened_shape_list[i].instanceArray + var cameraMatrix = mat4.create() mat4.lookAt( cameraMatrix, - vec3.fromValues( - -halfEyeDistance + j / (num - 1) * 2 * halfEyeDistance, - 0, - 0 - ), + vec3.fromValues(-halfEyeDistance + j / (num - 1) * 2 * halfEyeDistance, 0, 0), vec3.fromValues(0, 0, -0.4), vec3.fromValues(0, 1, 0) - ); - draw3D( - shape.first, - shape.count, - instanceArray, - cameraMatrix, - [1, 1, 1, 1], - null, - true - ); + ) + draw3D(shape.first, shape.count, instanceArray, cameraMatrix, [1, 1, 1, 1], null, true) } - gl.finish(); - copy_viewport(gl.canvas, frame); - frame_list.push(frame); - clear_viewport(); + gl.finish() + copy_viewport(gl.canvas, frame) + frame_list.push(frame) + clear_viewport() } for (var i = frame_list.length - 2; i > 0; i--) { - frame_list.push(frame_list[i]); + frame_list.push(frame_list[i]) } function animate() { - var frame = frame_list.shift(); - copy_viewport_webGL(frame); - frame_list.push(frame); - hollusionTimeout = setTimeout(animate, 500 / num); + var frame = frame_list.shift() + copy_viewport_webGL(frame) + frame_list.push(frame) + hollusionTimeout = setTimeout(animate, 500 / num) } - animate(); - return new ShapeDrawn(); + animate() + return new ShapeDrawn() } function clearHollusion() { - clearTimeout(hollusionTimeout); + clearTimeout(hollusionTimeout) } function stereogram(shape) { - clear_viewport(); - var flattened_shape_list = generateFlattenedShapeList(shape); - var depth_map = open_pixmap('depth_map', viewport_size, viewport_size, true); + clear_viewport() + var flattened_shape_list = generateFlattenedShapeList(shape) + var depth_map = open_pixmap('depth_map', viewport_size, viewport_size, true) // draw the depth map for (var i = 0; i < flattened_shape_list.length; i++) { - var shape = flattened_shape_list[i].shape; - var instanceArray = flattened_shape_list[i].instanceArray; - drawRune(shape.first, shape.count, instanceArray); + var shape = flattened_shape_list[i].shape + var instanceArray = flattened_shape_list[i].instanceArray + drawRune(shape.first, shape.count, instanceArray) } - gl.finish(); - copy_viewport(gl.canvas, depth_map); + gl.finish() + copy_viewport(gl.canvas, depth_map) // copy from the old library, with some modifications - var E = 100; //; distance between eyes, 300 pixels - var D = 600; //distance between eyes and image plane, 600 pixels - var delta = 40; //stereo seperation - var MAX_X = depth_map.width; - var MAX_Y = depth_map.height; - var MAX_Z = 0; - var CENTRE = Math.round(MAX_X / 2); - - var stereo_data = depth_map - .getContext('2d') - .createImageData(depth_map.width, depth_map.height); - var pixels = stereo_data.data; - var depth_data = depth_map - .getContext('2d') - .getImageData(0, 0, depth_map.width, depth_map.height); - var depth_pix = depth_data.data; + var E = 100 //; distance between eyes, 300 pixels + var D = 600 //distance between eyes and image plane, 600 pixels + var delta = 40 //stereo seperation + var MAX_X = depth_map.width + var MAX_Y = depth_map.height + var MAX_Z = 0 + var CENTRE = Math.round(MAX_X / 2) + + var stereo_data = depth_map.getContext('2d').createImageData(depth_map.width, depth_map.height) + var pixels = stereo_data.data + var depth_data = depth_map.getContext('2d').getImageData(0, 0, depth_map.width, depth_map.height) + var depth_pix = depth_data.data function get_depth(x, y) { if (x >= 0 && x < MAX_X) { - var tgt = 4 * (y * depth_map.width + x); - return -100 * depth_pix[tgt] / 255 - 400; - } else return -500; + var tgt = 4 * (y * depth_map.width + x) + return -100 * depth_pix[tgt] / 255 - 400 + } else return -500 } for (var y = 0; y < MAX_Y; y++) { //may want to use list of points instead - var link_left = []; - var link_right = []; - var colours = []; + var link_left = [] + var link_right = [] + var colours = [] //varraint creation for (var x = 0; x < MAX_X; x++) { - var z = get_depth(x, y); - var s = delta + z * (E / (z - D)); // Determine distance between intersection of lines of sight on image plane - var left = x - Math.round(s / 2); //x is integer, left is integer - var right = left + Math.round(s); //right is integer + var z = get_depth(x, y) + var s = delta + z * (E / (z - D)) // Determine distance between intersection of lines of sight on image plane + var left = x - Math.round(s / 2) //x is integer, left is integer + var right = left + Math.round(s) //right is integer if (left > 0 && right < MAX_X) { if ( (!link_right[left] || s < link_right[left]) && (!link_left[right] || s < link_left[right]) ) { - link_right[left] = Math.round(s); - link_left[right] = Math.round(s); + link_right[left] = Math.round(s) + link_left[right] = Math.round(s) } } } //varraint resolution for (var x = 0; x < MAX_X; x++) { - var s = link_left[x]; - if (s == undefined) s = Infinity; - else s = x; - var d; - if (x - s > 0) d = link_right[x - s]; - else d = Infinity; - if (s == Infinity || s > d) link_left[x] = 0; + var s = link_left[x] + if (s == undefined) s = Infinity + else s = x + var d + if (x - s > 0) d = link_right[x - s] + else d = Infinity + if (s == Infinity || s > d) link_left[x] = 0 } //drawing step for (var x = 0; x < MAX_X; x++) { - var s = link_left[x]; //should be valid for any integer till MAX_X + var s = link_left[x] //should be valid for any integer till MAX_X var colour = colours[x - s] || [ Math.round(Math.round(Math.random() * 10 / 9) * 255), Math.round(Math.round(Math.random() * 10 / 9) * 255), Math.round(Math.round(Math.random() * 10 / 9) * 255) - ]; - var tgt = 4 * (y * depth_map.width + x); - pixels[tgt] = colour[0]; - pixels[tgt + 1] = colour[1]; - pixels[tgt + 2] = colour[2]; - pixels[tgt + 3] = 255; - colours[x] = colour; + ] + var tgt = 4 * (y * depth_map.width + x) + pixels[tgt] = colour[0] + pixels[tgt + 1] = colour[1] + pixels[tgt + 2] = colour[2] + pixels[tgt + 3] = 255 + colours[x] = colour } } //throw on canvas - depth_map.getContext('2d').putImageData(stereo_data, 0, 0); - copy_viewport_webGL(depth_map); - return new ShapeDrawn(); + depth_map.getContext('2d').putImageData(stereo_data, 0, 0) + copy_viewport_webGL(depth_map) + return new ShapeDrawn() } /*-----------------------Color functions----------------------*/ function hexToColor(hex) { - var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) return [ parseInt(result[1], 16) / 255, parseInt(result[2], 16) / 255, parseInt(result[3], 16) / 255, 1 - ]; + ] } /** @@ -572,33 +527,26 @@ function hexToColor(hex) { * @param {*} b The blue value. */ function color(shape, r, g, b) { - var wrapper = new Shape(); - wrapper.addS(shape); - var color = [ - r, - g, - b, - 1 - ] - wrapper.setColor(color); - return wrapper; + var wrapper = new Shape() + wrapper.addS(shape) + var color = [r, g, b, 1] + wrapper.setColor(color) + return wrapper } function addColorFromHex(shape, hex) { - var wrapper = new Shape(); - wrapper.addS(shape); - wrapper.setColor(hexToColor(hex)); - return wrapper; + var wrapper = new Shape() + wrapper.addS(shape) + wrapper.setColor(hexToColor(hex)) + return wrapper } function random_color(shape) { - var wrapper = new Shape(); - wrapper.addS(shape); - var randomColor = hexToColor( - colorPalette[Math.floor(Math.random() * colorPalette.length)] - ); - wrapper.setColor(randomColor); - return wrapper; + var wrapper = new Shape() + wrapper.addS(shape) + var randomColor = hexToColor(colorPalette[Math.floor(Math.random() * colorPalette.length)]) + wrapper.setColor(randomColor) + return wrapper } // black and white not included because they are boring colors @@ -613,175 +561,175 @@ var colorPalette = [ '#FFEB3B', '#FF9800', '#795548' -]; +] function red(shape) { - return addColorFromHex(shape, '#F44336'); + return addColorFromHex(shape, '#F44336') } function pink(shape) { - return addColorFromHex(shape, '#E91E63'); + return addColorFromHex(shape, '#E91E63') } function purple(shape) { - return addColorFromHex(shape, '#AA00FF'); + return addColorFromHex(shape, '#AA00FF') } function indigo(shape) { - return addColorFromHex(shape, '#3F51B5'); + return addColorFromHex(shape, '#3F51B5') } function blue(shape) { - return addColorFromHex(shape, '#2196F3'); + return addColorFromHex(shape, '#2196F3') } function green(shape) { - return addColorFromHex(shape, '#4CAF50'); + return addColorFromHex(shape, '#4CAF50') } function yellow(shape) { - return addColorFromHex(shape, '#FFEB3B'); + return addColorFromHex(shape, '#FFEB3B') } function orange(shape) { - return addColorFromHex(shape, '#FF9800'); + return addColorFromHex(shape, '#FF9800') } function brown(shape) { - return addColorFromHex(shape, '#795548'); + return addColorFromHex(shape, '#795548') } function black(shape) { - return addColorFromHex(shape, '#000000'); + return addColorFromHex(shape, '#000000') } function white(shape) { - return addColorFromHex(shape, '#FFFFFF'); + return addColorFromHex(shape, '#FFFFFF') } /*-----------------------Transformation functions----------------------*/ function scale_independent(ratio_x, ratio_y, shape) { - var scaleVec = vec3.fromValues(ratio_x, ratio_y, 1); - var scaleMat = mat4.create(); - mat4.scale(scaleMat, scaleMat, scaleVec); - var wrapper = new Shape(); - wrapper.addS(shape); - wrapper.setM(scaleMat); - return wrapper; + var scaleVec = vec3.fromValues(ratio_x, ratio_y, 1) + var scaleMat = mat4.create() + mat4.scale(scaleMat, scaleMat, scaleVec) + var wrapper = new Shape() + wrapper.addS(shape) + wrapper.setM(scaleMat) + return wrapper } function scale(ratio, shape) { - return scale_independent(ratio, ratio, shape); + return scale_independent(ratio, ratio, shape) } function translate(x, y, shape) { - var translateVec = vec3.fromValues(x, -y, 0); - var translateMat = mat4.create(); - mat4.translate(translateMat, translateMat, translateVec); - var wrapper = new Shape(); - wrapper.addS(shape); - wrapper.setM(translateMat); - return wrapper; + var translateVec = vec3.fromValues(x, -y, 0) + var translateMat = mat4.create() + mat4.translate(translateMat, translateMat, translateVec) + var wrapper = new Shape() + wrapper.addS(shape) + wrapper.setM(translateMat) + return wrapper } function rotate(rad, shape) { - var rotateMat = mat4.create(); - mat4.rotateZ(rotateMat, rotateMat, rad); - var wrapper = new Shape(); - wrapper.addS(shape); - wrapper.setM(rotateMat); - return wrapper; + var rotateMat = mat4.create() + mat4.rotateZ(rotateMat, rotateMat, rad) + var wrapper = new Shape() + wrapper.addS(shape) + wrapper.setM(rotateMat) + return wrapper } function stack_frac(frac, shape1, shape2) { - var upper = translate(0, -(1 - frac), scale_independent(1, frac, shape1)); - var lower = translate(0, frac, scale_independent(1, 1 - frac, shape2)); - var combined = new Shape(); - combined.setS([upper, lower]); - return combined; + var upper = translate(0, -(1 - frac), scale_independent(1, frac, shape1)) + var lower = translate(0, frac, scale_independent(1, 1 - frac, shape2)) + var combined = new Shape() + combined.setS([upper, lower]) + return combined } function stack(shape1, shape2) { - return stack_frac(1 / 2, shape1, shape2); + return stack_frac(1 / 2, shape1, shape2) } function stackn(n, shape) { if (n === 1) { - return shape; + return shape } else { - return stack_frac(1 / n, shape, stackn(n - 1, shape)); + return stack_frac(1 / n, shape, stackn(n - 1, shape)) } } function quarter_turn_right(shape) { - return rotate(-Math.PI / 2, shape); + return rotate(-Math.PI / 2, shape) } function quarter_turn_left(shape) { - return rotate(Math.PI / 2, shape); + return rotate(Math.PI / 2, shape) } function turn_upside_down(shape) { - return rotate(Math.PI, shape); + return rotate(Math.PI, shape) } function beside_frac(frac, shape1, shape2) { - var left = translate(-(1 - frac), 0, scale_independent(frac, 1, shape1)); - var right = translate(frac, 0, scale_independent(1 - frac, 1, shape2)); - var combined = new Shape(); - combined.setS([left, right]); - return combined; + var left = translate(-(1 - frac), 0, scale_independent(frac, 1, shape1)) + var right = translate(frac, 0, scale_independent(1 - frac, 1, shape2)) + var combined = new Shape() + combined.setS([left, right]) + return combined } function beside(shape1, shape2) { - return beside_frac(1 / 2, shape1, shape2); + return beside_frac(1 / 2, shape1, shape2) } function flip_vert(shape) { - return scale_independent(1, -1, shape); + return scale_independent(1, -1, shape) } function flip_horiz(shape) { - return scale_independent(-1, 1, shape); + return scale_independent(-1, 1, shape) } function make_cross(shape) { return stack( beside(quarter_turn_right(shape), rotate(Math.PI, shape)), beside(shape, rotate(Math.PI / 2, shape)) - ); + ) } function repeat_pattern(n, pattern, shape) { if (n === 0) { - return shape; + return shape } else { - return pattern(repeat_pattern(n - 1, pattern, shape)); + return pattern(repeat_pattern(n - 1, pattern, shape)) } } function overlay_frac(frac, shape1, shape2) { - var front = new Shape(); - front.addS(shape1); - var frontMat = front.getM(); + var front = new Shape() + front.addS(shape1) + var frontMat = front.getM() // z: scale by frac - mat4.scale(frontMat, frontMat, vec3.fromValues(1, 1, frac)); + mat4.scale(frontMat, frontMat, vec3.fromValues(1, 1, frac)) - var back = new Shape(); - back.addS(shape2); - var backMat = back.getM(); + var back = new Shape() + back.addS(shape2) + var backMat = back.getM() // z: scale by (1-frac), translate by -frac mat4.scale( backMat, mat4.translate(backMat, backMat, vec3.fromValues(0, 0, -frac)), vec3.fromValues(1, 1, 1 - frac) - ); + ) - var combined = new Shape(); - combined.setS([front, back]); // render front first to avoid redrawing - return combined; + var combined = new Shape() + combined.setS([front, back]) // render front first to avoid redrawing + return combined } function overlay(shape1, shape2) { - return overlay_frac(0.5, shape1, shape2); + return overlay_frac(0.5, shape1, shape2) } diff --git a/public/externalLibs/index.js b/public/externalLibs/index.js index 9e6840f269..5e6e8f9b43 100644 --- a/public/externalLibs/index.js +++ b/public/externalLibs/index.js @@ -1,14 +1,14 @@ -/** +/** * Load a given external library, as a javascript file * to run in the global scope, by adding it to the DOM */ function dynamicallyLoadScript(url) { - var script = document.createElement("script"); - script.src = url; + var script = document.createElement('script') + script.src = url /** Forces scripts to be loaded in order. */ script.async = false script.defer = true - document.head.appendChild(script); + document.head.appendChild(script) } /** @@ -16,7 +16,7 @@ function dynamicallyLoadScript(url) { */ function loadAllLibs() { const files = [ - // list library + // list library '/externalLibs/list.js', // sound '/externalLibs/sound/sounds.js', @@ -38,53 +38,53 @@ function loadAllLibs() { '/externalLibs/streams/stream.js', '/externalLibs/pe_library.js', '/externalLibs/assert_compiled.js' - ]; + ] for (var i = 0; i < files.length; i++) { - dynamicallyLoadScript(files[i]); + dynamicallyLoadScript(files[i]) } } /** * Loads libraries according to the name provided. - * This is to faciliate a lack of namespace clash for + * This is to faciliate a lack of namespace clash for * graphics libraries (@see #341) */ function loadLib(externalLibraryName) { - let files; - switch(externalLibraryName) { - case "TWO_DIM_RUNES": + let files + switch (externalLibraryName) { + case 'TWO_DIM_RUNES': files = [ // graphics '/externalLibs/graphics/gl-matrix.js', '/externalLibs/graphics/webGLgraphics.js', - '/externalLibs/graphics/webGLrune.js', - ]; - break; - case "THREE_DIM_RUNES": + '/externalLibs/graphics/webGLrune.js' + ] + break + case 'THREE_DIM_RUNES': files = [ // graphics '/externalLibs/graphics/gl-matrix.js', '/externalLibs/graphics/webGLgraphics.js', - '/externalLibs/graphics/webGLrune.js', - ]; - break; - case "CURVES": + '/externalLibs/graphics/webGLrune.js' + ] + break + case 'CURVES': files = [ // graphics '/externalLibs/graphics/gl-matrix.js', '/externalLibs/graphics/webGLhi_graph.js', '/externalLibs/graphics/webGLhi_graph_ce.js', '/externalLibs/graphics/webGLgraphics.js', - '/externalLibs/graphics/webGLcurve.js', - ]; - break; + '/externalLibs/graphics/webGLcurve.js' + ] + break default: - break; + break } for (var i = 0; i < files.length; i++) { - dynamicallyLoadScript(files[i]); + dynamicallyLoadScript(files[i]) } } -loadAllLibs(); +loadAllLibs() diff --git a/public/externalLibs/list.js b/public/externalLibs/list.js index 608ebb3474..73dae688f4 100644 --- a/public/externalLibs/list.js +++ b/public/externalLibs/list.js @@ -3,109 +3,116 @@ // Author: Martin Henz -"use strict"; +'use strict' // array test works differently for Rhino and // the Firefox environment (especially Web Console) function array_test(x) { - if (Array.isArray === undefined) { - return x instanceof Array; - } - else { - return Array.isArray(x); - } + if (Array.isArray === undefined) { + return x instanceof Array + } else { + return Array.isArray(x) + } } + // pair constructs a pair using a two-element array // LOW-LEVEL FUNCTION, NOT SOURCE function pair(x, xs) { - return [x, xs]; + return [x, xs] } + // is_pair returns true iff arg is a two-element array // LOW-LEVEL FUNCTION, NOT SOURCE function is_pair(x) { - return array_test(x) && x.length === 2; + return array_test(x) && x.length === 2 } + // head returns the first component of the given pair, // throws an exception if the argument is not a pair // LOW-LEVEL FUNCTION, NOT SOURCE function head(xs) { - if (is_pair(xs)) { - return xs[0]; - } - else { - throw new Error('head(xs) expects a pair as argument xs, but encountered ' + xs); - } + if (is_pair(xs)) { + return xs[0] + } else { + throw new Error('head(xs) expects a pair as argument xs, but encountered ' + xs) + } } + // tail returns the second component of the given pair // throws an exception if the argument is not a pair // LOW-LEVEL FUNCTION, NOT SOURCE function tail(xs) { - if (is_pair(xs)) { - return xs[1]; - } - else { - throw new Error('tail(xs) expects a pair as argument xs, but encountered ' + xs); - } + if (is_pair(xs)) { + return xs[1] + } else { + throw new Error('tail(xs) expects a pair as argument xs, but encountered ' + xs) + } } + // is_null returns true if arg is exactly null // LOW-LEVEL FUNCTION, NOT SOURCE function is_null(xs) { - return xs === null; + return xs === null } + // is_list recurses down the list and checks that it ends with the empty list [] // does not throw Value exceptions // LOW-LEVEL FUNCTION, NOT SOURCE function is_list(xs) { - for (;; xs = tail(xs)) { - if (is_null(xs)) { - return true; - } - else if (!is_pair(xs)) { - return false; - } + for (; ; xs = tail(xs)) { + if (is_null(xs)) { + return true + } else if (!is_pair(xs)) { + return false } + } } + // list makes a list out of its arguments // LOW-LEVEL FUNCTION, NOT SOURCE function list() { - let theList = null; - for (let i = arguments.length - 1; i >= 0; i--) { - theList = pair(arguments[i], theList); - } - return theList; + let the_list = null + for (let i = arguments.length - 1; i >= 0; i--) { + the_list = pair(arguments[i], the_list) + } + return the_list } + // list_to_vector returns vector that contains the elements of the argument list // in the given order. // list_to_vector throws an exception if the argument is not a list // LOW-LEVEL FUNCTION, NOT SOURCE function list_to_vector(lst) { - const vector = []; - while (!is_null(lst)) { - vector.push(head(lst)); - lst = tail(lst); - } - return vector; + const vector = [] + while (!is_null(lst)) { + vector.push(head(lst)) + lst = tail(lst) + } + return vector } + // vector_to_list returns a list that contains the elements of the argument vector // in the given order. // vector_to_list throws an exception if the argument is not a vector // LOW-LEVEL FUNCTION, NOT SOURCE function vector_to_list(vector) { - let result = null; - for (let i = vector.length - 1; i >= 0; i = i - 1) { - result = pair(vector[i], result); - } - return result; + let result = null + for (let i = vector.length - 1; i >= 0; i = i - 1) { + result = pair(vector[i], result) + } + return result } + // returns the length of a given argument list // throws an exception if the argument is not a list function length(xs) { - let i = 0; - while (!is_null(xs)) { - i += 1; - xs = tail(xs); - } - return i; + let i = 0 + while (!is_null(xs)) { + i += 1 + xs = tail(xs) + } + return i } + // map applies first arg f to the elements of the second argument, // assumed to be a list. // f is applied element-by-element: @@ -115,28 +122,33 @@ function length(xs) { // argument is not a function. // tslint:disable-next-line:ban-types function map(f, xs) { - return is_null(xs) ? null : pair(f(head(xs)), map(f, tail(xs))); + return is_null(xs) ? null : pair(f(head(xs)), map(f, tail(xs))) } + // build_list takes a non-negative integer n as first argument, // and a function fun as second argument. // build_list returns a list of n elements, that results from // applying fun to the numbers from 0 to n-1. // tslint:disable-next-line:ban-types function build_list(n, fun) { - if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { - throw new Error('build_list(n, fun) expects a positive integer as ' + 'argument n, but encountered ' + n); - } - // tslint:disable-next-line:ban-types - function build(i, alreadyBuilt) { - if (i < 0) { - return alreadyBuilt; - } - else { - return build(i - 1, pair(fun(i), alreadyBuilt)); - } - } - return build(n - 1, null); + if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { + throw new Error( + 'build_list(n, fun) expects a positive integer as ' + 'argument n, but encountered ' + n + ) + } + + // tslint:disable-next-line:ban-types + function build(i, alreadyBuilt) { + if (i < 0) { + return alreadyBuilt + } else { + return build(i - 1, pair(fun(i), alreadyBuilt)) + } + } + + return build(n - 1, null) } + // for_each applies first arg fun to the elements of the list passed as // second argument. fun is applied element-by-element: // for_each(fun,[1,[2,[]]]) results in the calls fun(1) and fun(2). @@ -146,97 +158,99 @@ function build_list(n, fun) { // first argument is not a function. // tslint:disable-next-line:ban-types function for_each(fun, xs) { - if (!is_list(xs)) { - throw new Error('for_each expects a list as argument xs, but encountered ' + xs); - } - for (; !is_null(xs); xs = tail(xs)) { - fun(head(xs)); - } - return true; + if (!is_list(xs)) { + throw new Error('for_each expects a list as argument xs, but encountered ' + xs) + } + for (; !is_null(xs); xs = tail(xs)) { + fun(head(xs)) + } + return true } + // list_to_string returns a string that represents the argument list. // It applies itself recursively on the elements of the given list. // When it encounters a non-list, it applies stringify to it. function list_to_string(l) { - return interop_1.stringify(l); + return interop_1.stringify(l) } + // reverse reverses the argument list // reverse throws an exception if the argument is not a list. function reverse(xs) { - if (!is_list(xs)) { - throw new Error('reverse(xs) expects a list as argument xs, but encountered ' + xs); - } - let result = null; - for (; !is_null(xs); xs = tail(xs)) { - result = pair(head(xs), result); - } - return result; + if (!is_list(xs)) { + throw new Error('reverse(xs) expects a list as argument xs, but encountered ' + xs) + } + let result = null + for (; !is_null(xs); xs = tail(xs)) { + result = pair(head(xs), result) + } + return result } + // append first argument list and second argument list. // In the result, the [] at the end of the first argument list // is replaced by the second argument list // append throws an exception if the first argument is not a list function append(xs, ys) { - if (is_null(xs)) { - return ys; - } - else { - return pair(head(xs), append(tail(xs), ys)); - } + if (is_null(xs)) { + return ys + } else { + return pair(head(xs), append(tail(xs), ys)) + } } + // member looks for a given first-argument element in a given // second argument list. It returns the first postfix sublist // that starts with the given element. It returns [] if the // element does not occur in the list function member(v, xs) { - for (; !is_null(xs); xs = tail(xs)) { - if (head(xs) === v) { - return xs; - } + for (; !is_null(xs); xs = tail(xs)) { + if (head(xs) === v) { + return xs } - return null; + } + return null } + // removes the first occurrence of a given first-argument element // in a given second-argument list. Returns the original list // if there is no occurrence. function remove(v, xs) { - if (is_null(xs)) { - return null; - } - else { - if (v === head(xs)) { - return tail(xs); - } - else { - return pair(head(xs), remove(v, tail(xs))); - } - } + if (is_null(xs)) { + return null + } else { + if (v === head(xs)) { + return tail(xs) + } else { + return pair(head(xs), remove(v, tail(xs))) + } + } } + // Similar to remove. But removes all instances of v instead of just the first function remove_all(v, xs) { - if (is_null(xs)) { - return null; - } - else { - if (v === head(xs)) { - return remove_all(v, tail(xs)); - } - else { - return pair(head(xs), remove_all(v, tail(xs))); - } - } + if (is_null(xs)) { + return null + } else { + if (v === head(xs)) { + return remove_all(v, tail(xs)) + } else { + return pair(head(xs), remove_all(v, tail(xs))) + } + } } + // for backwards-compatibility // equal computes the structural equality // over its arguments function equal(item1, item2) { - if (is_pair(item1) && is_pair(item2)) { - return equal(head(item1), head(item2)) && equal(tail(item1), tail(item2)); - } - else { - return item1 === item2; - } + if (is_pair(item1) && is_pair(item2)) { + return equal(head(item1), head(item2)) && equal(tail(item1), tail(item2)) + } else { + return item1 === item2 + } } + // assoc treats the second argument as an association, // a list of (index,value) pairs. // assoc returns the first (index,value) pair whose @@ -244,59 +258,64 @@ function equal(item1, item2) { // first argument v. Returns false if there is no such // pair function assoc(v, xs) { - if (is_null(xs)) { - return false; - } - else if (equal(v, head(head(xs)))) { - return head(xs); - } - else { - return assoc(v, tail(xs)); - } + if (is_null(xs)) { + return false + } else if (equal(v, head(head(xs)))) { + return head(xs) + } else { + return assoc(v, tail(xs)) + } } + // filter returns the sublist of elements of given list xs // for which the given predicate function returns true. // tslint:disable-next-line:ban-types function filter(pred, xs) { - if (is_null(xs)) { - return xs; - } - else { - if (pred(head(xs))) { - return pair(head(xs), filter(pred, tail(xs))); - } - else { - return filter(pred, tail(xs)); - } - } + if (is_null(xs)) { + return xs + } else { + if (pred(head(xs))) { + return pair(head(xs), filter(pred, tail(xs))) + } else { + return filter(pred, tail(xs)) + } + } } + // enumerates numbers starting from start, // using a step size of 1, until the number // exceeds end. function enum_list(start, end) { - if (typeof start !== 'number') { - throw new Error('enum_list(start, end) expects a number as argument start, but encountered ' + start); - } - if (typeof end !== 'number') { - throw new Error('enum_list(start, end) expects a number as argument start, but encountered ' + end); - } - if (start > end) { - return null; - } - else { - return pair(start, enum_list(start + 1, end)); - } + if (typeof start !== 'number') { + throw new Error( + 'enum_list(start, end) expects a number as argument start, but encountered ' + start + ) + } + if (typeof end !== 'number') { + throw new Error( + 'enum_list(start, end) expects a number as argument start, but encountered ' + end + ) + } + if (start > end) { + return null + } else { + return pair(start, enum_list(start + 1, end)) + } } + // Returns the item in list lst at index n (the first item is at position 0) function list_ref(xs, n) { - if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { - throw new Error('list_ref(xs, n) expects a positive integer as argument n, but encountered ' + n); - } - for (; n > 0; --n) { - xs = tail(xs); - } - return head(xs); + if (typeof n !== 'number' || n < 0 || Math.floor(n) !== n) { + throw new Error( + 'list_ref(xs, n) expects a positive integer as argument n, but encountered ' + n + ) + } + for (; n > 0; --n) { + xs = tail(xs) + } + return head(xs) } + // accumulate applies given operation op to elements of a list // in a right-to-left order, first apply op to the last element // and an initial element, resulting in r1, then to the @@ -306,35 +325,35 @@ function list_ref(xs, n) { // accumulate(op,zero,list(1,2,3)) results in // op(1, op(2, op(3, zero))) function accumulate(op, initial, sequence) { - if (is_null(sequence)) { - return initial; - } - else { - return op(head(sequence), accumulate(op, initial, tail(sequence))); - } + if (is_null(sequence)) { + return initial + } else { + return op(head(sequence), accumulate(op, initial, tail(sequence))) + } } + // set_head(xs,x) changes the head of given pair xs to be x, // throws an exception if the argument is not a pair // LOW-LEVEL FUNCTION, NOT SOURCE function set_head(xs, x) { - if (is_pair(xs)) { - xs[0] = x; - return undefined; - } - else { - throw new Error('set_head(xs,x) expects a pair as argument xs, but encountered ' + xs); - } + if (is_pair(xs)) { + xs[0] = x + return undefined + } else { + throw new Error('set_head(xs,x) expects a pair as argument xs, but encountered ' + xs) + } } + // set_tail(xs,x) changes the tail of given pair xs to be x, // throws an exception if the argument is not a pair // LOW-LEVEL FUNCTION, NOT SOURCE function set_tail(xs, x) { - if (is_pair(xs)) { - xs[1] = x; - return undefined; - } - else { - throw new Error('set_tail(xs,x) expects a pair as argument xs, but encountered ' + xs); - } + if (is_pair(xs)) { + xs[1] = x + return undefined + } else { + throw new Error('set_tail(xs,x) expects a pair as argument xs, but encountered ' + xs) + } } -exports.set_tail = set_tail; + +exports.set_tail = set_tail diff --git a/public/externalLibs/pe_library.js b/public/externalLibs/pe_library.js index 7b00a5a1e0..4f1a4a1943 100644 --- a/public/externalLibs/pe_library.js +++ b/public/externalLibs/pe_library.js @@ -1,58 +1,58 @@ function is_array(x) { - if (Array.isArray === undefined) { - return x instanceof Array; - } else { - return Array.isArray(x); - } + if (Array.isArray === undefined) { + return x instanceof Array + } else { + return Array.isArray(x) + } } -function map_array(f, ls){ - let res = []; - let len = ls.length; - for(let i = 0; i < len; i++){ - res.push(f(ls[i])); - } - return res; +function map_array(f, ls) { + let res = [] + let len = ls.length + for (let i = 0; i < len; i++) { + res.push(f(ls[i])) + } + return res } -function accumulate_array(op, init, ls){ - for(let i = 0; i < ls.length; i++){ - init = op(ls[i], init); - } - return init; +function accumulate_array(op, init, ls) { + for (let i = 0; i < ls.length; i++) { + init = op(ls[i], init) + } + return init } -function filter_array(f, ls){ - let res = []; - for(let i = 0; i < ls.length; i++){ - if(f(ls[i])){ - res.push(ls[i]); - } +function filter_array(f, ls) { + let res = [] + for (let i = 0; i < ls.length; i++) { + if (f(ls[i])) { + res.push(ls[i]) } - return res; + } + return res } -function enum_array(a,b){ - let res = []; - for(let i = a; a <= b; a++){ - res.push(a); - } - return res; +function enum_array(a, b) { + let res = [] + for (let i = a; a <= b; a++) { + res.push(a) + } + return res } -function take_array(xs, n){ - let res = []; - let arr_len = xs.length; - for(let i = 0; i < n; i = i + 1){ - res[i] = xs[i]; - } - return res; +function take_array(xs, n) { + let res = [] + let arr_len = xs.length + for (let i = 0; i < n; i = i + 1) { + res[i] = xs[i] + } + return res } -function drop_array(xs, n){ - let res = []; - let arr_len = xs.length; - for(let i = n; i < arr_len; i = i + 1){ - res.push(xs[i]); - } - return res; -} \ No newline at end of file +function drop_array(xs, n) { + let res = [] + let arr_len = xs.length + for (let i = n; i < arr_len; i = i + 1) { + res.push(xs[i]) + } + return res +} diff --git a/public/externalLibs/sound/riffwave.js b/public/externalLibs/sound/riffwave.js index c72c6e727e..8fcb428531 100644 --- a/public/externalLibs/sound/riffwave.js +++ b/public/externalLibs/sound/riffwave.js @@ -18,115 +18,110 @@ */ var FastBase64 = { + chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + encLookup: [], - chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", - encLookup: [], - - Init: function() { - for (var i=0; i<4096; i++) { - this.encLookup[i] = this.chars[i >> 6] + this.chars[i & 0x3F]; - } - }, - - Encode: function(src) { - var len = src.length; - var dst = ''; - var i = 0; - while (len > 2) { - n = (src[i] << 16) | (src[i+1]<<8) | src[i+2]; - dst+= this.encLookup[n >> 12] + this.encLookup[n & 0xFFF]; - len-= 3; - i+= 3; - } - if (len > 0) { - var n1= (src[i] & 0xFC) >> 2; - var n2= (src[i] & 0x03) << 4; - if (len > 1) n2 |= (src[++i] & 0xF0) >> 4; - dst+= this.chars[n1]; - dst+= this.chars[n2]; - if (len == 2) { - var n3= (src[i++] & 0x0F) << 2; - n3 |= (src[i] & 0xC0) >> 6; - dst+= this.chars[n3]; - } - if (len == 1) dst+= '='; - dst+= '='; - } - return dst; - } // end Encode - -} - -FastBase64.Init(); - -var RIFFWAVE = function(data) { - - this.data = []; // Array containing audio samples - this.wav = []; // Array containing the generated wave file - this.dataURI = ''; // http://en.wikipedia.org/wiki/Data_URI_scheme - - this.header = { // OFFS SIZE NOTES - chunkId : [0x52,0x49,0x46,0x46], // 0 4 "RIFF" = 0x52494646 - chunkSize : 0, // 4 4 36+SubChunk2Size = 4+(8+SubChunk1Size)+(8+SubChunk2Size) - format : [0x57,0x41,0x56,0x45], // 8 4 "WAVE" = 0x57415645 - subChunk1Id : [0x66,0x6d,0x74,0x20], // 12 4 "fmt " = 0x666d7420 - subChunk1Size: 16, // 16 4 16 for PCM - audioFormat : 1, // 20 2 PCM = 1 - numChannels : 1, // 22 2 Mono = 1, Stereo = 2... - sampleRate : 8000, // 24 4 8000, 44100... - byteRate : 0, // 28 4 SampleRate*NumChannels*BitsPerSample/8 - blockAlign : 0, // 32 2 NumChannels*BitsPerSample/8 - bitsPerSample: 8, // 34 2 8 bits = 8, 16 bits = 16 - subChunk2Id : [0x64,0x61,0x74,0x61], // 36 4 "data" = 0x64617461 - subChunk2Size: 0 // 40 4 data size = NumSamples*NumChannels*BitsPerSample/8 - }; - - function u32ToArray(i) { - return [i&0xFF, (i>>8)&0xFF, (i>>16)&0xFF, (i>>24)&0xFF]; + Init: function() { + for (var i = 0; i < 4096; i++) { + this.encLookup[i] = this.chars[i >> 6] + this.chars[i & 0x3f] } - - function u16ToArray(i) { - return [i&0xFF, (i>>8)&0xFF]; + }, + + Encode: function(src) { + var len = src.length + var dst = '' + var i = 0 + while (len > 2) { + n = (src[i] << 16) | (src[i + 1] << 8) | src[i + 2] + dst += this.encLookup[n >> 12] + this.encLookup[n & 0xfff] + len -= 3 + i += 3 } - - function split16bitArray(data) { - var r = []; - var j = 0; - var len = data.length; - for (var i=0; i>8) & 0xFF; - } - return r; + if (len > 0) { + var n1 = (src[i] & 0xfc) >> 2 + var n2 = (src[i] & 0x03) << 4 + if (len > 1) n2 |= (src[++i] & 0xf0) >> 4 + dst += this.chars[n1] + dst += this.chars[n2] + if (len == 2) { + var n3 = (src[i++] & 0x0f) << 2 + n3 |= (src[i] & 0xc0) >> 6 + dst += this.chars[n3] + } + if (len == 1) dst += '=' + dst += '=' } + return dst + } // end Encode +} - this.Make = function(data) { - if (data instanceof Array) this.data = data; - this.header.blockAlign = (this.header.numChannels * this.header.bitsPerSample) >> 3; - this.header.byteRate = this.header.blockAlign * this.sampleRate; - this.header.subChunk2Size = this.data.length * (this.header.bitsPerSample >> 3); - this.header.chunkSize = 36 + this.header.subChunk2Size; - - this.wav = this.header.chunkId.concat( - u32ToArray(this.header.chunkSize), - this.header.format, - this.header.subChunk1Id, - u32ToArray(this.header.subChunk1Size), - u16ToArray(this.header.audioFormat), - u16ToArray(this.header.numChannels), - u32ToArray(this.header.sampleRate), - u32ToArray(this.header.byteRate), - u16ToArray(this.header.blockAlign), - u16ToArray(this.header.bitsPerSample), - this.header.subChunk2Id, - u32ToArray(this.header.subChunk2Size), - (this.header.bitsPerSample == 16) ? split16bitArray(this.data) : this.data - ); - this.dataURI = 'data:audio/wav;base64,'+FastBase64.Encode(this.wav); - }; - - if (data instanceof Array) this.Make(data); - -}; // end RIFFWAVE - +FastBase64.Init() +var RIFFWAVE = function(data) { + this.data = [] // Array containing audio samples + this.wav = [] // Array containing the generated wave file + this.dataURI = '' // http://en.wikipedia.org/wiki/Data_URI_scheme + + this.header = { + // OFFS SIZE NOTES + chunkId: [0x52, 0x49, 0x46, 0x46], // 0 4 "RIFF" = 0x52494646 + chunkSize: 0, // 4 4 36+SubChunk2Size = 4+(8+SubChunk1Size)+(8+SubChunk2Size) + format: [0x57, 0x41, 0x56, 0x45], // 8 4 "WAVE" = 0x57415645 + subChunk1Id: [0x66, 0x6d, 0x74, 0x20], // 12 4 "fmt " = 0x666d7420 + subChunk1Size: 16, // 16 4 16 for PCM + audioFormat: 1, // 20 2 PCM = 1 + numChannels: 1, // 22 2 Mono = 1, Stereo = 2... + sampleRate: 8000, // 24 4 8000, 44100... + byteRate: 0, // 28 4 SampleRate*NumChannels*BitsPerSample/8 + blockAlign: 0, // 32 2 NumChannels*BitsPerSample/8 + bitsPerSample: 8, // 34 2 8 bits = 8, 16 bits = 16 + subChunk2Id: [0x64, 0x61, 0x74, 0x61], // 36 4 "data" = 0x64617461 + subChunk2Size: 0 // 40 4 data size = NumSamples*NumChannels*BitsPerSample/8 + } + + function u32ToArray(i) { + return [i & 0xff, (i >> 8) & 0xff, (i >> 16) & 0xff, (i >> 24) & 0xff] + } + + function u16ToArray(i) { + return [i & 0xff, (i >> 8) & 0xff] + } + + function split16bitArray(data) { + var r = [] + var j = 0 + var len = data.length + for (var i = 0; i < len; i++) { + r[j++] = data[i] & 0xff + r[j++] = (data[i] >> 8) & 0xff + } + return r + } + + this.Make = function(data) { + if (data instanceof Array) this.data = data + this.header.blockAlign = (this.header.numChannels * this.header.bitsPerSample) >> 3 + this.header.byteRate = this.header.blockAlign * this.sampleRate + this.header.subChunk2Size = this.data.length * (this.header.bitsPerSample >> 3) + this.header.chunkSize = 36 + this.header.subChunk2Size + + this.wav = this.header.chunkId.concat( + u32ToArray(this.header.chunkSize), + this.header.format, + this.header.subChunk1Id, + u32ToArray(this.header.subChunk1Size), + u16ToArray(this.header.audioFormat), + u16ToArray(this.header.numChannels), + u32ToArray(this.header.sampleRate), + u32ToArray(this.header.byteRate), + u16ToArray(this.header.blockAlign), + u16ToArray(this.header.bitsPerSample), + this.header.subChunk2Id, + u32ToArray(this.header.subChunk2Size), + this.header.bitsPerSample == 16 ? split16bitArray(this.data) : this.data + ) + this.dataURI = 'data:audio/wav;base64,' + FastBase64.Encode(this.wav) + } + + if (data instanceof Array) this.Make(data) +} // end RIFFWAVE diff --git a/public/externalLibs/sound/soundToneMatrix.js b/public/externalLibs/sound/soundToneMatrix.js index fe96143d39..207dd50984 100644 --- a/public/externalLibs/sound/soundToneMatrix.js +++ b/public/externalLibs/sound/soundToneMatrix.js @@ -9,146 +9,143 @@ v2 (2016/2017) Xiao Pu - September 2016 - fit source academy IDE */ -var $tone_matrix; // canvas container for tone matrix +var $tone_matrix // canvas container for tone matrix -var color_white = "#ffffff"; // color of the highlighted square -var color_white_2 = "#666666"; // color of the adjacent squares -var color_white_3 = "#444444"; // color of the squares that are two units from the highlighted square -var color_on = "#cccccc"; -var color_off = "#333333"; +var color_white = '#ffffff' // color of the highlighted square +var color_white_2 = '#666666' // color of the adjacent squares +var color_white_3 = '#444444' // color of the squares that are two units from the highlighted square +var color_on = '#cccccc' +var color_off = '#333333' // the side length of the squares in the matrix -var square_side_length = 18; +var square_side_length = 18 // the distance between two adjacent squares in the matrix -var distance_between_squares = 6; +var distance_between_squares = 6 // margin of the canvas -var margin_length = 20; +var margin_length = 20 // the duration for playing one grid is 0.5s -var grid_duration = 0.5; +var grid_duration = 0.5 // but the duration for playing one entire sound is 1 (which means there will be reverberations) -var sound_duration = 1; +var sound_duration = 1 // for playing the tone matrix repeatedly in play_matrix_continuously function -var timeout_matrix; +var timeout_matrix // for coloring the matrix accordingly while it's being played -var timeout_color; +var timeout_color -var timeout_objects = new Array(); +var timeout_objects = new Array() // given the x, y coordinates of a "click" event // return the row and column numbers of the clicked square function x_y_to_row_column(x, y) { - var row = Math.floor((y - margin_length) / (square_side_length + distance_between_squares)); - var column = Math.floor((x - margin_length) / (square_side_length + distance_between_squares)); - return Array(row, column); + var row = Math.floor((y - margin_length) / (square_side_length + distance_between_squares)) + var column = Math.floor((x - margin_length) / (square_side_length + distance_between_squares)) + return Array(row, column) } // given the row number of a square, return the leftmost coordinate function row_to_y(row) { - return margin_length + row * (square_side_length + distance_between_squares); + return margin_length + row * (square_side_length + distance_between_squares) } // given the column number of a square, return the topmost coordinate function column_to_x(column) { - return margin_length + column * (square_side_length + distance_between_squares); + return margin_length + column * (square_side_length + distance_between_squares) } // return a list representing a particular row function get_row(row) { - return vector_to_list(matrix[row]); + return vector_to_list(matrix[row]) } // return a list representing a particular column function get_column(column) { - var result = new Array(16); + var result = new Array(16) for (var i = 15; i >= 0; i--) { - result[i] = matrix[i][column]; - }; - return vector_to_list(result); + result[i] = matrix[i][column] + } + return vector_to_list(result) } function is_on(row, column) { if (row < 0 || row > 15 || column < 0 || column > 15) { - return; + return } - return matrix[row][column]; + return matrix[row][column] } // set the color of a particular square function set_color(row, column, color) { if (row < 0 || row > 15 || column < 0 || column > 15) { - return; + return } - var ctx = $tone_matrix.getContext("2d"); - ctx.fillStyle = color; + var ctx = $tone_matrix.getContext('2d') + ctx.fillStyle = color - ctx.fillRect(column_to_x(column), - row_to_y(row), - square_side_length, - square_side_length); + ctx.fillRect(column_to_x(column), row_to_y(row), square_side_length, square_side_length) } // highlight a given square function highlight_color(row, column, color) { - set_color(row, column, color); + set_color(row, column, color) } // given the square that we are supposed to highlight, color the neighboring squares function set_adjacent_color_1(row, column, color) { if (!is_on(row, column - 1)) { - set_color(row, column - 1, color); + set_color(row, column - 1, color) } if (!is_on(row, column + 1)) { - set_color(row, column + 1, color); + set_color(row, column + 1, color) } if (!is_on(row - 1, column)) { - set_color(row - 1, column, color); + set_color(row - 1, column, color) } if (!is_on(row + 1, column)) { - set_color(row + 1, column, color); + set_color(row + 1, column, color) } } // given the square that we are supposed to highlight, color the squares 2 units from it function set_adjacent_color_2(row, column, color) { if (!is_on(row, column - 2)) { - set_color(row, column - 2, color); + set_color(row, column - 2, color) } if (!is_on(row + 1, column - 1)) { - set_color(row + 1, column - 1, color); + set_color(row + 1, column - 1, color) } if (!is_on(row + 2, column)) { - set_color(row + 2, column, color); + set_color(row + 2, column, color) } if (!is_on(row + 1, column + 1)) { - set_color(row + 1, column + 1, color); + set_color(row + 1, column + 1, color) } if (!is_on(row, column + 2)) { - set_color(row, column + 2, color); + set_color(row, column + 2, color) } if (!is_on(row - 1, column + 1)) { - set_color(row - 1, column + 1, color); + set_color(row - 1, column + 1, color) } if (!is_on(row - 2, column)) { - set_color(row - 2, column, color); + set_color(row - 2, column, color) } if (!is_on(row - 1, column - 1)) { - set_color(row - 1, column - 1, color); + set_color(row - 1, column - 1, color) } } @@ -157,151 +154,155 @@ function redraw_matrix() { for (var i = 15; i >= 0; i--) { for (var j = 15; j >= 0; j--) { if (matrix[i][j]) { - set_color(i, j, color_on); + set_color(i, j, color_on) } else { - set_color(i, j, color_off); + set_color(i, j, color_off) } - }; - }; + } + } } -var ToneMatrix = {}; +var ToneMatrix = {} function initialise_matrix($container) { if (!$tone_matrix) { - $tone_matrix = document.createElement('canvas'); - $tone_matrix.width = 420; - $tone_matrix.height = 420; + $tone_matrix = document.createElement('canvas') + $tone_matrix.width = 420 + $tone_matrix.height = 420 // the array representing the configuration of the matrix - matrix = new Array(16); + matrix = new Array(16) // the visualisation of the matrix itself - var ctx = $tone_matrix.getContext("2d"); + var ctx = $tone_matrix.getContext('2d') // draw the initial matrix for (var i = 15; i >= 0; i--) { - matrix[i] = new Array(16); + matrix[i] = new Array(16) for (var j = 15; j >= 0; j--) { - set_color(i, j, color_off); - matrix[i][j] = false; - }; - }; + set_color(i, j, color_off) + matrix[i][j] = false + } + } - bind_events_to_rect($tone_matrix); + bind_events_to_rect($tone_matrix) } $tone_matrix.hidden = false $container.appendChild($tone_matrix) } -ToneMatrix.initialise_matrix = initialise_matrix; +ToneMatrix.initialise_matrix = initialise_matrix // bind the click events to the matrix function bind_events_to_rect(c) { - c.addEventListener('click', function (event) { - // calculate the x, y coordinates of the click event - var offset_left = $(this).offset().left; - var offset_top = $(this).offset().top; - var x = event.pageX - offset_left; - var y = event.pageY - offset_top; - - // obtain the row and column numbers of the square clicked - var row_column = x_y_to_row_column(x, y); - var row = row_column[0]; - var column = row_column[1]; - - if (row < 0 || row > 15 || column < 0 || column > 15) { - return; - } + c.addEventListener( + 'click', + function(event) { + // calculate the x, y coordinates of the click event + var offset_left = $(this).offset().left + var offset_top = $(this).offset().top + var x = event.pageX - offset_left + var y = event.pageY - offset_top + + // obtain the row and column numbers of the square clicked + var row_column = x_y_to_row_column(x, y) + var row = row_column[0] + var column = row_column[1] + + if (row < 0 || row > 15 || column < 0 || column > 15) { + return + } - if (matrix[row][column] == undefined || !matrix[row][column]) { - matrix[row][column] = true; - set_color(row, column, color_on); - } else { - matrix[row][column] = false; - set_color(row, column, color_off); - } - }, false); + if (matrix[row][column] == undefined || !matrix[row][column]) { + matrix[row][column] = true + set_color(row, column, color_on) + } else { + matrix[row][column] = false + set_color(row, column, color_off) + } + }, + false + ) } function random_animate() { for (var i = 5; i >= 0; i--) { - var row = Math.floor(Math.random() * 16); - var column = Math.floor(Math.random() * 16); + var row = Math.floor(Math.random() * 16) + var column = Math.floor(Math.random() * 16) if (!is_on(row, column)) { - set_color(row, column, color_white_3); + set_color(row, column, color_white_3) } - }; + } for (var i = 10; i >= 0; i--) { - var row = Math.floor(Math.random() * 16); - var column = Math.floor(Math.random() * 16); + var row = Math.floor(Math.random() * 16) + var column = Math.floor(Math.random() * 16) if (!is_on(row, column)) { - set_color(row, column, color_off); + set_color(row, column, color_off) } - }; + } } function animate_column(n) { if (n < 0 || n > 15) { - return; + return } - var column = list_to_vector(get_column(n)); + var column = list_to_vector(get_column(n)) for (var j = 0; j <= 15; j++) { if (column[j]) { // if a particular square is clicked, highlight itself // and the neighboring squares in the animation - highlight_color(j, n, color_white); - set_adjacent_color_1(j, n, color_white_2); - set_adjacent_color_2(j, n, color_white_3); + highlight_color(j, n, color_white) + set_adjacent_color_1(j, n, color_white_2) + set_adjacent_color_2(j, n, color_white_3) } - }; + } } function unanimate_column(n) { if (n < 0 || n > 15) { - return; + return } - var column = list_to_vector(get_column(n)); + var column = list_to_vector(get_column(n)) for (var j = 0; j <= 15; j++) { if (column[j]) { - highlight_color(j, n, color_on); - set_adjacent_color_1(j, n, color_off); - set_adjacent_color_2(j, n, color_off); + highlight_color(j, n, color_on) + set_adjacent_color_1(j, n, color_off) + set_adjacent_color_2(j, n, color_off) } - }; + } } // generate a randomised matrix function randomise_matrix() { - var ctx = $tone_matrix.getContext("2d"); - var on; // the square in the matrix is on or off + var ctx = $tone_matrix.getContext('2d') + var on // the square in the matrix is on or off - clear_matrix(); + clear_matrix() // draw the randomised matrix for (var i = 15; i >= 0; i--) { for (var j = 15; j >= 0; j--) { - on = Math.random() > 0.9; + on = Math.random() > 0.9 if (on) { - set_color(i, j, color_on); - matrix[i][j] = true; + set_color(i, j, color_on) + matrix[i][j] = true } else { - set_color(i, j, color_off); - matrix[i][j] = false; + set_color(i, j, color_off) + matrix[i][j] = false } - }; - }; + } + } } -ToneMatrix.randomise_matrix = randomise_matrix; +ToneMatrix.randomise_matrix = randomise_matrix function bindMatrixButtons() { - $("#clear-matrix").on("click", function () { - clear_matrix(); + $('#clear-matrix').on('click', function() { + clear_matrix() // stop_matrix(); - $("#play-matrix").attr("value", "Play"); - }); + $('#play-matrix').attr('value', 'Play') + }) // $("#play-matrix").on("click", function () { // if ($(this).attr("value") == "Play") { @@ -317,279 +318,309 @@ function bindMatrixButtons() { // $("#random-matrix").on("click", function () { // randomise_matrix(); // }); -}; -ToneMatrix.bindMatrixButtons = bindMatrixButtons; +} +ToneMatrix.bindMatrixButtons = bindMatrixButtons // ********** THE FOLLOWING FUNCTIONS ARE EXPOSED TO STUDENTS ********** // return the current state of the matrix, represented by a list of lists of bits function get_matrix() { if (!matrix) { - throw new Error("Please activate the tone matrix first by clicking on the tab!") + throw new Error('Please activate the tone matrix first by clicking on the tab!') } - var matrix_list = matrix.slice(0); - var result = []; + var matrix_list = matrix.slice(0) + var result = [] for (var i = 0; i <= 15; i++) { - result[i] = vector_to_list(matrix_list[15 - i]); - }; + result[i] = vector_to_list(matrix_list[15 - i]) + } - return vector_to_list(result); + return vector_to_list(result) } // reset the matrix to the initial state function clear_matrix() { - matrix = new Array(16); - var ctx = $tone_matrix.getContext("2d"); + matrix = new Array(16) + var ctx = $tone_matrix.getContext('2d') // draw the initial matrix for (var i = 15; i >= 0; i--) { - matrix[i] = new Array(16); + matrix[i] = new Array(16) for (var j = 15; j >= 0; j--) { - set_color(i, j, color_off); - matrix[i][j] = false; - }; - }; + set_color(i, j, color_off) + matrix[i][j] = false + } + } } -ToneMatrix.clear_matrix = clear_matrix; +ToneMatrix.clear_matrix = clear_matrix -var set_time_out_renamed = window.setTimeout; +var set_time_out_renamed = window.setTimeout function set_timeout(f, t) { - var timeoutObj = set_time_out_renamed(f, t); - timeout_objects.push(timeoutObj); + var timeoutObj = set_time_out_renamed(f, t) + timeout_objects.push(timeoutObj) } function clear_all_timeout() { for (var i = timeout_objects.length - 1; i >= 0; i--) { - clearTimeout(timeout_objects[i]); - }; + clearTimeout(timeout_objects[i]) + } - timeout_objects = new Array(); + timeout_objects = new Array() } // functions from mission 14 function letter_name_to_midi_note(note) { // we don't consider double flat/ double sharp - var note = note.split(""); - var res = 12; //MIDI notes for mysterious C0 - var n = note[0].toUpperCase(); + var note = note.split('') + var res = 12 //MIDI notes for mysterious C0 + var n = note[0].toUpperCase() switch (n) { case 'D': - res = res + 2; - break; + res = res + 2 + break case 'E': - res = res + 4; - break; + res = res + 4 + break case 'F': - res = res + 5; - break; + res = res + 5 + break case 'G': - res = res + 7; - break; + res = res + 7 + break case 'A': - res = res + 9; - break; + res = res + 9 + break case 'B': - res = res + 11; - break; + res = res + 11 + break default: - break; + break } if (note.length === 2) { - res = parseInt(note[1]) * 12 + res; + res = parseInt(note[1]) * 12 + res } else if (note.length === 3) { switch (note[1]) { case '#': - res = res + 1; - break; + res = res + 1 + break case 'b': - res = res - 1; - break; + res = res - 1 + break default: - break; + break } - res = parseInt(note[2]) * 12 + res; + res = parseInt(note[2]) * 12 + res } - return res; + return res } function letter_name_to_frequency(note) { - return midi_note_to_frequency(note_to_midi_note(note)); + return midi_note_to_frequency(note_to_midi_note(note)) } function midi_note_to_frequency(note) { - return 8.1757989156 * Math.pow(2, (note / 12)); + return 8.1757989156 * Math.pow(2, note / 12) } function square_sourcesound(freq, duration) { function fourier_expansion_square(level, t) { - var answer = 0; + var answer = 0 for (var i = 1; i <= level; i++) { - answer = answer + Math.sin(2 * Math.PI * (2 * i - 1) * freq * t) / (2 * i - 1); + answer = answer + Math.sin(2 * Math.PI * (2 * i - 1) * freq * t) / (2 * i - 1) } - return answer; - } - return autocut_sourcesound(make_sourcesound(function (t) { - var x = (4 / Math.PI) * fourier_expansion_square(5, t); - if (x > 1) { - return 1; - } else if (x < -1) { - return -1; - } else { - return x; - } - }, duration)); + return answer + } + return autocut_sourcesound( + make_sourcesound(function(t) { + var x = 4 / Math.PI * fourier_expansion_square(5, t) + if (x > 1) { + return 1 + } else if (x < -1) { + return -1 + } else { + return x + } + }, duration) + ) } function square_sound(freq, duration) { - return sourcesound_to_sound(square_sourcesound(freq, duration)); + return sourcesound_to_sound(square_sourcesound(freq, duration)) } function triangle_sourcesound(freq, duration) { function fourier_expansion_triangle(level, t) { - var answer = 0; + var answer = 0 for (var i = 0; i < level; i++) { - answer = answer + Math.pow(-1, i) * Math.sin((2 * i + 1) * t * freq * Math.PI * 2) / Math.pow((2 * i + 1), 2); + answer = + answer + + Math.pow(-1, i) * Math.sin((2 * i + 1) * t * freq * Math.PI * 2) / Math.pow(2 * i + 1, 2) } - return answer; - } - return autocut_sourcesound(make_sourcesound(function (t) { - var x = (8 / Math.PI / Math.PI) * fourier_expansion_triangle(5, t); - if (x > 1) { - return 1; - } else if (x < -1) { - return -1; - } else { - return x; - } - }, duration)); + return answer + } + return autocut_sourcesound( + make_sourcesound(function(t) { + var x = 8 / Math.PI / Math.PI * fourier_expansion_triangle(5, t) + if (x > 1) { + return 1 + } else if (x < -1) { + return -1 + } else { + return x + } + }, duration) + ) } function triangle_sound(freq, duration) { - return sourcesound_to_sound(triangle_sourcesound(freq, duration)); + return sourcesound_to_sound(triangle_sourcesound(freq, duration)) } function sawtooth_sourcesound(freq, duration) { function fourier_expansion_sawtooth(level, t) { - var answer = 0; + var answer = 0 for (var i = 1; i <= level; i++) { - answer = answer + Math.sin(2 * Math.PI * i * freq * t) / i; + answer = answer + Math.sin(2 * Math.PI * i * freq * t) / i } - return answer; - } - return autocut_sourcesound(make_sourcesound(function (t) { - var x = (1 / 2) - (1 / Math.PI) * fourier_expansion_sawtooth(5, t); - if (x > 1) { - return 1; - } else if (x < -1) { - return -1; - } else { - return x; - } - }, duration)); + return answer + } + return autocut_sourcesound( + make_sourcesound(function(t) { + var x = 1 / 2 - 1 / Math.PI * fourier_expansion_sawtooth(5, t) + if (x > 1) { + return 1 + } else if (x < -1) { + return -1 + } else { + return x + } + }, duration) + ) } function sawtooth_sound(freq, duration) { - return sourcesound_to_sound(sawtooth_sourcesound(freq, duration)); + return sourcesound_to_sound(sawtooth_sourcesound(freq, duration)) } function exponential_decay(decay_period) { - return function (t) { - if ((t > decay_period) || (t < 0)) { - return undefined; + return function(t) { + if (t > decay_period || t < 0) { + return undefined } else { - var halflife = decay_period / 8; - var lambda = Math.log(2) / halflife; - return Math.pow(Math.E, -lambda * t); + var halflife = decay_period / 8 + var lambda = Math.log(2) / halflife + return Math.pow(Math.E, -lambda * t) } } } function adsr(attack_time, decay_time, sustain_level, release_time) { - return function (sound) { - var sourcesound = sound_to_sourcesound(sound); - var wave = get_wave(sourcesound); - var duration = get_duration(sourcesound); - return sourcesound_to_sound(make_sourcesound(function (x) { - if (x < attack_time) { - return wave(x) * (x / attack_time); - } else if (x < attack_time + decay_time) { - return ((exponential_decay(1 - sustain_level, decay_time))(x - attack_time) + sustain_level) * wave(x); - } else if (x < duration - release_time) { - return wave(x) * sustain_level; - } else if (x <= duration) { - return wave(x) * sustain_level * (exponential_decay(release_time))(x - (duration - release_time)); - } else { - return 0; - } - }, duration)); - }; + return function(sound) { + var sourcesound = sound_to_sourcesound(sound) + var wave = get_wave(sourcesound) + var duration = get_duration(sourcesound) + return sourcesound_to_sound( + make_sourcesound(function(x) { + if (x < attack_time) { + return wave(x) * (x / attack_time) + } else if (x < attack_time + decay_time) { + return ( + (exponential_decay(1 - sustain_level, decay_time)(x - attack_time) + sustain_level) * + wave(x) + ) + } else if (x < duration - release_time) { + return wave(x) * sustain_level + } else if (x <= duration) { + return ( + wave(x) * sustain_level * exponential_decay(release_time)(x - (duration - release_time)) + ) + } else { + return 0 + } + }, duration) + ) + } } function stacking_adsr(waveform, base_frequency, duration, list_of_envelope) { function zip(lst, n) { if (is_null(lst)) { - return lst; + return lst } else { - return pair(pair(n, head(lst)), zip(tail(lst), n + 1)); + return pair(pair(n, head(lst)), zip(tail(lst), n + 1)) } } - return simultaneously(accumulate(function (x, y) { - return pair((tail(x))(waveform(base_frequency * head(x), duration)), y); - }, null, zip(list_of_envelope, 1))); + return simultaneously( + accumulate( + function(x, y) { + return pair(tail(x)(waveform(base_frequency * head(x), duration)), y) + }, + null, + zip(list_of_envelope, 1) + ) + ) } // instruments for students function trombone(note, duration) { - return stacking_adsr(square_sound, midi_note_to_frequency(note), duration, - list(adsr(0.4, 0, 1, 0), - adsr(0.6472, 1.2, 0, 0))); + return stacking_adsr( + square_sound, + midi_note_to_frequency(note), + duration, + list(adsr(0.4, 0, 1, 0), adsr(0.6472, 1.2, 0, 0)) + ) } function piano(note, duration) { - return stacking_adsr(triangle_sound, midi_note_to_frequency(note), duration, - list(adsr(0, 1.03, 0, 0), - adsr(0, 0.64, 0, 0), - adsr(0, 0.4, 0, 0))); + return stacking_adsr( + triangle_sound, + midi_note_to_frequency(note), + duration, + list(adsr(0, 1.03, 0, 0), adsr(0, 0.64, 0, 0), adsr(0, 0.4, 0, 0)) + ) } function bell(note, duration) { - return stacking_adsr(square_sound, midi_note_to_frequency(note), duration, - list(adsr(0, 1.2, 0, 0), - adsr(0, 1.3236, 0, 0), - adsr(0, 1.5236, 0, 0), - adsr(0, 1.8142, 0, 0))); + return stacking_adsr( + square_sound, + midi_note_to_frequency(note), + duration, + list(adsr(0, 1.2, 0, 0), adsr(0, 1.3236, 0, 0), adsr(0, 1.5236, 0, 0), adsr(0, 1.8142, 0, 0)) + ) } function violin(note, duration) { - return stacking_adsr(sawtooth_sound, midi_note_to_frequency(note), duration, - list(adsr(0.7, 0, 1, 0.3), - adsr(0.7, 0, 1, 0.3), - adsr(0.9, 0, 1, 0.3), - adsr(0.9, 0, 1, 0.3))); + return stacking_adsr( + sawtooth_sound, + midi_note_to_frequency(note), + duration, + list(adsr(0.7, 0, 1, 0.3), adsr(0.7, 0, 1, 0.3), adsr(0.9, 0, 1, 0.3), adsr(0.9, 0, 1, 0.3)) + ) } function cello(note, duration) { - return stacking_adsr(square_sound, midi_note_to_frequency(note), duration, - list(adsr(0.1, 0, 1, 0.2), - adsr(0.1, 0, 1, 0.3), - adsr(0, 0, 0.2, 0.3))); + return stacking_adsr( + square_sound, + midi_note_to_frequency(note), + duration, + list(adsr(0.1, 0, 1, 0.2), adsr(0.1, 0, 1, 0.3), adsr(0, 0, 0.2, 0.3)) + ) } function string_to_list_of_numbers(string) { - var array_of_numbers = string.split(""); - return map(function (x) { - return parseInt(x); - }, vector_to_list(array_of_numbers)); + var array_of_numbers = string.split('') + return map(function(x) { + return parseInt(x) + }, vector_to_list(array_of_numbers)) } diff --git a/public/externalLibs/sound/sounds.js b/public/externalLibs/sound/sounds.js index b7aa8654a6..3fe559ac4e 100644 --- a/public/externalLibs/sound/sounds.js +++ b/public/externalLibs/sound/sounds.js @@ -1,23 +1,23 @@ // Constants -var FS = 32000; // Standard sampling rate for all problems +var FS = 32000 // Standard sampling rate for all problems // --------------------------------------------- // Fast reimplementations of the list library // --------------------------------------------- function append(xs, ys) { - var v1 = list_to_vector(xs); - var v2 = list_to_vector(ys); - var vector = v1.concat(v2); - return vector_to_list(vector); + var v1 = list_to_vector(xs) + var v2 = list_to_vector(ys) + var vector = v1.concat(v2) + return vector_to_list(vector) } function map(f, xs) { - var vector = list_to_vector(xs); - for (var i=0; i 1) { - data[i] = 1; - } - if (data[i] < -1) { - data[i] = -1; - } + for (var i = 0; i < data.length; i++) { + if (data[i] > 1) { + data[i] = 1 } - var old_value = 0; - for (var i=0; i 0.01 && data[i] == 0) { - data[i] = old_value * 0.999; - } - old_value = data[i]; + if (data[i] < -1) { + data[i] = -1 } - return data; + } + var old_value = 0 + for (var i = 0; i < data.length; i++) { + if (Math.abs(old_value - data[i]) > 0.01 && data[i] == 0) { + data[i] = old_value * 0.999 + } + old_value = data[i] + } + return data } function copy(data) { - var ret = []; - for (var i=0; i amplitude) x duration */ function make_sourcesound(wave, duration) { - return pair(wave, duration); + return pair(wave, duration) } function get_wave(sourcesound) { - return head(sourcesound); + return head(sourcesound) } function get_duration(sourcesound) { - return tail(sourcesound); + return tail(sourcesound) } function is_sound(sound) { - return is_pair(sound) && head(sound) === 'sound'; + return is_pair(sound) && head(sound) === 'sound' } -var _playing = false; -var _audio = null; +var _playing = false +var _audio = null function play(sound) { - if (_playing) return; + if (_playing) return - if (!is_sound(sound)) { - throw new Error("play() expects sound as input, did you forget to sourcesound_to_sound()?"); - } + if (!is_sound(sound)) { + throw new Error('play() expects sound as input, did you forget to sourcesound_to_sound()?') + } - var data = tail(sound); + var data = tail(sound) - _audio = raw_to_audio(data); - _audio.addEventListener('ended', stop); - _audio.play(); - _playing = true; + _audio = raw_to_audio(data) + _audio.addEventListener('ended', stop) + _audio.play() + _playing = true } function stop() { - if (_playing) { - _audio.pause(); - _audio = null; - } - _playing = false; + if (_playing) { + _audio.pause() + _audio = null + } + _playing = false } function cut_sourcesound(sourcesound, duration) { - var wave = get_wave(sourcesound); - return make_sourcesound(function(t) { - if (t >= duration) { - return 0; - } else { - return wave(t); - } - }, duration); + var wave = get_wave(sourcesound) + return make_sourcesound(function(t) { + if (t >= duration) { + return 0 + } else { + return wave(t) + } + }, duration) } function cut(sound, duration) { - var data = tail(sound); - var ret = []; - for (var i=0; i 1) { - return 1; - } else if (a < -1) { - return -1; - } else { - return a; - } - }, duration); + var wave = get_wave(sourcesound) + var duration = get_duration(sourcesound) + return make_sourcesound(function(t) { + var a = wave(t) + if (a > 1) { + return 1 + } else if (a < -1) { + return -1 + } else { + return a + } + }, duration) } function clamp(sound) { - var ret = []; - var data = tail(sound); - for (var i=0; i 1) { - return 1; - } else if (ret[i] < -1) { - return -1; - } else { - return ret[i]; - } + var ret = [] + var data = tail(sound) + for (var i = 0; i < data.length; i++) { + if (ret[i] > 1) { + return 1 + } else if (ret[i] < -1) { + return -1 + } else { + return ret[i] } - return ret; + } + return ret } // for mission 14 function letter_name_to_midi_note(note) { - // we don't consider double flat/ double sharp - var note = note.split(""); - var res = 12; //MIDI notes for mysterious C0 - var n = note[0].toUpperCase(); - switch(n) { - case 'D': - res = res + 2; - break; - - case 'E': - res = res + 4; - break; - - case 'F': - res = res + 5; - break; - - case 'G': - res = res + 7; - break; - - case 'A': - res = res + 9; - break; - - case 'B': - res = res + 11; - break; - - default : - break; + // we don't consider double flat/ double sharp + var note = note.split('') + var res = 12 //MIDI notes for mysterious C0 + var n = note[0].toUpperCase() + switch (n) { + case 'D': + res = res + 2 + break + + case 'E': + res = res + 4 + break + + case 'F': + res = res + 5 + break + + case 'G': + res = res + 7 + break + + case 'A': + res = res + 9 + break + + case 'B': + res = res + 11 + break + + default: + break + } + + if (note.length === 2) { + res = parseInt(note[1]) * 12 + res + } else if (note.length === 3) { + switch (note[1]) { + case '#': + res = res + 1 + break + + case 'b': + res = res - 1 + break + + default: + break } + res = parseInt(note[2]) * 12 + res + } - if (note.length === 2) { - res = parseInt(note[1]) * 12 + res; - } else if (note.length === 3) { - switch (note[1]) { - case '#': - res = res + 1; - break; - - case 'b': - res = res - 1; - break; - - default: - break; - } - res = parseInt(note[2]) * 12 + res; - } - - return res; + return res } function letter_name_to_frequency(note) { - return midi_note_to_frequency(note_to_midi_note(note)); + return midi_note_to_frequency(note_to_midi_note(note)) } function midi_note_to_frequency(note) { - return 8.1757989156 * Math.pow(2, (note / 12)); + return 8.1757989156 * Math.pow(2, note / 12) } function square_sourcesound(freq, duration) { - function fourier_expansion_square(level, t) { - var answer = 0; - for (var i = 1; i <= level; i++) { - answer = answer + Math.sin(2 * Math.PI * (2 * i - 1) * freq * t) / (2 * i - 1); - } - return answer; + function fourier_expansion_square(level, t) { + var answer = 0 + for (var i = 1; i <= level; i++) { + answer = answer + Math.sin(2 * Math.PI * (2 * i - 1) * freq * t) / (2 * i - 1) } - return autocut_sourcesound(make_sourcesound(function(t) { - var x = (4 / Math.PI) * fourier_expansion_square(5, t); - if (x > 1) { - return 1; - } else if (x < -1) { - return -1; - } else { - return x; - } - }, duration)); + return answer + } + return autocut_sourcesound( + make_sourcesound(function(t) { + var x = 4 / Math.PI * fourier_expansion_square(5, t) + if (x > 1) { + return 1 + } else if (x < -1) { + return -1 + } else { + return x + } + }, duration) + ) } function square_sound(freq, duration) { - return sourcesound_to_sound(square_sourcesound(freq, duration)); + return sourcesound_to_sound(square_sourcesound(freq, duration)) } function triangle_sourcesound(freq, duration) { - function fourier_expansion_triangle(level, t) { - var answer = 0; - for (var i = 0; i < level; i++) { - answer = answer + Math.pow(-1, i) * Math.sin((2 * i + 1) * t * freq * Math.PI * 2) / Math.pow((2 * i + 1), 2); - } - return answer; + function fourier_expansion_triangle(level, t) { + var answer = 0 + for (var i = 0; i < level; i++) { + answer = + answer + + Math.pow(-1, i) * Math.sin((2 * i + 1) * t * freq * Math.PI * 2) / Math.pow(2 * i + 1, 2) } - return autocut_sourcesound(make_sourcesound(function(t) { - var x = (8 / Math.PI / Math.PI) * fourier_expansion_triangle(5, t); - if (x > 1) { - return 1; - } else if (x < -1) { - return -1; - } else { - return x; - } - }, duration)); + return answer + } + return autocut_sourcesound( + make_sourcesound(function(t) { + var x = 8 / Math.PI / Math.PI * fourier_expansion_triangle(5, t) + if (x > 1) { + return 1 + } else if (x < -1) { + return -1 + } else { + return x + } + }, duration) + ) } function triangle_sound(freq, duration) { - return sourcesound_to_sound(triangle_sourcesound(freq, duration)); + return sourcesound_to_sound(triangle_sourcesound(freq, duration)) } function sawtooth_sourcesound(freq, duration) { - function fourier_expansion_sawtooth(level, t) { - var answer = 0; - for (var i = 1; i <= level; i++) { - answer = answer + Math.sin(2 * Math.PI * i * freq * t) / i; - } - return answer; + function fourier_expansion_sawtooth(level, t) { + var answer = 0 + for (var i = 1; i <= level; i++) { + answer = answer + Math.sin(2 * Math.PI * i * freq * t) / i } - return autocut_sourcesound(make_sourcesound(function(t) { - var x = (1 / 2) - (1 / Math.PI) * fourier_expansion_sawtooth(5, t); - if (x > 1) { - return 1; - } else if (x < -1) { - return -1; - } else { - return x; - } - }, duration)); + return answer + } + return autocut_sourcesound( + make_sourcesound(function(t) { + var x = 1 / 2 - 1 / Math.PI * fourier_expansion_sawtooth(5, t) + if (x > 1) { + return 1 + } else if (x < -1) { + return -1 + } else { + return x + } + }, duration) + ) } function sawtooth_sound(freq, duration) { - return sourcesound_to_sound(sawtooth_sourcesound(freq, duration)); + return sourcesound_to_sound(sawtooth_sourcesound(freq, duration)) } function play_concurrently(sound) { - if (!is_sound(sound)) { - throw new Error("play() expects sound as input, did you forget to sourcesound_to_sound()?"); - } + if (!is_sound(sound)) { + throw new Error('play() expects sound as input, did you forget to sourcesound_to_sound()?') + } - var data = tail(sound); + var data = tail(sound) - var audio = raw_to_audio(data); - audio.play(); + var audio = raw_to_audio(data) + audio.play() } diff --git a/public/externalLibs/streams/stream.js b/public/externalLibs/streams/stream.js index bd5c79b87c..4c06a6f749 100644 --- a/public/externalLibs/streams/stream.js +++ b/public/externalLibs/streams/stream.js @@ -9,21 +9,23 @@ // throws an exception if the argument is not a pair // LOW-LEVEL FUNCTION, NOT JEDISCRIPT function stream_tail(xs) { - var tail; - if (is_pair(xs)) { - tail = xs[1]; - } else { - throw new Error("stream_tail(xs) expects a pair as " - + "argument xs, but encountered " + xs); - } + var tail + if (is_pair(xs)) { + tail = xs[1] + } else { + throw new Error('stream_tail(xs) expects a pair as ' + 'argument xs, but encountered ' + xs) + } - if (typeof tail === "function") { - return tail(); - } else { - throw new Error("stream_tail(xs) expects a function as " - + "the tail of the argument pair xs, " - + "but encountered " + tail); - } + if (typeof tail === 'function') { + return tail() + } else { + throw new Error( + 'stream_tail(xs) expects a function as ' + + 'the tail of the argument pair xs, ' + + 'but encountered ' + + tail + ) + } } // is_stream recurses down the stream and checks that it ends with @@ -31,32 +33,32 @@ function stream_tail(xs) { // LOW-LEVEL FUNCTION, NOT JEDISCRIPT // Lazy? No: is_stream needs to go down the stream function is_stream(xs) { - return (array_test(xs) && xs.length === 0) - || (is_pair(xs) && typeof tail(xs) === "function" && - is_stream(stream_tail(xs))); + return ( + (array_test(xs) && xs.length === 0) || + (is_pair(xs) && typeof tail(xs) === 'function' && is_stream(stream_tail(xs))) + ) } // list_to_stream transforms a given list to a stream // Lazy? Yes: list_to_stream goes down the list only when forced function list_to_stream(xs) { - if (is_empty_list(xs)) { - return []; - } else { - return pair(head(xs), - function() { - return list_to_stream(tail(xs)); - }); - } + if (is_empty_list(xs)) { + return [] + } else { + return pair(head(xs), function() { + return list_to_stream(tail(xs)) + }) + } } // stream_to_list transforms a given stream to a list // Lazy? No: stream_to_list needs to force the whole stream function stream_to_list(xs) { - if (is_empty_list(xs)) { - return []; - } else { - return pair(head(xs), stream_to_list(stream_tail(xs))); - } + if (is_empty_list(xs)) { + return [] + } else { + return pair(head(xs), stream_to_list(stream_tail(xs))) + } } // stream makes a stream out of its arguments @@ -64,22 +66,22 @@ function stream_to_list(xs) { // Lazy? No: In this implementation, we generate first a // complete list, and then a stream using list_to_stream function stream() { - var the_list = []; - for (var i = arguments.length - 1; i >= 0; i--) { - the_list = pair(arguments[i], the_list); - } - return list_to_stream(the_list); + var the_list = [] + for (var i = arguments.length - 1; i >= 0; i--) { + the_list = pair(arguments[i], the_list) + } + return list_to_stream(the_list) } // stream_length returns the length of a given argument stream // throws an exception if the argument is not a stream // Lazy? No: The function needs to explore the whole stream function stream_length(xs) { - if (is_empty_list(xs)) { - return 0; - } else { - return 1 + stream_length(stream_tail(xs)); - } + if (is_empty_list(xs)) { + return 0 + } else { + return 1 + stream_length(stream_tail(xs)) + } } // stream_map applies first arg f to the elements of the second @@ -93,14 +95,13 @@ function stream_length(xs) { // Lazy? Yes: The argument stream is only explored as forced by // the result stream. function stream_map(f, s) { - if (is_empty_list(s)) { - return []; - } else { - return pair(f(head(s)), - function() { - return stream_map(f, stream_tail(s)); - }); - } + if (is_empty_list(s)) { + return [] + } else { + return pair(f(head(s)), function() { + return stream_map(f, stream_tail(s)) + }) + } } // build_stream takes a non-negative integer n as first argument, @@ -110,17 +111,16 @@ function stream_map(f, s) { // Lazy? Yes: The result stream forces the applications of fun // for the next element function build_stream(n, fun) { - function build(i) { - if (i >= n) { - return []; - } else { - return pair(fun(i), - function() { - return build(i + 1); - }); - } + function build(i) { + if (i >= n) { + return [] + } else { + return pair(fun(i), function() { + return build(i + 1) + }) } - return build(0); + } + return build(0) } // stream_for_each applies first arg fun to the elements of the list @@ -133,27 +133,31 @@ function build_stream(n, fun) { // first argument is not a function. // Lazy? No: stream_for_each forces the exploration of the entire stream function stream_for_each(fun, xs) { - if (is_empty_list(xs)) { - return true; - } else { - fun(head(xs)); - return stream_for_each(fun, stream_tail(xs)); - } + if (is_empty_list(xs)) { + return true + } else { + fun(head(xs)) + return stream_for_each(fun, stream_tail(xs)) + } } // stream_reverse reverses the argument stream // stream_reverse throws an exception if the argument is not a stream. // Lazy? No: stream_reverse forces the exploration of the entire stream function stream_reverse(xs) { - function rev(original, reversed) { - if (is_empty_list(original)) { - return reversed; - } else { - return rev(stream_tail(original), - pair(head(original), function() { return reversed; })); - } + function rev(original, reversed) { + if (is_empty_list(original)) { + return reversed + } else { + return rev( + stream_tail(original), + pair(head(original), function() { + return reversed + }) + ) } - return rev(xs,[]); + } + return rev(xs, []) } // stream_to_vector returns vector that contains the elements of the argument @@ -161,13 +165,13 @@ function stream_reverse(xs) { // stream_to_vector throws an exception if the argument is not a stream // LOW-LEVEL FUNCTION, NOT JEDISCRIPT // Lazy? No: stream_to_vector forces the exploration of the entire stream -function stream_to_vector(lst){ - var vector = []; - while (!is_empty_list(lst)) { - vector.push(head(lst)); - lst = stream_tail(lst); - } - return vector; +function stream_to_vector(lst) { + var vector = [] + while (!is_empty_list(lst)) { + vector.push(head(lst)) + lst = stream_tail(lst) + } + return vector } // stream_append appends first argument stream and second argument stream. @@ -177,14 +181,13 @@ function stream_to_vector(lst){ // stream. // Lazy? Yes: the result stream forces the actual append operation function stream_append(xs, ys) { - if (is_empty_list(xs)) { - return ys; - } else { - return pair(head(xs), - function() { - return stream_append(stream_tail(xs), ys); - }); - } + if (is_empty_list(xs)) { + return ys + } else { + return pair(head(xs), function() { + return stream_append(stream_tail(xs), ys) + }) + } } // stream_member looks for a given first-argument element in a given @@ -193,13 +196,13 @@ function stream_append(xs, ys) { // element does not occur in the stream // Lazy? Sort-of: stream_member forces the stream only until the element is found. function stream_member(x, s) { - if (is_empty_list(s)) { - return []; - } else if (head(s) === x) { - return s; - } else { - return stream_member(x, stream_tail(s)); - } + if (is_empty_list(s)) { + return [] + } else if (head(s) === x) { + return s + } else { + return stream_member(x, stream_tail(s)) + } } // stream_remove removes the first occurrence of a given first-argument element @@ -207,30 +210,29 @@ function stream_member(x, s) { // if there is no occurrence. // Lazy? Yes: the result stream forces the construction of each next element function stream_remove(v, xs) { - if (is_empty_list(xs)) { - return []; - } else if (v === head(xs)) { - return stream_tail(xs); - } else { - return pair(head(xs), - function() { - return stream_remove(v, stream_tail(xs)); - }); - } + if (is_empty_list(xs)) { + return [] + } else if (v === head(xs)) { + return stream_tail(xs) + } else { + return pair(head(xs), function() { + return stream_remove(v, stream_tail(xs)) + }) + } } // stream_remove_all removes all instances of v instead of just the first. // Lazy? Yes: the result stream forces the construction of each next element function stream_remove_all(v, xs) { - if (is_empty_list(xs)) { - return []; - } else if (v === head(xs)) { - return stream_remove_all(v, stream_tail(xs)); - } else { - return pair(head(xs), function() { - return stream_remove_all(v, stream_tail(xs)); - }); - } + if (is_empty_list(xs)) { + return [] + } else if (v === head(xs)) { + return stream_remove_all(v, stream_tail(xs)) + } else { + return pair(head(xs), function() { + return stream_remove_all(v, stream_tail(xs)) + }) + } } // filter returns the substream of elements of given stream s @@ -240,16 +242,15 @@ function stream_remove_all(v, xs) { // of the next element needs to go down the stream // until an element is found for which p holds. function stream_filter(p, s) { - if (is_empty_list(s)) { - return []; - } else if (p(head(s))) { - return pair(head(s), - function() { - return stream_filter(p, stream_tail(s)); - }); - } else { - return stream_filter(p, stream_tail(s)); - } + if (is_empty_list(s)) { + return [] + } else if (p(head(s))) { + return pair(head(s), function() { + return stream_filter(p, stream_tail(s)) + }) + } else { + return stream_filter(p, stream_tail(s)) + } } // enumerates numbers starting from start, @@ -258,14 +259,13 @@ function stream_filter(p, s) { // Lazy? Yes: The result stream forces the construction of // each next element function enum_stream(start, end) { - if (start > end) { - return []; - } else { - return pair(start, - function() { - return enum_stream(start + 1, end); - }); - } + if (start > end) { + return [] + } else { + return pair(start, function() { + return enum_stream(start + 1, end) + }) + } } // integers_from constructs an infinite stream of integers @@ -273,10 +273,9 @@ function enum_stream(start, end) { // Lazy? Yes: The result stream forces the construction of // each next element function integers_from(n) { - return pair(n, - function() { - return integers_from(n + 1); - }); + return pair(n, function() { + return integers_from(n + 1) + }) } // eval_stream constructs the list of the first n elements @@ -285,13 +284,11 @@ function integers_from(n) { // the first n elements, and leaves the rest of // the stream untouched. function eval_stream(s, n) { - if (n === 0) { - return []; - } else { - return pair(head(s), - eval_stream(stream_tail(s), - n - 1)); - } + if (n === 0) { + return [] + } else { + return pair(head(s), eval_stream(stream_tail(s), n - 1)) + } } // Returns the item in stream s at index n (the first item is at position 0) @@ -299,10 +296,9 @@ function eval_stream(s, n) { // the first n elements, and leaves the rest of // the stream untouched. function stream_ref(s, n) { - if (n === 0) { - return head(s); - } else { - return stream_ref(stream_tail(s), n - 1); - } + if (n === 0) { + return head(s) + } else { + return stream_ref(stream_tail(s), n - 1) + } } - diff --git a/public/externalLibs/tree.js b/public/externalLibs/tree.js index 5d21c3c94e..1761b43a40 100644 --- a/public/externalLibs/tree.js +++ b/public/externalLibs/tree.js @@ -5,44 +5,44 @@ // make_empty_binary_tree returns an empty list function make_empty_binary_tree() { - return null; + return null } // checks if a given list is a valid binary tree, according to the abstraction function is_binary_tree(t) { - return (is_empty_binary_tree(t) || - ((length(t) === 3) - && is_binary_tree(left_subtree_of(t)) - && is_binary_tree(right_subtree_of(t)))); + return ( + is_empty_binary_tree(t) || + (length(t) === 3 && is_binary_tree(left_subtree_of(t)) && is_binary_tree(right_subtree_of(t))) + ) } -// make_binary_tree_node returns a binary tree node composed of the +// make_binary_tree_node returns a binary tree node composed of the // three elements passed in function make_binary_tree_node(left, value, right) { - if (!is_binary_tree(left)) { - throw new Error("Left subtree is not a valid binary tree"); - } else if (!is_binary_tree(right)) { - throw new Error("Right subtree is not a valid binary tree"); - } - return list(left, value, right); + if (!is_binary_tree(left)) { + throw new Error('Left subtree is not a valid binary tree') + } else if (!is_binary_tree(right)) { + throw new Error('Right subtree is not a valid binary tree') + } + return list(left, value, right) } // is_empty_binary_tree checks if given binary tree node is an empty list function is_empty_binary_tree(t) { - return is_null(t); + return is_null(t) } // left_subtree_of returns the left subtree of a given binary tree node function left_subtree_of(t) { - return list_ref(t, 0); + return list_ref(t, 0) } // value_of returns the value of a given binary tree node function value_of(t) { - return list_ref(t, 1); + return list_ref(t, 1) } // right_subtree_of returns the right subtree of a given binary tree node function right_subtree_of(t) { - return list_ref(t, 2); + return list_ref(t, 2) } diff --git a/public/externalLibs/visualizer/KineticJS.js b/public/externalLibs/visualizer/KineticJS.js index 12feae4def..6303b2739c 100644 --- a/public/externalLibs/visualizer/KineticJS.js +++ b/public/externalLibs/visualizer/KineticJS.js @@ -1,4 +1,4981 @@ /*! KineticJS v4.5.5 2013-07-28 http://www.kineticjs.com by Eric Rowell @ericdrowell - MIT License https://github.com/ericdrowell/KineticJS/wiki/License*/ -var Kinetic={};!function(){Kinetic.version="4.5.5",Kinetic.Filters={},Kinetic.Node=function(a){this._init(a)},Kinetic.Shape=function(a){this.__init(a)},Kinetic.Container=function(a){this.__init(a)},Kinetic.Stage=function(a){this.___init(a)},Kinetic.Layer=function(a){this.___init(a)},Kinetic.Group=function(a){this.___init(a)},Kinetic.Global={stages:[],idCounter:0,ids:{},names:{},shapes:{},listenClickTap:!1,inDblClickWindow:!1,dblClickWindow:400,isDragging:function(){var a=Kinetic.DD;return a?a.isDragging:!1},isDragReady:function(){var a=Kinetic.DD;return a?!!a.node:!1},_addId:function(a,b){void 0!==b&&(this.ids[b]=a)},_removeId:function(a){void 0!==a&&delete this.ids[a]},_addName:function(a,b){void 0!==b&&(void 0===this.names[b]&&(this.names[b]=[]),this.names[b].push(a))},_removeName:function(a,b){if(void 0!==a){var c=this.names[a];if(void 0!==c){for(var d=0;dc;c++)this[c]=a[c];return this},Kinetic.Collection.prototype=[],Kinetic.Collection.prototype.each=function(a){for(var b=0;ba;a++)b.push(this[a]);return b},Kinetic.Collection.toCollection=function(a){var b,c=new Kinetic.Collection,d=a.length;for(b=0;d>b;b++)c.push(a[b]);return c},Kinetic.Collection.mapMethods=function(a){var b,c=a.length;for(b=0;c>b;b++)!function(b){var c=a[b];Kinetic.Collection.prototype[c]=function(){var a,b=this.length;for(args=[].slice.call(arguments),a=0;b>a;a++)this[a][c].apply(this[a],args)}}(b)}}(),function(){Kinetic.Transform=function(){this.m=[1,0,0,1,0,0]},Kinetic.Transform.prototype={translate:function(a,b){this.m[4]+=this.m[0]*a+this.m[2]*b,this.m[5]+=this.m[1]*a+this.m[3]*b},scale:function(a,b){this.m[0]*=a,this.m[1]*=a,this.m[2]*=b,this.m[3]*=b},rotate:function(a){var b=Math.cos(a),c=Math.sin(a),d=this.m[0]*b+this.m[2]*c,e=this.m[1]*b+this.m[3]*c,f=this.m[0]*-c+this.m[2]*b,g=this.m[1]*-c+this.m[3]*b;this.m[0]=d,this.m[1]=e,this.m[2]=f,this.m[3]=g},getTranslation:function(){return{x:this.m[4],y:this.m[5]}},skew:function(a,b){var c=this.m[0]+this.m[2]*b,d=this.m[1]+this.m[3]*b,e=this.m[2]+this.m[0]*a,f=this.m[3]+this.m[1]*a;this.m[0]=c,this.m[1]=d,this.m[2]=e,this.m[3]=f},multiply:function(a){var b=this.m[0]*a.m[0]+this.m[2]*a.m[1],c=this.m[1]*a.m[0]+this.m[3]*a.m[1],d=this.m[0]*a.m[2]+this.m[2]*a.m[3],e=this.m[1]*a.m[2]+this.m[3]*a.m[3],f=this.m[0]*a.m[4]+this.m[2]*a.m[5]+this.m[4],g=this.m[1]*a.m[4]+this.m[3]*a.m[5]+this.m[5];this.m[0]=b,this.m[1]=c,this.m[2]=d,this.m[3]=e,this.m[4]=f,this.m[5]=g},invert:function(){var a=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),b=this.m[3]*a,c=-this.m[1]*a,d=-this.m[2]*a,e=this.m[0]*a,f=a*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),g=a*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);this.m[0]=b,this.m[1]=c,this.m[2]=d,this.m[3]=e,this.m[4]=f,this.m[5]=g},getMatrix:function(){return this.m}}}(),function(){var a="canvas",b="2d",c="[object Array]",d="[object Number]",e="[object String]",f=Math.PI/180,g=180/Math.PI,h="#",i="",j="0",k="Kinetic warning: ",l="Kinetic error: ",m="rgb(",n={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},o=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;Kinetic.Util={_isElement:function(a){return!(!a||1!=a.nodeType)},_isFunction:function(a){return!!(a&&a.constructor&&a.call&&a.apply)},_isObject:function(a){return!!a&&a.constructor==Object},_isArray:function(a){return Object.prototype.toString.call(a)==c},_isNumber:function(a){return Object.prototype.toString.call(a)==d},_isString:function(a){return Object.prototype.toString.call(a)==e},_hasMethods:function(a){var b,c=[];for(b in a)this._isFunction(a[b])&&c.push(b);return c.length>0},_isInDocument:function(a){for(;a=a.parentNode;)if(a==document)return!0;return!1},_getXY:function(a){if(this._isNumber(a))return{x:a,y:a};if(this._isArray(a)){if(1===a.length){var b=a[0];if(this._isNumber(b))return{x:b,y:b};if(this._isArray(b))return{x:b[0],y:b[1]};if(this._isObject(b))return b}else if(a.length>=2)return{x:a[0],y:a[1]}}else if(this._isObject(a))return a;return null},_getSize:function(a){if(this._isNumber(a))return{width:a,height:a};if(this._isArray(a))if(1===a.length){var b=a[0];if(this._isNumber(b))return{width:b,height:b};if(this._isArray(b)){if(b.length>=4)return{width:b[2],height:b[3]};if(b.length>=2)return{width:b[0],height:b[1]}}else if(this._isObject(b))return b}else{if(a.length>=4)return{width:a[2],height:a[3]};if(a.length>=2)return{width:a[0],height:a[1]}}else if(this._isObject(a))return a;return null},_getPoints:function(a){var b,c,d=[];if(void 0===a)return[];if(c=a.length,this._isArray(a[0])){for(b=0;c>b;b++)d.push({x:a[b][0],y:a[b][1]});return d}if(this._isObject(a[0]))return a;for(b=0;c>b;b+=2)d.push({x:a[b],y:a[b+1]});return d},_getImage:function(c,d){var e,f,g,h;c?this._isElement(c)?d(c):this._isString(c)?(e=new Image,e.onload=function(){d(e)},e.src=c):c.data?(f=document.createElement(a),f.width=c.width,f.height=c.height,g=f.getContext(b),g.putImageData(c,0,0),h=f.toDataURL(),e=new Image,e.onload=function(){d(e)},e.src=h):d(null):d(null)},_rgbToHex:function(a,b,c){return((1<<24)+(a<<16)+(b<<8)+c).toString(16).slice(1)},_hexToRgb:function(a){a=a.replace(h,i);var b=parseInt(a,16);return{r:255&b>>16,g:255&b>>8,b:255&b}},getRandomColor:function(){for(var a=(16777215*Math.random()<<0).toString(16);a.length<6;)a=j+a;return h+a},getRGB:function(a){var b;return a in n?(b=n[a],{r:b[0],g:b[1],b:b[2]}):a[0]===h?this._hexToRgb(a.substring(1)):a.substr(0,4)===m?(b=o.exec(a.replace(/ /g,"")),{r:parseInt(b[1],10),g:parseInt(b[2],10),b:parseInt(b[3],10)}):{r:0,g:0,b:0}},_merge:function(a,b){var c=this._clone(b);for(var d in a)c[d]=this._isObject(a[d])?this._merge(a[d],c[d]):a[d];return c},_clone:function(a){var b={};for(var c in a)b[c]=this._isObject(a[c])?this._clone(a[c]):a[c];return b},_degToRad:function(a){return a*f},_radToDeg:function(a){return a*g},_capitalize:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},error:function(a){throw new Error(l+a)},warn:function(a){window.console&&console.warn&&console.warn(k+a)},extend:function(a,b){for(var c in b.prototype)c in a.prototype||(a.prototype[c]=b.prototype[c])},addMethods:function(a,b){var c;for(c in b)a.prototype[c]=b[c]},_getControlPoints:function(a,b,c,d){var e=a.x,f=a.y,g=b.x,h=b.y,i=c.x,j=c.y,k=Math.sqrt(Math.pow(g-e,2)+Math.pow(h-f,2)),l=Math.sqrt(Math.pow(i-g,2)+Math.pow(j-h,2)),m=d*k/(k+l),n=d*l/(k+l),o=g-m*(i-e),p=h-m*(j-f),q=g+n*(i-e),r=h+n*(j-f);return[{x:o,y:p},{x:q,y:r}]},_expandPoints:function(a,b){var c,d,e=a.length,f=[];for(c=1;e-1>c;c++)d=Kinetic.Util._getControlPoints(a[c-1],a[c],a[c+1],b),f.push(d[0]),f.push(a[c]),f.push(d[1]);return f},_removeLastLetter:function(a){return a.substring(0,a.length-1)}}}(),function(){var a=document.createElement("canvas"),b=a.getContext("2d"),c=window.devicePixelRatio||1,d=b.webkitBackingStorePixelRatio||b.mozBackingStorePixelRatio||b.msBackingStorePixelRatio||b.oBackingStorePixelRatio||b.backingStorePixelRatio||1,e=c/d;Kinetic.Canvas=function(a){this.init(a)},Kinetic.Canvas.prototype={init:function(a){a=a||{};var b=a.width||0,c=a.height||0,d=a.pixelRatio||e,f=a.contextType||"2d";this.pixelRatio=d,this.element=document.createElement("canvas"),this.element.style.padding=0,this.element.style.margin=0,this.element.style.border=0,this.element.style.background="transparent",this.element.style.position="absolute",this.element.style.top=0,this.element.style.left=0,this.context=this.element.getContext(f),this.setSize(b,c)},getElement:function(){return this.element},getContext:function(){return this.context},setWidth:function(a){this.width=this.element.width=a*this.pixelRatio,this.element.style.width=a+"px"},setHeight:function(a){this.height=this.element.height=a*this.pixelRatio,this.element.style.height=a+"px"},getWidth:function(){return this.width},getHeight:function(){return this.height},setSize:function(a,b){this.setWidth(a),this.setHeight(b)},clear:function(){var a=this.getContext();this.getElement(),a.clearRect(0,0,this.getWidth(),this.getHeight())},toDataURL:function(a,b){try{return this.element.toDataURL(a,b)}catch(c){try{return this.element.toDataURL()}catch(d){return Kinetic.Util.warn("Unable to get data URL. "+d.message),""}}},fill:function(a){a.getFillEnabled()&&this._fill(a)},stroke:function(a){a.getStrokeEnabled()&&this._stroke(a)},fillStroke:function(a){var b=a.getFillEnabled();b&&this._fill(a),a.getStrokeEnabled()&&this._stroke(a,a.hasShadow()&&a.hasFill()&&b)},applyShadow:function(a,b){var c=this.context;c.save(),this._applyShadow(a),b(),c.restore(),b()},_applyLineCap:function(a){var b=a.getLineCap();b&&(this.context.lineCap=b)},_applyOpacity:function(a){var b=a.getAbsoluteOpacity();1!==b&&(this.context.globalAlpha=b)},_applyLineJoin:function(a){var b=a.getLineJoin();b&&(this.context.lineJoin=b)},_applyAncestorTransforms:function(a){var b,c,d=this.context;a._eachAncestorReverse(function(a){b=a.getTransform(!0),c=b.getMatrix(),d.transform(c[0],c[1],c[2],c[3],c[4],c[5])},!0)},_clip:function(a){var b=this.getContext();b.save(),this._applyAncestorTransforms(a),b.beginPath(),a.getClipFunc()(this),b.clip(),b.setTransform(1,0,0,1,0,0)}},Kinetic.SceneCanvas=function(a){Kinetic.Canvas.call(this,a)},Kinetic.SceneCanvas.prototype={setWidth:function(a){var b=this.pixelRatio;Kinetic.Canvas.prototype.setWidth.call(this,a),this.context.scale(b,b)},setHeight:function(a){var b=this.pixelRatio;Kinetic.Canvas.prototype.setHeight.call(this,a),this.context.scale(b,b)},_fillColor:function(a){var b=this.context,c=a.getFill();b.fillStyle=c,a._fillFunc(b)},_fillPattern:function(a){var b=this.context,c=a.getFillPatternImage(),d=a.getFillPatternX(),e=a.getFillPatternY(),f=a.getFillPatternScale(),g=a.getFillPatternRotation(),h=a.getFillPatternOffset(),i=a.getFillPatternRepeat();(d||e)&&b.translate(d||0,e||0),g&&b.rotate(g),f&&b.scale(f.x,f.y),h&&b.translate(-1*h.x,-1*h.y),b.fillStyle=b.createPattern(c,i||"repeat"),b.fill()},_fillLinearGradient:function(a){var b=this.context,c=a.getFillLinearGradientStartPoint(),d=a.getFillLinearGradientEndPoint(),e=a.getFillLinearGradientColorStops(),f=b.createLinearGradient(c.x,c.y,d.x,d.y);if(e){for(var g=0;gf;f++)g=k[f],h=g.split(d),i=h[0],j=h[1]||c,this.eventListeners[i]||(this.eventListeners[i]=[]),this.eventListeners[i].push({name:j,handler:e});return this},off:function(a){var c,e,f,g,h,i=a.split(b),j=i.length;for(c=0;j>c;c++)if(e=i[c],f=e.split(d),g=f[0],h=f[1],g)this.eventListeners[g]&&this._off(g,h);else for(t in this.eventListeners)this._off(t,h);return this},remove:function(){var a=this.getParent();return a&&a.children&&(a.children.splice(this.index,1),a._setChildrenIndices(),delete this.parent),this},destroy:function(){var a=Kinetic.Global;a._removeId(this.getId()),a._removeName(this.getName(),this._id),this.remove()},getAttr:function(a){var b=e+Kinetic.Util._capitalize(a);return Kinetic.Util._isFunction(this[b])?this[b]():this.attrs[a]},setAttr:function(){var a=Array.prototype.slice.call(arguments),b=a[0],c=f+Kinetic.Util._capitalize(b),d=this[c];return a.shift(),Kinetic.Util._isFunction(d)?d.apply(this,a):this.attrs[b]=a[0],this},getAttrs:function(){return this.attrs||{}},setAttrs:function(a){var b,c;if(a)for(b in a)b===B||(c=f+Kinetic.Util._capitalize(b),Kinetic.Util._isFunction(this[c])?this[c](a[b]):this._setAttr(b,a[b]));return this},getVisible:function(){var a=this.attrs.visible,b=this.getParent();return void 0===a&&(a=!0),a&&b&&!b.getVisible()?!1:a},show:function(){return this.setVisible(!0),this},hide:function(){return this.setVisible(!1),this},getZIndex:function(){return this.index||0},getAbsoluteZIndex:function(){function a(h){for(b=[],c=h.length,d=0;c>d;d++)e=h[d],j++,e.nodeType!==g&&(b=b.concat(e.getChildren().toArray())),e._id===i._id&&(d=c);b.length>0&&b[0].getLevel()<=f&&a(b)}var b,c,d,e,f=this.getLevel(),i=(this.getStage(),this),j=0;return i.nodeType!==h&&a(i.getStage().getChildren()),j},getLevel:function(){for(var a=0,b=this.parent;b;)a++,b=b.parent;return a},setPosition:function(){var a=Kinetic.Util._getXY([].slice.call(arguments));return this.setX(a.x),this.setY(a.y),this},getPosition:function(){return{x:this.getX(),y:this.getY()}},getAbsolutePosition:function(){var a=this.getAbsoluteTransform(),b=this.getOffset();return a.translate(b.x,b.y),a.getTranslation()},setAbsolutePosition:function(){var a,b=Kinetic.Util._getXY([].slice.call(arguments)),c=this._clearTransform();return this.attrs.x=c.x,this.attrs.y=c.y,delete c.x,delete c.y,a=this.getAbsoluteTransform(),a.invert(),a.translate(b.x,b.y),b={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this.setPosition(b.x,b.y),this._setTransform(c),this},move:function(){var a=Kinetic.Util._getXY([].slice.call(arguments)),b=this.getX(),c=this.getY();return void 0!==a.x&&(b+=a.x),void 0!==a.y&&(c+=a.y),this.setPosition(b,c),this},_eachAncestorReverse:function(a,b){var c,d,e=[],f=this.getParent();for(b&&e.unshift(this);f;)e.unshift(f),f=f.parent;for(c=e.length,d=0;c>d;d++)a(e[d])},rotate:function(a){return this.setRotation(this.getRotation()+a),this},rotateDeg:function(a){return this.setRotation(this.getRotation()+Kinetic.Util._degToRad(a)),this},moveToTop:function(){var a=this.index;return this.parent.children.splice(a,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0},moveUp:function(){var a=this.index,b=this.parent.getChildren().length;return b-1>a?(this.parent.children.splice(a,1),this.parent.children.splice(a+1,0,this),this.parent._setChildrenIndices(),!0):!1},moveDown:function(){var a=this.index;return a>0?(this.parent.children.splice(a,1),this.parent.children.splice(a-1,0,this),this.parent._setChildrenIndices(),!0):!1},moveToBottom:function(){var a=this.index;return a>0?(this.parent.children.splice(a,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1},setZIndex:function(a){var b=this.index;return this.parent.children.splice(b,1),this.parent.children.splice(a,0,this),this.parent._setChildrenIndices(),this},getAbsoluteOpacity:function(){var a=this.getOpacity();return this.getParent()&&(a*=this.getParent().getAbsoluteOpacity()),a},moveTo:function(a){return Kinetic.Node.prototype.remove.call(this),a.add(this),this},toObject:function(){var a,b,c=Kinetic.Util,d={},e=this.getAttrs();d.attrs={};for(a in e)b=e[a],c._isFunction(b)||c._isElement(b)||c._isObject(b)&&c._hasMethods(b)||(d.attrs[a]=b);return d.className=this.getClassName(),d},toJSON:function(){return JSON.stringify(this.toObject())},getParent:function(){return this.parent},getLayer:function(){return this.getParent().getLayer()},getStage:function(){return this.getParent()?this.getParent().getStage():void 0},fire:function(a,b,c){return c?this._fireAndBubble(a,b||{}):this._fire(a,b||{}),this},getAbsoluteTransform:function(){var a,b=new Kinetic.Transform;return this._eachAncestorReverse(function(c){a=c.getTransform(),b.multiply(a)},!0),b},_getAndCacheTransform:function(){var a=new Kinetic.Transform,b=this.getX(),c=this.getY(),d=this.getRotation(),e=this.getScaleX(),f=this.getScaleY(),g=this.getSkewX(),h=this.getSkewY(),i=this.getOffsetX(),j=this.getOffsetY();return(0!==b||0!==c)&&a.translate(b,c),0!==d&&a.rotate(d),(0!==g||0!==h)&&a.skew(g,h),(1!==e||1!==f)&&a.scale(e,f),(0!==i||0!==j)&&a.translate(-1*i,-1*j),this.cachedTransform=a,a},getTransform:function(a){var b=this.cachedTransform;return a&&b?b:this._getAndCacheTransform()},clone:function(a){var b,c,d,e,f,g=this.getClassName(),h=new Kinetic[g](this.attrs);for(b in this.eventListeners)for(c=this.eventListeners[b],d=c.length,e=0;d>e;e++)f=c[e],f.name.indexOf(k)<0&&(h.eventListeners[b]||(h.eventListeners[b]=[]),h.eventListeners[b].push(f));return h.setAttrs(a),h},toDataURL:function(a){a=a||{};var b=a.mimeType||null,c=a.quality||null,d=this.getStage(),e=a.x||0,f=a.y||0,g=new Kinetic.SceneCanvas({width:a.width||d.getWidth(),height:a.height||d.getHeight(),pixelRatio:1}),h=g.getContext();return h.save(),(e||f)&&h.translate(-1*e,-1*f),this.drawScene(g),h.restore(),g.toDataURL(b,c)},toImage:function(a){Kinetic.Util._getImage(this.toDataURL(a),function(b){a.callback(b)})},setSize:function(){var a=Kinetic.Util._getSize(Array.prototype.slice.call(arguments));return this.setWidth(a.width),this.setHeight(a.height),this},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},getWidth:function(){return this.attrs.width||0},getHeight:function(){return this.attrs.height||0},getClassName:function(){return this.className||this.nodeType},getType:function(){return this.nodeType},_get:function(a){return this.nodeType===a?[this]:[]},_off:function(a,b){var c,d,e=this.eventListeners[a];for(c=0;cd;d++)e[d].handler.call(this,b)},draw:function(){return this.drawScene(),this.drawHit(),this},shouldDrawHit:function(){return this.isVisible()&&this.isListening()&&!Kinetic.Global.isDragging()},isDraggable:function(){return!1}}),Kinetic.Node.addGetterSetter=function(a,b,c,d){this.addGetter(a,b,c),this.addSetter(a,b,d)},Kinetic.Node.addPointGetterSetter=function(a,b,c,d){this.addPointGetter(a,b),this.addPointSetter(a,b),this.addGetter(a,b+i,c),this.addGetter(a,b+j,c),this.addSetter(a,b+i,d),this.addSetter(a,b+j,d)},Kinetic.Node.addPointsGetterSetter=function(a,b){this.addPointsGetter(a,b),this.addPointsSetter(a,b),this.addPointAdder(a,b)},Kinetic.Node.addRotationGetterSetter=function(a,b,c,d){this.addRotationGetter(a,b,c),this.addRotationSetter(a,b,d)},Kinetic.Node.addColorGetterSetter=function(a,b){this.addGetter(a,b),this.addSetter(a,b),this.addColorRGBGetter(a,b),this.addColorComponentGetter(a,b,u),this.addColorComponentGetter(a,b,v),this.addColorComponentGetter(a,b,w),this.addColorRGBSetter(a,b),this.addColorComponentSetter(a,b,u),this.addColorComponentSetter(a,b,v),this.addColorComponentSetter(a,b,w)},Kinetic.Node.addColorRGBGetter=function(a,b){var c=e+Kinetic.Util._capitalize(b)+s;a.prototype[c]=function(){return Kinetic.Util.getRGB(this.attrs[b])}},Kinetic.Node.addColorComponentGetter=function(a,b,c){var d=e+Kinetic.Util._capitalize(b),f=d+Kinetic.Util._capitalize(c);a.prototype[f]=function(){return this[d+s]()[c]}},Kinetic.Node.addPointsGetter=function(a,b){var c=e+Kinetic.Util._capitalize(b);a.prototype[c]=function(){var a=this.attrs[b];return void 0===a?[]:a}},Kinetic.Node.addGetter=function(a,b,c){var d=e+Kinetic.Util._capitalize(b);a.prototype[d]=function(){var a=this.attrs[b];return void 0===a?c:a}},Kinetic.Node.addPointGetter=function(a,b){var c=e+Kinetic.Util._capitalize(b);a.prototype[c]=function(){var a=this;return{x:a[c+i](),y:a[c+j]()}}},Kinetic.Node.addRotationGetter=function(a,b,c){var d=e+Kinetic.Util._capitalize(b);a.prototype[d]=function(){var a=this.attrs[b];return void 0===a&&(a=c),a},a.prototype[d+r]=function(){var a=this.attrs[b];return void 0===a&&(a=c),Kinetic.Util._radToDeg(a)}},Kinetic.Node.addColorRGBSetter=function(a,b){var c=f+Kinetic.Util._capitalize(b)+s;a.prototype[c]=function(a){var c=a&&void 0!==a.r?0|a.r:this.getAttr(b+x),d=a&&void 0!==a.g?0|a.g:this.getAttr(b+y),e=a&&void 0!==a.b?0|a.b:this.getAttr(b+z);this._setAttr(b,A+Kinetic.Util._rgbToHex(c,d,e))}},Kinetic.Node.addColorComponentSetter=function(a,b,c){var d=f+Kinetic.Util._capitalize(b),e=d+Kinetic.Util._capitalize(c);a.prototype[e]=function(a){var b={};b[c]=a,this[d+s](b)}},Kinetic.Node.addPointsSetter=function(a,b){var c=f+Kinetic.Util._capitalize(b);a.prototype[c]=function(a){var b=Kinetic.Util._getPoints(a);this._setAttr("points",b)}},Kinetic.Node.addSetter=function(a,b,c){var d=f+Kinetic.Util._capitalize(b);a.prototype[d]=function(a){this._setAttr(b,a),c&&(this.cachedTransform=null)}},Kinetic.Node.addPointSetter=function(a,b){var c=f+Kinetic.Util._capitalize(b);a.prototype[c]=function(){var a=Kinetic.Util._getXY([].slice.call(arguments)),d=this.attrs[b],e=0,f=0;a&&(e=a.x,f=a.y,this._fireBeforeChangeEvent(b,d,a),void 0!==e&&this[c+i](e),void 0!==f&&this[c+j](f),this._fireChangeEvent(b,d,a))}},Kinetic.Node.addRotationSetter=function(a,b,c){var d=f+Kinetic.Util._capitalize(b);a.prototype[d]=function(a){this._setAttr(b,a),c&&(this.cachedTransform=null)},a.prototype[d+r]=function(a){this._setAttr(b,Kinetic.Util._degToRad(a)),c&&(this.cachedTransform=null)}},Kinetic.Node.addPointAdder=function(b,c){var d=a+Kinetic.Util._removeLastLetter(Kinetic.Util._capitalize(c));b.prototype[d]=function(){var a=Kinetic.Util._getXY([].slice.call(arguments)),b=this.attrs[c];a&&(this._fireBeforeChangeEvent(c,b,a),this.attrs[c].push(a),this._fireChangeEvent(c,b,a))}},Kinetic.Node.create=function(a,b){return this._createNode(JSON.parse(a),b)},Kinetic.Node._createNode=function(a,b){var c,d,e,f=Kinetic.Node.prototype.getClassName.call(a),g=a.children;if(b&&(a.attrs.container=b),c=new Kinetic[f](a.attrs),g)for(d=g.length,e=0;d>e;e++)c.add(this._createNode(g[e]));return c},Kinetic.Node.addGetterSetter(Kinetic.Node,"x",0,!0),Kinetic.Node.addGetterSetter(Kinetic.Node,"y",0,!0),Kinetic.Node.addGetterSetter(Kinetic.Node,"opacity",1),Kinetic.Node.addGetter(Kinetic.Node,"name"),Kinetic.Node.addGetter(Kinetic.Node,"id"),Kinetic.Node.addRotationGetterSetter(Kinetic.Node,"rotation",0,!0),Kinetic.Node.addPointGetterSetter(Kinetic.Node,"scale",1,!0),Kinetic.Node.addPointGetterSetter(Kinetic.Node,"skew",0,!0),Kinetic.Node.addPointGetterSetter(Kinetic.Node,"offset",0,!0),Kinetic.Node.addSetter(Kinetic.Node,"width"),Kinetic.Node.addSetter(Kinetic.Node,"height"),Kinetic.Node.addGetterSetter(Kinetic.Node,"listening",!0),Kinetic.Node.addSetter(Kinetic.Node,"visible"),Kinetic.Node.prototype.isListening=Kinetic.Node.prototype.getListening,Kinetic.Node.prototype.isVisible=Kinetic.Node.prototype.getVisible,Kinetic.Collection.mapMethods(["on","off","remove","destroy","show","hide","move","rotate","moveToTop","moveUp","moveDown","moveToBottom","moveTo","fire","draw"])}(),function(){function a(a){window.setTimeout(a,1e3/60)}var b=500;Kinetic.Animation=function(a,b){this.func=a,this.setLayers(b),this.id=Kinetic.Animation.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:(new Date).getTime()}},Kinetic.Animation.prototype={setLayers:function(a){var b=[];b=a?a.length>0?a:[a]:[],this.layers=b},getLayers:function(){return this.layers},addLayer:function(a){var b,c,d=this.layers;if(d){for(b=d.length,c=0;b>c;c++)if(d[c]._id===a._id)return!1}else this.layers=[];return this.layers.push(a),!0},isRunning:function(){for(var a=Kinetic.Animation,b=a.animations,c=0;ce;e++)if(c[e].id===b){this.animations.splice(e,1);break}},Kinetic.Animation._runFrames=function(){var a,b,c,d,e,f,g,h,i={},j=this.animations;for(d=0;de;e++)g=b[e],void 0!==g._id&&(i[g._id]=g);c&&c.call(a,a.frame)}for(h in i)i[h].draw()},Kinetic.Animation._animationLoop=function(){var a=this;this.animations.length>0?(this._runFrames(),Kinetic.Animation.requestAnimFrame(function(){a._animationLoop()})):this.animRunning=!1},Kinetic.Animation._handleAnimation=function(){var a=this;this.animRunning||(this.animRunning=!0,a._animationLoop())},RAF=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||a}(),Kinetic.Animation.requestAnimFrame=function(b){var c=Kinetic.DD&&Kinetic.DD.isDragging?a:RAF;c(b)};var c=Kinetic.Node.prototype.moveTo;Kinetic.Node.prototype.moveTo=function(a){c.call(this,a)},Kinetic.Layer.prototype.batchDraw=function(){var a=this;this.batchAnim||(this.batchAnim=new Kinetic.Animation(function(){a.lastBatchDrawTime&&(new Date).getTime()-a.lastBatchDrawTime>b&&a.batchAnim.stop()},this)),this.lastBatchDrawTime=(new Date).getTime(),this.batchAnim.isRunning()||(this.draw(),this.batchAnim.start())},Kinetic.Stage.prototype.batchDraw=function(){this.getChildren().each(function(a){a.batchDraw()})}}(),function(){var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},b=1,c=2,d=3,e=0;Kinetic.Tween=function(b){var c,d=this,g=b.node,h=g._id,i=b.duration||1,j=b.easing||Kinetic.Easings.Linear,k=!!b.yoyo;this.node=g,this._id=e++,this.anim=new Kinetic.Animation(function(){d.tween.onEnterFrame()},g.getLayer()||g.getLayers()),this.tween=new f(c,function(a){d._tweenFunc(a)},j,0,1,1e3*i,k),this._addListeners(),Kinetic.Tween.attrs[h]||(Kinetic.Tween.attrs[h]={}),Kinetic.Tween.attrs[h][this._id]||(Kinetic.Tween.attrs[h][this._id]={}),Kinetic.Tween.tweens[h]||(Kinetic.Tween.tweens[h]={});for(c in b)void 0===a[c]&&this._addAttr(c,b[c]);this.reset(),this.onFinish=b.onFinish,this.onReset=b.onReset},Kinetic.Tween.attrs={},Kinetic.Tween.tweens={},Kinetic.Tween.prototype={_addAttr:function(a,b){var c,d,e,f,g,h,i,j=this.node,k=j._id;if(e=Kinetic.Tween.tweens[k][a],e&&delete Kinetic.Tween.attrs[k][e][a],c=j.getAttr(a),Kinetic.Util._isArray(b))for(b=Kinetic.Util._getPoints(b),d=[],g=b.length,f=0;g>f;f++)h=c[f],i=b[f],d.push({x:i.x-h.x,y:i.y-h.y});else d=b-c;Kinetic.Tween.attrs[k][this._id][a]={start:c,diff:d},Kinetic.Tween.tweens[k][a]=this._id},_tweenFunc:function(a){var b,c,d,e,f,g,h,i,j,k=this.node,l=Kinetic.Tween.attrs[k._id][this._id];for(b in l){if(c=l[b],d=c.start,e=c.diff,Kinetic.Util._isArray(d))for(f=[],h=d.length,g=0;h>g;g++)i=d[g],j=e[g],f.push({x:i.x+j.x*a,y:i.y+j.y*a});else f=d+e*a;k.setAttr(b,f)}},_addListeners:function(){var a=this;this.tween.onPlay=function(){a.anim.start()},this.tween.onReverse=function(){a.anim.start()},this.tween.onPause=function(){a.anim.stop()},this.tween.onFinish=function(){a.onFinish&&a.onFinish()},this.tween.onReset=function(){a.onReset&&a.onReset()}},play:function(){return this.tween.play(),this},reverse:function(){return this.tween.reverse(),this},reset:function(){var a=this.node;return this.tween.reset(),(a.getLayer()||a.getLayers()).draw(),this},seek:function(a){var b=this.node;return this.tween.seek(1e3*a),(b.getLayer()||b.getLayers()).draw(),this},pause:function(){return this.tween.pause(),this},finish:function(){var a=this.node;return this.tween.finish(),(a.getLayer()||a.getLayers()).draw(),this},destroy:function(){var a,b=this.node._id,c=this._id,d=Kinetic.Tween.tweens[b];this.pause();for(a in d)delete Kinetic.Tween.tweens[b][a];delete Kinetic.Tween.attrs[b][c]}};var f=function(a,b,c,d,e,f,g){this.prop=a,this.propFunc=b,this.begin=d,this._pos=d,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=g,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=c,this._change=e-this.begin,this.pause() -};f.prototype={fire:function(a){var b=this[a];b&&b()},setTime:function(a){a>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():0>a?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=a,this.update())},getTime:function(){return this._time},setPosition:function(a){this.prevPos=this._pos,this.propFunc(a),this._pos=a},getPosition:function(a){return void 0===a&&(a=this._time),this.func(a,this.begin,this._change,this.duration)},play:function(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")},reverse:function(){this.state=d,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")},seek:function(a){this.pause(),this._time=a,this.update(),this.fire("onSeek")},reset:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")},finish:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")},update:function(){this.setPosition(this.getPosition(this._time))},onEnterFrame:function(){var a=this.getTimer()-this._startTime;this.state===c?this.setTime(a):this.state===d&&this.setTime(this.duration-a)},pause:function(){this.state=b,this.fire("onPause")},getTimer:function(){return(new Date).getTime()}},Kinetic.Easings={BackEaseIn:function(a,b,c,d){var e=1.70158;return c*(a/=d)*a*((e+1)*a-e)+b},BackEaseOut:function(a,b,c,d){var e=1.70158;return c*((a=a/d-1)*a*((e+1)*a+e)+1)+b},BackEaseInOut:function(a,b,c,d){var e=1.70158;return(a/=d/2)<1?c/2*a*a*(((e*=1.525)+1)*a-e)+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b},ElasticEaseIn:function(a,b,c,d,e,f){var g=0;return 0===a?b:1==(a/=d)?b+c:(f||(f=.3*d),!e||ea?-.5*e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+b:.5*e*Math.pow(2,-10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+c+b)},BounceEaseOut:function(a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:2/2.75>a?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:2.5/2.75>a?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},BounceEaseIn:function(a,b,c,d){return c-Kinetic.Easings.BounceEaseOut(d-a,0,c,d)+b},BounceEaseInOut:function(a,b,c,d){return d/2>a?.5*Kinetic.Easings.BounceEaseIn(2*a,0,c,d)+b:.5*Kinetic.Easings.BounceEaseOut(2*a-d,0,c,d)+.5*c+b},EaseIn:function(a,b,c,d){return c*(a/=d)*a+b},EaseOut:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},EaseInOut:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},StrongEaseIn:function(a,b,c,d){return c*(a/=d)*a*a*a*a+b},StrongEaseOut:function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},StrongEaseInOut:function(a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},Linear:function(a,b,c,d){return c*a/d+b}}}(),function(){Kinetic.DD={anim:new Kinetic.Animation,isDragging:!1,offset:{x:0,y:0},node:null,_drag:function(a){var b=Kinetic.DD,c=b.node;if(c){var d=c.getStage().getPointerPosition(),e=c.getDragBoundFunc(),f={x:d.x-b.offset.x,y:d.y-b.offset.y};void 0!==e&&(f=e.call(c,f,a)),c.setAbsolutePosition(f),b.isDragging||(b.isDragging=!0,c.fire("dragstart",a,!0)),c.fire("dragmove",a,!0)}},_endDragBefore:function(a){var b,c,d=Kinetic.DD,e=Kinetic.Global,f=d.node;f&&(b=f.nodeType,c=f.getLayer(),d.anim.stop(),d.isDragging&&(d.isDragging=!1,e.listenClickTap=!1,a&&(a.dragEndNode=f)),delete d.node,(c||f).draw())},_endDragAfter:function(a){a=a||{};var b=a.dragEndNode;a&&b&&b.fire("dragend",a,!0)}},Kinetic.Node.prototype.startDrag=function(){var a=Kinetic.DD,b=this.getStage(),c=this.getLayer(),d=b.getPointerPosition(),e=(this.getTransform().getTranslation(),this.getAbsolutePosition());d&&(a.node&&a.node.stopDrag(),a.node=this,a.offset.x=d.x-e.x,a.offset.y=d.y-e.y,a.anim.setLayers(c||this.getLayers()),a.anim.start())},Kinetic.Node.prototype.stopDrag=function(){var a=Kinetic.DD,b={};a._endDragBefore(b),a._endDragAfter(b)},Kinetic.Node.prototype.setDraggable=function(a){this._setAttr("draggable",a),this._dragChange()};var a=Kinetic.Node.prototype.destroy;Kinetic.Node.prototype.destroy=function(){var b=Kinetic.DD;b.node&&b.node._id===this._id&&this.stopDrag(),a.call(this)},Kinetic.Node.prototype.isDragging=function(){var a=Kinetic.DD;return a.node&&a.node._id===this._id&&a.isDragging},Kinetic.Node.prototype._listenDrag=function(){this._dragCleanup();var a=this;this.on("mousedown.kinetic touchstart.kinetic",function(b){Kinetic.DD.node||a.startDrag(b)})},Kinetic.Node.prototype._dragChange=function(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var a=this.getStage(),b=Kinetic.DD;a&&b.node&&b.node._id===this._id&&b.node.stopDrag()}},Kinetic.Node.prototype._dragCleanup=function(){this.off("mousedown.kinetic"),this.off("touchstart.kinetic")},Kinetic.Node.addGetterSetter(Kinetic.Node,"dragBoundFunc"),Kinetic.Node.addGetter(Kinetic.Node,"draggable",!1),Kinetic.Node.prototype.isDraggable=Kinetic.Node.prototype.getDraggable;var b=document.getElementsByTagName("html")[0];b.addEventListener("mouseup",Kinetic.DD._endDragBefore,!0),b.addEventListener("touchend",Kinetic.DD._endDragBefore,!0),b.addEventListener("mouseup",Kinetic.DD._endDragAfter,!1),b.addEventListener("touchend",Kinetic.DD._endDragAfter,!1)}(),function(){Kinetic.Util.addMethods(Kinetic.Container,{__init:function(a){this.children=new Kinetic.Collection,Kinetic.Node.call(this,a)},getChildren:function(){return this.children},hasChildren:function(){return this.getChildren().length>0},removeChildren:function(){for(var a,b=this.children;b.length>0;)a=b[0],a.hasChildren()&&a.removeChildren(),a.remove();return this},destroyChildren:function(){for(var a=this.children;a.length>0;)a[0].destroy();return this},add:function(a){var b=(Kinetic.Global,this.children);return this._validateAdd(a),a.index=b.length,a.parent=this,b.push(a),this._fire("add",{child:a}),this},destroy:function(){this.hasChildren()&&this.destroyChildren(),Kinetic.Node.prototype.destroy.call(this)},get:function(a){var b,c,d,e,f,g,h,i=[],j=a.replace(/ /g,"").split(","),k=j.length;for(b=0;k>b;b++)if(d=j[b],"#"===d.charAt(0))f=this._getNodeById(d.slice(1)),f&&i.push(f);else if("."===d.charAt(0))e=this._getNodesByName(d.slice(1)),i=i.concat(e);else for(g=this.getChildren(),h=g.length,c=0;h>c;c++)i=i.concat(g[c]._get(d));return Kinetic.Collection.toCollection(i)},_getNodeById:function(a){var b=(this.getStage(),Kinetic.Global),c=b.ids[a];return void 0!==c&&this.isAncestorOf(c)?c:null},_getNodesByName:function(a){var b=Kinetic.Global,c=b.names[a]||[];return this._getDescendants(c)},_get:function(a){for(var b=Kinetic.Node.prototype._get.call(this,a),c=this.getChildren(),d=c.length,e=0;d>e;e++)b=b.concat(c[e]._get(a));return b},toObject:function(){var a=Kinetic.Node.prototype.toObject.call(this);a.children=[];for(var b=this.getChildren(),c=b.length,d=0;c>d;d++){var e=b[d];a.children.push(e.toObject())}return a},_getDescendants:function(a){for(var b=[],c=a.length,d=0;c>d;d++){var e=a[d];this.isAncestorOf(e)&&b.push(e)}return b},isAncestorOf:function(a){for(var b=a.getParent();b;){if(b._id===this._id)return!0;b=b.getParent()}return!1},clone:function(a){var b=Kinetic.Node.prototype.clone.call(this,a);return this.getChildren().each(function(a){b.add(a.clone())}),b},getAllIntersections:function(){for(var a=Kinetic.Util._getXY(Array.prototype.slice.call(arguments)),b=[],c=this.get("Shape"),d=c.length,e=0;d>e;e++){var f=c[e];f.isVisible()&&f.intersects(a)&&b.push(f)}return b},_setChildrenIndices:function(){for(var a=this.children,b=a.length,c=0;b>c;c++)a[c].index=c},drawScene:function(a){var b,c,d,e=this.getLayer(),f=!!this.getClipFunc();if(!a&&e&&(a=e.getCanvas()),this.isVisible()){for(f&&a._clip(this),b=this.children,d=b.length,c=0;d>c;c++)b[c].drawScene(a);f&&a.getContext().restore()}return this},drawHit:function(){var a,b=!!this.getClipFunc()&&"Stage"!==this.nodeType,c=0,d=0,e=[];if(this.shouldDrawHit()){for(b&&(a=this.getLayer().hitCanvas,a._clip(this)),e=this.children,d=e.length,c=0;d>c;c++)e[c].drawHit();b&&a.getContext().restore()}return this}}),Kinetic.Util.extend(Kinetic.Container,Kinetic.Node),Kinetic.Node.addGetterSetter(Kinetic.Container,"clipFunc")}(),function(){function a(a){a.fill()}function b(a){a.stroke()}function c(a){a.fill()}function d(a){a.stroke()}var e="beforeDraw",f="draw";Kinetic.Util.addMethods(Kinetic.Shape,{__init:function(e){this.nodeType="Shape",this._fillFunc=a,this._strokeFunc=b,this._fillFuncHit=c,this._strokeFuncHit=d;for(var f,g=Kinetic.Global.shapes;;)if(f=Kinetic.Util.getRandomColor(),f&&!(f in g))break;this.colorKey=f,g[f]=this,Kinetic.Node.call(this,e),this._setDrawFuncs()},hasChildren:function(){return!1},getChildren:function(){return[]},getContext:function(){return this.getLayer().getContext()},getCanvas:function(){return this.getLayer().getCanvas()},hasShadow:function(){return 0!==this.getShadowOpacity()&&!!(this.getShadowColor()||this.getShadowBlur()||this.getShadowOffsetX()||this.getShadowOffsetY())},hasFill:function(){return!!(this.getFill()||this.getFillPatternImage()||this.getFillLinearGradientColorStops()||this.getFillRadialGradientColorStops())},_get:function(a){return this.className===a||this.nodeType===a?[this]:[]},intersects:function(){var a=Kinetic.Util._getXY(Array.prototype.slice.call(arguments)),b=this.getStage(),c=b.hitCanvas;c.clear(),this.drawScene(c);var d=c.context.getImageData(0|a.x,0|a.y,1,1).data;return d[3]>0},enableFill:function(){return this._setAttr("fillEnabled",!0),this},disableFill:function(){return this._setAttr("fillEnabled",!1),this},enableStroke:function(){return this._setAttr("strokeEnabled",!0),this},disableStroke:function(){return this._setAttr("strokeEnabled",!1),this},enableStrokeScale:function(){return this._setAttr("strokeScaleEnabled",!0),this},disableStrokeScale:function(){return this._setAttr("strokeScaleEnabled",!1),this},enableShadow:function(){return this._setAttr("shadowEnabled",!0),this},disableShadow:function(){return this._setAttr("shadowEnabled",!1),this},enableDashArray:function(){return this._setAttr("dashArrayEnabled",!0),this},disableDashArray:function(){return this._setAttr("dashArrayEnabled",!1),this},destroy:function(){return Kinetic.Node.prototype.destroy.call(this),delete Kinetic.Global.shapes[this.colorKey],this},drawScene:function(a){a=a||this.getLayer().getCanvas();var b=this.getDrawFunc(),c=a.getContext();return b&&this.isVisible()&&(c.save(),a._applyOpacity(this),a._applyLineJoin(this),a._applyAncestorTransforms(this),this._fireBeforeDrawEvents(),b.call(this,a),this._fireDrawEvents(),c.restore()),this},_fireBeforeDrawEvents:function(){this._fireAndBubble(e,{node:this})},_fireDrawEvents:function(){this._fireAndBubble(f,{node:this})},drawHit:function(){var a=this.getAttrs(),b=a.drawHitFunc||a.drawFunc,c=this.getLayer().hitCanvas,d=c.getContext();return b&&this.shouldDrawHit()&&(d.save(),c._applyLineJoin(this),c._applyAncestorTransforms(this),b.call(this,c),d.restore()),this},_setDrawFuncs:function(){!this.attrs.drawFunc&&this.drawFunc&&this.setDrawFunc(this.drawFunc),!this.attrs.drawHitFunc&&this.drawHitFunc&&this.setDrawHitFunc(this.drawHitFunc)}}),Kinetic.Util.extend(Kinetic.Shape,Kinetic.Node),Kinetic.Node.addColorGetterSetter(Kinetic.Shape,"stroke"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"lineJoin"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"lineCap"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"strokeWidth"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"drawFunc"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"drawHitFunc"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"dashArray"),Kinetic.Node.addColorGetterSetter(Kinetic.Shape,"shadowColor"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"shadowBlur"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"shadowOpacity"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillPatternImage"),Kinetic.Node.addColorGetterSetter(Kinetic.Shape,"fill"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillPatternX"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillPatternY"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillLinearGradientColorStops"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillRadialGradientStartRadius"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillRadialGradientEndRadius"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillRadialGradientColorStops"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillPatternRepeat"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillEnabled",!0),Kinetic.Node.addGetterSetter(Kinetic.Shape,"strokeEnabled",!0),Kinetic.Node.addGetterSetter(Kinetic.Shape,"shadowEnabled",!0),Kinetic.Node.addGetterSetter(Kinetic.Shape,"dashArrayEnabled",!0),Kinetic.Node.addGetterSetter(Kinetic.Shape,"fillPriority","color"),Kinetic.Node.addGetterSetter(Kinetic.Shape,"strokeScaleEnabled",!0),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"fillPatternOffset",0),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"fillPatternScale",1),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"fillLinearGradientStartPoint",0),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"fillLinearGradientEndPoint",0),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"fillRadialGradientStartPoint",0),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"fillRadialGradientEndPoint",0),Kinetic.Node.addPointGetterSetter(Kinetic.Shape,"shadowOffset",0),Kinetic.Node.addRotationGetterSetter(Kinetic.Shape,"fillPatternRotation",0)}(),function(){function a(a,b){a.content.addEventListener(b,function(c){a[x+b](c)},!1)}var b="Stage",c="string",d="px",e="mouseout",f="mouseleave",g="mouseover",h="mouseenter",i="mousemove",j="mousedown",k="mouseup",l="click",m="dblclick",n="touchstart",o="touchend",p="tap",q="dbltap",r="touchmove",s="div",t="relative",u="inline-block",v="kineticjs-content",w=" ",x="_",y="container",z="",A=[j,i,k,e,n,r,o,g],B=A.length;Kinetic.Util.addMethods(Kinetic.Stage,{___init:function(a){Kinetic.Container.call(this,a),this.nodeType=b,this._id=Kinetic.Global.idCounter++,this._buildDOM(),this._bindContentEvents(),Kinetic.Global.stages.push(this)},_validateAdd:function(a){"Layer"!==a.getType()&&Kinetic.Util.error("You may only add layers to the stage.")},setContainer:function(a){return typeof a===c&&(a=document.getElementById(a)),this._setAttr(y,a),this},draw:function(){return Kinetic.Node.prototype.draw.call(this),this},setHeight:function(a){return Kinetic.Node.prototype.setHeight.call(this,a),this._resizeDOM(),this},setWidth:function(a){return Kinetic.Node.prototype.setWidth.call(this,a),this._resizeDOM(),this},clear:function(){var a,b=this.children,c=b.length;for(a=0;c>a;a++)b[a].clear();return this},destroy:function(){var a=this.content;Kinetic.Container.prototype.destroy.call(this),a&&Kinetic.Util._isInDocument(a)&&this.getContainer().removeChild(a)},getMousePosition:function(){return this.mousePos},getTouchPosition:function(){return this.touchPos},getPointerPosition:function(){return this.getTouchPosition()||this.getMousePosition()},getStage:function(){return this},getContent:function(){return this.content},toDataURL:function(a){function b(e){var f=i[e],j=f.toDataURL(),k=new Image;k.onload=function(){h.drawImage(k,0,0),e=0;a--)if(b=d[a].getIntersection(c))return b;return null},_resizeDOM:function(){if(this.content){var a,b,c=this.getWidth(),e=this.getHeight(),f=this.getChildren(),g=f.length;for(this.content.style.width=c+d,this.content.style.height=e+d,this.bufferCanvas.setSize(c,e,1),this.hitCanvas.setSize(c,e),a=0;g>a;a++)b=f[a],b.getCanvas().setSize(c,e),b.hitCanvas.setSize(c,e),b.draw()}},add:function(a){return Kinetic.Container.prototype.add.call(this,a),a.canvas.setSize(this.attrs.width,this.attrs.height),a.hitCanvas.setSize(this.attrs.width,this.attrs.height),a.draw(),this.content.appendChild(a.canvas.element),this},getParent:function(){return null},getLayer:function(){return null},getLayers:function(){return this.getChildren()},_setPointerPosition:function(a){a||(a=window.event),this._setMousePosition(a),this._setTouchPosition(a)},_bindContentEvents:function(){var b;for(b=0;B>b;b++)a(this,A[b])},_mouseover:function(a){this._fire(g,a)},_mouseout:function(a){this._setPointerPosition(a);var b=Kinetic.Global,c=this.targetShape;c&&!b.isDragging()&&(c._fireAndBubble(e,a),c._fireAndBubble(f,a),this.targetShape=null),this.mousePos=void 0,this._fire(e,a)},_mousemove:function(a){this._setPointerPosition(a);var b,c=Kinetic.Global,d=Kinetic.DD,j=this.getIntersection(this.getPointerPosition());j?(b=j.shape,b&&(c.isDragging()||255!==j.pixel[3]||this.targetShape&&this.targetShape._id===b._id?b._fireAndBubble(i,a):(b._fireAndBubble(g,a,this.targetShape),b._fireAndBubble(h,a,this.targetShape),this.targetShape&&(this.targetShape._fireAndBubble(e,a,b),this.targetShape._fireAndBubble(f,a,b)),this.targetShape=b))):(this._fire(i,a),this.targetShape&&!c.isDragging()&&(this.targetShape._fireAndBubble(e,a),this.targetShape._fireAndBubble(f,a),this.targetShape=null)),d&&d._drag(a),a.preventDefault&&a.preventDefault()},_mousedown:function(a){this._setPointerPosition(a);var b=Kinetic.Global,c=this.getIntersection(this.getPointerPosition()),d=c&&c.shape?c.shape:this;b.listenClickTap=!0,this.clickStartShape=d,d._fireAndBubble(j,a),a.preventDefault&&a.preventDefault()},_mouseup:function(a){this._setPointerPosition(a);var b=Kinetic.Global,c=this.getIntersection(this.getPointerPosition()),d=c&&c.shape?c.shape:this;d._fireAndBubble(k,a),b.listenClickTap&&d._id===this.clickStartShape._id&&(d._fireAndBubble(l,a),b.inDblClickWindow?(d._fireAndBubble(m,a),b.inDblClickWindow=!1):b.inDblClickWindow=!0,setTimeout(function(){b.inDblClickWindow=!1},b.dblClickWindow)),b.listenClickTap=!1,a.preventDefault&&a.preventDefault()},_touchstart:function(a){this._setPointerPosition(a);var b=Kinetic.Global,c=this.getIntersection(this.getPointerPosition()),d=c&&c.shape?c.shape:this;b.listenClickTap=!0,this.tapStartShape=d,d._fireAndBubble(n,a),d.isListening()&&a.preventDefault&&a.preventDefault()},_touchend:function(a){this._setPointerPosition(a);var b=Kinetic.Global,c=this.getIntersection(this.getPointerPosition()),d=c&&c.shape?c.shape:this;d._fireAndBubble(o,a),b.listenClickTap&&d._id===this.tapStartShape._id&&(d._fireAndBubble(p,a),b.inDblClickWindow?(d._fireAndBubble(q,a),b.inDblClickWindow=!1):b.inDblClickWindow=!0,setTimeout(function(){b.inDblClickWindow=!1},b.dblClickWindow)),b.listenClickTap=!1,d.isListening()&&a.preventDefault&&a.preventDefault()},_touchmove:function(a){this._setPointerPosition(a);var b=Kinetic.DD,c=this.getIntersection(this.getPointerPosition()),d=c&&c.shape?c.shape:this;d._fireAndBubble(r,a),b&&b._drag(a),d.isListening()&&a.preventDefault&&a.preventDefault()},_setMousePosition:function(a){var b=a.clientX-this._getContentPosition().left,c=a.clientY-this._getContentPosition().top;this.mousePos={x:b,y:c}},_setTouchPosition:function(a){var b,c,d;void 0!==a.touches&&1===a.touches.length&&(b=a.touches[0],c=b.clientX-this._getContentPosition().left,d=b.clientY-this._getContentPosition().top,this.touchPos={x:c,y:d})},_getContentPosition:function(){var a=this.content.getBoundingClientRect();return{top:a.top,left:a.left}},_buildDOM:function(){var a=this.getContainer();a.innerHTML=z,this.content=document.createElement(s),this.content.style.position=t,this.content.style.display=u,this.content.className=v,a.appendChild(this.content),this.bufferCanvas=new Kinetic.SceneCanvas,this.hitCanvas=new Kinetic.HitCanvas,this._resizeDOM()},_onContent:function(a,b){var c,d,e=a.split(w),f=e.length;for(c=0;f>c;c++)d=e[c],this.content.addEventListener(d,b,!1)}}),Kinetic.Util.extend(Kinetic.Stage,Kinetic.Container),Kinetic.Node.addGetter(Kinetic.Stage,"container")}(),function(){var a="#";Kinetic.Util.addMethods(Kinetic.Layer,{___init:function(a){this.nodeType="Layer",this.canvas=new Kinetic.SceneCanvas,this.hitCanvas=new Kinetic.HitCanvas,Kinetic.Container.call(this,a)},_validateAdd:function(a){var b=a.getType();"Group"!==b&&"Shape"!==b&&Kinetic.Util.error("You may only add groups and shapes to a layer.")},getIntersection:function(){var b,c,d,e=Kinetic.Util._getXY(Array.prototype.slice.call(arguments));if(this.isVisible()&&this.isListening()){if(b=this.hitCanvas.context.getImageData(0|e.x,0|e.y,1,1).data,255===b[3])return c=Kinetic.Util._rgbToHex(b[0],b[1],b[2]),d=Kinetic.Global.shapes[a+c],{shape:d,pixel:b};if(b[0]>0||b[1]>0||b[2]>0||b[3]>0)return{pixel:b}}return null},drawScene:function(a){return a=a||this.getCanvas(),this.getClearBeforeDraw()&&a.clear(),Kinetic.Container.prototype.drawScene.call(this,a),this},drawHit:function(){var a=this.getLayer();return a&&a.getClearBeforeDraw()&&a.getHitCanvas().clear(),Kinetic.Container.prototype.drawHit.call(this),this},getCanvas:function(){return this.canvas},getHitCanvas:function(){return this.hitCanvas},getContext:function(){return this.getCanvas().getContext()},clear:function(){return this.getCanvas().clear(),this},setVisible:function(a){return Kinetic.Node.prototype.setVisible.call(this,a),a?(this.getCanvas().element.style.display="block",this.hitCanvas.element.style.display="block"):(this.getCanvas().element.style.display="none",this.hitCanvas.element.style.display="none"),this},setZIndex:function(a){Kinetic.Node.prototype.setZIndex.call(this,a);var b=this.getStage();return b&&(b.content.removeChild(this.getCanvas().element),ae;e+=4)c[e+3]>0&&(c[e]=d.r,c[e+1]=d.g,c[e+2]=d.b);Kinetic.Util._getImage(b,function(b){g.imageHitRegion=b,a&&a()})}catch(m){Kinetic.Util.warn("Unable to create image hit region. "+m.message)}},clearImageHitRegion:function(){delete this.imageHitRegion},getWidth:function(){var a=this.getImage();return this.attrs.width||(a?a.width:0)},getHeight:function(){var a=this.getImage();return this.attrs.height||(a?a.height:0)},_drawImage:function(a,b){5===b.length?a.drawImage(b[0],b[1],b[2],b[3],b[4]):9===b.length&&a.drawImage(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8])}},Kinetic.Util.extend(Kinetic.Image,Kinetic.Shape),Kinetic.Node.addFilterGetterSetter=function(a,b,c){this.addGetter(a,b,c),this.addFilterSetter(a,b)},Kinetic.Node.addFilterSetter=function(a,b){var d=c+Kinetic.Util._capitalize(b);a.prototype[d]=function(a){this._setAttr(b,a),this._applyFilter=!0}},Kinetic.Node.addGetterSetter(Kinetic.Image,"image"),Kinetic.Node.addGetter(Kinetic.Image,"crop"),Kinetic.Node.addFilterGetterSetter(Kinetic.Image,"filter")}(),function(){Kinetic.Polygon=function(a){this.___init(a)},Kinetic.Polygon.prototype={___init:function(a){Kinetic.Shape.call(this,a),this.className="Polygon"},drawFunc:function(a){var b=a.getContext(),c=this.getPoints(),d=c.length;b.beginPath(),b.moveTo(c[0].x,c[0].y);for(var e=1;d>e;e++)b.lineTo(c[e].x,c[e].y);b.closePath(),a.fillStroke(this)}},Kinetic.Util.extend(Kinetic.Polygon,Kinetic.Shape),Kinetic.Node.addPointsGetterSetter(Kinetic.Polygon,"points")}(),function(){function a(a){a.fillText(this.partialText,0,0)}function b(a){a.strokeText(this.partialText,0,0)}var c="auto",d="Calibri",e="canvas",f="center",g="Change.kinetic",h="2d",i="-",j="",k="left",l="text",m="Text",n="middle",o="normal",p="px ",q=" ",r="right",s="word",t="char",u="none",v=["fontFamily","fontSize","fontStyle","padding","align","lineHeight","text","width","height","wrap"],w=v.length,x=document.createElement(e).getContext(h);Kinetic.Text=function(a){this.___init(a)},Kinetic.Text.prototype={___init:function(d){var e=this;void 0===d.width&&(d.width=c),void 0===d.height&&(d.height=c),Kinetic.Shape.call(this,d),this._fillFunc=a,this._strokeFunc=b,this.className=m;for(var f=0;w>f;f++)this.on(v[f]+g,e._setTextData);this._setTextData()},drawFunc:function(a){var b=a.getContext(),c=this.getPadding(),d=(this.getFontStyle(),this.getFontSize(),this.getFontFamily(),this.getTextHeight()),e=this.getLineHeight()*d,g=this.textArr,h=g.length,i=this.getWidth();b.font=this._getContextFont(),b.textBaseline=n,b.textAlign=k,b.save(),b.translate(c,0),b.translate(0,c+d/2);for(var j=0;h>j;j++){var l=g[j],m=l.text,o=l.width;b.save(),this.getAlign()===r?b.translate(i-o-2*c,0):this.getAlign()===f&&b.translate((i-o-2*c)/2,0),this.partialText=m,a.fillStroke(this),b.restore(),b.translate(0,e)}b.restore()},drawHitFunc:function(a){var b=a.getContext(),c=this.getWidth(),d=this.getHeight();b.beginPath(),b.rect(0,0,c,d),b.closePath(),a.fillStroke(this)},setText:function(a){var b=Kinetic.Util._isString(a)?a:a.toString();this._setAttr(l,b)},getWidth:function(){return this.attrs.width===c?this.getTextWidth()+2*this.getPadding():this.attrs.width},getHeight:function(){return this.attrs.height===c?this.getTextHeight()*this.textArr.length*this.getLineHeight()+2*this.getPadding():this.attrs.height},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},_getTextSize:function(a){var b,c=x,d=this.getFontSize();return c.save(),c.font=this._getContextFont(),b=c.measureText(a),c.restore(),{width:b.width,height:parseInt(d,10)} -},_getContextFont:function(){return this.getFontStyle()+q+this.getFontSize()+p+this.getFontFamily()},_addTextLine:function(a,b){return this.textArr.push({text:a,width:b})},_getTextWidth:function(a){return x.measureText(a).width},_setTextData:function(){var a=this.getText().split("\n"),b=+this.getFontSize(),d=0,e=this.getLineHeight()*b,f=this.attrs.width,g=this.attrs.height,h=f!==c,j=g!==c,k=this.getPadding(),l=f-2*k,m=g-2*k,n=0,o=this.getWrap(),r=o!==u,s=o!==t&&r;this.textArr=[],x.save(),x.font=this.getFontStyle()+q+b+p+this.getFontFamily();for(var v=0,w=a.length;w>v;++v){var y=a[v],z=this._getTextWidth(y);if(h&&z>l)for(;y.length>0;){for(var A=0,B=y.length,C="",D=0;B>A;){var E=A+B>>>1,F=y.slice(0,E+1),G=this._getTextWidth(F);l>=G?(A=E+1,C=F,D=G):B=E}if(!C)break;if(s){var H=Math.max(C.lastIndexOf(q),C.lastIndexOf(i))+1;H>0&&(A=H,C=C.slice(0,A),D=this._getTextWidth(C))}if(this._addTextLine(C,D),n+=e,!r||j&&n+e>m)break;if(y=y.slice(A),y.length>0&&(z=this._getTextWidth(y),l>=z)){this._addTextLine(y,z),n+=e;break}}else this._addTextLine(y,z),n+=e,d=Math.max(d,z);if(j&&n+e>m)break}x.restore(),this.textHeight=b,this.textWidth=d}},Kinetic.Util.extend(Kinetic.Text,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.Text,"fontFamily",d),Kinetic.Node.addGetterSetter(Kinetic.Text,"fontSize",12),Kinetic.Node.addGetterSetter(Kinetic.Text,"fontStyle",o),Kinetic.Node.addGetterSetter(Kinetic.Text,"padding",0),Kinetic.Node.addGetterSetter(Kinetic.Text,"align",k),Kinetic.Node.addGetterSetter(Kinetic.Text,"lineHeight",1),Kinetic.Node.addGetterSetter(Kinetic.Text,"wrap",s),Kinetic.Node.addGetter(Kinetic.Text,l,j),Kinetic.Node.addSetter(Kinetic.Text,"width"),Kinetic.Node.addSetter(Kinetic.Text,"height")}(),function(){Kinetic.Line=function(a){this.___init(a)},Kinetic.Line.prototype={___init:function(a){Kinetic.Shape.call(this,a),this.className="Line"},drawFunc:function(a){var b,c,d=this.getPoints(),e=d.length,f=a.getContext();for(f.beginPath(),f.moveTo(d[0].x,d[0].y),b=1;e>b;b++)c=d[b],f.lineTo(c.x,c.y);a.stroke(this)}},Kinetic.Util.extend(Kinetic.Line,Kinetic.Shape),Kinetic.Node.addPointsGetterSetter(Kinetic.Line,"points")}(),function(){Kinetic.Spline=function(a){this.___init(a)},Kinetic.Spline.prototype={___init:function(a){var b=this;Kinetic.Shape.call(this,a),this.className="Spline",this.on("pointsChange.kinetic tensionChange.kinetic",function(){b._setAllPoints()}),this._setAllPoints()},drawFunc:function(a){var b,c,d,e,f=this.getPoints(),g=f.length,h=a.getContext(),i=this.getTension();if(h.beginPath(),h.moveTo(f[0].x,f[0].y),0!==i&&g>2){for(b=this.allPoints,c=b.length,d=2,h.quadraticCurveTo(b[0].x,b[0].y,b[1].x,b[1].y);c-1>d;)h.bezierCurveTo(b[d].x,b[d++].y,b[d].x,b[d++].y,b[d].x,b[d++].y);h.quadraticCurveTo(b[c-1].x,b[c-1].y,f[g-1].x,f[g-1].y)}else for(d=1;g>d;d++)e=f[d],h.lineTo(e.x,e.y);a.stroke(this)},_setAllPoints:function(){this.allPoints=Kinetic.Util._expandPoints(this.getPoints(),this.getTension())}},Kinetic.Util.extend(Kinetic.Spline,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.Spline,"tension",1),Kinetic.Node.addPointsGetterSetter(Kinetic.Spline,"points")}(),function(){Kinetic.Blob=function(a){this.___init(a)},Kinetic.Blob.prototype={___init:function(a){var b=this;Kinetic.Shape.call(this,a),this.className="Blob",this.on("pointsChange.kinetic tensionChange.kinetic",function(){b._setAllPoints()}),this._setAllPoints()},drawFunc:function(a){var b,c,d,e,f=this.getPoints(),g=f.length,h=a.getContext(),i=this.getTension();if(h.beginPath(),h.moveTo(f[0].x,f[0].y),0!==i&&g>2)for(b=this.allPoints,c=b.length,d=0;c-1>d;)h.bezierCurveTo(b[d].x,b[d++].y,b[d].x,b[d++].y,b[d].x,b[d++].y);else for(d=1;g>d;d++)e=f[d],h.lineTo(e.x,e.y);h.closePath(),a.fillStroke(this)},_setAllPoints:function(){var a=this.getPoints(),b=a.length,c=this.getTension(),d=Kinetic.Util,e=d._getControlPoints(a[b-1],a[0],a[1],c),f=d._getControlPoints(a[b-2],a[b-1],a[0],c);this.allPoints=Kinetic.Util._expandPoints(this.getPoints(),this.getTension()),this.allPoints.unshift(e[1]),this.allPoints.push(f[0]),this.allPoints.push(a[b-1]),this.allPoints.push(f[1]),this.allPoints.push(e[0]),this.allPoints.push(a[0])}},Kinetic.Util.extend(Kinetic.Blob,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.Blob,"tension",1),Kinetic.Node.addPointsGetterSetter(Kinetic.Blob,"points")}(),function(){Kinetic.Sprite=function(a){this.___init(a)},Kinetic.Sprite.prototype={___init:function(a){Kinetic.Shape.call(this,a),this.className="Sprite",this.anim=new Kinetic.Animation;var b=this;this.on("animationChange.kinetic",function(){b.setIndex(0)})},drawFunc:function(a){var b=this.getAnimation(),c=this.getIndex(),d=this.getAnimations()[b][c],e=a.getContext(),f=this.getImage();f&&e.drawImage(f,d.x,d.y,d.width,d.height,0,0,d.width,d.height)},drawHitFunc:function(a){var b=this.getAnimation(),c=this.getIndex(),d=this.getAnimations()[b][c],e=a.getContext();e.beginPath(),e.rect(0,0,d.width,d.height),e.closePath(),a.fill(this)},start:function(){var a=this,b=this.getLayer();this.anim.setLayers(b),this.interval=setInterval(function(){var b=a.getIndex();a._updateIndex(),a.afterFrameFunc&&b===a.afterFrameIndex&&(a.afterFrameFunc(),delete a.afterFrameFunc,delete a.afterFrameIndex)},1e3/this.getFrameRate()),this.anim.start()},stop:function(){this.anim.stop(),clearInterval(this.interval)},afterFrame:function(a,b){this.afterFrameIndex=a,this.afterFrameFunc=b},_updateIndex:function(){var a=this.getIndex(),b=this.getAnimation(),c=this.getAnimations(),d=c[b],e=d.length;e-1>a?this.setIndex(a+1):this.setIndex(0)}},Kinetic.Util.extend(Kinetic.Sprite,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.Sprite,"animation"),Kinetic.Node.addGetterSetter(Kinetic.Sprite,"animations"),Kinetic.Node.addGetterSetter(Kinetic.Sprite,"image"),Kinetic.Node.addGetterSetter(Kinetic.Sprite,"index",0),Kinetic.Node.addGetterSetter(Kinetic.Sprite,"frameRate",17)}(),function(){Kinetic.Path=function(a){this.___init(a)},Kinetic.Path.prototype={___init:function(a){this.dataArray=[];var b=this;Kinetic.Shape.call(this,a),this.className="Path",this.dataArray=Kinetic.Path.parsePathData(this.getData()),this.on("dataChange.kinetic",function(){b.dataArray=Kinetic.Path.parsePathData(this.getData())})},drawFunc:function(a){var b=this.dataArray,c=a.getContext();c.beginPath();for(var d=0;dj?i:j,p=i>j?1:i/j,q=i>j?j/i:1;c.translate(g,h),c.rotate(m),c.scale(p,q),c.arc(0,0,o,k,k+l,1-n),c.scale(1/p,1/q),c.rotate(-m),c.translate(-g,-h);break;case"z":c.closePath()}}a.fillStroke(this)}},Kinetic.Util.extend(Kinetic.Path,Kinetic.Shape),Kinetic.Path.getLineLength=function(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))},Kinetic.Path.getPointOnLine=function(a,b,c,d,e,f,g){void 0===f&&(f=b),void 0===g&&(g=c);var h=(e-c)/(d-b+1e-8),i=Math.sqrt(a*a/(1+h*h));b>d&&(i*=-1);var j,k=h*i;if((g-c)/(f-b+1e-8)===h)j={x:f+i,y:g+k};else{var l,m,n=this.getLineLength(b,c,d,e);if(1e-8>n)return void 0;var o=(f-b)*(d-b)+(g-c)*(e-c);o/=n*n,l=b+o*(d-b),m=c+o*(e-c);var p=this.getLineLength(f,g,l,m),q=Math.sqrt(a*a-p*p);i=Math.sqrt(q*q/(1+h*h)),b>d&&(i*=-1),k=h*i,j={x:l+i,y:m+k}}return j},Kinetic.Path.getPointOnCubicBezier=function(a,b,c,d,e,f,g,h,i){function j(a){return a*a*a}function k(a){return 3*a*a*(1-a)}function l(a){return 3*a*(1-a)*(1-a)}function m(a){return(1-a)*(1-a)*(1-a)}var n=h*j(a)+f*k(a)+d*l(a)+b*m(a),o=i*j(a)+g*k(a)+e*l(a)+c*m(a);return{x:n,y:o}},Kinetic.Path.getPointOnQuadraticBezier=function(a,b,c,d,e,f,g){function h(a){return a*a}function i(a){return 2*a*(1-a)}function j(a){return(1-a)*(1-a)}var k=f*h(a)+d*i(a)+b*j(a),l=g*h(a)+e*i(a)+c*j(a);return{x:k,y:l}},Kinetic.Path.getPointOnEllipticalArc=function(a,b,c,d,e,f){var g=Math.cos(f),h=Math.sin(f),i={x:c*Math.cos(e),y:d*Math.sin(e)};return{x:a+(i.x*g-i.y*h),y:b+(i.x*h+i.y*g)}},Kinetic.Path.parsePathData=function(a){if(!a)return[];var b=a,c=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];b=b.replace(new RegExp(" ","g"),",");for(var d=0;d0&&""===k[0]&&k.shift();for(var l=0;l0&&!isNaN(k[0]);){var m,n,o,p,q,r,s,t,u,v,w=null,x=[],y=g,z=h;switch(j){case"l":g+=k.shift(),h+=k.shift(),w="L",x.push(g,h);break;case"L":g=k.shift(),h=k.shift(),x.push(g,h);break;case"m":g+=k.shift(),h+=k.shift(),w="M",x.push(g,h),j="l";break;case"M":g=k.shift(),h=k.shift(),w="M",x.push(g,h),j="L";break;case"h":g+=k.shift(),w="L",x.push(g,h);break;case"H":g=k.shift(),w="L",x.push(g,h);break;case"v":h+=k.shift(),w="L",x.push(g,h);break;case"V":h=k.shift(),w="L",x.push(g,h);break;case"C":x.push(k.shift(),k.shift(),k.shift(),k.shift()),g=k.shift(),h=k.shift(),x.push(g,h);break;case"c":x.push(g+k.shift(),h+k.shift(),g+k.shift(),h+k.shift()),g+=k.shift(),h+=k.shift(),w="C",x.push(g,h);break;case"S":n=g,o=h,m=f[f.length-1],"C"===m.command&&(n=g+(g-m.points[2]),o=h+(h-m.points[3])),x.push(n,o,k.shift(),k.shift()),g=k.shift(),h=k.shift(),w="C",x.push(g,h);break;case"s":n=g,o=h,m=f[f.length-1],"C"===m.command&&(n=g+(g-m.points[2]),o=h+(h-m.points[3])),x.push(n,o,g+k.shift(),h+k.shift()),g+=k.shift(),h+=k.shift(),w="C",x.push(g,h);break;case"Q":x.push(k.shift(),k.shift()),g=k.shift(),h=k.shift(),x.push(g,h);break;case"q":x.push(g+k.shift(),h+k.shift()),g+=k.shift(),h+=k.shift(),w="Q",x.push(g,h);break;case"T":n=g,o=h,m=f[f.length-1],"Q"===m.command&&(n=g+(g-m.points[0]),o=h+(h-m.points[1])),g=k.shift(),h=k.shift(),w="Q",x.push(n,o,g,h);break;case"t":n=g,o=h,m=f[f.length-1],"Q"===m.command&&(n=g+(g-m.points[0]),o=h+(h-m.points[1])),g+=k.shift(),h+=k.shift(),w="Q",x.push(n,o,g,h);break;case"A":p=k.shift(),q=k.shift(),r=k.shift(),s=k.shift(),t=k.shift(),u=g,v=h,g=k.shift(),h=k.shift(),w="A",x=this.convertEndpointToCenterParameterization(u,v,g,h,s,t,p,q,r);break;case"a":p=k.shift(),q=k.shift(),r=k.shift(),s=k.shift(),t=k.shift(),u=g,v=h,g+=k.shift(),h+=k.shift(),w="A",x=this.convertEndpointToCenterParameterization(u,v,g,h,s,t,p,q,r)}f.push({command:w||j,points:x,start:{x:y,y:z},pathLength:this.calcLength(y,z,w||j,x)})}("z"===j||"Z"===j)&&f.push({command:"z",points:[],start:void 0,pathLength:0})}return f},Kinetic.Path.calcLength=function(a,b,c,d){var e,f,g,h=Kinetic.Path;switch(c){case"L":return h.getLineLength(a,b,d[0],d[1]);case"C":for(e=0,f=h.getPointOnCubicBezier(0,a,b,d[0],d[1],d[2],d[3],d[4],d[5]),t=.01;1>=t;t+=.01)g=h.getPointOnCubicBezier(t,a,b,d[0],d[1],d[2],d[3],d[4],d[5]),e+=h.getLineLength(f.x,f.y,g.x,g.y),f=g;return e;case"Q":for(e=0,f=h.getPointOnQuadraticBezier(0,a,b,d[0],d[1],d[2],d[3]),t=.01;1>=t;t+=.01)g=h.getPointOnQuadraticBezier(t,a,b,d[0],d[1],d[2],d[3]),e+=h.getLineLength(f.x,f.y,g.x,g.y),f=g;return e;case"A":e=0;var i=d[4],j=d[5],k=d[4]+j,l=Math.PI/180;if(Math.abs(i-k)j)for(t=i-l;t>k;t-=l)g=h.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],t,0),e+=h.getLineLength(f.x,f.y,g.x,g.y),f=g;else for(t=i+l;k>t;t+=l)g=h.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],t,0),e+=h.getLineLength(f.x,f.y,g.x,g.y),f=g;return g=h.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],k,0),e+=h.getLineLength(f.x,f.y,g.x,g.y)}return 0},Kinetic.Path.convertEndpointToCenterParameterization=function(a,b,c,d,e,f,g,h,i){var j=i*(Math.PI/180),k=Math.cos(j)*(a-c)/2+Math.sin(j)*(b-d)/2,l=-1*Math.sin(j)*(a-c)/2+Math.cos(j)*(b-d)/2,m=k*k/(g*g)+l*l/(h*h);m>1&&(g*=Math.sqrt(m),h*=Math.sqrt(m));var n=Math.sqrt((g*g*h*h-g*g*l*l-h*h*k*k)/(g*g*l*l+h*h*k*k));e==f&&(n*=-1),isNaN(n)&&(n=0);var o=n*g*l/h,p=n*-h*k/g,q=(a+c)/2+Math.cos(j)*o-Math.sin(j)*p,r=(b+d)/2+Math.sin(j)*o+Math.cos(j)*p,s=function(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1])},t=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(s(a)*s(b))},u=function(a,b){return(a[0]*b[1]=1&&(y=0),0===f&&y>0&&(y-=2*Math.PI),1==f&&0>y&&(y+=2*Math.PI),[q,r,g,h,v,y,j,f]},Kinetic.Node.addGetterSetter(Kinetic.Path,"data")}(),function(){function a(a){a.fillText(this.partialText,0,0)}function b(a){a.strokeText(this.partialText,0,0)}var c="",d="Calibri",e="normal";Kinetic.TextPath=function(a){this.___init(a)},Kinetic.TextPath.prototype={___init:function(c){var d=this;this.dummyCanvas=document.createElement("canvas"),this.dataArray=[],Kinetic.Shape.call(this,c),this._fillFunc=a,this._strokeFunc=b,this.className="TextPath",this.dataArray=Kinetic.Path.parsePathData(this.attrs.data),this.on("dataChange.kinetic",function(){d.dataArray=Kinetic.Path.parsePathData(this.attrs.data)}),this.on("textChange.kinetic textStroke.kinetic textStrokeWidth.kinetic",d._setTextData),d._setTextData()},drawFunc:function(a){var b=(this.charArr,a.getContext());b.font=this._getContextFont(),b.textBaseline="middle",b.textAlign="left",b.save();for(var c=this.glyphInfo,d=0;d0)return g=d,b[d];"M"==b[d].command&&(c={x:b[d].points[0],y:b[d].points[1]})}return{}},j=function(b){var f=a._getTextSize(b).width,g=0,j=0;for(d=void 0;Math.abs(f-g)/f>.01&&25>j;){j++;for(var k=g;void 0===e;)e=i(),e&&k+e.pathLengthf?d=Kinetic.Path.getPointOnLine(f,c.x,c.y,e.points[0],e.points[1],c.x,c.y):e=void 0;break;case"A":var m=e.points[4],n=e.points[5],o=e.points[4]+n;0===h?h=m+1e-8:f>g?h+=Math.PI/180*n/Math.abs(n):h-=Math.PI/360*n/Math.abs(n),Math.abs(h)>Math.abs(o)&&(h=o,l=!0),d=Kinetic.Path.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],h,e.points[6]);break;case"C":0===h?h=f>e.pathLength?1e-8:f/e.pathLength:f>g?h+=(f-g)/e.pathLength:h-=(g-f)/e.pathLength,h>1&&(h=1,l=!0),d=Kinetic.Path.getPointOnCubicBezier(h,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);break;case"Q":0===h?h=f/e.pathLength:f>g?h+=(f-g)/e.pathLength:h-=(g-f)/e.pathLength,h>1&&(h=1,l=!0),d=Kinetic.Path.getPointOnQuadraticBezier(h,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3])}void 0!==d&&(g=Kinetic.Path.getLineLength(c.x,c.y,d.x,d.y)),l&&(l=!1,e=void 0)}},k=0;kb;b++)c=g*Math.sin(2*b*Math.PI/f),d=-1*g*Math.cos(2*b*Math.PI/f),e.lineTo(c,d);e.closePath(),a.fillStroke(this)}},Kinetic.Util.extend(Kinetic.RegularPolygon,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.RegularPolygon,"radius",0),Kinetic.Node.addGetterSetter(Kinetic.RegularPolygon,"sides",0)}(),function(){Kinetic.Star=function(a){this.___init(a)},Kinetic.Star.prototype={___init:function(a){Kinetic.Shape.call(this,a),this.className="Star"},drawFunc:function(a){var b=a.getContext(),c=this.attrs.innerRadius,d=this.attrs.outerRadius,e=this.attrs.numPoints;b.beginPath(),b.moveTo(0,0-this.attrs.outerRadius);for(var f=1;2*e>f;f++){var g=0===f%2?d:c,h=g*Math.sin(f*Math.PI/e),i=-1*g*Math.cos(f*Math.PI/e);b.lineTo(h,i)}b.closePath(),a.fillStroke(this)}},Kinetic.Util.extend(Kinetic.Star,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.Star,"numPoints",0),Kinetic.Node.addGetterSetter(Kinetic.Star,"innerRadius",0),Kinetic.Node.addGetterSetter(Kinetic.Star,"outerRadius",0)}(),function(){var a=["fontFamily","fontSize","fontStyle","padding","lineHeight","text"],b="Change.kinetic",c="none",d="up",e="right",f="down",g="left",h="Label",i=a.length;Kinetic.Label=function(a){this.____init(a)},Kinetic.Label.prototype={____init:function(a){var b=this;this.className=h,Kinetic.Group.call(this,a),this.on("add.kinetic",function(a){b._addListeners(a.child),b._sync()})},getText:function(){return this.get("Text")[0]},getTag:function(){return this.get("Tag")[0]},_addListeners:function(c){var d,e=this,f=function(){e._sync()};for(d=0;i>d;d++)c.on(a[d]+b,f)},getWidth:function(){return this.getText().getWidth()},getHeight:function(){return this.getText().getHeight()},_sync:function(){var a,b,c,h,i,j,k=this.getText(),l=this.getTag();if(k&&l){switch(a=k.getWidth(),b=k.getHeight(),c=l.getPointerDirection(),h=l.getPointerWidth(),pointerHeight=l.getPointerHeight(),i=0,j=0,c){case d:i=a/2,j=-1*pointerHeight;break;case e:i=a+h,j=b/2;break;case f:i=a/2,j=b+pointerHeight;break;case g:i=-1*h,j=b/2}l.setAttrs({x:-1*i,y:-1*j,width:a,height:b}),k.setAttrs({x:-1*i,y:-1*j})}}},Kinetic.Util.extend(Kinetic.Label,Kinetic.Group),Kinetic.Tag=function(a){this.___init(a)},Kinetic.Tag.prototype={___init:function(a){Kinetic.Shape.call(this,a),this.className="Tag"},drawFunc:function(a){var b=a.getContext(),c=this.getWidth(),h=this.getHeight(),i=this.getPointerDirection(),j=this.getPointerWidth(),k=this.getPointerHeight();this.getCornerRadius(),b.beginPath(),b.moveTo(0,0),i===d&&(b.lineTo((c-j)/2,0),b.lineTo(c/2,-1*k),b.lineTo((c+j)/2,0)),b.lineTo(c,0),i===e&&(b.lineTo(c,(h-k)/2),b.lineTo(c+j,h/2),b.lineTo(c,(h+k)/2)),b.lineTo(c,h),i===f&&(b.lineTo((c+j)/2,h),b.lineTo(c/2,h+k),b.lineTo((c-j)/2,h)),b.lineTo(0,h),i===g&&(b.lineTo(0,(h+k)/2),b.lineTo(-1*j,h/2),b.lineTo(0,(h-k)/2)),b.closePath(),a.fillStroke(this)}},Kinetic.Util.extend(Kinetic.Tag,Kinetic.Shape),Kinetic.Node.addGetterSetter(Kinetic.Tag,"pointerDirection",c),Kinetic.Node.addGetterSetter(Kinetic.Tag,"pointerWidth",0),Kinetic.Node.addGetterSetter(Kinetic.Tag,"pointerHeight",0),Kinetic.Node.addGetterSetter(Kinetic.Tag,"cornerRadius",0)}(),function(){Kinetic.Filters.Grayscale=function(a){for(var b=a.data,c=0;ch;h++)N=N.next=new a,h==J&&(M=N);for(N.next=L,l=k=0,g=0;F>g;g++){for(u=v=w=x=m=n=o=p=0,q=J*(y=D[k]),r=J*(z=D[k+1]),s=J*(A=D[k+2]),t=J*(B=D[k+3]),m+=K*y,n+=K*z,o+=K*A,p+=K*B,N=L,h=0;J>h;h++)N.r=y,N.g=z,N.b=A,N.a=B,N=N.next;for(h=1;J>h;h++)i=k+((h>H?H:h)<<2),m+=(N.r=y=D[i])*(C=J-h),n+=(N.g=z=D[i+1])*C,o+=(N.b=A=D[i+2])*C,p+=(N.a=B=D[i+3])*C,u+=y,v+=z,w+=A,x+=B,N=N.next;for(O=L,P=M,f=0;E>f;f++)D[k+3]=B=p*Q>>R,0!==B?(B=255/B,D[k]=(m*Q>>R)*B,D[k+1]=(n*Q>>R)*B,D[k+2]=(o*Q>>R)*B):D[k]=D[k+1]=D[k+2]=0,m-=q,n-=r,o-=s,p-=t,q-=O.r,r-=O.g,s-=O.b,t-=O.a,i=l+((i=f+e+1)f;f++){for(v=w=x=u=n=o=p=m=0,k=f<<2,q=J*(y=D[k]),r=J*(z=D[k+1]),s=J*(A=D[k+2]),t=J*(B=D[k+3]),m+=K*y,n+=K*z,o+=K*A,p+=K*B,N=L,h=0;J>h;h++)N.r=y,N.g=z,N.b=A,N.a=B,N=N.next;for(j=E,h=1;e>=h;h++)k=j+f<<2,m+=(N.r=y=D[k])*(C=J-h),n+=(N.g=z=D[k+1])*C,o+=(N.b=A=D[k+2])*C,p+=(N.a=B=D[k+3])*C,u+=y,v+=z,w+=A,x+=B,N=N.next,I>h&&(j+=E);for(k=f,O=L,P=M,g=0;F>g;g++)i=k<<2,D[i+3]=B=p*Q>>R,B>0?(B=255/B,D[i]=(m*Q>>R)*B,D[i+1]=(n*Q>>R)*B,D[i+2]=(o*Q>>R)*B):D[i]=D[i+1]=D[i+2]=0,m-=q,n-=r,o-=s,p-=t,q-=O.r,r-=O.g,s-=O.b,t-=O.a,i=f+((i=g+J)0&&b(a,c)},Kinetic.Node.addFilterGetterSetter(Kinetic.Image,"filterRadius",0)}(),function(){function a(a,b,c){var d=4*(c*a.width+b),e=[];return e.push(a.data[d++],a.data[d++],a.data[d++],a.data[d++]),e}function b(a,b){return Math.sqrt(Math.pow(a[0]-b[0],2)+Math.pow(a[1]-b[1],2)+Math.pow(a[2]-b[2],2))}function c(a){for(var b=[0,0,0],c=0;cn?0:255}return l}}function e(a,b){for(var c=0;ch;h++)for(var i=0;b>i;i++){for(var j=h*b+i,k=0,l=0;e>l;l++)for(var m=0;e>m;m++){var n=h+l-f,o=i+m-f;if(n>=0&&c>n&&o>=0&&b>o){var p=n*b+o,q=d[l*e+m];k+=a[p]*q}}g[j]=2040===k?255:0}return g}function g(a,b,c){for(var d=[1,1,1,1,1,1,1,1,1],e=Math.round(Math.sqrt(d.length)),f=Math.floor(e/2),g=[],h=0;c>h;h++)for(var i=0;b>i;i++){for(var j=h*b+i,k=0,l=0;e>l;l++)for(var m=0;e>m;m++){var n=h+l-f,o=i+m-f;if(n>=0&&c>n&&o>=0&&b>o){var p=n*b+o,q=d[l*e+m];k+=a[p]*q}}g[j]=k>=1020?255:0}return g}function h(a,b,c){for(var d=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],e=Math.round(Math.sqrt(d.length)),f=Math.floor(e/2),g=[],h=0;c>h;h++)for(var i=0;b>i;i++){for(var j=h*b+i,k=0,l=0;e>l;l++)for(var m=0;e>m;m++){var n=h+l-f,o=i+m-f;if(n>=0&&c>n&&o>=0&&b>o){var p=n*b+o,q=d[l*e+m];k+=a[p]*q}}g[j]=k}return g}Kinetic.Filters.Mask=function(a){var b=this.getFilterThreshold(),c=d(a,b);return c&&(c=f(c,a.width,a.height),c=g(c,a.width,a.height),c=h(c,a.width,a.height),e(a,c)),a},Kinetic.Node.addFilterGetterSetter(Kinetic.Image,"filterThreshold",0)}(); \ No newline at end of file +var Kinetic = {} +!(function() { + ;(Kinetic.version = '4.5.5'), + (Kinetic.Filters = {}), + (Kinetic.Node = function(a) { + this._init(a) + }), + (Kinetic.Shape = function(a) { + this.__init(a) + }), + (Kinetic.Container = function(a) { + this.__init(a) + }), + (Kinetic.Stage = function(a) { + this.___init(a) + }), + (Kinetic.Layer = function(a) { + this.___init(a) + }), + (Kinetic.Group = function(a) { + this.___init(a) + }), + (Kinetic.Global = { + stages: [], + idCounter: 0, + ids: {}, + names: {}, + shapes: {}, + listenClickTap: !1, + inDblClickWindow: !1, + dblClickWindow: 400, + isDragging: function() { + var a = Kinetic.DD + return a ? a.isDragging : !1 + }, + isDragReady: function() { + var a = Kinetic.DD + return a ? !!a.node : !1 + }, + _addId: function(a, b) { + void 0 !== b && (this.ids[b] = a) + }, + _removeId: function(a) { + void 0 !== a && delete this.ids[a] + }, + _addName: function(a, b) { + void 0 !== b && (void 0 === this.names[b] && (this.names[b] = []), this.names[b].push(a)) + }, + _removeName: function(a, b) { + if (void 0 !== a) { + var c = this.names[a] + if (void 0 !== c) { + for (var d = 0; d < c.length; d++) { + var e = c[d] + e._id === b && c.splice(d, 1) + } + 0 === c.length && delete this.names[a] + } + } + } + }) +})(), + (function(a, b) { + 'object' == typeof exports + ? (module.exports = b()) + : 'function' == typeof define && define.amd + ? define(b) + : (a.returnExports = b()) + })(this, function() { + return Kinetic + }), + (function() { + ;(Kinetic.Collection = function() { + var a = [].slice.call(arguments), + b = a.length, + c = 0 + for (this.length = b; b > c; c++) this[c] = a[c] + return this + }), + (Kinetic.Collection.prototype = []), + (Kinetic.Collection.prototype.each = function(a) { + for (var b = 0; b < this.length; b++) a(this[b], b) + }), + (Kinetic.Collection.prototype.toArray = function() { + var a, + b = [], + c = this.length + for (a = 0; c > a; a++) b.push(this[a]) + return b + }), + (Kinetic.Collection.toCollection = function(a) { + var b, + c = new Kinetic.Collection(), + d = a.length + for (b = 0; d > b; b++) c.push(a[b]) + return c + }), + (Kinetic.Collection.mapMethods = function(a) { + var b, + c = a.length + for (b = 0; c > b; b++) + !(function(b) { + var c = a[b] + Kinetic.Collection.prototype[c] = function() { + var a, + b = this.length + for (args = [].slice.call(arguments), a = 0; b > a; a++) + this[a][c].apply(this[a], args) + } + })(b) + }) + })(), + (function() { + ;(Kinetic.Transform = function() { + this.m = [1, 0, 0, 1, 0, 0] + }), + (Kinetic.Transform.prototype = { + translate: function(a, b) { + ;(this.m[4] += this.m[0] * a + this.m[2] * b), + (this.m[5] += this.m[1] * a + this.m[3] * b) + }, + scale: function(a, b) { + ;(this.m[0] *= a), (this.m[1] *= a), (this.m[2] *= b), (this.m[3] *= b) + }, + rotate: function(a) { + var b = Math.cos(a), + c = Math.sin(a), + d = this.m[0] * b + this.m[2] * c, + e = this.m[1] * b + this.m[3] * c, + f = this.m[0] * -c + this.m[2] * b, + g = this.m[1] * -c + this.m[3] * b + ;(this.m[0] = d), (this.m[1] = e), (this.m[2] = f), (this.m[3] = g) + }, + getTranslation: function() { + return { x: this.m[4], y: this.m[5] } + }, + skew: function(a, b) { + var c = this.m[0] + this.m[2] * b, + d = this.m[1] + this.m[3] * b, + e = this.m[2] + this.m[0] * a, + f = this.m[3] + this.m[1] * a + ;(this.m[0] = c), (this.m[1] = d), (this.m[2] = e), (this.m[3] = f) + }, + multiply: function(a) { + var b = this.m[0] * a.m[0] + this.m[2] * a.m[1], + c = this.m[1] * a.m[0] + this.m[3] * a.m[1], + d = this.m[0] * a.m[2] + this.m[2] * a.m[3], + e = this.m[1] * a.m[2] + this.m[3] * a.m[3], + f = this.m[0] * a.m[4] + this.m[2] * a.m[5] + this.m[4], + g = this.m[1] * a.m[4] + this.m[3] * a.m[5] + this.m[5] + ;(this.m[0] = b), + (this.m[1] = c), + (this.m[2] = d), + (this.m[3] = e), + (this.m[4] = f), + (this.m[5] = g) + }, + invert: function() { + var a = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]), + b = this.m[3] * a, + c = -this.m[1] * a, + d = -this.m[2] * a, + e = this.m[0] * a, + f = a * (this.m[2] * this.m[5] - this.m[3] * this.m[4]), + g = a * (this.m[1] * this.m[4] - this.m[0] * this.m[5]) + ;(this.m[0] = b), + (this.m[1] = c), + (this.m[2] = d), + (this.m[3] = e), + (this.m[4] = f), + (this.m[5] = g) + }, + getMatrix: function() { + return this.m + } + }) + })(), + (function() { + var a = 'canvas', + b = '2d', + c = '[object Array]', + d = '[object Number]', + e = '[object String]', + f = Math.PI / 180, + g = 180 / Math.PI, + h = '#', + i = '', + j = '0', + k = 'Kinetic warning: ', + l = 'Kinetic error: ', + m = 'rgb(', + n = { + aqua: [0, 255, 255], + lime: [0, 255, 0], + silver: [192, 192, 192], + black: [0, 0, 0], + maroon: [128, 0, 0], + teal: [0, 128, 128], + blue: [0, 0, 255], + navy: [0, 0, 128], + white: [255, 255, 255], + fuchsia: [255, 0, 255], + olive: [128, 128, 0], + yellow: [255, 255, 0], + orange: [255, 165, 0], + gray: [128, 128, 128], + purple: [128, 0, 128], + green: [0, 128, 0], + red: [255, 0, 0], + pink: [255, 192, 203], + cyan: [0, 255, 255], + transparent: [255, 255, 255, 0] + }, + o = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/ + Kinetic.Util = { + _isElement: function(a) { + return !(!a || 1 != a.nodeType) + }, + _isFunction: function(a) { + return !!(a && a.constructor && a.call && a.apply) + }, + _isObject: function(a) { + return !!a && a.constructor == Object + }, + _isArray: function(a) { + return Object.prototype.toString.call(a) == c + }, + _isNumber: function(a) { + return Object.prototype.toString.call(a) == d + }, + _isString: function(a) { + return Object.prototype.toString.call(a) == e + }, + _hasMethods: function(a) { + var b, + c = [] + for (b in a) this._isFunction(a[b]) && c.push(b) + return c.length > 0 + }, + _isInDocument: function(a) { + for (; (a = a.parentNode); ) if (a == document) return !0 + return !1 + }, + _getXY: function(a) { + if (this._isNumber(a)) return { x: a, y: a } + if (this._isArray(a)) { + if (1 === a.length) { + var b = a[0] + if (this._isNumber(b)) return { x: b, y: b } + if (this._isArray(b)) return { x: b[0], y: b[1] } + if (this._isObject(b)) return b + } else if (a.length >= 2) return { x: a[0], y: a[1] } + } else if (this._isObject(a)) return a + return null + }, + _getSize: function(a) { + if (this._isNumber(a)) return { width: a, height: a } + if (this._isArray(a)) + if (1 === a.length) { + var b = a[0] + if (this._isNumber(b)) return { width: b, height: b } + if (this._isArray(b)) { + if (b.length >= 4) return { width: b[2], height: b[3] } + if (b.length >= 2) return { width: b[0], height: b[1] } + } else if (this._isObject(b)) return b + } else { + if (a.length >= 4) return { width: a[2], height: a[3] } + if (a.length >= 2) return { width: a[0], height: a[1] } + } + else if (this._isObject(a)) return a + return null + }, + _getPoints: function(a) { + var b, + c, + d = [] + if (void 0 === a) return [] + if (((c = a.length), this._isArray(a[0]))) { + for (b = 0; c > b; b++) d.push({ x: a[b][0], y: a[b][1] }) + return d + } + if (this._isObject(a[0])) return a + for (b = 0; c > b; b += 2) d.push({ x: a[b], y: a[b + 1] }) + return d + }, + _getImage: function(c, d) { + var e, f, g, h + c + ? this._isElement(c) + ? d(c) + : this._isString(c) + ? ((e = new Image()), + (e.onload = function() { + d(e) + }), + (e.src = c)) + : c.data + ? ((f = document.createElement(a)), + (f.width = c.width), + (f.height = c.height), + (g = f.getContext(b)), + g.putImageData(c, 0, 0), + (h = f.toDataURL()), + (e = new Image()), + (e.onload = function() { + d(e) + }), + (e.src = h)) + : d(null) + : d(null) + }, + _rgbToHex: function(a, b, c) { + return ((1 << 24) + (a << 16) + (b << 8) + c).toString(16).slice(1) + }, + _hexToRgb: function(a) { + a = a.replace(h, i) + var b = parseInt(a, 16) + return { r: 255 & (b >> 16), g: 255 & (b >> 8), b: 255 & b } + }, + getRandomColor: function() { + for (var a = ((16777215 * Math.random()) << 0).toString(16); a.length < 6; ) a = j + a + return h + a + }, + getRGB: function(a) { + var b + return a in n + ? ((b = n[a]), { r: b[0], g: b[1], b: b[2] }) + : a[0] === h + ? this._hexToRgb(a.substring(1)) + : a.substr(0, 4) === m + ? ((b = o.exec(a.replace(/ /g, ''))), + { r: parseInt(b[1], 10), g: parseInt(b[2], 10), b: parseInt(b[3], 10) }) + : { r: 0, g: 0, b: 0 } + }, + _merge: function(a, b) { + var c = this._clone(b) + for (var d in a) c[d] = this._isObject(a[d]) ? this._merge(a[d], c[d]) : a[d] + return c + }, + _clone: function(a) { + var b = {} + for (var c in a) b[c] = this._isObject(a[c]) ? this._clone(a[c]) : a[c] + return b + }, + _degToRad: function(a) { + return a * f + }, + _radToDeg: function(a) { + return a * g + }, + _capitalize: function(a) { + return a.charAt(0).toUpperCase() + a.slice(1) + }, + error: function(a) { + throw new Error(l + a) + }, + warn: function(a) { + window.console && console.warn && console.warn(k + a) + }, + extend: function(a, b) { + for (var c in b.prototype) c in a.prototype || (a.prototype[c] = b.prototype[c]) + }, + addMethods: function(a, b) { + var c + for (c in b) a.prototype[c] = b[c] + }, + _getControlPoints: function(a, b, c, d) { + var e = a.x, + f = a.y, + g = b.x, + h = b.y, + i = c.x, + j = c.y, + k = Math.sqrt(Math.pow(g - e, 2) + Math.pow(h - f, 2)), + l = Math.sqrt(Math.pow(i - g, 2) + Math.pow(j - h, 2)), + m = d * k / (k + l), + n = d * l / (k + l), + o = g - m * (i - e), + p = h - m * (j - f), + q = g + n * (i - e), + r = h + n * (j - f) + return [{ x: o, y: p }, { x: q, y: r }] + }, + _expandPoints: function(a, b) { + var c, + d, + e = a.length, + f = [] + for (c = 1; e - 1 > c; c++) + (d = Kinetic.Util._getControlPoints(a[c - 1], a[c], a[c + 1], b)), + f.push(d[0]), + f.push(a[c]), + f.push(d[1]) + return f + }, + _removeLastLetter: function(a) { + return a.substring(0, a.length - 1) + } + } + })(), + (function() { + var a = document.createElement('canvas'), + b = a.getContext('2d'), + c = window.devicePixelRatio || 1, + d = + b.webkitBackingStorePixelRatio || + b.mozBackingStorePixelRatio || + b.msBackingStorePixelRatio || + b.oBackingStorePixelRatio || + b.backingStorePixelRatio || + 1, + e = c / d + ;(Kinetic.Canvas = function(a) { + this.init(a) + }), + (Kinetic.Canvas.prototype = { + init: function(a) { + a = a || {} + var b = a.width || 0, + c = a.height || 0, + d = a.pixelRatio || e, + f = a.contextType || '2d' + ;(this.pixelRatio = d), + (this.element = document.createElement('canvas')), + (this.element.style.padding = 0), + (this.element.style.margin = 0), + (this.element.style.border = 0), + (this.element.style.background = 'transparent'), + (this.element.style.position = 'absolute'), + (this.element.style.top = 0), + (this.element.style.left = 0), + (this.context = this.element.getContext(f)), + this.setSize(b, c) + }, + getElement: function() { + return this.element + }, + getContext: function() { + return this.context + }, + setWidth: function(a) { + ;(this.width = this.element.width = a * this.pixelRatio), + (this.element.style.width = a + 'px') + }, + setHeight: function(a) { + ;(this.height = this.element.height = a * this.pixelRatio), + (this.element.style.height = a + 'px') + }, + getWidth: function() { + return this.width + }, + getHeight: function() { + return this.height + }, + setSize: function(a, b) { + this.setWidth(a), this.setHeight(b) + }, + clear: function() { + var a = this.getContext() + this.getElement(), a.clearRect(0, 0, this.getWidth(), this.getHeight()) + }, + toDataURL: function(a, b) { + try { + return this.element.toDataURL(a, b) + } catch (c) { + try { + return this.element.toDataURL() + } catch (d) { + return Kinetic.Util.warn('Unable to get data URL. ' + d.message), '' + } + } + }, + fill: function(a) { + a.getFillEnabled() && this._fill(a) + }, + stroke: function(a) { + a.getStrokeEnabled() && this._stroke(a) + }, + fillStroke: function(a) { + var b = a.getFillEnabled() + b && this._fill(a), + a.getStrokeEnabled() && this._stroke(a, a.hasShadow() && a.hasFill() && b) + }, + applyShadow: function(a, b) { + var c = this.context + c.save(), this._applyShadow(a), b(), c.restore(), b() + }, + _applyLineCap: function(a) { + var b = a.getLineCap() + b && (this.context.lineCap = b) + }, + _applyOpacity: function(a) { + var b = a.getAbsoluteOpacity() + 1 !== b && (this.context.globalAlpha = b) + }, + _applyLineJoin: function(a) { + var b = a.getLineJoin() + b && (this.context.lineJoin = b) + }, + _applyAncestorTransforms: function(a) { + var b, + c, + d = this.context + a._eachAncestorReverse(function(a) { + ;(b = a.getTransform(!0)), + (c = b.getMatrix()), + d.transform(c[0], c[1], c[2], c[3], c[4], c[5]) + }, !0) + }, + _clip: function(a) { + var b = this.getContext() + b.save(), + this._applyAncestorTransforms(a), + b.beginPath(), + a.getClipFunc()(this), + b.clip(), + b.setTransform(1, 0, 0, 1, 0, 0) + } + }), + (Kinetic.SceneCanvas = function(a) { + Kinetic.Canvas.call(this, a) + }), + (Kinetic.SceneCanvas.prototype = { + setWidth: function(a) { + var b = this.pixelRatio + Kinetic.Canvas.prototype.setWidth.call(this, a), this.context.scale(b, b) + }, + setHeight: function(a) { + var b = this.pixelRatio + Kinetic.Canvas.prototype.setHeight.call(this, a), this.context.scale(b, b) + }, + _fillColor: function(a) { + var b = this.context, + c = a.getFill() + ;(b.fillStyle = c), a._fillFunc(b) + }, + _fillPattern: function(a) { + var b = this.context, + c = a.getFillPatternImage(), + d = a.getFillPatternX(), + e = a.getFillPatternY(), + f = a.getFillPatternScale(), + g = a.getFillPatternRotation(), + h = a.getFillPatternOffset(), + i = a.getFillPatternRepeat() + ;(d || e) && b.translate(d || 0, e || 0), + g && b.rotate(g), + f && b.scale(f.x, f.y), + h && b.translate(-1 * h.x, -1 * h.y), + (b.fillStyle = b.createPattern(c, i || 'repeat')), + b.fill() + }, + _fillLinearGradient: function(a) { + var b = this.context, + c = a.getFillLinearGradientStartPoint(), + d = a.getFillLinearGradientEndPoint(), + e = a.getFillLinearGradientColorStops(), + f = b.createLinearGradient(c.x, c.y, d.x, d.y) + if (e) { + for (var g = 0; g < e.length; g += 2) f.addColorStop(e[g], e[g + 1]) + ;(b.fillStyle = f), b.fill() + } + }, + _fillRadialGradient: function(a) { + for ( + var b = this.context, + c = a.getFillRadialGradientStartPoint(), + d = a.getFillRadialGradientEndPoint(), + e = a.getFillRadialGradientStartRadius(), + f = a.getFillRadialGradientEndRadius(), + g = a.getFillRadialGradientColorStops(), + h = b.createRadialGradient(c.x, c.y, e, d.x, d.y, f), + i = 0; + i < g.length; + i += 2 + ) + h.addColorStop(g[i], g[i + 1]) + ;(b.fillStyle = h), b.fill() + }, + _fill: function(a, b) { + var c = this.context, + d = a.getFill(), + e = a.getFillPatternImage(), + f = a.getFillLinearGradientColorStops(), + g = a.getFillRadialGradientColorStops(), + h = a.getFillPriority() + c.save(), + !b && a.hasShadow() && this._applyShadow(a), + d && 'color' === h + ? this._fillColor(a) + : e && 'pattern' === h + ? this._fillPattern(a) + : f && 'linear-gradient' === h + ? this._fillLinearGradient(a) + : g && 'radial-gradient' === h + ? this._fillRadialGradient(a) + : d + ? this._fillColor(a) + : e + ? this._fillPattern(a) + : f + ? this._fillLinearGradient(a) + : g && this._fillRadialGradient(a), + c.restore(), + !b && a.hasShadow() && this._fill(a, !0) + }, + _stroke: function(a, b) { + var c = this.context, + d = a.getStroke(), + e = a.getStrokeWidth(), + f = a.getDashArray() + ;(d || e) && + (c.save(), + a.getStrokeScaleEnabled() || c.setTransform(1, 0, 0, 1, 0, 0), + this._applyLineCap(a), + f && + a.getDashArrayEnabled() && + (c.setLineDash + ? c.setLineDash(f) + : 'mozDash' in c + ? (c.mozDash = f) + : 'webkitLineDash' in c && (c.webkitLineDash = f)), + !b && a.hasShadow() && this._applyShadow(a), + (c.lineWidth = e || 2), + (c.strokeStyle = d || 'black'), + a._strokeFunc(c), + c.restore(), + !b && a.hasShadow() && this._stroke(a, !0)) + }, + _applyShadow: function(a) { + var b = this.context + if (a.hasShadow() && a.getShadowEnabled()) { + var c = a.getAbsoluteOpacity(), + d = a.getShadowColor() || 'black', + e = a.getShadowBlur() || 5, + f = a.getShadowOffset() || { x: 0, y: 0 } + a.getShadowOpacity() && (b.globalAlpha = a.getShadowOpacity() * c), + (b.shadowColor = d), + (b.shadowBlur = e), + (b.shadowOffsetX = f.x), + (b.shadowOffsetY = f.y) + } + } + }), + Kinetic.Util.extend(Kinetic.SceneCanvas, Kinetic.Canvas), + (Kinetic.HitCanvas = function(a) { + Kinetic.Canvas.call(this, a) + }), + (Kinetic.HitCanvas.prototype = { + _fill: function(a) { + var b = this.context + b.save(), (b.fillStyle = a.colorKey), a._fillFuncHit(b), b.restore() + }, + _stroke: function(a) { + var b = this.context, + c = a.getStroke(), + d = a.getStrokeWidth() + ;(c || d) && + (this._applyLineCap(a), + b.save(), + (b.lineWidth = d || 2), + (b.strokeStyle = a.colorKey), + a._strokeFuncHit(b), + b.restore()) + } + }), + Kinetic.Util.extend(Kinetic.HitCanvas, Kinetic.Canvas) + })(), + (function() { + var a = 'add', + b = ' ', + c = '', + d = '.', + e = 'get', + f = 'set', + g = 'Shape', + h = 'Stage', + i = 'X', + j = 'Y', + k = 'kinetic', + l = 'before', + m = 'Change', + n = 'id', + o = 'name', + p = 'mouseenter', + q = 'mouseleave', + r = 'Deg', + s = 'RGB', + u = 'r', + v = 'g', + w = 'b', + x = 'R', + y = 'G', + z = 'B', + A = '#', + B = 'children' + Kinetic.Util.addMethods(Kinetic.Node, { + _init: function(a) { + ;(this._id = Kinetic.Global.idCounter++), + (this.eventListeners = {}), + (this.attrs = {}), + this.setAttrs(a) + }, + on: function(a, e) { + var f, + g, + h, + i, + j, + k = a.split(b), + l = k.length + for (f = 0; l > f; f++) + (g = k[f]), + (h = g.split(d)), + (i = h[0]), + (j = h[1] || c), + this.eventListeners[i] || (this.eventListeners[i] = []), + this.eventListeners[i].push({ name: j, handler: e }) + return this + }, + off: function(a) { + var c, + e, + f, + g, + h, + i = a.split(b), + j = i.length + for (c = 0; j > c; c++) + if (((e = i[c]), (f = e.split(d)), (g = f[0]), (h = f[1]), g)) + this.eventListeners[g] && this._off(g, h) + else for (t in this.eventListeners) this._off(t, h) + return this + }, + remove: function() { + var a = this.getParent() + return ( + a && + a.children && + (a.children.splice(this.index, 1), a._setChildrenIndices(), delete this.parent), + this + ) + }, + destroy: function() { + var a = Kinetic.Global + a._removeId(this.getId()), a._removeName(this.getName(), this._id), this.remove() + }, + getAttr: function(a) { + var b = e + Kinetic.Util._capitalize(a) + return Kinetic.Util._isFunction(this[b]) ? this[b]() : this.attrs[a] + }, + setAttr: function() { + var a = Array.prototype.slice.call(arguments), + b = a[0], + c = f + Kinetic.Util._capitalize(b), + d = this[c] + return ( + a.shift(), Kinetic.Util._isFunction(d) ? d.apply(this, a) : (this.attrs[b] = a[0]), this + ) + }, + getAttrs: function() { + return this.attrs || {} + }, + setAttrs: function(a) { + var b, c + if (a) + for (b in a) + b === B || + ((c = f + Kinetic.Util._capitalize(b)), + Kinetic.Util._isFunction(this[c]) ? this[c](a[b]) : this._setAttr(b, a[b])) + return this + }, + getVisible: function() { + var a = this.attrs.visible, + b = this.getParent() + return void 0 === a && (a = !0), a && b && !b.getVisible() ? !1 : a + }, + show: function() { + return this.setVisible(!0), this + }, + hide: function() { + return this.setVisible(!1), this + }, + getZIndex: function() { + return this.index || 0 + }, + getAbsoluteZIndex: function() { + function a(h) { + for (b = [], c = h.length, d = 0; c > d; d++) + (e = h[d]), + j++, + e.nodeType !== g && (b = b.concat(e.getChildren().toArray())), + e._id === i._id && (d = c) + b.length > 0 && b[0].getLevel() <= f && a(b) + } + var b, + c, + d, + e, + f = this.getLevel(), + i = (this.getStage(), this), + j = 0 + return i.nodeType !== h && a(i.getStage().getChildren()), j + }, + getLevel: function() { + for (var a = 0, b = this.parent; b; ) a++, (b = b.parent) + return a + }, + setPosition: function() { + var a = Kinetic.Util._getXY([].slice.call(arguments)) + return this.setX(a.x), this.setY(a.y), this + }, + getPosition: function() { + return { x: this.getX(), y: this.getY() } + }, + getAbsolutePosition: function() { + var a = this.getAbsoluteTransform(), + b = this.getOffset() + return a.translate(b.x, b.y), a.getTranslation() + }, + setAbsolutePosition: function() { + var a, + b = Kinetic.Util._getXY([].slice.call(arguments)), + c = this._clearTransform() + return ( + (this.attrs.x = c.x), + (this.attrs.y = c.y), + delete c.x, + delete c.y, + (a = this.getAbsoluteTransform()), + a.invert(), + a.translate(b.x, b.y), + (b = { x: this.attrs.x + a.getTranslation().x, y: this.attrs.y + a.getTranslation().y }), + this.setPosition(b.x, b.y), + this._setTransform(c), + this + ) + }, + move: function() { + var a = Kinetic.Util._getXY([].slice.call(arguments)), + b = this.getX(), + c = this.getY() + return ( + void 0 !== a.x && (b += a.x), void 0 !== a.y && (c += a.y), this.setPosition(b, c), this + ) + }, + _eachAncestorReverse: function(a, b) { + var c, + d, + e = [], + f = this.getParent() + for (b && e.unshift(this); f; ) e.unshift(f), (f = f.parent) + for (c = e.length, d = 0; c > d; d++) a(e[d]) + }, + rotate: function(a) { + return this.setRotation(this.getRotation() + a), this + }, + rotateDeg: function(a) { + return this.setRotation(this.getRotation() + Kinetic.Util._degToRad(a)), this + }, + moveToTop: function() { + var a = this.index + return ( + this.parent.children.splice(a, 1), + this.parent.children.push(this), + this.parent._setChildrenIndices(), + !0 + ) + }, + moveUp: function() { + var a = this.index, + b = this.parent.getChildren().length + return b - 1 > a + ? (this.parent.children.splice(a, 1), + this.parent.children.splice(a + 1, 0, this), + this.parent._setChildrenIndices(), + !0) + : !1 + }, + moveDown: function() { + var a = this.index + return a > 0 + ? (this.parent.children.splice(a, 1), + this.parent.children.splice(a - 1, 0, this), + this.parent._setChildrenIndices(), + !0) + : !1 + }, + moveToBottom: function() { + var a = this.index + return a > 0 + ? (this.parent.children.splice(a, 1), + this.parent.children.unshift(this), + this.parent._setChildrenIndices(), + !0) + : !1 + }, + setZIndex: function(a) { + var b = this.index + return ( + this.parent.children.splice(b, 1), + this.parent.children.splice(a, 0, this), + this.parent._setChildrenIndices(), + this + ) + }, + getAbsoluteOpacity: function() { + var a = this.getOpacity() + return this.getParent() && (a *= this.getParent().getAbsoluteOpacity()), a + }, + moveTo: function(a) { + return Kinetic.Node.prototype.remove.call(this), a.add(this), this + }, + toObject: function() { + var a, + b, + c = Kinetic.Util, + d = {}, + e = this.getAttrs() + d.attrs = {} + for (a in e) + (b = e[a]), + c._isFunction(b) || + c._isElement(b) || + (c._isObject(b) && c._hasMethods(b)) || + (d.attrs[a] = b) + return (d.className = this.getClassName()), d + }, + toJSON: function() { + return JSON.stringify(this.toObject()) + }, + getParent: function() { + return this.parent + }, + getLayer: function() { + return this.getParent().getLayer() + }, + getStage: function() { + return this.getParent() ? this.getParent().getStage() : void 0 + }, + fire: function(a, b, c) { + return c ? this._fireAndBubble(a, b || {}) : this._fire(a, b || {}), this + }, + getAbsoluteTransform: function() { + var a, + b = new Kinetic.Transform() + return ( + this._eachAncestorReverse(function(c) { + ;(a = c.getTransform()), b.multiply(a) + }, !0), + b + ) + }, + _getAndCacheTransform: function() { + var a = new Kinetic.Transform(), + b = this.getX(), + c = this.getY(), + d = this.getRotation(), + e = this.getScaleX(), + f = this.getScaleY(), + g = this.getSkewX(), + h = this.getSkewY(), + i = this.getOffsetX(), + j = this.getOffsetY() + return ( + (0 !== b || 0 !== c) && a.translate(b, c), + 0 !== d && a.rotate(d), + (0 !== g || 0 !== h) && a.skew(g, h), + (1 !== e || 1 !== f) && a.scale(e, f), + (0 !== i || 0 !== j) && a.translate(-1 * i, -1 * j), + (this.cachedTransform = a), + a + ) + }, + getTransform: function(a) { + var b = this.cachedTransform + return a && b ? b : this._getAndCacheTransform() + }, + clone: function(a) { + var b, + c, + d, + e, + f, + g = this.getClassName(), + h = new Kinetic[g](this.attrs) + for (b in this.eventListeners) + for (c = this.eventListeners[b], d = c.length, e = 0; d > e; e++) + (f = c[e]), + f.name.indexOf(k) < 0 && + (h.eventListeners[b] || (h.eventListeners[b] = []), h.eventListeners[b].push(f)) + return h.setAttrs(a), h + }, + toDataURL: function(a) { + a = a || {} + var b = a.mimeType || null, + c = a.quality || null, + d = this.getStage(), + e = a.x || 0, + f = a.y || 0, + g = new Kinetic.SceneCanvas({ + width: a.width || d.getWidth(), + height: a.height || d.getHeight(), + pixelRatio: 1 + }), + h = g.getContext() + return ( + h.save(), + (e || f) && h.translate(-1 * e, -1 * f), + this.drawScene(g), + h.restore(), + g.toDataURL(b, c) + ) + }, + toImage: function(a) { + Kinetic.Util._getImage(this.toDataURL(a), function(b) { + a.callback(b) + }) + }, + setSize: function() { + var a = Kinetic.Util._getSize(Array.prototype.slice.call(arguments)) + return this.setWidth(a.width), this.setHeight(a.height), this + }, + getSize: function() { + return { width: this.getWidth(), height: this.getHeight() } + }, + getWidth: function() { + return this.attrs.width || 0 + }, + getHeight: function() { + return this.attrs.height || 0 + }, + getClassName: function() { + return this.className || this.nodeType + }, + getType: function() { + return this.nodeType + }, + _get: function(a) { + return this.nodeType === a ? [this] : [] + }, + _off: function(a, b) { + var c, + d, + e = this.eventListeners[a] + for (c = 0; c < e.length; c++) + if (((d = e[c].name), !(('kinetic' === d && 'kinetic' !== b) || (b && d !== b)))) { + if ((e.splice(c, 1), 0 === e.length)) { + delete this.eventListeners[a] + break + } + c-- + } + }, + _clearTransform: function() { + var a = { + x: this.getX(), + y: this.getY(), + rotation: this.getRotation(), + scaleX: this.getScaleX(), + scaleY: this.getScaleY(), + offsetX: this.getOffsetX(), + offsetY: this.getOffsetY(), + skewX: this.getSkewX(), + skewY: this.getSkewY() + } + return ( + (this.attrs.x = 0), + (this.attrs.y = 0), + (this.attrs.rotation = 0), + (this.attrs.scaleX = 1), + (this.attrs.scaleY = 1), + (this.attrs.offsetX = 0), + (this.attrs.offsetY = 0), + (this.attrs.skewX = 0), + (this.attrs.skewY = 0), + a + ) + }, + _setTransform: function(a) { + var b + for (b in a) this.attrs[b] = a[b] + this.cachedTransform = null + }, + _fireBeforeChangeEvent: function(a, b, c) { + this._fire(l + Kinetic.Util._capitalize(a) + m, { oldVal: b, newVal: c }) + }, + _fireChangeEvent: function(a, b, c) { + this._fire(a + m, { oldVal: b, newVal: c }) + }, + setId: function(a) { + var b = this.getId(), + c = (this.getStage(), Kinetic.Global) + return c._removeId(b), c._addId(this, a), this._setAttr(n, a), this + }, + setName: function(a) { + var b = this.getName(), + c = (this.getStage(), Kinetic.Global) + return c._removeName(b, this._id), c._addName(this, a), this._setAttr(o, a), this + }, + _setAttr: function(a, b) { + var c + void 0 !== b && + ((c = this.attrs[a]), + this._fireBeforeChangeEvent(a, c, b), + (this.attrs[a] = b), + this._fireChangeEvent(a, c, b)) + }, + _fireAndBubble: function(a, b, c) { + b && this.nodeType === g && (b.targetNode = this), this.getStage(), this.eventListeners + var d = !0 + a === p && c && this._id === c._id + ? (d = !1) + : a === q && c && this._id === c._id && (d = !1), + d && + (this._fire(a, b), + b && + !b.cancelBubble && + this.parent && + (c && c.parent + ? this._fireAndBubble.call(this.parent, a, b, c.parent) + : this._fireAndBubble.call(this.parent, a, b))) + }, + _fire: function(a, b) { + var c, + d, + e = this.eventListeners[a] + if (e) for (c = e.length, d = 0; c > d; d++) e[d].handler.call(this, b) + }, + draw: function() { + return this.drawScene(), this.drawHit(), this + }, + shouldDrawHit: function() { + return this.isVisible() && this.isListening() && !Kinetic.Global.isDragging() + }, + isDraggable: function() { + return !1 + } + }), + (Kinetic.Node.addGetterSetter = function(a, b, c, d) { + this.addGetter(a, b, c), this.addSetter(a, b, d) + }), + (Kinetic.Node.addPointGetterSetter = function(a, b, c, d) { + this.addPointGetter(a, b), + this.addPointSetter(a, b), + this.addGetter(a, b + i, c), + this.addGetter(a, b + j, c), + this.addSetter(a, b + i, d), + this.addSetter(a, b + j, d) + }), + (Kinetic.Node.addPointsGetterSetter = function(a, b) { + this.addPointsGetter(a, b), this.addPointsSetter(a, b), this.addPointAdder(a, b) + }), + (Kinetic.Node.addRotationGetterSetter = function(a, b, c, d) { + this.addRotationGetter(a, b, c), this.addRotationSetter(a, b, d) + }), + (Kinetic.Node.addColorGetterSetter = function(a, b) { + this.addGetter(a, b), + this.addSetter(a, b), + this.addColorRGBGetter(a, b), + this.addColorComponentGetter(a, b, u), + this.addColorComponentGetter(a, b, v), + this.addColorComponentGetter(a, b, w), + this.addColorRGBSetter(a, b), + this.addColorComponentSetter(a, b, u), + this.addColorComponentSetter(a, b, v), + this.addColorComponentSetter(a, b, w) + }), + (Kinetic.Node.addColorRGBGetter = function(a, b) { + var c = e + Kinetic.Util._capitalize(b) + s + a.prototype[c] = function() { + return Kinetic.Util.getRGB(this.attrs[b]) + } + }), + (Kinetic.Node.addColorComponentGetter = function(a, b, c) { + var d = e + Kinetic.Util._capitalize(b), + f = d + Kinetic.Util._capitalize(c) + a.prototype[f] = function() { + return this[d + s]()[c] + } + }), + (Kinetic.Node.addPointsGetter = function(a, b) { + var c = e + Kinetic.Util._capitalize(b) + a.prototype[c] = function() { + var a = this.attrs[b] + return void 0 === a ? [] : a + } + }), + (Kinetic.Node.addGetter = function(a, b, c) { + var d = e + Kinetic.Util._capitalize(b) + a.prototype[d] = function() { + var a = this.attrs[b] + return void 0 === a ? c : a + } + }), + (Kinetic.Node.addPointGetter = function(a, b) { + var c = e + Kinetic.Util._capitalize(b) + a.prototype[c] = function() { + var a = this + return { x: a[c + i](), y: a[c + j]() } + } + }), + (Kinetic.Node.addRotationGetter = function(a, b, c) { + var d = e + Kinetic.Util._capitalize(b) + ;(a.prototype[d] = function() { + var a = this.attrs[b] + return void 0 === a && (a = c), a + }), + (a.prototype[d + r] = function() { + var a = this.attrs[b] + return void 0 === a && (a = c), Kinetic.Util._radToDeg(a) + }) + }), + (Kinetic.Node.addColorRGBSetter = function(a, b) { + var c = f + Kinetic.Util._capitalize(b) + s + a.prototype[c] = function(a) { + var c = a && void 0 !== a.r ? 0 | a.r : this.getAttr(b + x), + d = a && void 0 !== a.g ? 0 | a.g : this.getAttr(b + y), + e = a && void 0 !== a.b ? 0 | a.b : this.getAttr(b + z) + this._setAttr(b, A + Kinetic.Util._rgbToHex(c, d, e)) + } + }), + (Kinetic.Node.addColorComponentSetter = function(a, b, c) { + var d = f + Kinetic.Util._capitalize(b), + e = d + Kinetic.Util._capitalize(c) + a.prototype[e] = function(a) { + var b = {} + ;(b[c] = a), this[d + s](b) + } + }), + (Kinetic.Node.addPointsSetter = function(a, b) { + var c = f + Kinetic.Util._capitalize(b) + a.prototype[c] = function(a) { + var b = Kinetic.Util._getPoints(a) + this._setAttr('points', b) + } + }), + (Kinetic.Node.addSetter = function(a, b, c) { + var d = f + Kinetic.Util._capitalize(b) + a.prototype[d] = function(a) { + this._setAttr(b, a), c && (this.cachedTransform = null) + } + }), + (Kinetic.Node.addPointSetter = function(a, b) { + var c = f + Kinetic.Util._capitalize(b) + a.prototype[c] = function() { + var a = Kinetic.Util._getXY([].slice.call(arguments)), + d = this.attrs[b], + e = 0, + f = 0 + a && + ((e = a.x), + (f = a.y), + this._fireBeforeChangeEvent(b, d, a), + void 0 !== e && this[c + i](e), + void 0 !== f && this[c + j](f), + this._fireChangeEvent(b, d, a)) + } + }), + (Kinetic.Node.addRotationSetter = function(a, b, c) { + var d = f + Kinetic.Util._capitalize(b) + ;(a.prototype[d] = function(a) { + this._setAttr(b, a), c && (this.cachedTransform = null) + }), + (a.prototype[d + r] = function(a) { + this._setAttr(b, Kinetic.Util._degToRad(a)), c && (this.cachedTransform = null) + }) + }), + (Kinetic.Node.addPointAdder = function(b, c) { + var d = a + Kinetic.Util._removeLastLetter(Kinetic.Util._capitalize(c)) + b.prototype[d] = function() { + var a = Kinetic.Util._getXY([].slice.call(arguments)), + b = this.attrs[c] + a && + (this._fireBeforeChangeEvent(c, b, a), + this.attrs[c].push(a), + this._fireChangeEvent(c, b, a)) + } + }), + (Kinetic.Node.create = function(a, b) { + return this._createNode(JSON.parse(a), b) + }), + (Kinetic.Node._createNode = function(a, b) { + var c, + d, + e, + f = Kinetic.Node.prototype.getClassName.call(a), + g = a.children + if ((b && (a.attrs.container = b), (c = new Kinetic[f](a.attrs)), g)) + for (d = g.length, e = 0; d > e; e++) c.add(this._createNode(g[e])) + return c + }), + Kinetic.Node.addGetterSetter(Kinetic.Node, 'x', 0, !0), + Kinetic.Node.addGetterSetter(Kinetic.Node, 'y', 0, !0), + Kinetic.Node.addGetterSetter(Kinetic.Node, 'opacity', 1), + Kinetic.Node.addGetter(Kinetic.Node, 'name'), + Kinetic.Node.addGetter(Kinetic.Node, 'id'), + Kinetic.Node.addRotationGetterSetter(Kinetic.Node, 'rotation', 0, !0), + Kinetic.Node.addPointGetterSetter(Kinetic.Node, 'scale', 1, !0), + Kinetic.Node.addPointGetterSetter(Kinetic.Node, 'skew', 0, !0), + Kinetic.Node.addPointGetterSetter(Kinetic.Node, 'offset', 0, !0), + Kinetic.Node.addSetter(Kinetic.Node, 'width'), + Kinetic.Node.addSetter(Kinetic.Node, 'height'), + Kinetic.Node.addGetterSetter(Kinetic.Node, 'listening', !0), + Kinetic.Node.addSetter(Kinetic.Node, 'visible'), + (Kinetic.Node.prototype.isListening = Kinetic.Node.prototype.getListening), + (Kinetic.Node.prototype.isVisible = Kinetic.Node.prototype.getVisible), + Kinetic.Collection.mapMethods([ + 'on', + 'off', + 'remove', + 'destroy', + 'show', + 'hide', + 'move', + 'rotate', + 'moveToTop', + 'moveUp', + 'moveDown', + 'moveToBottom', + 'moveTo', + 'fire', + 'draw' + ]) + })(), + (function() { + function a(a) { + window.setTimeout(a, 1e3 / 60) + } + var b = 500 + ;(Kinetic.Animation = function(a, b) { + ;(this.func = a), + this.setLayers(b), + (this.id = Kinetic.Animation.animIdCounter++), + (this.frame = { time: 0, timeDiff: 0, lastTime: new Date().getTime() }) + }), + (Kinetic.Animation.prototype = { + setLayers: function(a) { + var b = [] + ;(b = a ? (a.length > 0 ? a : [a]) : []), (this.layers = b) + }, + getLayers: function() { + return this.layers + }, + addLayer: function(a) { + var b, + c, + d = this.layers + if (d) { + for (b = d.length, c = 0; b > c; c++) if (d[c]._id === a._id) return !1 + } else this.layers = [] + return this.layers.push(a), !0 + }, + isRunning: function() { + for (var a = Kinetic.Animation, b = a.animations, c = 0; c < b.length; c++) + if (b[c].id === this.id) return !0 + return !1 + }, + start: function() { + this.stop(), + (this.frame.timeDiff = 0), + (this.frame.lastTime = new Date().getTime()), + Kinetic.Animation._addAnimation(this) + }, + stop: function() { + Kinetic.Animation._removeAnimation(this) + }, + _updateFrameObject: function(a) { + ;(this.frame.timeDiff = a - this.frame.lastTime), + (this.frame.lastTime = a), + (this.frame.time += this.frame.timeDiff), + (this.frame.frameRate = 1e3 / this.frame.timeDiff) + } + }), + (Kinetic.Animation.animations = []), + (Kinetic.Animation.animIdCounter = 0), + (Kinetic.Animation.animRunning = !1), + (Kinetic.Animation._addAnimation = function(a) { + this.animations.push(a), this._handleAnimation() + }), + (Kinetic.Animation._removeAnimation = function(a) { + for (var b = a.id, c = this.animations, d = c.length, e = 0; d > e; e++) + if (c[e].id === b) { + this.animations.splice(e, 1) + break + } + }), + (Kinetic.Animation._runFrames = function() { + var a, + b, + c, + d, + e, + f, + g, + h, + i = {}, + j = this.animations + for (d = 0; d < j.length; d++) { + for ( + a = j[d], + b = a.layers, + c = a.func, + a._updateFrameObject(new Date().getTime()), + f = b.length, + e = 0; + f > e; + e++ + ) + (g = b[e]), void 0 !== g._id && (i[g._id] = g) + c && c.call(a, a.frame) + } + for (h in i) i[h].draw() + }), + (Kinetic.Animation._animationLoop = function() { + var a = this + this.animations.length > 0 + ? (this._runFrames(), + Kinetic.Animation.requestAnimFrame(function() { + a._animationLoop() + })) + : (this.animRunning = !1) + }), + (Kinetic.Animation._handleAnimation = function() { + var a = this + this.animRunning || ((this.animRunning = !0), a._animationLoop()) + }), + (RAF = (function() { + return ( + window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + a + ) + })()), + (Kinetic.Animation.requestAnimFrame = function(b) { + var c = Kinetic.DD && Kinetic.DD.isDragging ? a : RAF + c(b) + }) + var c = Kinetic.Node.prototype.moveTo + ;(Kinetic.Node.prototype.moveTo = function(a) { + c.call(this, a) + }), + (Kinetic.Layer.prototype.batchDraw = function() { + var a = this + this.batchAnim || + (this.batchAnim = new Kinetic.Animation(function() { + a.lastBatchDrawTime && + new Date().getTime() - a.lastBatchDrawTime > b && + a.batchAnim.stop() + }, this)), + (this.lastBatchDrawTime = new Date().getTime()), + this.batchAnim.isRunning() || (this.draw(), this.batchAnim.start()) + }), + (Kinetic.Stage.prototype.batchDraw = function() { + this.getChildren().each(function(a) { + a.batchDraw() + }) + }) + })(), + (function() { + var a = { node: 1, duration: 1, easing: 1, onFinish: 1, yoyo: 1 }, + b = 1, + c = 2, + d = 3, + e = 0 + ;(Kinetic.Tween = function(b) { + var c, + d = this, + g = b.node, + h = g._id, + i = b.duration || 1, + j = b.easing || Kinetic.Easings.Linear, + k = !!b.yoyo + ;(this.node = g), + (this._id = e++), + (this.anim = new Kinetic.Animation(function() { + d.tween.onEnterFrame() + }, g.getLayer() || g.getLayers())), + (this.tween = new f( + c, + function(a) { + d._tweenFunc(a) + }, + j, + 0, + 1, + 1e3 * i, + k + )), + this._addListeners(), + Kinetic.Tween.attrs[h] || (Kinetic.Tween.attrs[h] = {}), + Kinetic.Tween.attrs[h][this._id] || (Kinetic.Tween.attrs[h][this._id] = {}), + Kinetic.Tween.tweens[h] || (Kinetic.Tween.tweens[h] = {}) + for (c in b) void 0 === a[c] && this._addAttr(c, b[c]) + this.reset(), (this.onFinish = b.onFinish), (this.onReset = b.onReset) + }), + (Kinetic.Tween.attrs = {}), + (Kinetic.Tween.tweens = {}), + (Kinetic.Tween.prototype = { + _addAttr: function(a, b) { + var c, + d, + e, + f, + g, + h, + i, + j = this.node, + k = j._id + if ( + ((e = Kinetic.Tween.tweens[k][a]), + e && delete Kinetic.Tween.attrs[k][e][a], + (c = j.getAttr(a)), + Kinetic.Util._isArray(b)) + ) + for (b = Kinetic.Util._getPoints(b), d = [], g = b.length, f = 0; g > f; f++) + (h = c[f]), (i = b[f]), d.push({ x: i.x - h.x, y: i.y - h.y }) + else d = b - c + ;(Kinetic.Tween.attrs[k][this._id][a] = { start: c, diff: d }), + (Kinetic.Tween.tweens[k][a] = this._id) + }, + _tweenFunc: function(a) { + var b, + c, + d, + e, + f, + g, + h, + i, + j, + k = this.node, + l = Kinetic.Tween.attrs[k._id][this._id] + for (b in l) { + if (((c = l[b]), (d = c.start), (e = c.diff), Kinetic.Util._isArray(d))) + for (f = [], h = d.length, g = 0; h > g; g++) + (i = d[g]), (j = e[g]), f.push({ x: i.x + j.x * a, y: i.y + j.y * a }) + else f = d + e * a + k.setAttr(b, f) + } + }, + _addListeners: function() { + var a = this + ;(this.tween.onPlay = function() { + a.anim.start() + }), + (this.tween.onReverse = function() { + a.anim.start() + }), + (this.tween.onPause = function() { + a.anim.stop() + }), + (this.tween.onFinish = function() { + a.onFinish && a.onFinish() + }), + (this.tween.onReset = function() { + a.onReset && a.onReset() + }) + }, + play: function() { + return this.tween.play(), this + }, + reverse: function() { + return this.tween.reverse(), this + }, + reset: function() { + var a = this.node + return this.tween.reset(), (a.getLayer() || a.getLayers()).draw(), this + }, + seek: function(a) { + var b = this.node + return this.tween.seek(1e3 * a), (b.getLayer() || b.getLayers()).draw(), this + }, + pause: function() { + return this.tween.pause(), this + }, + finish: function() { + var a = this.node + return this.tween.finish(), (a.getLayer() || a.getLayers()).draw(), this + }, + destroy: function() { + var a, + b = this.node._id, + c = this._id, + d = Kinetic.Tween.tweens[b] + this.pause() + for (a in d) delete Kinetic.Tween.tweens[b][a] + delete Kinetic.Tween.attrs[b][c] + } + }) + var f = function(a, b, c, d, e, f, g) { + ;(this.prop = a), + (this.propFunc = b), + (this.begin = d), + (this._pos = d), + (this.duration = f), + (this._change = 0), + (this.prevPos = 0), + (this.yoyo = g), + (this._time = 0), + (this._position = 0), + (this._startTime = 0), + (this._finish = 0), + (this.func = c), + (this._change = e - this.begin), + this.pause() + } + ;(f.prototype = { + fire: function(a) { + var b = this[a] + b && b() + }, + setTime: function(a) { + a > this.duration + ? this.yoyo + ? ((this._time = this.duration), this.reverse()) + : this.finish() + : 0 > a + ? this.yoyo + ? ((this._time = 0), this.play()) + : this.reset() + : ((this._time = a), this.update()) + }, + getTime: function() { + return this._time + }, + setPosition: function(a) { + ;(this.prevPos = this._pos), this.propFunc(a), (this._pos = a) + }, + getPosition: function(a) { + return ( + void 0 === a && (a = this._time), this.func(a, this.begin, this._change, this.duration) + ) + }, + play: function() { + ;(this.state = c), + (this._startTime = this.getTimer() - this._time), + this.onEnterFrame(), + this.fire('onPlay') + }, + reverse: function() { + ;(this.state = d), + (this._time = this.duration - this._time), + (this._startTime = this.getTimer() - this._time), + this.onEnterFrame(), + this.fire('onReverse') + }, + seek: function(a) { + this.pause(), (this._time = a), this.update(), this.fire('onSeek') + }, + reset: function() { + this.pause(), (this._time = 0), this.update(), this.fire('onReset') + }, + finish: function() { + this.pause(), (this._time = this.duration), this.update(), this.fire('onFinish') + }, + update: function() { + this.setPosition(this.getPosition(this._time)) + }, + onEnterFrame: function() { + var a = this.getTimer() - this._startTime + this.state === c ? this.setTime(a) : this.state === d && this.setTime(this.duration - a) + }, + pause: function() { + ;(this.state = b), this.fire('onPause') + }, + getTimer: function() { + return new Date().getTime() + } + }), + (Kinetic.Easings = { + BackEaseIn: function(a, b, c, d) { + var e = 1.70158 + return c * (a /= d) * a * ((e + 1) * a - e) + b + }, + BackEaseOut: function(a, b, c, d) { + var e = 1.70158 + return c * ((a = a / d - 1) * a * ((e + 1) * a + e) + 1) + b + }, + BackEaseInOut: function(a, b, c, d) { + var e = 1.70158 + return (a /= d / 2) < 1 + ? c / 2 * a * a * (((e *= 1.525) + 1) * a - e) + b + : c / 2 * ((a -= 2) * a * (((e *= 1.525) + 1) * a + e) + 2) + b + }, + ElasticEaseIn: function(a, b, c, d, e, f) { + var g = 0 + return 0 === a + ? b + : 1 == (a /= d) + ? b + c + : (f || (f = 0.3 * d), + !e || e < Math.abs(c) + ? ((e = c), (g = f / 4)) + : (g = f / (2 * Math.PI) * Math.asin(c / e)), + -(e * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * d - g) * 2 * Math.PI / f)) + b) + }, + ElasticEaseOut: function(a, b, c, d, e, f) { + var g = 0 + return 0 === a + ? b + : 1 == (a /= d) + ? b + c + : (f || (f = 0.3 * d), + !e || e < Math.abs(c) + ? ((e = c), (g = f / 4)) + : (g = f / (2 * Math.PI) * Math.asin(c / e)), + e * Math.pow(2, -10 * a) * Math.sin((a * d - g) * 2 * Math.PI / f) + c + b) + }, + ElasticEaseInOut: function(a, b, c, d, e, f) { + var g = 0 + return 0 === a + ? b + : 2 == (a /= d / 2) + ? b + c + : (f || (f = d * 0.3 * 1.5), + !e || e < Math.abs(c) + ? ((e = c), (g = f / 4)) + : (g = f / (2 * Math.PI) * Math.asin(c / e)), + 1 > a + ? -0.5 * + e * + Math.pow(2, 10 * (a -= 1)) * + Math.sin((a * d - g) * 2 * Math.PI / f) + + b + : 0.5 * + e * + Math.pow(2, -10 * (a -= 1)) * + Math.sin((a * d - g) * 2 * Math.PI / f) + + c + + b) + }, + BounceEaseOut: function(a, b, c, d) { + return (a /= d) < 1 / 2.75 + ? c * 7.5625 * a * a + b + : 2 / 2.75 > a + ? c * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + b + : 2.5 / 2.75 > a + ? c * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + b + : c * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + b + }, + BounceEaseIn: function(a, b, c, d) { + return c - Kinetic.Easings.BounceEaseOut(d - a, 0, c, d) + b + }, + BounceEaseInOut: function(a, b, c, d) { + return d / 2 > a + ? 0.5 * Kinetic.Easings.BounceEaseIn(2 * a, 0, c, d) + b + : 0.5 * Kinetic.Easings.BounceEaseOut(2 * a - d, 0, c, d) + 0.5 * c + b + }, + EaseIn: function(a, b, c, d) { + return c * (a /= d) * a + b + }, + EaseOut: function(a, b, c, d) { + return -c * (a /= d) * (a - 2) + b + }, + EaseInOut: function(a, b, c, d) { + return (a /= d / 2) < 1 ? c / 2 * a * a + b : -c / 2 * (--a * (a - 2) - 1) + b + }, + StrongEaseIn: function(a, b, c, d) { + return c * (a /= d) * a * a * a * a + b + }, + StrongEaseOut: function(a, b, c, d) { + return c * ((a = a / d - 1) * a * a * a * a + 1) + b + }, + StrongEaseInOut: function(a, b, c, d) { + return (a /= d / 2) < 1 + ? c / 2 * a * a * a * a * a + b + : c / 2 * ((a -= 2) * a * a * a * a + 2) + b + }, + Linear: function(a, b, c, d) { + return c * a / d + b + } + }) + })(), + (function() { + ;(Kinetic.DD = { + anim: new Kinetic.Animation(), + isDragging: !1, + offset: { x: 0, y: 0 }, + node: null, + _drag: function(a) { + var b = Kinetic.DD, + c = b.node + if (c) { + var d = c.getStage().getPointerPosition(), + e = c.getDragBoundFunc(), + f = { x: d.x - b.offset.x, y: d.y - b.offset.y } + void 0 !== e && (f = e.call(c, f, a)), + c.setAbsolutePosition(f), + b.isDragging || ((b.isDragging = !0), c.fire('dragstart', a, !0)), + c.fire('dragmove', a, !0) + } + }, + _endDragBefore: function(a) { + var b, + c, + d = Kinetic.DD, + e = Kinetic.Global, + f = d.node + f && + ((b = f.nodeType), + (c = f.getLayer()), + d.anim.stop(), + d.isDragging && ((d.isDragging = !1), (e.listenClickTap = !1), a && (a.dragEndNode = f)), + delete d.node, + (c || f).draw()) + }, + _endDragAfter: function(a) { + a = a || {} + var b = a.dragEndNode + a && b && b.fire('dragend', a, !0) + } + }), + (Kinetic.Node.prototype.startDrag = function() { + var a = Kinetic.DD, + b = this.getStage(), + c = this.getLayer(), + d = b.getPointerPosition(), + e = (this.getTransform().getTranslation(), this.getAbsolutePosition()) + d && + (a.node && a.node.stopDrag(), + (a.node = this), + (a.offset.x = d.x - e.x), + (a.offset.y = d.y - e.y), + a.anim.setLayers(c || this.getLayers()), + a.anim.start()) + }), + (Kinetic.Node.prototype.stopDrag = function() { + var a = Kinetic.DD, + b = {} + a._endDragBefore(b), a._endDragAfter(b) + }), + (Kinetic.Node.prototype.setDraggable = function(a) { + this._setAttr('draggable', a), this._dragChange() + }) + var a = Kinetic.Node.prototype.destroy + ;(Kinetic.Node.prototype.destroy = function() { + var b = Kinetic.DD + b.node && b.node._id === this._id && this.stopDrag(), a.call(this) + }), + (Kinetic.Node.prototype.isDragging = function() { + var a = Kinetic.DD + return a.node && a.node._id === this._id && a.isDragging + }), + (Kinetic.Node.prototype._listenDrag = function() { + this._dragCleanup() + var a = this + this.on('mousedown.kinetic touchstart.kinetic', function(b) { + Kinetic.DD.node || a.startDrag(b) + }) + }), + (Kinetic.Node.prototype._dragChange = function() { + if (this.attrs.draggable) this._listenDrag() + else { + this._dragCleanup() + var a = this.getStage(), + b = Kinetic.DD + a && b.node && b.node._id === this._id && b.node.stopDrag() + } + }), + (Kinetic.Node.prototype._dragCleanup = function() { + this.off('mousedown.kinetic'), this.off('touchstart.kinetic') + }), + Kinetic.Node.addGetterSetter(Kinetic.Node, 'dragBoundFunc'), + Kinetic.Node.addGetter(Kinetic.Node, 'draggable', !1), + (Kinetic.Node.prototype.isDraggable = Kinetic.Node.prototype.getDraggable) + var b = document.getElementsByTagName('html')[0] + b.addEventListener('mouseup', Kinetic.DD._endDragBefore, !0), + b.addEventListener('touchend', Kinetic.DD._endDragBefore, !0), + b.addEventListener('mouseup', Kinetic.DD._endDragAfter, !1), + b.addEventListener('touchend', Kinetic.DD._endDragAfter, !1) + })(), + (function() { + Kinetic.Util.addMethods(Kinetic.Container, { + __init: function(a) { + ;(this.children = new Kinetic.Collection()), Kinetic.Node.call(this, a) + }, + getChildren: function() { + return this.children + }, + hasChildren: function() { + return this.getChildren().length > 0 + }, + removeChildren: function() { + for (var a, b = this.children; b.length > 0; ) + (a = b[0]), a.hasChildren() && a.removeChildren(), a.remove() + return this + }, + destroyChildren: function() { + for (var a = this.children; a.length > 0; ) a[0].destroy() + return this + }, + add: function(a) { + var b = (Kinetic.Global, this.children) + return ( + this._validateAdd(a), + (a.index = b.length), + (a.parent = this), + b.push(a), + this._fire('add', { child: a }), + this + ) + }, + destroy: function() { + this.hasChildren() && this.destroyChildren(), Kinetic.Node.prototype.destroy.call(this) + }, + get: function(a) { + var b, + c, + d, + e, + f, + g, + h, + i = [], + j = a.replace(/ /g, '').split(','), + k = j.length + for (b = 0; k > b; b++) + if (((d = j[b]), '#' === d.charAt(0))) (f = this._getNodeById(d.slice(1))), f && i.push(f) + else if ('.' === d.charAt(0)) (e = this._getNodesByName(d.slice(1))), (i = i.concat(e)) + else + for (g = this.getChildren(), h = g.length, c = 0; h > c; c++) i = i.concat(g[c]._get(d)) + return Kinetic.Collection.toCollection(i) + }, + _getNodeById: function(a) { + var b = (this.getStage(), Kinetic.Global), + c = b.ids[a] + return void 0 !== c && this.isAncestorOf(c) ? c : null + }, + _getNodesByName: function(a) { + var b = Kinetic.Global, + c = b.names[a] || [] + return this._getDescendants(c) + }, + _get: function(a) { + for ( + var b = Kinetic.Node.prototype._get.call(this, a), + c = this.getChildren(), + d = c.length, + e = 0; + d > e; + e++ + ) + b = b.concat(c[e]._get(a)) + return b + }, + toObject: function() { + var a = Kinetic.Node.prototype.toObject.call(this) + a.children = [] + for (var b = this.getChildren(), c = b.length, d = 0; c > d; d++) { + var e = b[d] + a.children.push(e.toObject()) + } + return a + }, + _getDescendants: function(a) { + for (var b = [], c = a.length, d = 0; c > d; d++) { + var e = a[d] + this.isAncestorOf(e) && b.push(e) + } + return b + }, + isAncestorOf: function(a) { + for (var b = a.getParent(); b; ) { + if (b._id === this._id) return !0 + b = b.getParent() + } + return !1 + }, + clone: function(a) { + var b = Kinetic.Node.prototype.clone.call(this, a) + return ( + this.getChildren().each(function(a) { + b.add(a.clone()) + }), + b + ) + }, + getAllIntersections: function() { + for ( + var a = Kinetic.Util._getXY(Array.prototype.slice.call(arguments)), + b = [], + c = this.get('Shape'), + d = c.length, + e = 0; + d > e; + e++ + ) { + var f = c[e] + f.isVisible() && f.intersects(a) && b.push(f) + } + return b + }, + _setChildrenIndices: function() { + for (var a = this.children, b = a.length, c = 0; b > c; c++) a[c].index = c + }, + drawScene: function(a) { + var b, + c, + d, + e = this.getLayer(), + f = !!this.getClipFunc() + if ((!a && e && (a = e.getCanvas()), this.isVisible())) { + for (f && a._clip(this), b = this.children, d = b.length, c = 0; d > c; c++) + b[c].drawScene(a) + f && a.getContext().restore() + } + return this + }, + drawHit: function() { + var a, + b = !!this.getClipFunc() && 'Stage' !== this.nodeType, + c = 0, + d = 0, + e = [] + if (this.shouldDrawHit()) { + for ( + b && ((a = this.getLayer().hitCanvas), a._clip(this)), + e = this.children, + d = e.length, + c = 0; + d > c; + c++ + ) + e[c].drawHit() + b && a.getContext().restore() + } + return this + } + }), + Kinetic.Util.extend(Kinetic.Container, Kinetic.Node), + Kinetic.Node.addGetterSetter(Kinetic.Container, 'clipFunc') + })(), + (function() { + function a(a) { + a.fill() + } + function b(a) { + a.stroke() + } + function c(a) { + a.fill() + } + function d(a) { + a.stroke() + } + var e = 'beforeDraw', + f = 'draw' + Kinetic.Util.addMethods(Kinetic.Shape, { + __init: function(e) { + ;(this.nodeType = 'Shape'), + (this._fillFunc = a), + (this._strokeFunc = b), + (this._fillFuncHit = c), + (this._strokeFuncHit = d) + for (var f, g = Kinetic.Global.shapes; ; ) + if (((f = Kinetic.Util.getRandomColor()), f && !(f in g))) break + ;(this.colorKey = f), (g[f] = this), Kinetic.Node.call(this, e), this._setDrawFuncs() + }, + hasChildren: function() { + return !1 + }, + getChildren: function() { + return [] + }, + getContext: function() { + return this.getLayer().getContext() + }, + getCanvas: function() { + return this.getLayer().getCanvas() + }, + hasShadow: function() { + return ( + 0 !== this.getShadowOpacity() && + !!( + this.getShadowColor() || + this.getShadowBlur() || + this.getShadowOffsetX() || + this.getShadowOffsetY() + ) + ) + }, + hasFill: function() { + return !!( + this.getFill() || + this.getFillPatternImage() || + this.getFillLinearGradientColorStops() || + this.getFillRadialGradientColorStops() + ) + }, + _get: function(a) { + return this.className === a || this.nodeType === a ? [this] : [] + }, + intersects: function() { + var a = Kinetic.Util._getXY(Array.prototype.slice.call(arguments)), + b = this.getStage(), + c = b.hitCanvas + c.clear(), this.drawScene(c) + var d = c.context.getImageData(0 | a.x, 0 | a.y, 1, 1).data + return d[3] > 0 + }, + enableFill: function() { + return this._setAttr('fillEnabled', !0), this + }, + disableFill: function() { + return this._setAttr('fillEnabled', !1), this + }, + enableStroke: function() { + return this._setAttr('strokeEnabled', !0), this + }, + disableStroke: function() { + return this._setAttr('strokeEnabled', !1), this + }, + enableStrokeScale: function() { + return this._setAttr('strokeScaleEnabled', !0), this + }, + disableStrokeScale: function() { + return this._setAttr('strokeScaleEnabled', !1), this + }, + enableShadow: function() { + return this._setAttr('shadowEnabled', !0), this + }, + disableShadow: function() { + return this._setAttr('shadowEnabled', !1), this + }, + enableDashArray: function() { + return this._setAttr('dashArrayEnabled', !0), this + }, + disableDashArray: function() { + return this._setAttr('dashArrayEnabled', !1), this + }, + destroy: function() { + return ( + Kinetic.Node.prototype.destroy.call(this), + delete Kinetic.Global.shapes[this.colorKey], + this + ) + }, + drawScene: function(a) { + a = a || this.getLayer().getCanvas() + var b = this.getDrawFunc(), + c = a.getContext() + return ( + b && + this.isVisible() && + (c.save(), + a._applyOpacity(this), + a._applyLineJoin(this), + a._applyAncestorTransforms(this), + this._fireBeforeDrawEvents(), + b.call(this, a), + this._fireDrawEvents(), + c.restore()), + this + ) + }, + _fireBeforeDrawEvents: function() { + this._fireAndBubble(e, { node: this }) + }, + _fireDrawEvents: function() { + this._fireAndBubble(f, { node: this }) + }, + drawHit: function() { + var a = this.getAttrs(), + b = a.drawHitFunc || a.drawFunc, + c = this.getLayer().hitCanvas, + d = c.getContext() + return ( + b && + this.shouldDrawHit() && + (d.save(), + c._applyLineJoin(this), + c._applyAncestorTransforms(this), + b.call(this, c), + d.restore()), + this + ) + }, + _setDrawFuncs: function() { + !this.attrs.drawFunc && this.drawFunc && this.setDrawFunc(this.drawFunc), + !this.attrs.drawHitFunc && this.drawHitFunc && this.setDrawHitFunc(this.drawHitFunc) + } + }), + Kinetic.Util.extend(Kinetic.Shape, Kinetic.Node), + Kinetic.Node.addColorGetterSetter(Kinetic.Shape, 'stroke'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'lineJoin'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'lineCap'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'strokeWidth'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'drawFunc'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'drawHitFunc'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'dashArray'), + Kinetic.Node.addColorGetterSetter(Kinetic.Shape, 'shadowColor'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'shadowBlur'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'shadowOpacity'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternImage'), + Kinetic.Node.addColorGetterSetter(Kinetic.Shape, 'fill'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternX'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternY'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillLinearGradientColorStops'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillRadialGradientStartRadius'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillRadialGradientEndRadius'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillRadialGradientColorStops'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPatternRepeat'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillEnabled', !0), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'strokeEnabled', !0), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'shadowEnabled', !0), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'dashArrayEnabled', !0), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'fillPriority', 'color'), + Kinetic.Node.addGetterSetter(Kinetic.Shape, 'strokeScaleEnabled', !0), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillPatternOffset', 0), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillPatternScale', 1), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillLinearGradientStartPoint', 0), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillLinearGradientEndPoint', 0), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillRadialGradientStartPoint', 0), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'fillRadialGradientEndPoint', 0), + Kinetic.Node.addPointGetterSetter(Kinetic.Shape, 'shadowOffset', 0), + Kinetic.Node.addRotationGetterSetter(Kinetic.Shape, 'fillPatternRotation', 0) + })(), + (function() { + function a(a, b) { + a.content.addEventListener( + b, + function(c) { + a[x + b](c) + }, + !1 + ) + } + var b = 'Stage', + c = 'string', + d = 'px', + e = 'mouseout', + f = 'mouseleave', + g = 'mouseover', + h = 'mouseenter', + i = 'mousemove', + j = 'mousedown', + k = 'mouseup', + l = 'click', + m = 'dblclick', + n = 'touchstart', + o = 'touchend', + p = 'tap', + q = 'dbltap', + r = 'touchmove', + s = 'div', + t = 'relative', + u = 'inline-block', + v = 'kineticjs-content', + w = ' ', + x = '_', + y = 'container', + z = '', + A = [j, i, k, e, n, r, o, g], + B = A.length + Kinetic.Util.addMethods(Kinetic.Stage, { + ___init: function(a) { + Kinetic.Container.call(this, a), + (this.nodeType = b), + (this._id = Kinetic.Global.idCounter++), + this._buildDOM(), + this._bindContentEvents(), + Kinetic.Global.stages.push(this) + }, + _validateAdd: function(a) { + 'Layer' !== a.getType() && Kinetic.Util.error('You may only add layers to the stage.') + }, + setContainer: function(a) { + return typeof a === c && (a = document.getElementById(a)), this._setAttr(y, a), this + }, + draw: function() { + return Kinetic.Node.prototype.draw.call(this), this + }, + setHeight: function(a) { + return Kinetic.Node.prototype.setHeight.call(this, a), this._resizeDOM(), this + }, + setWidth: function(a) { + return Kinetic.Node.prototype.setWidth.call(this, a), this._resizeDOM(), this + }, + clear: function() { + var a, + b = this.children, + c = b.length + for (a = 0; c > a; a++) b[a].clear() + return this + }, + destroy: function() { + var a = this.content + Kinetic.Container.prototype.destroy.call(this), + a && Kinetic.Util._isInDocument(a) && this.getContainer().removeChild(a) + }, + getMousePosition: function() { + return this.mousePos + }, + getTouchPosition: function() { + return this.touchPos + }, + getPointerPosition: function() { + return this.getTouchPosition() || this.getMousePosition() + }, + getStage: function() { + return this + }, + getContent: function() { + return this.content + }, + toDataURL: function(a) { + function b(e) { + var f = i[e], + j = f.toDataURL(), + k = new Image() + ;(k.onload = function() { + h.drawImage(k, 0, 0), e < i.length - 1 ? b(e + 1) : a.callback(g.toDataURL(c, d)) + }), + (k.src = j) + } + a = a || {} + var c = a.mimeType || null, + d = a.quality || null, + e = a.x || 0, + f = a.y || 0, + g = new Kinetic.SceneCanvas({ + width: a.width || this.getWidth(), + height: a.height || this.getHeight(), + pixelRatio: 1 + }), + h = g.getContext(), + i = this.children + ;(e || f) && h.translate(-1 * e, -1 * f), b(0) + }, + toImage: function(a) { + var b = a.callback + ;(a.callback = function(a) { + Kinetic.Util._getImage(a, function(a) { + b(a) + }) + }), + this.toDataURL(a) + }, + getIntersection: function() { + var a, + b, + c = Kinetic.Util._getXY(Array.prototype.slice.call(arguments)), + d = this.getChildren(), + e = d.length, + f = e - 1 + for (a = f; a >= 0; a--) if ((b = d[a].getIntersection(c))) return b + return null + }, + _resizeDOM: function() { + if (this.content) { + var a, + b, + c = this.getWidth(), + e = this.getHeight(), + f = this.getChildren(), + g = f.length + for ( + this.content.style.width = c + d, + this.content.style.height = e + d, + this.bufferCanvas.setSize(c, e, 1), + this.hitCanvas.setSize(c, e), + a = 0; + g > a; + a++ + ) + (b = f[a]), b.getCanvas().setSize(c, e), b.hitCanvas.setSize(c, e), b.draw() + } + }, + add: function(a) { + return ( + Kinetic.Container.prototype.add.call(this, a), + a.canvas.setSize(this.attrs.width, this.attrs.height), + a.hitCanvas.setSize(this.attrs.width, this.attrs.height), + a.draw(), + this.content.appendChild(a.canvas.element), + this + ) + }, + getParent: function() { + return null + }, + getLayer: function() { + return null + }, + getLayers: function() { + return this.getChildren() + }, + _setPointerPosition: function(a) { + a || (a = window.event), this._setMousePosition(a), this._setTouchPosition(a) + }, + _bindContentEvents: function() { + var b + for (b = 0; B > b; b++) a(this, A[b]) + }, + _mouseover: function(a) { + this._fire(g, a) + }, + _mouseout: function(a) { + this._setPointerPosition(a) + var b = Kinetic.Global, + c = this.targetShape + c && + !b.isDragging() && + (c._fireAndBubble(e, a), c._fireAndBubble(f, a), (this.targetShape = null)), + (this.mousePos = void 0), + this._fire(e, a) + }, + _mousemove: function(a) { + this._setPointerPosition(a) + var b, + c = Kinetic.Global, + d = Kinetic.DD, + j = this.getIntersection(this.getPointerPosition()) + j + ? ((b = j.shape), + b && + (c.isDragging() || + 255 !== j.pixel[3] || + (this.targetShape && this.targetShape._id === b._id) + ? b._fireAndBubble(i, a) + : (b._fireAndBubble(g, a, this.targetShape), + b._fireAndBubble(h, a, this.targetShape), + this.targetShape && + (this.targetShape._fireAndBubble(e, a, b), + this.targetShape._fireAndBubble(f, a, b)), + (this.targetShape = b)))) + : (this._fire(i, a), + this.targetShape && + !c.isDragging() && + (this.targetShape._fireAndBubble(e, a), + this.targetShape._fireAndBubble(f, a), + (this.targetShape = null))), + d && d._drag(a), + a.preventDefault && a.preventDefault() + }, + _mousedown: function(a) { + this._setPointerPosition(a) + var b = Kinetic.Global, + c = this.getIntersection(this.getPointerPosition()), + d = c && c.shape ? c.shape : this + ;(b.listenClickTap = !0), + (this.clickStartShape = d), + d._fireAndBubble(j, a), + a.preventDefault && a.preventDefault() + }, + _mouseup: function(a) { + this._setPointerPosition(a) + var b = Kinetic.Global, + c = this.getIntersection(this.getPointerPosition()), + d = c && c.shape ? c.shape : this + d._fireAndBubble(k, a), + b.listenClickTap && + d._id === this.clickStartShape._id && + (d._fireAndBubble(l, a), + b.inDblClickWindow + ? (d._fireAndBubble(m, a), (b.inDblClickWindow = !1)) + : (b.inDblClickWindow = !0), + setTimeout(function() { + b.inDblClickWindow = !1 + }, b.dblClickWindow)), + (b.listenClickTap = !1), + a.preventDefault && a.preventDefault() + }, + _touchstart: function(a) { + this._setPointerPosition(a) + var b = Kinetic.Global, + c = this.getIntersection(this.getPointerPosition()), + d = c && c.shape ? c.shape : this + ;(b.listenClickTap = !0), + (this.tapStartShape = d), + d._fireAndBubble(n, a), + d.isListening() && a.preventDefault && a.preventDefault() + }, + _touchend: function(a) { + this._setPointerPosition(a) + var b = Kinetic.Global, + c = this.getIntersection(this.getPointerPosition()), + d = c && c.shape ? c.shape : this + d._fireAndBubble(o, a), + b.listenClickTap && + d._id === this.tapStartShape._id && + (d._fireAndBubble(p, a), + b.inDblClickWindow + ? (d._fireAndBubble(q, a), (b.inDblClickWindow = !1)) + : (b.inDblClickWindow = !0), + setTimeout(function() { + b.inDblClickWindow = !1 + }, b.dblClickWindow)), + (b.listenClickTap = !1), + d.isListening() && a.preventDefault && a.preventDefault() + }, + _touchmove: function(a) { + this._setPointerPosition(a) + var b = Kinetic.DD, + c = this.getIntersection(this.getPointerPosition()), + d = c && c.shape ? c.shape : this + d._fireAndBubble(r, a), + b && b._drag(a), + d.isListening() && a.preventDefault && a.preventDefault() + }, + _setMousePosition: function(a) { + var b = a.clientX - this._getContentPosition().left, + c = a.clientY - this._getContentPosition().top + this.mousePos = { x: b, y: c } + }, + _setTouchPosition: function(a) { + var b, c, d + void 0 !== a.touches && + 1 === a.touches.length && + ((b = a.touches[0]), + (c = b.clientX - this._getContentPosition().left), + (d = b.clientY - this._getContentPosition().top), + (this.touchPos = { x: c, y: d })) + }, + _getContentPosition: function() { + var a = this.content.getBoundingClientRect() + return { top: a.top, left: a.left } + }, + _buildDOM: function() { + var a = this.getContainer() + ;(a.innerHTML = z), + (this.content = document.createElement(s)), + (this.content.style.position = t), + (this.content.style.display = u), + (this.content.className = v), + a.appendChild(this.content), + (this.bufferCanvas = new Kinetic.SceneCanvas()), + (this.hitCanvas = new Kinetic.HitCanvas()), + this._resizeDOM() + }, + _onContent: function(a, b) { + var c, + d, + e = a.split(w), + f = e.length + for (c = 0; f > c; c++) (d = e[c]), this.content.addEventListener(d, b, !1) + } + }), + Kinetic.Util.extend(Kinetic.Stage, Kinetic.Container), + Kinetic.Node.addGetter(Kinetic.Stage, 'container') + })(), + (function() { + var a = '#' + Kinetic.Util.addMethods(Kinetic.Layer, { + ___init: function(a) { + ;(this.nodeType = 'Layer'), + (this.canvas = new Kinetic.SceneCanvas()), + (this.hitCanvas = new Kinetic.HitCanvas()), + Kinetic.Container.call(this, a) + }, + _validateAdd: function(a) { + var b = a.getType() + 'Group' !== b && + 'Shape' !== b && + Kinetic.Util.error('You may only add groups and shapes to a layer.') + }, + getIntersection: function() { + var b, + c, + d, + e = Kinetic.Util._getXY(Array.prototype.slice.call(arguments)) + if (this.isVisible() && this.isListening()) { + if ( + ((b = this.hitCanvas.context.getImageData(0 | e.x, 0 | e.y, 1, 1).data), 255 === b[3]) + ) + return ( + (c = Kinetic.Util._rgbToHex(b[0], b[1], b[2])), + (d = Kinetic.Global.shapes[a + c]), + { shape: d, pixel: b } + ) + if (b[0] > 0 || b[1] > 0 || b[2] > 0 || b[3] > 0) return { pixel: b } + } + return null + }, + drawScene: function(a) { + return ( + (a = a || this.getCanvas()), + this.getClearBeforeDraw() && a.clear(), + Kinetic.Container.prototype.drawScene.call(this, a), + this + ) + }, + drawHit: function() { + var a = this.getLayer() + return ( + a && a.getClearBeforeDraw() && a.getHitCanvas().clear(), + Kinetic.Container.prototype.drawHit.call(this), + this + ) + }, + getCanvas: function() { + return this.canvas + }, + getHitCanvas: function() { + return this.hitCanvas + }, + getContext: function() { + return this.getCanvas().getContext() + }, + clear: function() { + return this.getCanvas().clear(), this + }, + setVisible: function(a) { + return ( + Kinetic.Node.prototype.setVisible.call(this, a), + a + ? ((this.getCanvas().element.style.display = 'block'), + (this.hitCanvas.element.style.display = 'block')) + : ((this.getCanvas().element.style.display = 'none'), + (this.hitCanvas.element.style.display = 'none')), + this + ) + }, + setZIndex: function(a) { + Kinetic.Node.prototype.setZIndex.call(this, a) + var b = this.getStage() + return ( + b && + (b.content.removeChild(this.getCanvas().element), + a < b.getChildren().length - 1 + ? b.content.insertBefore( + this.getCanvas().element, + b.getChildren()[a + 1].getCanvas().element + ) + : b.content.appendChild(this.getCanvas().element)), + this + ) + }, + moveToTop: function() { + Kinetic.Node.prototype.moveToTop.call(this) + var a = this.getStage() + a && + (a.content.removeChild(this.getCanvas().element), + a.content.appendChild(this.getCanvas().element)) + }, + moveUp: function() { + if (Kinetic.Node.prototype.moveUp.call(this)) { + var a = this.getStage() + a && + (a.content.removeChild(this.getCanvas().element), + this.index < a.getChildren().length - 1 + ? a.content.insertBefore( + this.getCanvas().element, + a.getChildren()[this.index + 1].getCanvas().element + ) + : a.content.appendChild(this.getCanvas().element)) + } + }, + moveDown: function() { + if (Kinetic.Node.prototype.moveDown.call(this)) { + var a = this.getStage() + if (a) { + var b = a.getChildren() + a.content.removeChild(this.getCanvas().element), + a.content.insertBefore( + this.getCanvas().element, + b[this.index + 1].getCanvas().element + ) + } + } + }, + moveToBottom: function() { + if (Kinetic.Node.prototype.moveToBottom.call(this)) { + var a = this.getStage() + if (a) { + var b = a.getChildren() + a.content.removeChild(this.getCanvas().element), + a.content.insertBefore(this.getCanvas().element, b[1].getCanvas().element) + } + } + }, + getLayer: function() { + return this + }, + remove: function() { + var a = this.getStage(), + b = this.getCanvas(), + c = b.element + return ( + Kinetic.Node.prototype.remove.call(this), + a && b && Kinetic.Util._isInDocument(c) && a.content.removeChild(c), + this + ) + } + }), + Kinetic.Util.extend(Kinetic.Layer, Kinetic.Container), + Kinetic.Node.addGetterSetter(Kinetic.Layer, 'clearBeforeDraw', !0) + })(), + (function() { + Kinetic.Util.addMethods(Kinetic.Group, { + ___init: function(a) { + ;(this.nodeType = 'Group'), Kinetic.Container.call(this, a) + }, + _validateAdd: function(a) { + var b = a.getType() + 'Group' !== b && + 'Shape' !== b && + Kinetic.Util.error('You may only add groups and shapes to groups.') + } + }), + Kinetic.Util.extend(Kinetic.Group, Kinetic.Container) + })(), + (function() { + ;(Kinetic.Rect = function(a) { + this.___init(a) + }), + (Kinetic.Rect.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'Rect') + }, + drawFunc: function(a) { + var b = a.getContext(), + c = this.getCornerRadius(), + d = this.getWidth(), + e = this.getHeight() + b.beginPath(), + c + ? (b.moveTo(c, 0), + b.lineTo(d - c, 0), + b.arc(d - c, c, c, 3 * Math.PI / 2, 0, !1), + b.lineTo(d, e - c), + b.arc(d - c, e - c, c, 0, Math.PI / 2, !1), + b.lineTo(c, e), + b.arc(c, e - c, c, Math.PI / 2, Math.PI, !1), + b.lineTo(0, c), + b.arc(c, c, c, Math.PI, 3 * Math.PI / 2, !1)) + : b.rect(0, 0, d, e), + b.closePath(), + a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Rect, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Rect, 'cornerRadius', 0) + })(), + (function() { + var a = 2 * Math.PI - 1e-4, + b = 'Circle' + ;(Kinetic.Circle = function(a) { + this.___init(a) + }), + (Kinetic.Circle.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = b) + }, + drawFunc: function(b) { + var c = b.getContext() + c.beginPath(), c.arc(0, 0, this.getRadius(), 0, a, !1), c.closePath(), b.fillStroke(this) + }, + getWidth: function() { + return 2 * this.getRadius() + }, + getHeight: function() { + return 2 * this.getRadius() + }, + setWidth: function(a) { + Kinetic.Node.prototype.setWidth.call(this, a), this.setRadius(a / 2) + }, + setHeight: function(a) { + Kinetic.Node.prototype.setHeight.call(this, a), this.setRadius(a / 2) + } + }), + Kinetic.Util.extend(Kinetic.Circle, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Circle, 'radius', 0) + })(), + (function() { + var a = 2 * Math.PI - 1e-4, + b = 'Ellipse' + ;(Kinetic.Ellipse = function(a) { + this.___init(a) + }), + (Kinetic.Ellipse.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = b) + }, + drawFunc: function(b) { + var c = b.getContext(), + d = this.getRadius() + c.beginPath(), + c.save(), + d.x !== d.y && c.scale(1, d.y / d.x), + c.arc(0, 0, d.x, 0, a, !1), + c.restore(), + c.closePath(), + b.fillStroke(this) + }, + getWidth: function() { + return 2 * this.getRadius().x + }, + getHeight: function() { + return 2 * this.getRadius().y + }, + setWidth: function(a) { + Kinetic.Node.prototype.setWidth.call(this, a), this.setRadius({ x: a / 2 }) + }, + setHeight: function(a) { + Kinetic.Node.prototype.setHeight.call(this, a), this.setRadius({ y: a / 2 }) + } + }), + Kinetic.Util.extend(Kinetic.Ellipse, Kinetic.Shape), + Kinetic.Node.addPointGetterSetter(Kinetic.Ellipse, 'radius', 0) + })(), + (function() { + ;(Kinetic.Wedge = function(a) { + this.___init(a) + }), + (Kinetic.Wedge.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'Wedge') + }, + drawFunc: function(a) { + var b = a.getContext() + b.beginPath(), + b.arc(0, 0, this.getRadius(), 0, this.getAngle(), this.getClockwise()), + b.lineTo(0, 0), + b.closePath(), + a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Wedge, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Wedge, 'radius', 0), + Kinetic.Node.addRotationGetterSetter(Kinetic.Wedge, 'angle', 0), + Kinetic.Node.addGetterSetter(Kinetic.Wedge, 'clockwise', !1) + })(), + (function() { + var a = 'Image', + b = 'crop', + c = 'set' + ;(Kinetic.Image = function(a) { + this.___init(a) + }), + (Kinetic.Image.prototype = { + ___init: function(b) { + Kinetic.Shape.call(this, b), (this.className = a) + }, + drawFunc: function(a) { + var b, + c, + d, + e, + f, + g, + h = this.getWidth(), + i = this.getHeight(), + j = this, + k = a.getContext(), + l = this.getCrop() + this.getFilter() && this._applyFilter && (this.applyFilter(), (this._applyFilter = !1)), + (g = this.filterCanvas ? this.filterCanvas.getElement() : this.getImage()), + k.beginPath(), + k.rect(0, 0, h, i), + k.closePath(), + a.fillStroke(this), + g && + (l + ? ((c = l.x || 0), + (d = l.y || 0), + (e = l.width || 0), + (f = l.height || 0), + (b = [g, c, d, e, f, 0, 0, h, i])) + : (b = [g, 0, 0, h, i]), + this.hasShadow() + ? a.applyShadow(this, function() { + j._drawImage(k, b) + }) + : this._drawImage(k, b)) + }, + drawHitFunc: function(a) { + var b = this.getWidth(), + c = this.getHeight(), + d = this.imageHitRegion, + e = a.getContext() + d + ? (e.drawImage(d, 0, 0, b, c), + e.beginPath(), + e.rect(0, 0, b, c), + e.closePath(), + a.stroke(this)) + : (e.beginPath(), e.rect(0, 0, b, c), e.closePath(), a.fillStroke(this)) + }, + applyFilter: function() { + var a, + b, + c, + d = this.getImage(), + e = this.getWidth(), + f = this.getHeight(), + g = this.getFilter() + ;(a = this.filterCanvas + ? this.filterCanvas + : (this.filterCanvas = new Kinetic.SceneCanvas({ width: e, height: f }))), + (b = a.getContext()) + try { + this._drawImage(b, [d, 0, 0, e, f]), + (c = b.getImageData(0, 0, a.getWidth(), a.getHeight())), + g.call(this, c), + b.putImageData(c, 0, 0) + } catch (h) { + this.clearFilter(), Kinetic.Util.warn('Unable to apply filter. ' + h.message) + } + }, + clearFilter: function() { + ;(this.filterCanvas = null), (this._applyFilter = !1) + }, + setCrop: function() { + var a = [].slice.call(arguments), + c = Kinetic.Util._getXY(a), + d = Kinetic.Util._getSize(a), + e = Kinetic.Util._merge(c, d) + this._setAttr(b, Kinetic.Util._merge(e, this.getCrop())) + }, + createImageHitRegion: function(a) { + var b, + c, + d, + e, + f, + g = this, + h = this.getWidth(), + i = this.getHeight(), + j = new Kinetic.Canvas({ width: h, height: i }), + k = j.getContext(), + l = this.getImage() + k.drawImage(l, 0, 0) + try { + for ( + b = k.getImageData(0, 0, h, i), + c = b.data, + d = Kinetic.Util._hexToRgb(this.colorKey), + e = 0, + f = c.length; + f > e; + e += 4 + ) + c[e + 3] > 0 && ((c[e] = d.r), (c[e + 1] = d.g), (c[e + 2] = d.b)) + Kinetic.Util._getImage(b, function(b) { + ;(g.imageHitRegion = b), a && a() + }) + } catch (m) { + Kinetic.Util.warn('Unable to create image hit region. ' + m.message) + } + }, + clearImageHitRegion: function() { + delete this.imageHitRegion + }, + getWidth: function() { + var a = this.getImage() + return this.attrs.width || (a ? a.width : 0) + }, + getHeight: function() { + var a = this.getImage() + return this.attrs.height || (a ? a.height : 0) + }, + _drawImage: function(a, b) { + 5 === b.length + ? a.drawImage(b[0], b[1], b[2], b[3], b[4]) + : 9 === b.length && a.drawImage(b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8]) + } + }), + Kinetic.Util.extend(Kinetic.Image, Kinetic.Shape), + (Kinetic.Node.addFilterGetterSetter = function(a, b, c) { + this.addGetter(a, b, c), this.addFilterSetter(a, b) + }), + (Kinetic.Node.addFilterSetter = function(a, b) { + var d = c + Kinetic.Util._capitalize(b) + a.prototype[d] = function(a) { + this._setAttr(b, a), (this._applyFilter = !0) + } + }), + Kinetic.Node.addGetterSetter(Kinetic.Image, 'image'), + Kinetic.Node.addGetter(Kinetic.Image, 'crop'), + Kinetic.Node.addFilterGetterSetter(Kinetic.Image, 'filter') + })(), + (function() { + ;(Kinetic.Polygon = function(a) { + this.___init(a) + }), + (Kinetic.Polygon.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'Polygon') + }, + drawFunc: function(a) { + var b = a.getContext(), + c = this.getPoints(), + d = c.length + b.beginPath(), b.moveTo(c[0].x, c[0].y) + for (var e = 1; d > e; e++) b.lineTo(c[e].x, c[e].y) + b.closePath(), a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Polygon, Kinetic.Shape), + Kinetic.Node.addPointsGetterSetter(Kinetic.Polygon, 'points') + })(), + (function() { + function a(a) { + a.fillText(this.partialText, 0, 0) + } + function b(a) { + a.strokeText(this.partialText, 0, 0) + } + var c = 'auto', + d = 'Calibri', + e = 'canvas', + f = 'center', + g = 'Change.kinetic', + h = '2d', + i = '-', + j = '', + k = 'left', + l = 'text', + m = 'Text', + n = 'middle', + o = 'normal', + p = 'px ', + q = ' ', + r = 'right', + s = 'word', + t = 'char', + u = 'none', + v = [ + 'fontFamily', + 'fontSize', + 'fontStyle', + 'padding', + 'align', + 'lineHeight', + 'text', + 'width', + 'height', + 'wrap' + ], + w = v.length, + x = document.createElement(e).getContext(h) + ;(Kinetic.Text = function(a) { + this.___init(a) + }), + (Kinetic.Text.prototype = { + ___init: function(d) { + var e = this + void 0 === d.width && (d.width = c), + void 0 === d.height && (d.height = c), + Kinetic.Shape.call(this, d), + (this._fillFunc = a), + (this._strokeFunc = b), + (this.className = m) + for (var f = 0; w > f; f++) this.on(v[f] + g, e._setTextData) + this._setTextData() + }, + drawFunc: function(a) { + var b = a.getContext(), + c = this.getPadding(), + d = (this.getFontStyle(), + this.getFontSize(), + this.getFontFamily(), + this.getTextHeight()), + e = this.getLineHeight() * d, + g = this.textArr, + h = g.length, + i = this.getWidth() + ;(b.font = this._getContextFont()), + (b.textBaseline = n), + (b.textAlign = k), + b.save(), + b.translate(c, 0), + b.translate(0, c + d / 2) + for (var j = 0; h > j; j++) { + var l = g[j], + m = l.text, + o = l.width + b.save(), + this.getAlign() === r + ? b.translate(i - o - 2 * c, 0) + : this.getAlign() === f && b.translate((i - o - 2 * c) / 2, 0), + (this.partialText = m), + a.fillStroke(this), + b.restore(), + b.translate(0, e) + } + b.restore() + }, + drawHitFunc: function(a) { + var b = a.getContext(), + c = this.getWidth(), + d = this.getHeight() + b.beginPath(), b.rect(0, 0, c, d), b.closePath(), a.fillStroke(this) + }, + setText: function(a) { + var b = Kinetic.Util._isString(a) ? a : a.toString() + this._setAttr(l, b) + }, + getWidth: function() { + return this.attrs.width === c + ? this.getTextWidth() + 2 * this.getPadding() + : this.attrs.width + }, + getHeight: function() { + return this.attrs.height === c + ? this.getTextHeight() * this.textArr.length * this.getLineHeight() + + 2 * this.getPadding() + : this.attrs.height + }, + getTextWidth: function() { + return this.textWidth + }, + getTextHeight: function() { + return this.textHeight + }, + _getTextSize: function(a) { + var b, + c = x, + d = this.getFontSize() + return ( + c.save(), + (c.font = this._getContextFont()), + (b = c.measureText(a)), + c.restore(), + { width: b.width, height: parseInt(d, 10) } + ) + }, + _getContextFont: function() { + return this.getFontStyle() + q + this.getFontSize() + p + this.getFontFamily() + }, + _addTextLine: function(a, b) { + return this.textArr.push({ text: a, width: b }) + }, + _getTextWidth: function(a) { + return x.measureText(a).width + }, + _setTextData: function() { + var a = this.getText().split('\n'), + b = +this.getFontSize(), + d = 0, + e = this.getLineHeight() * b, + f = this.attrs.width, + g = this.attrs.height, + h = f !== c, + j = g !== c, + k = this.getPadding(), + l = f - 2 * k, + m = g - 2 * k, + n = 0, + o = this.getWrap(), + r = o !== u, + s = o !== t && r + ;(this.textArr = []), + x.save(), + (x.font = this.getFontStyle() + q + b + p + this.getFontFamily()) + for (var v = 0, w = a.length; w > v; ++v) { + var y = a[v], + z = this._getTextWidth(y) + if (h && z > l) + for (; y.length > 0; ) { + for (var A = 0, B = y.length, C = '', D = 0; B > A; ) { + var E = (A + B) >>> 1, + F = y.slice(0, E + 1), + G = this._getTextWidth(F) + l >= G ? ((A = E + 1), (C = F), (D = G)) : (B = E) + } + if (!C) break + if (s) { + var H = Math.max(C.lastIndexOf(q), C.lastIndexOf(i)) + 1 + H > 0 && ((A = H), (C = C.slice(0, A)), (D = this._getTextWidth(C))) + } + if ((this._addTextLine(C, D), (n += e), !r || (j && n + e > m))) break + if (((y = y.slice(A)), y.length > 0 && ((z = this._getTextWidth(y)), l >= z))) { + this._addTextLine(y, z), (n += e) + break + } + } + else this._addTextLine(y, z), (n += e), (d = Math.max(d, z)) + if (j && n + e > m) break + } + x.restore(), (this.textHeight = b), (this.textWidth = d) + } + }), + Kinetic.Util.extend(Kinetic.Text, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'fontFamily', d), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'fontSize', 12), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'fontStyle', o), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'padding', 0), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'align', k), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'lineHeight', 1), + Kinetic.Node.addGetterSetter(Kinetic.Text, 'wrap', s), + Kinetic.Node.addGetter(Kinetic.Text, l, j), + Kinetic.Node.addSetter(Kinetic.Text, 'width'), + Kinetic.Node.addSetter(Kinetic.Text, 'height') + })(), + (function() { + ;(Kinetic.Line = function(a) { + this.___init(a) + }), + (Kinetic.Line.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'Line') + }, + drawFunc: function(a) { + var b, + c, + d = this.getPoints(), + e = d.length, + f = a.getContext() + for (f.beginPath(), f.moveTo(d[0].x, d[0].y), b = 1; e > b; b++) + (c = d[b]), f.lineTo(c.x, c.y) + a.stroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Line, Kinetic.Shape), + Kinetic.Node.addPointsGetterSetter(Kinetic.Line, 'points') + })(), + (function() { + ;(Kinetic.Spline = function(a) { + this.___init(a) + }), + (Kinetic.Spline.prototype = { + ___init: function(a) { + var b = this + Kinetic.Shape.call(this, a), + (this.className = 'Spline'), + this.on('pointsChange.kinetic tensionChange.kinetic', function() { + b._setAllPoints() + }), + this._setAllPoints() + }, + drawFunc: function(a) { + var b, + c, + d, + e, + f = this.getPoints(), + g = f.length, + h = a.getContext(), + i = this.getTension() + if ((h.beginPath(), h.moveTo(f[0].x, f[0].y), 0 !== i && g > 2)) { + for ( + b = this.allPoints, + c = b.length, + d = 2, + h.quadraticCurveTo(b[0].x, b[0].y, b[1].x, b[1].y); + c - 1 > d; + + ) + h.bezierCurveTo(b[d].x, b[d++].y, b[d].x, b[d++].y, b[d].x, b[d++].y) + h.quadraticCurveTo(b[c - 1].x, b[c - 1].y, f[g - 1].x, f[g - 1].y) + } else for (d = 1; g > d; d++) (e = f[d]), h.lineTo(e.x, e.y) + a.stroke(this) + }, + _setAllPoints: function() { + this.allPoints = Kinetic.Util._expandPoints(this.getPoints(), this.getTension()) + } + }), + Kinetic.Util.extend(Kinetic.Spline, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Spline, 'tension', 1), + Kinetic.Node.addPointsGetterSetter(Kinetic.Spline, 'points') + })(), + (function() { + ;(Kinetic.Blob = function(a) { + this.___init(a) + }), + (Kinetic.Blob.prototype = { + ___init: function(a) { + var b = this + Kinetic.Shape.call(this, a), + (this.className = 'Blob'), + this.on('pointsChange.kinetic tensionChange.kinetic', function() { + b._setAllPoints() + }), + this._setAllPoints() + }, + drawFunc: function(a) { + var b, + c, + d, + e, + f = this.getPoints(), + g = f.length, + h = a.getContext(), + i = this.getTension() + if ((h.beginPath(), h.moveTo(f[0].x, f[0].y), 0 !== i && g > 2)) + for (b = this.allPoints, c = b.length, d = 0; c - 1 > d; ) + h.bezierCurveTo(b[d].x, b[d++].y, b[d].x, b[d++].y, b[d].x, b[d++].y) + else for (d = 1; g > d; d++) (e = f[d]), h.lineTo(e.x, e.y) + h.closePath(), a.fillStroke(this) + }, + _setAllPoints: function() { + var a = this.getPoints(), + b = a.length, + c = this.getTension(), + d = Kinetic.Util, + e = d._getControlPoints(a[b - 1], a[0], a[1], c), + f = d._getControlPoints(a[b - 2], a[b - 1], a[0], c) + ;(this.allPoints = Kinetic.Util._expandPoints(this.getPoints(), this.getTension())), + this.allPoints.unshift(e[1]), + this.allPoints.push(f[0]), + this.allPoints.push(a[b - 1]), + this.allPoints.push(f[1]), + this.allPoints.push(e[0]), + this.allPoints.push(a[0]) + } + }), + Kinetic.Util.extend(Kinetic.Blob, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Blob, 'tension', 1), + Kinetic.Node.addPointsGetterSetter(Kinetic.Blob, 'points') + })(), + (function() { + ;(Kinetic.Sprite = function(a) { + this.___init(a) + }), + (Kinetic.Sprite.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), + (this.className = 'Sprite'), + (this.anim = new Kinetic.Animation()) + var b = this + this.on('animationChange.kinetic', function() { + b.setIndex(0) + }) + }, + drawFunc: function(a) { + var b = this.getAnimation(), + c = this.getIndex(), + d = this.getAnimations()[b][c], + e = a.getContext(), + f = this.getImage() + f && e.drawImage(f, d.x, d.y, d.width, d.height, 0, 0, d.width, d.height) + }, + drawHitFunc: function(a) { + var b = this.getAnimation(), + c = this.getIndex(), + d = this.getAnimations()[b][c], + e = a.getContext() + e.beginPath(), e.rect(0, 0, d.width, d.height), e.closePath(), a.fill(this) + }, + start: function() { + var a = this, + b = this.getLayer() + this.anim.setLayers(b), + (this.interval = setInterval(function() { + var b = a.getIndex() + a._updateIndex(), + a.afterFrameFunc && + b === a.afterFrameIndex && + (a.afterFrameFunc(), delete a.afterFrameFunc, delete a.afterFrameIndex) + }, 1e3 / this.getFrameRate())), + this.anim.start() + }, + stop: function() { + this.anim.stop(), clearInterval(this.interval) + }, + afterFrame: function(a, b) { + ;(this.afterFrameIndex = a), (this.afterFrameFunc = b) + }, + _updateIndex: function() { + var a = this.getIndex(), + b = this.getAnimation(), + c = this.getAnimations(), + d = c[b], + e = d.length + e - 1 > a ? this.setIndex(a + 1) : this.setIndex(0) + } + }), + Kinetic.Util.extend(Kinetic.Sprite, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Sprite, 'animation'), + Kinetic.Node.addGetterSetter(Kinetic.Sprite, 'animations'), + Kinetic.Node.addGetterSetter(Kinetic.Sprite, 'image'), + Kinetic.Node.addGetterSetter(Kinetic.Sprite, 'index', 0), + Kinetic.Node.addGetterSetter(Kinetic.Sprite, 'frameRate', 17) + })(), + (function() { + ;(Kinetic.Path = function(a) { + this.___init(a) + }), + (Kinetic.Path.prototype = { + ___init: function(a) { + this.dataArray = [] + var b = this + Kinetic.Shape.call(this, a), + (this.className = 'Path'), + (this.dataArray = Kinetic.Path.parsePathData(this.getData())), + this.on('dataChange.kinetic', function() { + b.dataArray = Kinetic.Path.parsePathData(this.getData()) + }) + }, + drawFunc: function(a) { + var b = this.dataArray, + c = a.getContext() + c.beginPath() + for (var d = 0; d < b.length; d++) { + var e = b[d].command, + f = b[d].points + switch (e) { + case 'L': + c.lineTo(f[0], f[1]) + break + case 'M': + c.moveTo(f[0], f[1]) + break + case 'C': + c.bezierCurveTo(f[0], f[1], f[2], f[3], f[4], f[5]) + break + case 'Q': + c.quadraticCurveTo(f[0], f[1], f[2], f[3]) + break + case 'A': + var g = f[0], + h = f[1], + i = f[2], + j = f[3], + k = f[4], + l = f[5], + m = f[6], + n = f[7], + o = i > j ? i : j, + p = i > j ? 1 : i / j, + q = i > j ? j / i : 1 + c.translate(g, h), + c.rotate(m), + c.scale(p, q), + c.arc(0, 0, o, k, k + l, 1 - n), + c.scale(1 / p, 1 / q), + c.rotate(-m), + c.translate(-g, -h) + break + case 'z': + c.closePath() + } + } + a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Path, Kinetic.Shape), + (Kinetic.Path.getLineLength = function(a, b, c, d) { + return Math.sqrt((c - a) * (c - a) + (d - b) * (d - b)) + }), + (Kinetic.Path.getPointOnLine = function(a, b, c, d, e, f, g) { + void 0 === f && (f = b), void 0 === g && (g = c) + var h = (e - c) / (d - b + 1e-8), + i = Math.sqrt(a * a / (1 + h * h)) + b > d && (i *= -1) + var j, + k = h * i + if ((g - c) / (f - b + 1e-8) === h) j = { x: f + i, y: g + k } + else { + var l, + m, + n = this.getLineLength(b, c, d, e) + if (1e-8 > n) return void 0 + var o = (f - b) * (d - b) + (g - c) * (e - c) + ;(o /= n * n), (l = b + o * (d - b)), (m = c + o * (e - c)) + var p = this.getLineLength(f, g, l, m), + q = Math.sqrt(a * a - p * p) + ;(i = Math.sqrt(q * q / (1 + h * h))), + b > d && (i *= -1), + (k = h * i), + (j = { x: l + i, y: m + k }) + } + return j + }), + (Kinetic.Path.getPointOnCubicBezier = function(a, b, c, d, e, f, g, h, i) { + function j(a) { + return a * a * a + } + function k(a) { + return 3 * a * a * (1 - a) + } + function l(a) { + return 3 * a * (1 - a) * (1 - a) + } + function m(a) { + return (1 - a) * (1 - a) * (1 - a) + } + var n = h * j(a) + f * k(a) + d * l(a) + b * m(a), + o = i * j(a) + g * k(a) + e * l(a) + c * m(a) + return { x: n, y: o } + }), + (Kinetic.Path.getPointOnQuadraticBezier = function(a, b, c, d, e, f, g) { + function h(a) { + return a * a + } + function i(a) { + return 2 * a * (1 - a) + } + function j(a) { + return (1 - a) * (1 - a) + } + var k = f * h(a) + d * i(a) + b * j(a), + l = g * h(a) + e * i(a) + c * j(a) + return { x: k, y: l } + }), + (Kinetic.Path.getPointOnEllipticalArc = function(a, b, c, d, e, f) { + var g = Math.cos(f), + h = Math.sin(f), + i = { x: c * Math.cos(e), y: d * Math.sin(e) } + return { x: a + (i.x * g - i.y * h), y: b + (i.x * h + i.y * g) } + }), + (Kinetic.Path.parsePathData = function(a) { + if (!a) return [] + var b = a, + c = [ + 'm', + 'M', + 'l', + 'L', + 'v', + 'V', + 'h', + 'H', + 'z', + 'Z', + 'c', + 'C', + 'q', + 'Q', + 't', + 'T', + 's', + 'S', + 'a', + 'A' + ] + b = b.replace(new RegExp(' ', 'g'), ',') + for (var d = 0; d < c.length; d++) b = b.replace(new RegExp(c[d], 'g'), '|' + c[d]) + var e = b.split('|'), + f = [], + g = 0, + h = 0 + for (d = 1; d < e.length; d++) { + var i = e[d], + j = i.charAt(0) + ;(i = i.slice(1)), + (i = i.replace(new RegExp(',-', 'g'), '-')), + (i = i.replace(new RegExp('-', 'g'), ',-')), + (i = i.replace(new RegExp('e,-', 'g'), 'e-')) + var k = i.split(',') + k.length > 0 && '' === k[0] && k.shift() + for (var l = 0; l < k.length; l++) k[l] = parseFloat(k[l]) + for (; k.length > 0 && !isNaN(k[0]); ) { + var m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + w = null, + x = [], + y = g, + z = h + switch (j) { + case 'l': + ;(g += k.shift()), (h += k.shift()), (w = 'L'), x.push(g, h) + break + case 'L': + ;(g = k.shift()), (h = k.shift()), x.push(g, h) + break + case 'm': + ;(g += k.shift()), (h += k.shift()), (w = 'M'), x.push(g, h), (j = 'l') + break + case 'M': + ;(g = k.shift()), (h = k.shift()), (w = 'M'), x.push(g, h), (j = 'L') + break + case 'h': + ;(g += k.shift()), (w = 'L'), x.push(g, h) + break + case 'H': + ;(g = k.shift()), (w = 'L'), x.push(g, h) + break + case 'v': + ;(h += k.shift()), (w = 'L'), x.push(g, h) + break + case 'V': + ;(h = k.shift()), (w = 'L'), x.push(g, h) + break + case 'C': + x.push(k.shift(), k.shift(), k.shift(), k.shift()), + (g = k.shift()), + (h = k.shift()), + x.push(g, h) + break + case 'c': + x.push(g + k.shift(), h + k.shift(), g + k.shift(), h + k.shift()), + (g += k.shift()), + (h += k.shift()), + (w = 'C'), + x.push(g, h) + break + case 'S': + ;(n = g), + (o = h), + (m = f[f.length - 1]), + 'C' === m.command && ((n = g + (g - m.points[2])), (o = h + (h - m.points[3]))), + x.push(n, o, k.shift(), k.shift()), + (g = k.shift()), + (h = k.shift()), + (w = 'C'), + x.push(g, h) + break + case 's': + ;(n = g), + (o = h), + (m = f[f.length - 1]), + 'C' === m.command && ((n = g + (g - m.points[2])), (o = h + (h - m.points[3]))), + x.push(n, o, g + k.shift(), h + k.shift()), + (g += k.shift()), + (h += k.shift()), + (w = 'C'), + x.push(g, h) + break + case 'Q': + x.push(k.shift(), k.shift()), (g = k.shift()), (h = k.shift()), x.push(g, h) + break + case 'q': + x.push(g + k.shift(), h + k.shift()), + (g += k.shift()), + (h += k.shift()), + (w = 'Q'), + x.push(g, h) + break + case 'T': + ;(n = g), + (o = h), + (m = f[f.length - 1]), + 'Q' === m.command && ((n = g + (g - m.points[0])), (o = h + (h - m.points[1]))), + (g = k.shift()), + (h = k.shift()), + (w = 'Q'), + x.push(n, o, g, h) + break + case 't': + ;(n = g), + (o = h), + (m = f[f.length - 1]), + 'Q' === m.command && ((n = g + (g - m.points[0])), (o = h + (h - m.points[1]))), + (g += k.shift()), + (h += k.shift()), + (w = 'Q'), + x.push(n, o, g, h) + break + case 'A': + ;(p = k.shift()), + (q = k.shift()), + (r = k.shift()), + (s = k.shift()), + (t = k.shift()), + (u = g), + (v = h), + (g = k.shift()), + (h = k.shift()), + (w = 'A'), + (x = this.convertEndpointToCenterParameterization(u, v, g, h, s, t, p, q, r)) + break + case 'a': + ;(p = k.shift()), + (q = k.shift()), + (r = k.shift()), + (s = k.shift()), + (t = k.shift()), + (u = g), + (v = h), + (g += k.shift()), + (h += k.shift()), + (w = 'A'), + (x = this.convertEndpointToCenterParameterization(u, v, g, h, s, t, p, q, r)) + } + f.push({ + command: w || j, + points: x, + start: { x: y, y: z }, + pathLength: this.calcLength(y, z, w || j, x) + }) + } + ;('z' === j || 'Z' === j) && + f.push({ command: 'z', points: [], start: void 0, pathLength: 0 }) + } + return f + }), + (Kinetic.Path.calcLength = function(a, b, c, d) { + var e, + f, + g, + h = Kinetic.Path + switch (c) { + case 'L': + return h.getLineLength(a, b, d[0], d[1]) + case 'C': + for ( + e = 0, + f = h.getPointOnCubicBezier(0, a, b, d[0], d[1], d[2], d[3], d[4], d[5]), + t = 0.01; + 1 >= t; + t += 0.01 + ) + (g = h.getPointOnCubicBezier(t, a, b, d[0], d[1], d[2], d[3], d[4], d[5])), + (e += h.getLineLength(f.x, f.y, g.x, g.y)), + (f = g) + return e + case 'Q': + for ( + e = 0, f = h.getPointOnQuadraticBezier(0, a, b, d[0], d[1], d[2], d[3]), t = 0.01; + 1 >= t; + t += 0.01 + ) + (g = h.getPointOnQuadraticBezier(t, a, b, d[0], d[1], d[2], d[3])), + (e += h.getLineLength(f.x, f.y, g.x, g.y)), + (f = g) + return e + case 'A': + e = 0 + var i = d[4], + j = d[5], + k = d[4] + j, + l = Math.PI / 180 + if ( + (Math.abs(i - k) < l && (l = Math.abs(i - k)), + (f = h.getPointOnEllipticalArc(d[0], d[1], d[2], d[3], i, 0)), + 0 > j) + ) + for (t = i - l; t > k; t -= l) + (g = h.getPointOnEllipticalArc(d[0], d[1], d[2], d[3], t, 0)), + (e += h.getLineLength(f.x, f.y, g.x, g.y)), + (f = g) + else + for (t = i + l; k > t; t += l) + (g = h.getPointOnEllipticalArc(d[0], d[1], d[2], d[3], t, 0)), + (e += h.getLineLength(f.x, f.y, g.x, g.y)), + (f = g) + return ( + (g = h.getPointOnEllipticalArc(d[0], d[1], d[2], d[3], k, 0)), + (e += h.getLineLength(f.x, f.y, g.x, g.y)) + ) + } + return 0 + }), + (Kinetic.Path.convertEndpointToCenterParameterization = function(a, b, c, d, e, f, g, h, i) { + var j = i * (Math.PI / 180), + k = Math.cos(j) * (a - c) / 2 + Math.sin(j) * (b - d) / 2, + l = -1 * Math.sin(j) * (a - c) / 2 + Math.cos(j) * (b - d) / 2, + m = k * k / (g * g) + l * l / (h * h) + m > 1 && ((g *= Math.sqrt(m)), (h *= Math.sqrt(m))) + var n = Math.sqrt( + (g * g * h * h - g * g * l * l - h * h * k * k) / (g * g * l * l + h * h * k * k) + ) + e == f && (n *= -1), isNaN(n) && (n = 0) + var o = n * g * l / h, + p = n * -h * k / g, + q = (a + c) / 2 + Math.cos(j) * o - Math.sin(j) * p, + r = (b + d) / 2 + Math.sin(j) * o + Math.cos(j) * p, + s = function(a) { + return Math.sqrt(a[0] * a[0] + a[1] * a[1]) + }, + t = function(a, b) { + return (a[0] * b[0] + a[1] * b[1]) / (s(a) * s(b)) + }, + u = function(a, b) { + return (a[0] * b[1] < a[1] * b[0] ? -1 : 1) * Math.acos(t(a, b)) + }, + v = u([1, 0], [(k - o) / g, (l - p) / h]), + w = [(k - o) / g, (l - p) / h], + x = [(-1 * k - o) / g, (-1 * l - p) / h], + y = u(w, x) + return ( + t(w, x) <= -1 && (y = Math.PI), + t(w, x) >= 1 && (y = 0), + 0 === f && y > 0 && (y -= 2 * Math.PI), + 1 == f && 0 > y && (y += 2 * Math.PI), + [q, r, g, h, v, y, j, f] + ) + }), + Kinetic.Node.addGetterSetter(Kinetic.Path, 'data') + })(), + (function() { + function a(a) { + a.fillText(this.partialText, 0, 0) + } + function b(a) { + a.strokeText(this.partialText, 0, 0) + } + var c = '', + d = 'Calibri', + e = 'normal' + ;(Kinetic.TextPath = function(a) { + this.___init(a) + }), + (Kinetic.TextPath.prototype = { + ___init: function(c) { + var d = this + ;(this.dummyCanvas = document.createElement('canvas')), + (this.dataArray = []), + Kinetic.Shape.call(this, c), + (this._fillFunc = a), + (this._strokeFunc = b), + (this.className = 'TextPath'), + (this.dataArray = Kinetic.Path.parsePathData(this.attrs.data)), + this.on('dataChange.kinetic', function() { + d.dataArray = Kinetic.Path.parsePathData(this.attrs.data) + }), + this.on( + 'textChange.kinetic textStroke.kinetic textStrokeWidth.kinetic', + d._setTextData + ), + d._setTextData() + }, + drawFunc: function(a) { + var b = (this.charArr, a.getContext()) + ;(b.font = this._getContextFont()), + (b.textBaseline = 'middle'), + (b.textAlign = 'left'), + b.save() + for (var c = this.glyphInfo, d = 0; d < c.length; d++) { + b.save() + var e = c[d].p0 + c[d].p1, + parseFloat(this.attrs.fontSize), + b.translate(e.x, e.y), + b.rotate(c[d].rotation), + (this.partialText = c[d].text), + a.fillStroke(this), + b.restore() + } + b.restore() + }, + getTextWidth: function() { + return this.textWidth + }, + getTextHeight: function() { + return this.textHeight + }, + setText: function(a) { + Kinetic.Text.prototype.setText.call(this, a) + }, + _getTextSize: function(a) { + var b = this.dummyCanvas, + c = b.getContext('2d') + c.save(), (c.font = this._getContextFont()) + var d = c.measureText(a) + return c.restore(), { width: d.width, height: parseInt(this.attrs.fontSize, 10) } + }, + _setTextData: function() { + var a = this, + b = this._getTextSize(this.attrs.text) + ;(this.textWidth = b.width), (this.textHeight = b.height), (this.glyphInfo = []) + for ( + var c, + d, + e, + f = this.attrs.text.split(''), + g = -1, + h = 0, + i = function() { + h = 0 + for (var b = a.dataArray, d = g + 1; d < b.length; d++) { + if (b[d].pathLength > 0) return (g = d), b[d] + 'M' == b[d].command && (c = { x: b[d].points[0], y: b[d].points[1] }) + } + return {} + }, + j = function(b) { + var f = a._getTextSize(b).width, + g = 0, + j = 0 + for (d = void 0; Math.abs(f - g) / f > 0.01 && 25 > j; ) { + j++ + for (var k = g; void 0 === e; ) + (e = i()), e && k + e.pathLength < f && ((k += e.pathLength), (e = void 0)) + if (e === {} || void 0 === c) return void 0 + var l = !1 + switch (e.command) { + case 'L': + Kinetic.Path.getLineLength(c.x, c.y, e.points[0], e.points[1]) > f + ? (d = Kinetic.Path.getPointOnLine( + f, + c.x, + c.y, + e.points[0], + e.points[1], + c.x, + c.y + )) + : (e = void 0) + break + case 'A': + var m = e.points[4], + n = e.points[5], + o = e.points[4] + n + 0 === h + ? (h = m + 1e-8) + : f > g + ? (h += Math.PI / 180 * n / Math.abs(n)) + : (h -= Math.PI / 360 * n / Math.abs(n)), + Math.abs(h) > Math.abs(o) && ((h = o), (l = !0)), + (d = Kinetic.Path.getPointOnEllipticalArc( + e.points[0], + e.points[1], + e.points[2], + e.points[3], + h, + e.points[6] + )) + break + case 'C': + 0 === h + ? (h = f > e.pathLength ? 1e-8 : f / e.pathLength) + : f > g + ? (h += (f - g) / e.pathLength) + : (h -= (g - f) / e.pathLength), + h > 1 && ((h = 1), (l = !0)), + (d = Kinetic.Path.getPointOnCubicBezier( + h, + e.start.x, + e.start.y, + e.points[0], + e.points[1], + e.points[2], + e.points[3], + e.points[4], + e.points[5] + )) + break + case 'Q': + 0 === h + ? (h = f / e.pathLength) + : f > g + ? (h += (f - g) / e.pathLength) + : (h -= (g - f) / e.pathLength), + h > 1 && ((h = 1), (l = !0)), + (d = Kinetic.Path.getPointOnQuadraticBezier( + h, + e.start.x, + e.start.y, + e.points[0], + e.points[1], + e.points[2], + e.points[3] + )) + } + void 0 !== d && (g = Kinetic.Path.getLineLength(c.x, c.y, d.x, d.y)), + l && ((l = !1), (e = void 0)) + } + }, + k = 0; + k < f.length && (j(f[k]), void 0 !== c && void 0 !== d); + k++ + ) { + var l = Kinetic.Path.getLineLength(c.x, c.y, d.x, d.y), + m = 0, + n = Kinetic.Path.getPointOnLine(m + l / 2, c.x, c.y, d.x, d.y), + o = Math.atan2(d.y - c.y, d.x - c.x) + this.glyphInfo.push({ + transposeX: n.x, + transposeY: n.y, + text: f[k], + rotation: o, + p0: c, + p1: d + }), + (c = d) + } + } + }), + (Kinetic.TextPath.prototype._getContextFont = Kinetic.Text.prototype._getContextFont), + Kinetic.Util.extend(Kinetic.TextPath, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.TextPath, 'fontFamily', d), + Kinetic.Node.addGetterSetter(Kinetic.TextPath, 'fontSize', 12), + Kinetic.Node.addGetterSetter(Kinetic.TextPath, 'fontStyle', e), + Kinetic.Node.addGetter(Kinetic.TextPath, 'text', c) + })(), + (function() { + ;(Kinetic.RegularPolygon = function(a) { + this.___init(a) + }), + (Kinetic.RegularPolygon.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'RegularPolygon') + }, + drawFunc: function(a) { + var b, + c, + d, + e = a.getContext(), + f = this.attrs.sides, + g = this.attrs.radius + for (e.beginPath(), e.moveTo(0, 0 - g), b = 1; f > b; b++) + (c = g * Math.sin(2 * b * Math.PI / f)), + (d = -1 * g * Math.cos(2 * b * Math.PI / f)), + e.lineTo(c, d) + e.closePath(), a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.RegularPolygon, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.RegularPolygon, 'radius', 0), + Kinetic.Node.addGetterSetter(Kinetic.RegularPolygon, 'sides', 0) + })(), + (function() { + ;(Kinetic.Star = function(a) { + this.___init(a) + }), + (Kinetic.Star.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'Star') + }, + drawFunc: function(a) { + var b = a.getContext(), + c = this.attrs.innerRadius, + d = this.attrs.outerRadius, + e = this.attrs.numPoints + b.beginPath(), b.moveTo(0, 0 - this.attrs.outerRadius) + for (var f = 1; 2 * e > f; f++) { + var g = 0 === f % 2 ? d : c, + h = g * Math.sin(f * Math.PI / e), + i = -1 * g * Math.cos(f * Math.PI / e) + b.lineTo(h, i) + } + b.closePath(), a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Star, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Star, 'numPoints', 0), + Kinetic.Node.addGetterSetter(Kinetic.Star, 'innerRadius', 0), + Kinetic.Node.addGetterSetter(Kinetic.Star, 'outerRadius', 0) + })(), + (function() { + var a = ['fontFamily', 'fontSize', 'fontStyle', 'padding', 'lineHeight', 'text'], + b = 'Change.kinetic', + c = 'none', + d = 'up', + e = 'right', + f = 'down', + g = 'left', + h = 'Label', + i = a.length + ;(Kinetic.Label = function(a) { + this.____init(a) + }), + (Kinetic.Label.prototype = { + ____init: function(a) { + var b = this + ;(this.className = h), + Kinetic.Group.call(this, a), + this.on('add.kinetic', function(a) { + b._addListeners(a.child), b._sync() + }) + }, + getText: function() { + return this.get('Text')[0] + }, + getTag: function() { + return this.get('Tag')[0] + }, + _addListeners: function(c) { + var d, + e = this, + f = function() { + e._sync() + } + for (d = 0; i > d; d++) c.on(a[d] + b, f) + }, + getWidth: function() { + return this.getText().getWidth() + }, + getHeight: function() { + return this.getText().getHeight() + }, + _sync: function() { + var a, + b, + c, + h, + i, + j, + k = this.getText(), + l = this.getTag() + if (k && l) { + switch ( + ((a = k.getWidth()), + (b = k.getHeight()), + (c = l.getPointerDirection()), + (h = l.getPointerWidth()), + (pointerHeight = l.getPointerHeight()), + (i = 0), + (j = 0), + c) + ) { + case d: + ;(i = a / 2), (j = -1 * pointerHeight) + break + case e: + ;(i = a + h), (j = b / 2) + break + case f: + ;(i = a / 2), (j = b + pointerHeight) + break + case g: + ;(i = -1 * h), (j = b / 2) + } + l.setAttrs({ x: -1 * i, y: -1 * j, width: a, height: b }), + k.setAttrs({ x: -1 * i, y: -1 * j }) + } + } + }), + Kinetic.Util.extend(Kinetic.Label, Kinetic.Group), + (Kinetic.Tag = function(a) { + this.___init(a) + }), + (Kinetic.Tag.prototype = { + ___init: function(a) { + Kinetic.Shape.call(this, a), (this.className = 'Tag') + }, + drawFunc: function(a) { + var b = a.getContext(), + c = this.getWidth(), + h = this.getHeight(), + i = this.getPointerDirection(), + j = this.getPointerWidth(), + k = this.getPointerHeight() + this.getCornerRadius(), + b.beginPath(), + b.moveTo(0, 0), + i === d && + (b.lineTo((c - j) / 2, 0), b.lineTo(c / 2, -1 * k), b.lineTo((c + j) / 2, 0)), + b.lineTo(c, 0), + i === e && (b.lineTo(c, (h - k) / 2), b.lineTo(c + j, h / 2), b.lineTo(c, (h + k) / 2)), + b.lineTo(c, h), + i === f && (b.lineTo((c + j) / 2, h), b.lineTo(c / 2, h + k), b.lineTo((c - j) / 2, h)), + b.lineTo(0, h), + i === g && + (b.lineTo(0, (h + k) / 2), b.lineTo(-1 * j, h / 2), b.lineTo(0, (h - k) / 2)), + b.closePath(), + a.fillStroke(this) + } + }), + Kinetic.Util.extend(Kinetic.Tag, Kinetic.Shape), + Kinetic.Node.addGetterSetter(Kinetic.Tag, 'pointerDirection', c), + Kinetic.Node.addGetterSetter(Kinetic.Tag, 'pointerWidth', 0), + Kinetic.Node.addGetterSetter(Kinetic.Tag, 'pointerHeight', 0), + Kinetic.Node.addGetterSetter(Kinetic.Tag, 'cornerRadius', 0) + })(), + (function() { + Kinetic.Filters.Grayscale = function(a) { + for (var b = a.data, c = 0; c < b.length; c += 4) { + var d = 0.34 * b[c] + 0.5 * b[c + 1] + 0.16 * b[c + 2] + ;(b[c] = d), (b[c + 1] = d), (b[c + 2] = d) + } + } + })(), + (function() { + ;(Kinetic.Filters.Brighten = function(a) { + for (var b = this.getFilterBrightness(), c = a.data, d = 0; d < c.length; d += 4) + (c[d] += b), (c[d + 1] += b), (c[d + 2] += b) + }), + Kinetic.Node.addFilterGetterSetter(Kinetic.Image, 'filterBrightness', 0) + })(), + (function() { + Kinetic.Filters.Invert = function(a) { + for (var b = a.data, c = 0; c < b.length; c += 4) + (b[c] = 255 - b[c]), (b[c + 1] = 255 - b[c + 1]), (b[c + 2] = 255 - b[c + 2]) + } + })(), + (function() { + function a() { + ;(this.r = 0), (this.g = 0), (this.b = 0), (this.a = 0), (this.next = null) + } + function b(b, e) { + var f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u, + v, + w, + x, + y, + z, + A, + B, + C, + D = b.data, + E = b.width, + F = b.height, + G = e + e + 1, + H = E - 1, + I = F - 1, + J = e + 1, + K = J * (J + 1) / 2, + L = new a(), + M = null, + N = L, + O = null, + P = null, + Q = c[e], + R = d[e] + for (h = 1; G > h; h++) (N = N.next = new a()), h == J && (M = N) + for (N.next = L, l = k = 0, g = 0; F > g; g++) { + for ( + u = v = w = x = m = n = o = p = 0, + q = J * (y = D[k]), + r = J * (z = D[k + 1]), + s = J * (A = D[k + 2]), + t = J * (B = D[k + 3]), + m += K * y, + n += K * z, + o += K * A, + p += K * B, + N = L, + h = 0; + J > h; + h++ + ) + (N.r = y), (N.g = z), (N.b = A), (N.a = B), (N = N.next) + for (h = 1; J > h; h++) + (i = k + ((h > H ? H : h) << 2)), + (m += (N.r = y = D[i]) * (C = J - h)), + (n += (N.g = z = D[i + 1]) * C), + (o += (N.b = A = D[i + 2]) * C), + (p += (N.a = B = D[i + 3]) * C), + (u += y), + (v += z), + (w += A), + (x += B), + (N = N.next) + for (O = L, P = M, f = 0; E > f; f++) + (D[k + 3] = B = (p * Q) >> R), + 0 !== B + ? ((B = 255 / B), + (D[k] = ((m * Q) >> R) * B), + (D[k + 1] = ((n * Q) >> R) * B), + (D[k + 2] = ((o * Q) >> R) * B)) + : (D[k] = D[k + 1] = D[k + 2] = 0), + (m -= q), + (n -= r), + (o -= s), + (p -= t), + (q -= O.r), + (r -= O.g), + (s -= O.b), + (t -= O.a), + (i = (l + ((i = f + e + 1) < H ? i : H)) << 2), + (u += O.r = D[i]), + (v += O.g = D[i + 1]), + (w += O.b = D[i + 2]), + (x += O.a = D[i + 3]), + (m += u), + (n += v), + (o += w), + (p += x), + (O = O.next), + (q += y = P.r), + (r += z = P.g), + (s += A = P.b), + (t += B = P.a), + (u -= y), + (v -= z), + (w -= A), + (x -= B), + (P = P.next), + (k += 4) + l += E + } + for (f = 0; E > f; f++) { + for ( + v = w = x = u = n = o = p = m = 0, + k = f << 2, + q = J * (y = D[k]), + r = J * (z = D[k + 1]), + s = J * (A = D[k + 2]), + t = J * (B = D[k + 3]), + m += K * y, + n += K * z, + o += K * A, + p += K * B, + N = L, + h = 0; + J > h; + h++ + ) + (N.r = y), (N.g = z), (N.b = A), (N.a = B), (N = N.next) + for (j = E, h = 1; e >= h; h++) + (k = (j + f) << 2), + (m += (N.r = y = D[k]) * (C = J - h)), + (n += (N.g = z = D[k + 1]) * C), + (o += (N.b = A = D[k + 2]) * C), + (p += (N.a = B = D[k + 3]) * C), + (u += y), + (v += z), + (w += A), + (x += B), + (N = N.next), + I > h && (j += E) + for (k = f, O = L, P = M, g = 0; F > g; g++) + (i = k << 2), + (D[i + 3] = B = (p * Q) >> R), + B > 0 + ? ((B = 255 / B), + (D[i] = ((m * Q) >> R) * B), + (D[i + 1] = ((n * Q) >> R) * B), + (D[i + 2] = ((o * Q) >> R) * B)) + : (D[i] = D[i + 1] = D[i + 2] = 0), + (m -= q), + (n -= r), + (o -= s), + (p -= t), + (q -= O.r), + (r -= O.g), + (s -= O.b), + (t -= O.a), + (i = (f + ((i = g + J) < I ? i : I) * E) << 2), + (m += u += O.r = D[i]), + (n += v += O.g = D[i + 1]), + (o += w += O.b = D[i + 2]), + (p += x += O.a = D[i + 3]), + (O = O.next), + (q += y = P.r), + (r += z = P.g), + (s += A = P.b), + (t += B = P.a), + (u -= y), + (v -= z), + (w -= A), + (x -= B), + (P = P.next), + (k += E) + } + } + var c = [ + 512, + 512, + 456, + 512, + 328, + 456, + 335, + 512, + 405, + 328, + 271, + 456, + 388, + 335, + 292, + 512, + 454, + 405, + 364, + 328, + 298, + 271, + 496, + 456, + 420, + 388, + 360, + 335, + 312, + 292, + 273, + 512, + 482, + 454, + 428, + 405, + 383, + 364, + 345, + 328, + 312, + 298, + 284, + 271, + 259, + 496, + 475, + 456, + 437, + 420, + 404, + 388, + 374, + 360, + 347, + 335, + 323, + 312, + 302, + 292, + 282, + 273, + 265, + 512, + 497, + 482, + 468, + 454, + 441, + 428, + 417, + 405, + 394, + 383, + 373, + 364, + 354, + 345, + 337, + 328, + 320, + 312, + 305, + 298, + 291, + 284, + 278, + 271, + 265, + 259, + 507, + 496, + 485, + 475, + 465, + 456, + 446, + 437, + 428, + 420, + 412, + 404, + 396, + 388, + 381, + 374, + 367, + 360, + 354, + 347, + 341, + 335, + 329, + 323, + 318, + 312, + 307, + 302, + 297, + 292, + 287, + 282, + 278, + 273, + 269, + 265, + 261, + 512, + 505, + 497, + 489, + 482, + 475, + 468, + 461, + 454, + 447, + 441, + 435, + 428, + 422, + 417, + 411, + 405, + 399, + 394, + 389, + 383, + 378, + 373, + 368, + 364, + 359, + 354, + 350, + 345, + 341, + 337, + 332, + 328, + 324, + 320, + 316, + 312, + 309, + 305, + 301, + 298, + 294, + 291, + 287, + 284, + 281, + 278, + 274, + 271, + 268, + 265, + 262, + 259, + 257, + 507, + 501, + 496, + 491, + 485, + 480, + 475, + 470, + 465, + 460, + 456, + 451, + 446, + 442, + 437, + 433, + 428, + 424, + 420, + 416, + 412, + 408, + 404, + 400, + 396, + 392, + 388, + 385, + 381, + 377, + 374, + 370, + 367, + 363, + 360, + 357, + 354, + 350, + 347, + 344, + 341, + 338, + 335, + 332, + 329, + 326, + 323, + 320, + 318, + 315, + 312, + 310, + 307, + 304, + 302, + 299, + 297, + 294, + 292, + 289, + 287, + 285, + 282, + 280, + 278, + 275, + 273, + 271, + 269, + 267, + 265, + 263, + 261, + 259 + ], + d = [ + 9, + 11, + 12, + 13, + 13, + 14, + 14, + 15, + 15, + 15, + 15, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 21, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 22, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 23, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24, + 24 + ] + ;(Kinetic.Filters.Blur = function(a) { + var c = 0 | this.getFilterRadius() + c > 0 && b(a, c) + }), + Kinetic.Node.addFilterGetterSetter(Kinetic.Image, 'filterRadius', 0) + })(), + (function() { + function a(a, b, c) { + var d = 4 * (c * a.width + b), + e = [] + return e.push(a.data[d++], a.data[d++], a.data[d++], a.data[d++]), e + } + function b(a, b) { + return Math.sqrt( + Math.pow(a[0] - b[0], 2) + Math.pow(a[1] - b[1], 2) + Math.pow(a[2] - b[2], 2) + ) + } + function c(a) { + for (var b = [0, 0, 0], c = 0; c < a.length; c++) + (b[0] += a[c][0]), (b[1] += a[c][1]), (b[2] += a[c][2]) + return (b[0] /= a.length), (b[1] /= a.length), (b[2] /= a.length), b + } + function d(d, e) { + var f = a(d, 0, 0), + g = a(d, d.width - 1, 0), + h = a(d, 0, d.height - 1), + i = a(d, d.width - 1, d.height - 1), + j = e || 10 + if (b(f, g) < j && b(g, i) < j && b(i, h) < j && b(h, f) < j) { + for (var k = c([g, f, i, h]), l = [], m = 0; m < d.width * d.height; m++) { + var n = b(k, [d.data[4 * m], d.data[4 * m + 1], d.data[4 * m + 2]]) + l[m] = j > n ? 0 : 255 + } + return l + } + } + function e(a, b) { + for (var c = 0; c < a.width * a.height; c++) a.data[4 * c + 3] = b[c] + } + function f(a, b, c) { + for ( + var d = [1, 1, 1, 1, 0, 1, 1, 1, 1], + e = Math.round(Math.sqrt(d.length)), + f = Math.floor(e / 2), + g = [], + h = 0; + c > h; + h++ + ) + for (var i = 0; b > i; i++) { + for (var j = h * b + i, k = 0, l = 0; e > l; l++) + for (var m = 0; e > m; m++) { + var n = h + l - f, + o = i + m - f + if (n >= 0 && c > n && o >= 0 && b > o) { + var p = n * b + o, + q = d[l * e + m] + k += a[p] * q + } + } + g[j] = 2040 === k ? 255 : 0 + } + return g + } + function g(a, b, c) { + for ( + var d = [1, 1, 1, 1, 1, 1, 1, 1, 1], + e = Math.round(Math.sqrt(d.length)), + f = Math.floor(e / 2), + g = [], + h = 0; + c > h; + h++ + ) + for (var i = 0; b > i; i++) { + for (var j = h * b + i, k = 0, l = 0; e > l; l++) + for (var m = 0; e > m; m++) { + var n = h + l - f, + o = i + m - f + if (n >= 0 && c > n && o >= 0 && b > o) { + var p = n * b + o, + q = d[l * e + m] + k += a[p] * q + } + } + g[j] = k >= 1020 ? 255 : 0 + } + return g + } + function h(a, b, c) { + for ( + var d = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9], + e = Math.round(Math.sqrt(d.length)), + f = Math.floor(e / 2), + g = [], + h = 0; + c > h; + h++ + ) + for (var i = 0; b > i; i++) { + for (var j = h * b + i, k = 0, l = 0; e > l; l++) + for (var m = 0; e > m; m++) { + var n = h + l - f, + o = i + m - f + if (n >= 0 && c > n && o >= 0 && b > o) { + var p = n * b + o, + q = d[l * e + m] + k += a[p] * q + } + } + g[j] = k + } + return g + } + ;(Kinetic.Filters.Mask = function(a) { + var b = this.getFilterThreshold(), + c = d(a, b) + return ( + c && + ((c = f(c, a.width, a.height)), + (c = g(c, a.width, a.height)), + (c = h(c, a.width, a.height)), + e(a, c)), + a + ) + }), + Kinetic.Node.addFilterGetterSetter(Kinetic.Image, 'filterThreshold', 0) + })() diff --git a/public/externalLibs/visualizer/visualizer.js b/public/externalLibs/visualizer/visualizer.js index 6b6fb2689f..6f22c545db 100644 --- a/public/externalLibs/visualizer/visualizer.js +++ b/public/externalLibs/visualizer/visualizer.js @@ -1,8 +1,8 @@ -(function(exports) { +;(function(exports) { /** * Setup Stage */ - var stage; + var stage var container = document.createElement('div') container.id = 'list-visualizer-container' container.hidden = true @@ -14,87 +14,86 @@ }) /** - * Converts a list, or a pair, to a tree object. Wrapper function. - */ + * Converts a list, or a pair, to a tree object. Wrapper function. + */ function list_to_tree(lst) { - - // actual function in the wrapper - function construct_tree(lst) { - var thisNode = new TreeNode(); - - // memoise the current sublist - perms[counter] = lst; - // assigns an ID to the current node - thisNode.id = counter; - counter ++; - // if the head is also a list, draw it's sublist - if (is_pair(head(lst))) { - // check if such list has been built - if (perms.indexOf(head(lst)) > -1) { - thisNode.leftid = perms.indexOf(head(lst)); - } else { - thisNode.left = construct_tree(head(lst)); - } - // otherwise, it's a data item - } else { - thisNode.data = head(lst); - } - // similarly for right subtree. - if (is_pair(tail(lst)) || is_list(tail(lst)) && is_null(tail(lst))) { - if (perms.indexOf(tail(lst)) > -1) { - thisNode.rightid = perms.indexOf(tail(lst)); - } else if (!is_null(tail(lst))){ - thisNode.right = construct_tree(tail(lst)); - } - } else { - thisNode.data2 = tail(lst); - } - - return thisNode; + // actual function in the wrapper + function construct_tree(lst) { + var thisNode = new TreeNode() + + // memoise the current sublist + perms[counter] = lst + // assigns an ID to the current node + thisNode.id = counter + counter++ + // if the head is also a list, draw it's sublist + if (is_pair(head(lst))) { + // check if such list has been built + if (perms.indexOf(head(lst)) > -1) { + thisNode.leftid = perms.indexOf(head(lst)) + } else { + thisNode.left = construct_tree(head(lst)) + } + // otherwise, it's a data item + } else { + thisNode.data = head(lst) } - // keeps track of all sublists in order to detect cycles - var perms = []; - var tree = new Tree(); - var counter = 0; - tree.rootNode = construct_tree(lst); - return tree; + // similarly for right subtree. + if (is_pair(tail(lst)) || (is_list(tail(lst)) && is_null(tail(lst)))) { + if (perms.indexOf(tail(lst)) > -1) { + thisNode.rightid = perms.indexOf(tail(lst)) + } else if (!is_null(tail(lst))) { + thisNode.right = construct_tree(tail(lst)) + } + } else { + thisNode.data2 = tail(lst) + } + + return thisNode + } + // keeps track of all sublists in order to detect cycles + var perms = [] + var tree = new Tree() + var counter = 0 + tree.rootNode = construct_tree(lst) + return tree } var tcon = { - strokeWidth : 2, - stroke: 'white', - distanceX: 50, - distanceY: 60, - - boxWidth : 90, - boxHeight : 30, - vertBarPos : 0.5, - boxSpacingX : 50, - boxSpacingY : 60, - - arrowSpace : 5, - arrowSpaceH : 13, // horizontal - arrowLength : 8, - arrowAngle : 0.5236,//25 - 0.4363,//20 - 0.3491,// 30 - 0.5236 - - triangeSize : 5, - - padding : 5, - canvasWidth : 1000, + strokeWidth: 2, + stroke: 'white', + distanceX: 50, + distanceY: 60, + + boxWidth: 90, + boxHeight: 30, + vertBarPos: 0.5, + boxSpacingX: 50, + boxSpacingY: 60, + + arrowSpace: 5, + arrowSpaceH: 13, // horizontal + arrowLength: 8, + arrowAngle: 0.5236, //25 - 0.4363,//20 - 0.3491,// 30 - 0.5236 + + triangeSize: 5, + + padding: 5, + canvasWidth: 1000 } function displaySpecialContent(nodeLabel, value) { - if (typeof display === 'function') { - display('*' + nodeLabel + ': ' + value); - } else { - console.log('*' + nodeLabel + ': ' + value) - } + if (typeof display === 'function') { + display('*' + nodeLabel + ': ' + value) + } else { + console.log('*' + nodeLabel + ': ' + value) + } } /** - * A tree object built based on a list or pair. - */ + * A tree object built based on a list or pair. + */ function Tree() { - this.rootNode = new TreeNode(); + this.rootNode = new TreeNode() } /** A node in a binary tree. @@ -107,606 +106,689 @@ if list dicipline is enforced, all data2 shall be empty */ function TreeNode() { - this.data = null; - this.data2 = null; - this.left = null; - this.right = null; + this.data = null + this.data2 = null + this.left = null + this.right = null } /** - * Gets the drawer function of a tree - */ + * Gets the drawer function of a tree + */ Tree.prototype.getDrawer = function() { - return new TreeDrawer(this); + return new TreeDrawer(this) } /** - * Drawer function of a tree - */ + * Drawer function of a tree + */ function TreeDrawer(tree) { - this.tree = tree; + this.tree = tree } /** - * Draws a tree at x,y on a give layer. - * It actually calls drawNode and draws the root at x,y - */ + * Draws a tree at x,y on a give layer. + * It actually calls drawNode and draws the root at x,y + */ TreeDrawer.prototype.draw = function(x, y, layer) { - this.drawNode(this.tree.rootNode, x, y, layer); + this.drawNode(this.tree.rootNode, x, y, layer) } /** - * Draws a root node at x, y on a given layer. - * It first draws the individual box, then see if it's children have been drawn before (by set_head and set_tail). - * If so, it checks the position of the children and draws an arrow pointing to the children. - * Otherwise, recursively draws the children, or a slash in case of empty lists. - */ + * Draws a root node at x, y on a given layer. + * It first draws the individual box, then see if it's children have been drawn before (by set_head and set_tail). + * If so, it checks the position of the children and draws an arrow pointing to the children. + * Otherwise, recursively draws the children, or a slash in case of empty lists. + */ TreeDrawer.prototype.drawNode = function(node, x, y, layer) { - if (node !== null) { - // draws the content - realDrawNode(node.data, node.data2, node.id, x, y, x, y, layer); - - // if it has a left new child, draw it - if (node.left !== null) { - this.drawLeft(node.left, x, y, layer); - // (FIXME the next check may be redundant) - // if it's left child is part of a cycle and it's been drawn, link back to that node instead - } else if (node.leftid != null) { - backwardLeftEdge(x, y, nodelist[node.leftid].getX(), nodelist[node.leftid].getY(), layer); - - } - - // similarly for right child - if (node.right !== null) { - this.drawRight(node.right, x, y, layer); - // (FIXME the next check may be redundant) - } else if (node.rightid != null) { - backwardRightEdge(x, y, nodelist[node.rightid].getX(), nodelist[node.rightid].getY(), layer); - // if the tail is an empty box, draw the respective representation - } else if (node.data2 === null) { - var nullbox = new NodeEmpty_list(x, y); - nullbox.put(layer); - }; - } - } - - /** - * Draws a node at x, y on a given layer, making necessary left shift depending how far the structure of subtree - * extends to the right. - * - * It first draws the individual box, then see if it's children have been drawn before (by set_head and set_tail). - * If so, it checks the position of the children and draws an arrow pointing to the children. - * Otherwise, recursively draws the children, or a slash in case of empty lists. - */ - TreeDrawer.prototype.drawLeft = function(node, parentX, parentY, layer) { - var count, x, y; - // checks if it has a right child, how far it extends to the right direction - if (node.right === null) { - count = 0; - } else { - count = 1 + this.shiftScaleCount(node.right); - } - // shifts left accordingly - x = parentX - tcon.distanceX - count * tcon.distanceX; - y = parentY + tcon.distanceY; - - realDrawNode(node.data, node.data2, node.id, x, y, parentX, parentY, layer); + if (node !== null) { + // draws the content + realDrawNode(node.data, node.data2, node.id, x, y, x, y, layer) + // if it has a left new child, draw it if (node.left !== null) { - this.drawLeft(node.left, x, y, layer); + this.drawLeft(node.left, x, y, layer) + // (FIXME the next check may be redundant) + // if it's left child is part of a cycle and it's been drawn, link back to that node instead } else if (node.leftid != null) { - backwardLeftEdge(x, y, nodelist[node.leftid].getX(), nodelist[node.leftid].getY(), layer); + backwardLeftEdge(x, y, nodelist[node.leftid].getX(), nodelist[node.leftid].getY(), layer) + } - }; + // similarly for right child if (node.right !== null) { - this.drawRight(node.right, x, y, layer); + this.drawRight(node.right, x, y, layer) + // (FIXME the next check may be redundant) } else if (node.rightid != null) { - backwardRightEdge(x, y, nodelist[node.rightid].getX(), nodelist[node.rightid].getY(), layer); - + backwardRightEdge(x, y, nodelist[node.rightid].getX(), nodelist[node.rightid].getY(), layer) + // if the tail is an empty box, draw the respective representation } else if (node.data2 === null) { - var nullbox = new NodeEmpty_list(x, y); - nullbox.put(layer); - }; + var nullbox = new NodeEmpty_list(x, y) + nullbox.put(layer) + } + } } /** - * Draws a node at x, y on a given layer, making necessary right shift depending how far the structure of subtree - * extends to the left. - * - * It first draws the individual box, then see if it's children have been drawn before (by set_head and set_tail). - * If so, it checks the position of the children and draws an arrow pointing to the children. - * Otherwise, recursively draws the children, or a slash in case of empty lists. - */ - TreeDrawer.prototype.drawRight = function(node, parentX, parentY, layer) { - var count, x, y; - if (node.left === null) { - count = 0; - } else { - count = 1 + this.shiftScaleCount(node.left); - } - x = parentX + tcon.distanceX + count * tcon.distanceX; - y = parentY + tcon.distanceY; + * Draws a node at x, y on a given layer, making necessary left shift depending how far the structure of subtree + * extends to the right. + * + * It first draws the individual box, then see if it's children have been drawn before (by set_head and set_tail). + * If so, it checks the position of the children and draws an arrow pointing to the children. + * Otherwise, recursively draws the children, or a slash in case of empty lists. + */ + TreeDrawer.prototype.drawLeft = function(node, parentX, parentY, layer) { + var count, x, y + // checks if it has a right child, how far it extends to the right direction + if (node.right === null) { + count = 0 + } else { + count = 1 + this.shiftScaleCount(node.right) + } + // shifts left accordingly + x = parentX - tcon.distanceX - count * tcon.distanceX + y = parentY + tcon.distanceY - realDrawNode(node.data, node.data2, node.id, x, y, parentX, parentY, layer); + realDrawNode(node.data, node.data2, node.id, x, y, parentX, parentY, layer) - if (node.left !== null) { - this.drawLeft(node.left, x, y, layer); - } else if (node.leftid != null) { - backwardLeftEdge(x, y, nodelist[node.leftid].getX(), nodelist[node.leftid].getY(), layer); + if (node.left !== null) { + this.drawLeft(node.left, x, y, layer) + } else if (node.leftid != null) { + backwardLeftEdge(x, y, nodelist[node.leftid].getX(), nodelist[node.leftid].getY(), layer) + } + if (node.right !== null) { + this.drawRight(node.right, x, y, layer) + } else if (node.rightid != null) { + backwardRightEdge(x, y, nodelist[node.rightid].getX(), nodelist[node.rightid].getY(), layer) + } else if (node.data2 === null) { + var nullbox = new NodeEmpty_list(x, y) + nullbox.put(layer) + } + } - }; - if (node.right !== null) { - this.drawRight(node.right, x, y, layer); - } else if (node.rightid != null) { - backwardRightEdge(x, y, nodelist[node.rightid].getX(), nodelist[node.rightid].getY(), layer); + /** + * Draws a node at x, y on a given layer, making necessary right shift depending how far the structure of subtree + * extends to the left. + * + * It first draws the individual box, then see if it's children have been drawn before (by set_head and set_tail). + * If so, it checks the position of the children and draws an arrow pointing to the children. + * Otherwise, recursively draws the children, or a slash in case of empty lists. + */ + TreeDrawer.prototype.drawRight = function(node, parentX, parentY, layer) { + var count, x, y + if (node.left === null) { + count = 0 + } else { + count = 1 + this.shiftScaleCount(node.left) + } + x = parentX + tcon.distanceX + count * tcon.distanceX + y = parentY + tcon.distanceY - } else if (node.data2 === null) { - var nullbox = new NodeEmpty_list(x, y); - nullbox.put(layer); - }; + realDrawNode(node.data, node.data2, node.id, x, y, parentX, parentY, layer) + + if (node.left !== null) { + this.drawLeft(node.left, x, y, layer) + } else if (node.leftid != null) { + backwardLeftEdge(x, y, nodelist[node.leftid].getX(), nodelist[node.leftid].getY(), layer) + } + if (node.right !== null) { + this.drawRight(node.right, x, y, layer) + } else if (node.rightid != null) { + backwardRightEdge(x, y, nodelist[node.rightid].getX(), nodelist[node.rightid].getY(), layer) + } else if (node.data2 === null) { + var nullbox = new NodeEmpty_list(x, y) + nullbox.put(layer) + } } /** - * Returns the distance necessary for the shift of each node, calculated recursively. - */ + * Returns the distance necessary for the shift of each node, calculated recursively. + */ TreeDrawer.prototype.shiftScaleCount = function(node) { - var count = 0; - // if there is something on the left, it needs to be shifted to the right for 1 + how far that right child shifts - if (node.left !== null) { - count = count + 1 + this.shiftScaleCount(node.left); - } - // if there is something on the right, it needs to be shifted to the left for 1 + how far that left child shifts - if (node.right !== null) { - count = count + 1 + this.shiftScaleCount(node.right); - } - return count; + var count = 0 + // if there is something on the left, it needs to be shifted to the right for 1 + how far that right child shifts + if (node.left !== null) { + count = count + 1 + this.shiftScaleCount(node.left) + } + // if there is something on the right, it needs to be shifted to the left for 1 + how far that left child shifts + if (node.right !== null) { + count = count + 1 + this.shiftScaleCount(node.right) + } + return count } // a list of nodes drawn for a tree. Used to check if a node has appeared before. - var nodelist = []; + var nodelist = [] // keeps track the extreme left end of the tree. In units of pixels. - var minLeft = 500; + var minLeft = 500 /** - * Internal function that puts two data at x1, y1 on a given layer. Connects it to it's parent which is at x2, y2 - */ + * Internal function that puts two data at x1, y1 on a given layer. Connects it to it's parent which is at x2, y2 + */ function realDrawNode(data, data2, id, x1, y1, x2, y2, layer) { - var box = new NodeBox(data, data2); - var node = new Kinetic.Group(); + var box = new NodeBox(data, data2) + var node = new Kinetic.Group() - box.put(node); + box.put(node) - // no pointer is drawn to root - if (x2 !== x1) { - box.connectTo(x2 - x1, y2 - y1); - } + // no pointer is drawn to root + if (x2 !== x1) { + box.connectTo(x2 - x1, y2 - y1) + } - node.setX(x1); - node.setY(y1); - layer.add(node); + node.setX(x1) + node.setY(y1) + layer.add(node) - // add node to the known list - nodelist[id] = node; - // update left extreme of the tree - minLeft = Math.min(minLeft, x1); + // add node to the known list + nodelist[id] = node + // update left extreme of the tree + minLeft = Math.min(minLeft, x1) } /** - * Draws a tree object on the canvas at x,y on a given layer - */ + * Draws a tree object on the canvas at x,y on a given layer + */ function drawTree(tree, x, y, layer) { - var drawer = tree.getDrawer(); - drawer.draw(x, y, layer); + var drawer = tree.getDrawer() + drawer.draw(x, y, layer) - layer.draw(); + layer.draw() } /** - * Try to fit any data into the box. If not possible, assign a number and log it in the console. - */ + * Try to fit any data into the box. If not possible, assign a number and log it in the console. + */ function toText(data, full) { - if (full) { - return "" + data; + if (full) { + return '' + data + } else { + var type = typeof data + if (type === 'function' || type === 'object') { + return false } else { - var type = typeof data; - if (type === "function" || type === "object") { - return false; - } else { - var str = "" + data; - if (str.length > 5) { - return false; - } else { - return str; - } - } + var str = '' + data + if (str.length > 5) { + return false + } else { + return str + } } + } } /** - * Creates a Kinetic.Group that is used to represent a node in a tree. It takes up to two data items. - * The data items are simply converted with toString() - */ + * Creates a Kinetic.Group that is used to represent a node in a tree. It takes up to two data items. + * The data items are simply converted with toString() + */ function NodeBox(value, value2) { - // this.image is the inner content - this.image = new Kinetic.Group(); - - // outer rectangle - var rect = new Kinetic.Rect({ - width : tcon.boxWidth, - height : tcon.boxHeight, - strokeWidth : tcon.strokeWidth, - stroke : 'white', - fill : '#17181A' - }); - - // vertical bar seen in the box - var line = new Kinetic.Line({ - points : [tcon.boxWidth * tcon.vertBarPos, 0, - tcon.boxWidth * tcon.vertBarPos, tcon.boxHeight], - strokeWidth : tcon.strokeWidth, - stroke: 'white' - }); - - var txtValue; - var label; - // text for data item #1 - if (value !== null && (!is_list(value) || !is_null(value))) { - txtValue = toText(value); - label = false; - if (txtValue === false) { - label = true; - nodeLabel ++; - displaySpecialContent(nodeLabel, value); - } - var txt = new Kinetic.Text({ - text : (label) ? "*" + nodeLabel : txtValue, - align : 'center', - width : tcon.vertBarPos * tcon.boxWidth, - y : Math.floor((tcon.boxHeight - 1.2 * 12) / 2), - fontStyle : (label) ? "italic" : "normal", - fill :'white' - }); - this.image.add(txt); - } else if (is_list(value) && is_null(value)) { - var empty = new NodeEmpty_list( -tcon.boxWidth*tcon.vertBarPos, 0); - var emptyBox = empty.getRaw(); - this.image.add(emptyBox); + // this.image is the inner content + this.image = new Kinetic.Group() + + // outer rectangle + var rect = new Kinetic.Rect({ + width: tcon.boxWidth, + height: tcon.boxHeight, + strokeWidth: tcon.strokeWidth, + stroke: 'white', + fill: '#17181A' + }) + + // vertical bar seen in the box + var line = new Kinetic.Line({ + points: [tcon.boxWidth * tcon.vertBarPos, 0, tcon.boxWidth * tcon.vertBarPos, tcon.boxHeight], + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + + var txtValue + var label + // text for data item #1 + if (value !== null && (!is_list(value) || !is_null(value))) { + txtValue = toText(value) + label = false + if (txtValue === false) { + label = true + nodeLabel++ + displaySpecialContent(nodeLabel, value) } + var txt = new Kinetic.Text({ + text: label ? '*' + nodeLabel : txtValue, + align: 'center', + width: tcon.vertBarPos * tcon.boxWidth, + y: Math.floor((tcon.boxHeight - 1.2 * 12) / 2), + fontStyle: label ? 'italic' : 'normal', + fill: 'white' + }) + this.image.add(txt) + } else if (is_list(value) && is_null(value)) { + var empty = new NodeEmpty_list(-tcon.boxWidth * tcon.vertBarPos, 0) + var emptyBox = empty.getRaw() + this.image.add(emptyBox) + } - // text for data item #2 - if (value2 !== null) { - txtValue = toText(value2); - label = false; - if (txtValue === false) { - label = true; - nodeLabel ++; - displaySpecialContent(nodeLabel, value2); - } - var txt2 = new Kinetic.Text({ - text : (label) ? "*" + nodeLabel : txtValue, - align : 'center', - width : tcon.vertBarPos * tcon.boxWidth, - x : tcon.vertBarPos * tcon.boxWidth, - y : Math.floor((tcon.boxHeight - 1.2 * 12) / 2), - fontStyle : (label) ? "italic" : "normal", - fill :'white' - }); - this.image.add(txt2); + // text for data item #2 + if (value2 !== null) { + txtValue = toText(value2) + label = false + if (txtValue === false) { + label = true + nodeLabel++ + displaySpecialContent(nodeLabel, value2) } + var txt2 = new Kinetic.Text({ + text: label ? '*' + nodeLabel : txtValue, + align: 'center', + width: tcon.vertBarPos * tcon.boxWidth, + x: tcon.vertBarPos * tcon.boxWidth, + y: Math.floor((tcon.boxHeight - 1.2 * 12) / 2), + fontStyle: label ? 'italic' : 'normal', + fill: 'white' + }) + this.image.add(txt2) + } - this.image.add(rect); - this.image.add(line); + this.image.add(rect) + this.image.add(line) - // text need to be on top of the box background - if (value !== null && (!is_list(value) || !is_null(value))) { - txt.moveToTop(); - } else if (emptyBox) { - emptyBox.moveToTop(); - } - if (value2 !== null) { - txt2.moveToTop(); - } + // text need to be on top of the box background + if (value !== null && (!is_list(value) || !is_null(value))) { + txt.moveToTop() + } else if (emptyBox) { + emptyBox.moveToTop() + } + if (value2 !== null) { + txt2.moveToTop() + } } /** - * Connects a NodeBox to it's parent at x,y by using line segments with arrow head - */ + * Connects a NodeBox to it's parent at x,y by using line segments with arrow head + */ NodeBox.prototype.connectTo = function(x, y) { - // starting point - var start = {x: tcon.boxWidth/4, y:- tcon.arrowSpace}; + // starting point + var start = { x: tcon.boxWidth / 4, y: -tcon.arrowSpace } + + // end point + if (x > 0) { + var end = { x: x + tcon.boxWidth / 4, y: y + tcon.boxHeight / 2 } + } else { + var end = { x: x + tcon.boxWidth * 3 / 4, y: y + tcon.boxHeight / 2 } + } - // end point - if (x > 0) { - var end = {x:x + tcon.boxWidth/4, y:y + tcon.boxHeight/2} - } else { - var end = {x:x + tcon.boxWidth * 3/4, y:y + tcon.boxHeight/2} + var pointer = new Kinetic.Line({ + points: [start, end], + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + // the angle of the incoming arrow + var angle = Math.atan((end.y - start.y) / (end.x - start.x)) + + // left and right part of an arrow head, rotated to the calculated angle + if (x > 0) { + var left = { + x: start.x + Math.cos(angle + tcon.arrowAngle) * tcon.arrowLength, + y: start.y + Math.sin(angle + tcon.arrowAngle) * tcon.arrowLength } - - var pointer = new Kinetic.Line({ - points: [start, end], - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - // the angle of the incoming arrow - var angle = Math.atan((end.y - start.y)/(end.x - start.x)); - - // left and right part of an arrow head, rotated to the calculated angle - if (x > 0) { - var left = {x:start.x + Math.cos(angle + tcon.arrowAngle) * tcon.arrowLength, - y:start.y + Math.sin(angle + tcon.arrowAngle) * tcon.arrowLength}; - var right = {x:start.x + Math.cos(angle - tcon.arrowAngle) * tcon.arrowLength, - y:start.y + Math.sin(angle - tcon.arrowAngle) * tcon.arrowLength}; - } else { - var left = {x:start.x - Math.cos(angle + tcon.arrowAngle) * tcon.arrowLength, - y:start.y - Math.sin(angle + tcon.arrowAngle) * tcon.arrowLength}; - var right = {x:start.x - Math.cos(angle - tcon.arrowAngle) * tcon.arrowLength, - y:start.y - Math.sin(angle - tcon.arrowAngle) * tcon.arrowLength}; + var right = { + x: start.x + Math.cos(angle - tcon.arrowAngle) * tcon.arrowLength, + y: start.y + Math.sin(angle - tcon.arrowAngle) * tcon.arrowLength + } + } else { + var left = { + x: start.x - Math.cos(angle + tcon.arrowAngle) * tcon.arrowLength, + y: start.y - Math.sin(angle + tcon.arrowAngle) * tcon.arrowLength } + var right = { + x: start.x - Math.cos(angle - tcon.arrowAngle) * tcon.arrowLength, + y: start.y - Math.sin(angle - tcon.arrowAngle) * tcon.arrowLength + } + } - var arrow = new Kinetic.Line({ - points: [left, start, right], - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); + var arrow = new Kinetic.Line({ + points: [left, start, right], + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) - this.image.getParent().add(pointer); - this.image.getParent().add(arrow); + this.image.getParent().add(pointer) + this.image.getParent().add(arrow) } /** - * equivalent to container.add(this.image) - */ + * equivalent to container.add(this.image) + */ NodeBox.prototype.put = function(container) { - container.add(this.image); - }; + container.add(this.image) + } /** - * Connects a box to a previously known box, the arrow path is more complicated. - * After coming out of the starting box, it moves to the left or the right for a short distance, - * Then goes to the correct y-value and turns to reach the top of the end box. - * It then directly points to the end box. All turnings are 90 degress. - */ + * Connects a box to a previously known box, the arrow path is more complicated. + * After coming out of the starting box, it moves to the left or the right for a short distance, + * Then goes to the correct y-value and turns to reach the top of the end box. + * It then directly points to the end box. All turnings are 90 degress. + */ function backwardLeftEdge(x1, y1, x2, y2, layer) { - // coordinates of all the turning points, execpt the first segment in the path - if (x1 > x2 && y1 > y2) { // lower right to upper left - var path = [//x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth/4, y1 + tcon.boxSpacingY*3/4, - x2 - tcon.boxSpacingX/4, y1 + tcon.boxSpacingY*3/4, - x2 - tcon.boxSpacingX/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } else if (x1 <= x2 && y1 > y2) { // lower left to upper right - var path = [//x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth/4, y1 + tcon.boxSpacingY*3/4, - x1 - tcon.boxSpacingX/4, y1 + tcon.boxSpacingY*3/4, - x1 - tcon.boxSpacingX/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } else if (x1 > x2) { // upper right to lower left - var path = [//x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth/4, y1 + tcon.boxSpacingY*3/4, - x1 + tcon.boxWidth/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } else { // upper left to lower right - var path = [//x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth/4, y1 + tcon.boxSpacingY*3/4, - x1 + tcon.boxWidth/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } - var endX = path[path.length - 2]; - var endY = path[path.length - 1]; - var arrowPath = [endX - Math.cos(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength, endY - Math.sin(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength, - endX, endY, - endX + Math.cos(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength, endY - Math.sin(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength]; - // pointy arrow - var arrow = new Kinetic.Line({ - points: arrowPath, - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - - // first segment of the path - var pointerHead = new Kinetic.Line({ - points:[x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth/4, y1 + tcon.boxSpacingY*3/4], - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - - // following segments of the path - var pointer = new Kinetic.Line({ - points: path, - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - layer.add(pointerHead); - layer.add(pointer); - layer.add(arrow); - // since arrow path is complicated, move to bottom in case it covers some other box - pointer.moveToBottom(); + // coordinates of all the turning points, execpt the first segment in the path + if (x1 > x2 && y1 > y2) { + // lower right to upper left + var path = [ + //x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x2 - tcon.boxSpacingX / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x2 - tcon.boxSpacingX / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } else if (x1 <= x2 && y1 > y2) { + // lower left to upper right + var path = [ + //x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 - tcon.boxSpacingX / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 - tcon.boxSpacingX / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } else if (x1 > x2) { + // upper right to lower left + var path = [ + //x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 + tcon.boxWidth / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } else { + // upper left to lower right + var path = [ + //x1 + tcon.boxWidth/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 + tcon.boxWidth / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } + var endX = path[path.length - 2] + var endY = path[path.length - 1] + var arrowPath = [ + endX - Math.cos(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength, + endY - Math.sin(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength, + endX, + endY, + endX + Math.cos(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength, + endY - Math.sin(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength + ] + // pointy arrow + var arrow = new Kinetic.Line({ + points: arrowPath, + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + + // first segment of the path + var pointerHead = new Kinetic.Line({ + points: [ + x1 + tcon.boxWidth / 4, + y1 + tcon.boxHeight / 2, + x1 + tcon.boxWidth / 4, + y1 + tcon.boxSpacingY * 3 / 4 + ], + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + + // following segments of the path + var pointer = new Kinetic.Line({ + points: path, + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + layer.add(pointerHead) + layer.add(pointer) + layer.add(arrow) + // since arrow path is complicated, move to bottom in case it covers some other box + pointer.moveToBottom() } /** - * Same as backwardLeftEdge - */ + * Same as backwardLeftEdge + */ function backwardRightEdge(x1, y1, x2, y2, layer) { - if (x1 > x2 && y1 > y2) { - var path = [//x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth*3/4, y1 + tcon.boxSpacingY*3/4, - x1 + tcon.boxWidth + tcon.boxSpacingX/4, y1 + tcon.boxSpacingY*3/4, - x1 + tcon.boxWidth + tcon.boxSpacingX/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } else if (x1 <= x2 && y1 > y2) { - var path = [//x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth*3/4, y1 + tcon.boxSpacingY*3/4, - x2 + tcon.boxWidth + tcon.boxSpacingX/4, y1 + tcon.boxSpacingY*3/4, - x2 + tcon.boxWidth + tcon.boxSpacingX/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } else if (x1 > x2) { - var path = [//x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth*3/4, y1 + tcon.boxSpacingY*3/4, - x1 + tcon.boxWidth*3/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 + tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } else { - var path = [//x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth*3/4, y1 + tcon.boxSpacingY*3/4, - x1 + tcon.boxWidth*3/4, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.boxSpacingY*3/8, - x2 + tcon.boxWidth/4 - tcon.arrowSpaceH, y2 - tcon.arrowSpace]; - } - var endX = path[path.length - 2]; - var endY = path[path.length - 1]; - var arrowPath = [endX - Math.cos(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength, endY - Math.sin(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength, - endX, endY, - endX + Math.cos(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength, endY - Math.sin(Math.PI/2 - tcon.arrowAngle) * tcon.arrowLength]; - var arrow = new Kinetic.Line({ - points: arrowPath, - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - var pointerHead = new Kinetic.Line({ - points:[x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, - x1 + tcon.boxWidth*3/4, y1 + tcon.boxSpacingY*3/4], - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - var pointer = new Kinetic.Line({ - points: path, - strokeWidth: tcon.strokeWidth, - stroke: 'white' - }); - layer.add(pointerHead); - layer.add(pointer); - layer.add(arrow); - pointer.moveToBottom(); + if (x1 > x2 && y1 > y2) { + var path = [ + //x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth * 3 / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 + tcon.boxWidth + tcon.boxSpacingX / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 + tcon.boxWidth + tcon.boxSpacingX / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } else if (x1 <= x2 && y1 > y2) { + var path = [ + //x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth * 3 / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x2 + tcon.boxWidth + tcon.boxSpacingX / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x2 + tcon.boxWidth + tcon.boxSpacingX / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } else if (x1 > x2) { + var path = [ + //x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth * 3 / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 + tcon.boxWidth * 3 / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 + tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } else { + var path = [ + //x1 + tcon.boxWidth*3/4, y1 + tcon.boxHeight/2, + x1 + tcon.boxWidth * 3 / 4, + y1 + tcon.boxSpacingY * 3 / 4, + x1 + tcon.boxWidth * 3 / 4, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.boxSpacingY * 3 / 8, + x2 + tcon.boxWidth / 4 - tcon.arrowSpaceH, + y2 - tcon.arrowSpace + ] + } + var endX = path[path.length - 2] + var endY = path[path.length - 1] + var arrowPath = [ + endX - Math.cos(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength, + endY - Math.sin(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength, + endX, + endY, + endX + Math.cos(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength, + endY - Math.sin(Math.PI / 2 - tcon.arrowAngle) * tcon.arrowLength + ] + var arrow = new Kinetic.Line({ + points: arrowPath, + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + var pointerHead = new Kinetic.Line({ + points: [ + x1 + tcon.boxWidth * 3 / 4, + y1 + tcon.boxHeight / 2, + x1 + tcon.boxWidth * 3 / 4, + y1 + tcon.boxSpacingY * 3 / 4 + ], + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + var pointer = new Kinetic.Line({ + points: path, + strokeWidth: tcon.strokeWidth, + stroke: 'white' + }) + layer.add(pointerHead) + layer.add(pointer) + layer.add(arrow) + pointer.moveToBottom() } - /** - * Complements a NodeBox when the tail is an empty box. - */ + * Complements a NodeBox when the tail is an empty box. + */ function NodeEmpty_list(x, y) { - var null_box = new Kinetic.Line({ - x: x, - y: y, - points: [tcon.boxWidth * tcon.vertBarPos, tcon.boxHeight, - tcon.boxWidth * tcon.vertBarPos, 0, - tcon.boxWidth, 0, - tcon.boxWidth * tcon.vertBarPos, tcon.boxHeight, - tcon.boxWidth, tcon.boxHeight, - tcon.boxWidth, 0], - strokeWidth: tcon.strokeWidth - 1, - stroke: 'white' - }); - this.image = null_box; - }; + var null_box = new Kinetic.Line({ + x: x, + y: y, + points: [ + tcon.boxWidth * tcon.vertBarPos, + tcon.boxHeight, + tcon.boxWidth * tcon.vertBarPos, + 0, + tcon.boxWidth, + 0, + tcon.boxWidth * tcon.vertBarPos, + tcon.boxHeight, + tcon.boxWidth, + tcon.boxHeight, + tcon.boxWidth, + 0 + ], + strokeWidth: tcon.strokeWidth - 1, + stroke: 'white' + }) + this.image = null_box + } /** - * Adds it to a container - */ + * Adds it to a container + */ NodeEmpty_list.prototype.put = function(container) { - container.add(this.image); - }; + container.add(this.image) + } NodeEmpty_list.prototype.getRaw = function() { - return this.image; - }; + return this.image + } // A list of layers drawn, used for history - var layerList = []; + var layerList = [] // ID of the current layer shown. Avoid changing this value externally as layer is not updated. - var currentListVisualizer = -1; + var currentListVisualizer = -1 // label numbers when the data cannot be fit into the box - var nodeLabel = 0; + var nodeLabel = 0 /** - * For student use. Draws a list by converting it into a tree object, attempts to draw on the canvas, - * Then shift it to the left end. - */ + * For student use. Draws a list by converting it into a tree object, attempts to draw on the canvas, + * Then shift it to the left end. + */ function draw(xs) { - minLeft = 500; - nodelist = []; - nodeLabel = 0; - // hides all other layers - for (var i = 0; i < layerList.length; i++) { - layerList[i].hide(); - } - // creates a new layer and add to the stage - var layer = new Kinetic.Layer(); - stage.add(layer); - layerList.push(layer); - - if (!is_pair(xs)) { - if (is_null(xs)) { - var display = "[ ]"; - } else { - var display = toText(xs, true); - } - var txt = new Kinetic.Text({ - text : display, - align : 'center', - x : 500, - y : 50, - fontStyle : "normal", - fontSize : 20, - fill :'white' - }); - layer.add(txt); + minLeft = 500 + nodelist = [] + nodeLabel = 0 + // hides all other layers + for (var i = 0; i < layerList.length; i++) { + layerList[i].hide() + } + // creates a new layer and add to the stage + var layer = new Kinetic.Layer() + stage.add(layer) + layerList.push(layer) + + if (!is_pair(xs)) { + if (is_null(xs)) { + var display = '[ ]' } else { - // attempts to draw the tree - drawTree(list_to_tree(xs), 500, 50, layer); + var display = toText(xs, true) } + var txt = new Kinetic.Text({ + text: display, + align: 'center', + x: 500, + y: 50, + fontStyle: 'normal', + fontSize: 20, + fill: 'white' + }) + layer.add(txt) + } else { + // attempts to draw the tree + drawTree(list_to_tree(xs), 500, 50, layer) + } - // adjust the position - layer.setOffset(minLeft - 20,0); - layer.draw(); + // adjust the position + layer.setOffset(minLeft - 20, 0) + layer.draw() - // update current ID - currentListVisualizer = layerList.length - 1; - updateListVisualizerButtons(); + // update current ID + currentListVisualizer = layerList.length - 1 + updateListVisualizerButtons() } - exports.draw = draw; + exports.draw = draw /** - * Shows the layer with a given ID while hiding the others. - */ + * Shows the layer with a given ID while hiding the others. + */ function showListVisualizer(id) { - for (var i = 0; i < layerList.length; i++) { - layerList[i].hide(); - } - if (layerList[id]) { - layerList[id].show(); - currentListVisualizer = id; - } + for (var i = 0; i < layerList.length; i++) { + layerList[i].hide() + } + if (layerList[id]) { + layerList[id].show() + currentListVisualizer = id + } } function updateListVisualizerButtons() { - if (currentListVisualizer <= 0) { - $(".sa-list-visualizer #previous").attr('disabled', 'disabled'); - } else { - $(".sa-list-visualizer #previous").removeAttr('disabled'); - } + if (currentListVisualizer <= 0) { + $('.sa-list-visualizer #previous').attr('disabled', 'disabled') + } else { + $('.sa-list-visualizer #previous').removeAttr('disabled') + } - if (currentListVisualizer >= layerList.length - 1) { - $(".sa-list-visualizer #next").attr('disabled', 'disabled'); - } else { - $(".sa-list-visualizer #next").removeAttr('disabled'); - } + if (currentListVisualizer >= layerList.length - 1) { + $('.sa-list-visualizer #next').attr('disabled', 'disabled') + } else { + $('.sa-list-visualizer #next').removeAttr('disabled') + } } function clearListVisualizer() { - currentListVisualizer = -1; - for (var i = 0; i < layerList.length; i++) { - layerList[i].hide(); - } - layerList = []; - updateListVisualizerButtons(); + currentListVisualizer = -1 + for (var i = 0; i < layerList.length; i++) { + layerList[i].hide() + } + layerList = [] + updateListVisualizerButtons() } - exports.ListVisualizer ={ + exports.ListVisualizer = { draw: draw, clear: clearListVisualizer, init: function(parent) { @@ -730,6 +812,5 @@ } } - setTimeout(() => { - }, 1000) + setTimeout(() => {}, 1000) })(window) diff --git a/src/actions/interpreter.ts b/src/actions/interpreter.ts index 176ae7bbf6..f5087bb634 100644 --- a/src/actions/interpreter.ts +++ b/src/actions/interpreter.ts @@ -1,4 +1,4 @@ -import { SourceError, Value } from 'js-slang/dist/types' +import { SourceError, Value } from 'js-slang/types' import * as actionTypes from './actionTypes' import { WorkspaceLocation } from './workspaces' diff --git a/src/components/workspace/Repl.tsx b/src/components/workspace/Repl.tsx index 11c2e581c6..b9a12a76f2 100644 --- a/src/components/workspace/Repl.tsx +++ b/src/components/workspace/Repl.tsx @@ -1,6 +1,6 @@ import { Card } from '@blueprintjs/core' import { parseError } from 'js-slang' -import { stringify } from 'js-slang/dist/interop' +import { stringify } from 'js-slang/interop' import * as React from 'react' import { HotKeys } from 'react-hotkeys' diff --git a/src/mocks/context.ts b/src/mocks/context.ts index 6aaf16984d..7357e3c73d 100644 --- a/src/mocks/context.ts +++ b/src/mocks/context.ts @@ -1,9 +1,9 @@ import { parse } from 'acorn' import * as es from 'estree' import { createContext } from 'js-slang' -import Closure from 'js-slang/dist/closure' -import { Context, Frame } from 'js-slang/dist/types' -import { TypeError } from 'js-slang/dist/utils/rttc' +import Closure from 'js-slang/closure' +import { Context, Frame } from 'js-slang/types' +import { TypeError } from 'js-slang/utils/rttc' export function mockContext(chapter = 1): Context { return createContext(chapter) diff --git a/src/reducers/states.ts b/src/reducers/states.ts index b27f6d3bfe..a6b4ca406a 100644 --- a/src/reducers/states.ts +++ b/src/reducers/states.ts @@ -1,5 +1,5 @@ import { Context } from 'js-slang' -import { SourceError } from 'js-slang/dist/types' +import { SourceError } from 'js-slang/types' import { WorkspaceLocation, WorkspaceLocations } from '../actions/workspaces' import { Grading, GradingOverview } from '../components/academy/grading/gradingShape' diff --git a/src/sagas/index.ts b/src/sagas/index.ts index 49515ed5da..bdbd74d0b3 100644 --- a/src/sagas/index.ts +++ b/src/sagas/index.ts @@ -1,5 +1,5 @@ import { Context, interrupt, runInContext } from 'js-slang' -import { InterruptedError } from 'js-slang/dist/interpreter-errors' +import { InterruptedError } from 'js-slang/interpreter-errors' import { compressToEncodedURIComponent } from 'lz-string' import * as qs from 'query-string' import { delay, SagaIterator } from 'redux-saga' diff --git a/src/utils/slangHelper.ts b/src/utils/slangHelper.ts index dc34b3d93d..b3e3fffd5b 100644 --- a/src/utils/slangHelper.ts +++ b/src/utils/slangHelper.ts @@ -1,7 +1,7 @@ /* tslint:disable: ban-types*/ import { createContext as createSlangContext } from 'js-slang' -import { stringify } from 'js-slang/dist/interop' -import { Value } from 'js-slang/dist/types' +import { stringify } from 'js-slang/interop' +import { Value } from 'js-slang/types' import { handleConsoleLog } from '../actions' diff --git a/yarn.lock b/yarn.lock index a869dbbfde..271648f3ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,14 +5,12 @@ "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" - integrity sha512-cuAuTTIQ9RqcFRJ/Y8PvTh+paepNcaGxwQwjIDRWPXmzzyAeCO4KqS9ikMvq0MCbRk6GlYKwfzStrcP3/jSL8g== dependencies: "@babel/highlight" "7.0.0-beta.44" "@babel/highlight@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" - integrity sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ== dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -21,7 +19,6 @@ "@blueprintjs/core@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-2.1.1.tgz#8e7178c7bd0faea53a0f9a25392215a1fe62d05e" - integrity sha512-k2CNvE0WH43M4YOaU6O87f/kh5ZdojBkVEgp3wh7A1/2V6dilKRKepYhZYmTJ/T66F8qBkg+Nq7B+qU2DbH0Uw== dependencies: "@blueprintjs/icons" "^2.1.1" "@types/dom4" "^2.0.0" @@ -35,7 +32,6 @@ "@blueprintjs/core@^2.3.1": version "2.3.1" resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-2.3.1.tgz#c998f8d22b02bfc9990b66b201f1ea095fb15450" - integrity sha512-huOi4cyICMZb3YwbLgsq/sKWTvIAJw9RZrmarNvVXxK7XJLIk8xSyVZWxJchf+ESpVWskBhZS1cT9b736KptsQ== dependencies: "@blueprintjs/icons" "^2.2.1" "@types/dom4" "^2.0.0" @@ -49,7 +45,6 @@ "@blueprintjs/icons@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@blueprintjs/icons/-/icons-2.1.1.tgz#426b0291baf198e0181ae8f49bb5c2bc0bb55e9f" - integrity sha512-A7oLBH1oSsKEvEwAES3wCNWnZkOuDoAgLYoXJjk1Q+hdDqU+x9PQCgASR4o69jjV6GapSKVDKJ+G9Z/uKT5ARg== dependencies: classnames "^2.2" tslib "^1.9.0" @@ -57,7 +52,6 @@ "@blueprintjs/icons@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@blueprintjs/icons/-/icons-2.2.1.tgz#1b4275fc67467218a8ffec6403c87c7af24532a5" - integrity sha512-aMFjwfI6eEliw+Rqyhzt0ZbetxQgKO+fsnWefMqUEYG9eix/PSNPD8Bb/v1vyaFSO1Doa74G5Xj6d5AgNZt+Ww== dependencies: classnames "^2.2" tslib "^1.9.0" @@ -65,7 +59,6 @@ "@blueprintjs/select@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@blueprintjs/select/-/select-2.0.1.tgz#4746aff7ed534113b17d0663bf548b2867dc4b2a" - integrity sha512-QTNzYrc6LeBxNTAGr4wqFCjf5AXfNC8XfYt/H+rPmNJyDusVutDID4IXzhFlMM+Xt8xDNu7ayqKO6H3S82fjfw== dependencies: "@blueprintjs/core" "^2.3.1" classnames "^2.2" @@ -74,200 +67,162 @@ "@pixi/filter-adjustment@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-adjustment/-/filter-adjustment-2.5.0.tgz#541ae6f60fe74c43cd6d74b78347d97da4a1c20a" - integrity sha1-VBrm9g/nTEPNbXS3g0fZfaShwgo= "@pixi/filter-advanced-bloom@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-advanced-bloom/-/filter-advanced-bloom-2.6.0.tgz#5de110c97a9a61c27d67daf0d6741124445275fb" - integrity sha1-XeEQyXqaYcJ9Z9rw1nQRJERSdfs= dependencies: "@pixi/filter-kawase-blur" "^2.6.0" "@pixi/filter-ascii@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-ascii/-/filter-ascii-2.5.0.tgz#62ef324c68412584e6e529a83c376c2855fbaf67" - integrity sha1-Yu8yTGhBJYTm5SmoPDdsKFX7r2c= "@pixi/filter-bevel@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-bevel/-/filter-bevel-2.6.0.tgz#f45bb12f25fd61defedfc222bee15ba03a32e8e4" - integrity sha1-9FuxLyX9Yd7+38IivuFboDoy6OQ= "@pixi/filter-bloom@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-bloom/-/filter-bloom-2.5.0.tgz#4a42059c30beefa483c0dec7ef3614b2b3c58c05" - integrity sha1-SkIFnDC+76SDwN7H7zYUsrPFjAU= "@pixi/filter-bulge-pinch@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-bulge-pinch/-/filter-bulge-pinch-2.6.0.tgz#1e27c866da08b3b9743149fb8b3464b49c05f138" - integrity sha1-HifIZtoIs7l0MUn7izRktJwF8Tg= "@pixi/filter-color-map@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-color-map/-/filter-color-map-2.6.0.tgz#0fe8944dd275b38c38f9da5a13ccf1af2aa80996" - integrity sha1-D+iUTdJ1s4w4+dpaE8zxryqoCZY= "@pixi/filter-color-replace@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-color-replace/-/filter-color-replace-2.6.0.tgz#7ede850e89b61913ec00d7162370949a34fccf7f" - integrity sha1-ft6FDom2GRPsANcWI3CUmjT8z38= "@pixi/filter-convolution@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-convolution/-/filter-convolution-2.6.0.tgz#ce0cc499ae132e4fbac8aa5074489cc76a097120" - integrity sha1-zgzEma4TLk+6yKpQdEicx2oJcSA= "@pixi/filter-cross-hatch@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-cross-hatch/-/filter-cross-hatch-2.5.0.tgz#d72e9d3eb44aea64e629fb8718219679ec67d017" - integrity sha1-1y6dPrRK6mTmKfuHGCGWeexn0Bc= "@pixi/filter-crt@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-crt/-/filter-crt-2.6.0.tgz#0ab5c46a5ec20a20f9ca4c49af37520ae4e03204" - integrity sha1-CrXEal7CCiD5ykxJrzdSCuTgMgQ= "@pixi/filter-dot@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-dot/-/filter-dot-2.5.0.tgz#25dad184662eb537a18ca38ecf003d97dd999d75" - integrity sha1-JdrRhGYutTehjKOOzwA9l92ZnXU= "@pixi/filter-drop-shadow@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-drop-shadow/-/filter-drop-shadow-2.6.0.tgz#5d3c3f587647415f5c005e52c3e131adccf280f9" - integrity sha1-XTw/WHZHQV9cAF5Sw+ExrczygPk= dependencies: "@pixi/filter-kawase-blur" "^2.6.0" "@pixi/filter-emboss@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-emboss/-/filter-emboss-2.5.0.tgz#3d97cc4fb5991d7699ffe4a78216df8c2e353079" - integrity sha1-PZfMT7WZHXaZ/+SnghbfjC41MHk= "@pixi/filter-glitch@^2.6.1": version "2.6.1" resolved "https://registry.yarnpkg.com/@pixi/filter-glitch/-/filter-glitch-2.6.1.tgz#8fece6cd68a5720d0abe74bb1b90592c0e4a8bac" - integrity sha512-z3rl6kcMU7E11XyLgj9izLZDdeTw+tMKSvcSsD0ena+l9dORewLzmOiHprlHc7SJcdxIcy7u/9QuCsdXo/+TXQ== "@pixi/filter-glow@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-glow/-/filter-glow-2.5.0.tgz#44bd462ccbfebe2b7932291dddbee7ce14cb62c0" - integrity sha1-RL1GLMv+vit5Mikd3b7nzhTLYsA= "@pixi/filter-godray@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-godray/-/filter-godray-2.6.0.tgz#7c9fd85d2949740f555d1b817fa7f5fc71952f1c" - integrity sha1-fJ/YXSlJdA9VXRuBf6f1/HGVLxw= "@pixi/filter-kawase-blur@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-kawase-blur/-/filter-kawase-blur-2.6.0.tgz#d45c34d9cf3a0a6d9e73ba8266b5ef8f41fcd652" - integrity sha1-1Fw02c86Cm2ec7qCZrXvj0H81lI= "@pixi/filter-motion-blur@^2.6.1": version "2.6.1" resolved "https://registry.yarnpkg.com/@pixi/filter-motion-blur/-/filter-motion-blur-2.6.1.tgz#047c9999afb5838a7fa4f923f9237f9eeda284e8" - integrity sha512-OjYGWvpPU9ptuuUTuetxurzTgy97DKxpoxP2StlvVKbuBXxah7viZUKAtpSkMCSYCaUS/OZuqTtszziBG5ApxA== "@pixi/filter-multi-color-replace@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-multi-color-replace/-/filter-multi-color-replace-2.5.0.tgz#30834ddfc984cec7453034ea51217a391b96cf60" - integrity sha1-MINN38mEzsdFMDTqUSF6ORuWz2A= "@pixi/filter-old-film@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-old-film/-/filter-old-film-2.6.0.tgz#38ae6ed48288cd6b0085a8476c8da2ff4a4069c9" - integrity sha1-OK5u1IKIzWsAhahHbI2i/0pAack= "@pixi/filter-outline@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-outline/-/filter-outline-2.6.0.tgz#a8d1503db17bcb5830cc1f6b424ca78007eb841f" - integrity sha1-qNFQPbF7y1gwzB9rQkyngAfrhB8= "@pixi/filter-pixelate@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-pixelate/-/filter-pixelate-2.5.0.tgz#07aeb3f00a48d9c4a7cb228860d6322d77db4bc3" - integrity sha1-B66z8ApI2cSnyyKIYNYyLXfbS8M= "@pixi/filter-radial-blur@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-radial-blur/-/filter-radial-blur-2.6.0.tgz#fd2d5214786303f9f4f23b04079736e618e02d7c" - integrity sha1-/S1SFHhjA/n08jsEB5c25hjgLXw= "@pixi/filter-reflection@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-reflection/-/filter-reflection-2.6.0.tgz#7496cb51a0e61bf7bc158fa8e61d45319da8cc7f" - integrity sha1-dJbLUaDmG/e8FY+o5h1FMZ2ozH8= "@pixi/filter-rgb-split@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-rgb-split/-/filter-rgb-split-2.5.0.tgz#493704fa8d061a70772b6a38f60dff6b1c27b554" - integrity sha1-STcE+o0GGnB3K2o49g3/axwntVQ= "@pixi/filter-shockwave@^2.6.1": version "2.6.1" resolved "https://registry.yarnpkg.com/@pixi/filter-shockwave/-/filter-shockwave-2.6.1.tgz#1894d0c3b0188fb2a846ef995b3c2f5b043cfaab" - integrity sha512-Q8HvxwR/Kff3p2nopD2jP4E0MTr7x/IFOtIsC0f5KIKgNVu2UHvV8oRTB6Y0kVhMR2hDQk/Peu2jda6DrFVYXA== "@pixi/filter-simple-lightmap@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-simple-lightmap/-/filter-simple-lightmap-2.6.0.tgz#f2045101071d9d177fd45f61708f87bff0191496" - integrity sha1-8gRRAQcdnRd/1F9hcI+Hv/AZFJY= "@pixi/filter-tilt-shift@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-tilt-shift/-/filter-tilt-shift-2.6.0.tgz#3bcca3bf4ef3c5c6182d9f56035da547cddef7f9" - integrity sha1-O8yjv07zxcYYLZ9WA12lR83e9/k= "@pixi/filter-twist@^2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@pixi/filter-twist/-/filter-twist-2.5.0.tgz#a8f16567e9bc2f1d3026a6ebc3167e24221e3f28" - integrity sha1-qPFlZ+m8Lx0wJqbrwxZ+JCIePyg= "@pixi/filter-zoom-blur@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@pixi/filter-zoom-blur/-/filter-zoom-blur-2.6.0.tgz#4ad966a309372b731e0fc469d97dd51bf79d1bd6" - integrity sha1-Stlmowk3K3MeD8Rp2X3VG/edG9Y= "@types/acorn@^4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.3.tgz#d1f3e738dde52536f9aad3d3380d14e448820afd" - integrity sha512-gou/kWQkGPMZjdCKNZGDpqxLm9+ErG/pFZKPX4tvCjr0Xf4FCYYX3nAsu7aDVKJV3KUe27+mvqqyWT/9VZoM/A== dependencies: "@types/estree" "*" "@types/cheerio@*": version "0.22.7" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.7.tgz#4a92eafedfb2b9f4437d3a4410006d81114c66ce" - integrity sha512-+T9qBbqe/jXtTjzVddArZExahoPPmt8eq3O1ZuCKZXjBVxf/ciUYNXrIDZJEVgYvpELnv6VlPRCfLzufRxpAag== "@types/classnames@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@types/classnames/-/classnames-2.2.3.tgz#3f0ff6873da793870e20a260cada55982f38a9e5" - integrity sha512-x15/Io+JdzrkM9gnX6SWUs/EmqQzd65TD9tcZIAQ1VIdb93XErNuYmB7Yho8JUCE189ipUSESsWvGvYXRRIvYA== "@types/common-tags@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@types/common-tags/-/common-tags-1.4.0.tgz#28c1be61e352dde38936018984e2885caef087c1" - integrity sha512-HI1tSO87vmd1sPS3DOVSK4gvVKROvCBFvAnXlLiQtAus/+1xXMQcNyu9TX2ChwRXFeQZeB9+f+nMo99xLd5DdA== "@types/dom4@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/dom4/-/dom4-2.0.0.tgz#00dc42fed6b36a7a6dabb8f7a9c9e678ee644e05" - integrity sha512-8daxuqQvjHC2EaOfEC99ayfoiaaAVW+Mmm+3Uf0NDi9c5yarbFLXAU/BgSXLJgnbExSIokpvGDAZsYW82kg5Dg== "@types/dotenv@^4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/dotenv/-/dotenv-4.0.3.tgz#ebcfc40da7bc0728b705945b7db48485ec5b4b67" - integrity sha512-mmhpINC/HcLGQK5ikFJlLXINVvcxhlrV+ZOUJSN7/ottYl+8X4oSXzS9lBtDkmWAl96EGyGyLrNvk9zqdSH8Fw== dependencies: "@types/node" "*" "@types/draft-js@^0.10.23": version "0.10.23" resolved "https://registry.yarnpkg.com/@types/draft-js/-/draft-js-0.10.23.tgz#c313e5e2d6d1b707c18317882b9415975890f3bd" - integrity sha512-SMy+ZfSq2b+GN2RbjyxzJkqyDwfT+z3f3njXZi/1aZFz/l8OR+faYyNc8/z/b53L5JlAsFhXPn63LaN8bh00xw== dependencies: "@types/react" "*" immutable "^3.8.1" @@ -275,14 +230,12 @@ "@types/enzyme-adapter-react-16@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.2.tgz#15ae37c64d6221a6f4b3a4aacc357cf773859de4" - integrity sha512-/oEtlwJyFIT9metXC2A90XnjfHwBDYxhFoJwqNjNDG5K2CCqp7xneQbAp4u5j280bOmalFYUDjfmmxNQG3S4Og== dependencies: "@types/enzyme" "*" "@types/enzyme@*": version "3.1.10" resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.10.tgz#28108a9864e65699751469551a803a35d2e26160" - integrity sha512-90MTwbHmNJybcbHQvSQLbeebROnAXSK216Jl2wo+Yy6Xp0KA7d0NlJcx5nyV03agFUgk7sRmZTTbuhpjMkgNOQ== dependencies: "@types/cheerio" "*" "@types/react" "*" @@ -290,67 +243,55 @@ "@types/enzyme@^3.1.9": version "3.1.9" resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.9.tgz#fbd97f3beb7cad76fc9c6f04c97d77f4834522ef" - integrity sha512-spu+IYTIxDaaRBP12eYCpFJNQwtANX1ZxxXLk8SaCVjZnNUaIPtY7ek6ATdn5GykIf/E7L2lWnC3gQUl5b8kpQ== dependencies: "@types/cheerio" "*" "@types/react" "*" -"@types/estree@*", "@types/estree@0.0.39", "@types/estree@^0.0.39": +"@types/estree@*", "@types/estree@^0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" - integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== "@types/history@*": version "4.6.2" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.2.tgz#12cfaba693ba20f114ed5765467ff25fdf67ddb0" - integrity sha512-eVAb52MJ4lfPLiO9VvTgv8KaZDEIqCwhv+lXOMLlt4C1YHTShgmMULEg0RrCbnqfYd6QKfHsMp0MiX0vWISpSw== "@types/invariant@^2.2.29": version "2.2.29" resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.29.tgz#aa845204cd0a289f65d47e0de63a6a815e30cc66" - integrity sha512-lRVw09gOvgviOfeUrKc/pmTiRZ7g7oDOU6OAutyuSHpm1/o2RaBQvRhgK8QEdu+FFuw/wnWb29A/iuxv9i8OpQ== "@types/jest@^22.2.3": version "22.2.3" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.2.3.tgz#0157c0316dc3722c43a7b71de3fdf3acbccef10d" - integrity sha512-e74sM9W/4qqWB6D4TWV9FQk0WoHtX1X4FJpbjxucMSVJHtFjbQOH3H6yp+xno4br0AKG0wz/kPtaN599GUOvAg== "@types/lodash@^4.14.110": version "4.14.110" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.110.tgz#fb07498f84152947f30ea09d89207ca07123461e" - integrity sha512-iXYLa6olt4tnsCA+ZXeP6eEW3tk1SulWeYyP/yooWfAtXjozqXgtX4+XUtMuOCfYjKGz3F34++qUc3Q+TJuIIw== "@types/lz-string@^1.3.32": version "1.3.32" resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.3.32.tgz#60e26d0f70daa6bf385b9437bb02f661a5713f81" - integrity sha1-YOJtD3Dapr84W5Q3uwL2YaVxP4E= "@types/node@*", "@types/node@^9.6.5": version "9.6.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.5.tgz#ee700810fdf49ac1c399fc5980b7559b3e5a381d" - integrity sha512-NOLEgsT6UiDTjnWG5Hd2Mg25LRyz/oe8ql3wbjzgSFeRzRROhPmtlsvIrei4B46UjERF0td9SZ1ZXPLOdcrBHg== "@types/pixi.js@^4.7.3": version "4.7.3" resolved "https://registry.yarnpkg.com/@types/pixi.js/-/pixi.js-4.7.3.tgz#53e9b3df583cd985c773f42123abcfc345a04c3d" - integrity sha512-bs2d1K3QSnqLvQC8vvUcKXjowBv6qWNLX/3OgWAZmE5/trVeLDM9NUx5i23X7+hbmoPRNv6G1Cq8+mvTMObzIw== "@types/query-string@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/query-string/-/query-string-5.1.0.tgz#7f40cdea49ddafa0ea4f3db35fb6c24d3bfd4dcc" - integrity sha512-9/sJK+T04pNq7uwReR0CLxqXj1dhxiTapZ1tIxA0trEsT6FRS0bz09YMcMb7tsVBTm4RJ0NEBYGsAjoEmqoFXg== "@types/react-copy-to-clipboard@^4.2.5": version "4.2.5" resolved "https://registry.yarnpkg.com/@types/react-copy-to-clipboard/-/react-copy-to-clipboard-4.2.5.tgz#bda288b4256288676019b75ca86f1714bbd206d4" - integrity sha512-5LggaWWlMcgehfeDmr4FZmK8MXntzxLYERFdrXk72ye6QwpoZpyYFGgUM+xGVVtIP2WXlor8twZTXK1xckEDYw== dependencies: "@types/react" "*" "@types/react-dom@^16.0.5": version "16.0.5" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.5.tgz#a757457662e3819409229e8f86795ff37b371f96" - integrity sha512-ony2hEYlGXCLWNAWWgbsHR7qVvDbeMRFc5b43+7dhj3n+zXzxz81HV9Yjpc3JD8vLCiwYoSLqFCI6bD0+0zG2Q== dependencies: "@types/node" "*" "@types/react" "*" @@ -358,7 +299,6 @@ "@types/react-redux@^5.0.16": version "5.0.16" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-5.0.16.tgz#46f1b2043abd2b4364a857100abf5e5a6ef94bf0" - integrity sha512-P9AVN8pJpQJKYgNJd/sWECZJzY0fgtKrLFOg6k2yXVGGbrmuo8OU30xk65bqoNU95xFB6i8ySursJDBrSvJFFw== dependencies: "@types/react" "*" redux "^3.6.0" @@ -366,7 +306,6 @@ "@types/react-router-dom@^4.2.6": version "4.2.6" resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.2.6.tgz#9f7eb3c0e6661a9607d878ff8675cc4ea95cd276" - integrity sha512-K7SdbkF8xgecp2WCeXw51IMySYvQ1EuVPKfjU1fymyTSX9bZk5Qx8T5cipwtAY8Zhb/4GIjhYKm0ZGVEbCKEzQ== dependencies: "@types/history" "*" "@types/react" "*" @@ -375,7 +314,6 @@ "@types/react-router-redux@^5.0.13": version "5.0.13" resolved "https://registry.yarnpkg.com/@types/react-router-redux/-/react-router-redux-5.0.13.tgz#46dc040afc150ff7bbc8bb837b14ef4fa6a0b07e" - integrity sha512-nLKmRnGH5xRgtrJ5X2ItlDt/dIQ0veLekAJU35M91xhMTHvwt66dt5CWghcKAL56h1+33jPGJAR7RXSR/+UOeQ== dependencies: "@types/history" "*" "@types/react" "*" @@ -385,7 +323,6 @@ "@types/react-router@*", "@types/react-router@^4.0.24": version "4.0.24" resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.24.tgz#e378e84186522216ae36cea12313965e190cd55f" - integrity sha512-uYY+o2+d2+ZzcIkkzwkdybKnGTbH5ooBuHlkPnZMl2/YlmsVgwAwCxS8HYDle3VdnYxILZe9dUSa1mchg6RPWw== dependencies: "@types/history" "*" "@types/react" "*" @@ -393,33 +330,28 @@ "@types/react-test-renderer@^16.0.1": version "16.0.1" resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-16.0.1.tgz#36ee8c4fe33c61d460ad0e7bc42a2d0ddcc775a1" - integrity sha512-kmNh8g67Ck/y/vp6KX+4JTJXiTGLZBylNhu+R7sm7zcvsrnIGVO6J1zew5inVg428j9f8yHpl68RcYOZXVborQ== dependencies: "@types/react" "*" "@types/react@*", "@types/react@^16.3.10": version "16.3.10" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.3.10.tgz#2f25eef83f7c7f6c51cea4c02660f727c75d3b33" - integrity sha512-NGqrP0qhgn8hlFMO3I1w7vwT8KIcdEg1D1AFtYaNBhp1Uo4SZgUpNcbOBfrvgAPRr1nn+Ail/0VoPLI2n4SNMw== dependencies: csstype "^2.2.0" "@types/redux-mock-store@^0.0.13": version "0.0.13" resolved "https://registry.yarnpkg.com/@types/redux-mock-store/-/redux-mock-store-0.0.13.tgz#f7ec160214b854f2d976ca12525997a21512b2ea" - integrity sha512-OMU6xD2byzaURUx6rnkWusEhGfTYvNkwoNHcJkwfwVn1WWUtRSB+RReGhHLeXchg/8DcyLPikD7OP1vygMz1FA== dependencies: redux "^3.6.0" "@types/showdown@^1.7.5": version "1.7.5" resolved "https://registry.yarnpkg.com/@types/showdown/-/showdown-1.7.5.tgz#91061f2f16d5bdf66b186185999ed675a8908b6a" - integrity sha512-uUSUP6XtyTclRzTH0NLkEIiEowxYXOWDeulpngrPltEceOmsGdhfrl8xr3D4QfJA7FuUUyHwFQuWWURLFg3hgg== JSONStream@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.3.tgz#27b4b8fbbfeab4e71bcf551e7f27be8d952239bf" - integrity sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg== dependencies: jsonparse "^1.2.0" through ">=2.2.7 <3" @@ -427,17 +359,14 @@ JSONStream@^1.3.2: abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" - integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= abbrev@1, abbrev@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== accepts@~1.3.4, accepts@~1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= dependencies: mime-types "~2.1.18" negotiator "0.6.1" @@ -445,77 +374,68 @@ accepts@~1.3.4, accepts@~1.3.5: acorn-dynamic-import@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" - integrity sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ= dependencies: acorn "^4.0.3" acorn-globals@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" - integrity sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ== dependencies: acorn "^5.0.0" +acorn-walk@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" + acorn@^4.0.3: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= acorn@^5.0.0, acorn@^5.3.0: version "5.5.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" - integrity sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== acorn@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" - integrity sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ== address@1.0.3, address@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" - integrity sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg== ag-grid-react@^18.0.0: version "18.0.0" resolved "https://registry.yarnpkg.com/ag-grid-react/-/ag-grid-react-18.0.0.tgz#6d277bc4974a32c5a4953702fe27f3f14ee68651" - integrity sha1-bSd7xJdKMsWklTcC/ifz8U7mhlE= dependencies: prop-types "15.6.0" ag-grid@^18.0.1: version "18.0.1" resolved "https://registry.yarnpkg.com/ag-grid/-/ag-grid-18.0.1.tgz#e72ee2f7cd79063466fc99fa22f7f4e9880adda2" - integrity sha1-5y7i9815BjRm/Jn6Ivf06YgK3aI= agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" - integrity sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg== dependencies: es6-promisify "^5.0.0" agentkeepalive@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.4.1.tgz#aa95aebc3a749bca5ed53e3880a09f5235b48f0c" - integrity sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg== dependencies: humanize-ms "^1.2.1" ajv-keywords@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" - integrity sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I= ajv-keywords@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" - integrity sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74= ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -523,7 +443,6 @@ ajv@^4.9.1: ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" @@ -533,7 +452,6 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5: ajv@^6.1.0: version "6.4.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6" - integrity sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y= dependencies: fast-deep-equal "^1.0.0" fast-json-stable-stringify "^2.0.0" @@ -543,7 +461,6 @@ ajv@^6.1.0: align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= dependencies: kind-of "^3.0.2" longest "^1.0.1" @@ -552,66 +469,54 @@ align-text@^0.1.1, align-text@^0.1.3: alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= ansi-align@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= dependencies: string-width "^2.0.0" ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" - integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= ansi-regex@^3.0.0, ansi-regex@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" - integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= ansistyles@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" - integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk= anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== dependencies: micromatch "^2.1.5" normalize-path "^2.0.0" @@ -619,7 +524,6 @@ anymatch@^1.3.0: anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== dependencies: micromatch "^3.1.4" normalize-path "^2.1.1" @@ -627,29 +531,24 @@ anymatch@^2.0.0: append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - integrity sha1-126/jKlNJ24keja61EpLdKthGZE= dependencies: default-require-extensions "^1.0.0" aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2, aproba@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== "aproba@^1.1.2 || 2": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== archy@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= are-we-there-yet@~1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - integrity sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0= dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -657,61 +556,50 @@ are-we-there-yet@~1.1.2: argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= dependencies: arr-flatten "^1.0.1" arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= array-filter@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= array-flatten@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" - integrity sha1-Qmu52oQJDBg42BLIFQryCoMx4pY= array-includes@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" - integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0= dependencies: define-properties "^1.1.2" es-abstract "^1.7.0" @@ -719,49 +607,40 @@ array-includes@^3.0.3: array-map@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= array-reduce@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= dependencies: array-uniq "^1.0.1" array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= asap@^2.0.0, asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== dependencies: bn.js "^4.0.0" inherits "^2.0.1" @@ -770,86 +649,66 @@ asn1.js@^4.0.0: asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - integrity sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y= assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - integrity sha1-104bh+ev/A24qttwIfP+SBAasjQ= assert@^1.1.1: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= dependencies: util "0.10.3" assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== - -astring@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/astring/-/astring-1.3.1.tgz#3c9ac29c945717f361ca00964dcf6442381742d7" - integrity sha512-kMDFc68yAKWQVBC5PhWsnvKtNaQew1XTuYLFjcZFfGys3yl9A+vOcgo3w1VMr8XgK0aYfClg4g0ifDF5lftJNg== astring@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/astring/-/astring-1.3.0.tgz#7ed6ff7d317df5d4a7a06a42b5097774d8d48e01" - integrity sha512-laK24aJivdQ/BkPaLOcXFBabGk7HrVrV+cvFrIIJ/H9ytCI6vYn+o9sbaPYvaEmNOq3wj0SCsPujO/rF206x0A== async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - integrity sha1-GdOGodntxufByF04iu28xW0zYC0= async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" - integrity sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI= async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== async@^1.4.0, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= async@^2.1.2, async@^2.1.4, async@^2.4.1, async@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" - integrity sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw== dependencies: lodash "^4.14.0" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= atob@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" - integrity sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw== autoprefixer@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7" - integrity sha512-C9yv/UF3X+eJTi/zvfxuyfxmLibYrntpF3qoJYrMeQwgUJOZrZvpJiMG2FMQ3qnhWtF/be4pYONBBw95ZGe3vA== dependencies: browserslist "^2.5.1" caniuse-lite "^1.0.30000748" @@ -861,7 +720,6 @@ autoprefixer@7.1.6: autoprefixer@^6.3.1: version "6.7.7" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - integrity sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ= dependencies: browserslist "^1.7.6" caniuse-db "^1.0.30000634" @@ -873,22 +731,18 @@ autoprefixer@^6.3.1: aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - integrity sha1-FDQt0428yU0OW4fXY81jYSwOeU8= aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.2.1, aws4@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" - integrity sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w== babel-code-frame@6.26.0, babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: chalk "^1.1.3" esutils "^2.0.2" @@ -897,7 +751,6 @@ babel-code-frame@6.26.0, babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, bab babel-core@6: version "6.26.3" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -922,7 +775,6 @@ babel-core@6: babel-core@^6.0.0, babel-core@^6.24.1, babel-core@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - integrity sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g= dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -947,7 +799,6 @@ babel-core@^6.0.0, babel-core@^6.24.1, babel-core@^6.26.0: babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -961,7 +812,6 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= dependencies: babel-helper-explode-assignable-expression "^6.24.1" babel-runtime "^6.22.0" @@ -970,7 +820,6 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: babel-helper-builder-react-jsx@^6.24.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" - integrity sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA= dependencies: babel-runtime "^6.26.0" babel-types "^6.26.0" @@ -979,7 +828,6 @@ babel-helper-builder-react-jsx@^6.24.1: babel-helper-call-delegate@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= dependencies: babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" @@ -989,7 +837,6 @@ babel-helper-call-delegate@^6.24.1: babel-helper-define-map@^6.24.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.26.0" @@ -999,7 +846,6 @@ babel-helper-define-map@^6.24.1: babel-helper-explode-assignable-expression@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= dependencies: babel-runtime "^6.22.0" babel-traverse "^6.24.1" @@ -1008,7 +854,6 @@ babel-helper-explode-assignable-expression@^6.24.1: babel-helper-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= dependencies: babel-helper-get-function-arity "^6.24.1" babel-runtime "^6.22.0" @@ -1019,7 +864,6 @@ babel-helper-function-name@^6.24.1: babel-helper-get-function-arity@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1027,7 +871,6 @@ babel-helper-get-function-arity@^6.24.1: babel-helper-hoist-variables@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1035,7 +878,6 @@ babel-helper-hoist-variables@^6.24.1: babel-helper-optimise-call-expression@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1043,7 +885,6 @@ babel-helper-optimise-call-expression@^6.24.1: babel-helper-regex@^6.24.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= dependencies: babel-runtime "^6.26.0" babel-types "^6.26.0" @@ -1052,7 +893,6 @@ babel-helper-regex@^6.24.1: babel-helper-remap-async-to-generator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" @@ -1063,7 +903,6 @@ babel-helper-remap-async-to-generator@^6.24.1: babel-helper-replace-supers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= dependencies: babel-helper-optimise-call-expression "^6.24.1" babel-messages "^6.23.0" @@ -1075,7 +914,6 @@ babel-helper-replace-supers@^6.24.1: babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" @@ -1083,7 +921,6 @@ babel-helpers@^6.24.1: babel-jest@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.4.3.tgz#4b7a0b6041691bbd422ab49b3b73654a49a6627a" - integrity sha512-BgSjmtl3mW3i+VeVHEr9d2zFSAT66G++pJcHQiUjd00pkW+voYXFctIm/indcqOWWXw5a1nUpR1XWszD9fJ1qg== dependencies: babel-plugin-istanbul "^4.1.5" babel-preset-jest "^22.4.3" @@ -1091,7 +928,6 @@ babel-jest@^22.1.0: babel-jest@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.4.4.tgz#977259240420e227444ebe49e226a61e49ea659d" - integrity sha512-A9NB6/lZhYyypR9ATryOSDcqBaqNdzq4U+CN+/wcMsLcmKkPxQEoTKLajGfd3IkxNyVBT8NewUK2nWyGbSzHEQ== dependencies: babel-plugin-istanbul "^4.1.5" babel-preset-jest "^22.4.4" @@ -1099,7 +935,6 @@ babel-jest@^22.4.4: babel-loader@^7.1.2: version "7.1.4" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.4.tgz#e3463938bd4e6d55d1c174c5485d406a188ed015" - integrity sha512-/hbyEvPzBJuGpk9o80R0ZyTej6heEOr59GoEUtn8qFKbnx4cJm9FWES6J/iv644sYgrtVw9JJQkjaLW/bqb5gw== dependencies: find-cache-dir "^1.0.0" loader-utils "^1.0.2" @@ -1108,21 +943,18 @@ babel-loader@^7.1.2: babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= dependencies: babel-runtime "^6.22.0" babel-plugin-check-es2015-constants@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= dependencies: babel-runtime "^6.22.0" babel-plugin-dynamic-import-node@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.1.0.tgz#bd1d88ac7aaf98df4917c384373b04d971a2b37a" - integrity sha512-tTfZbM9Ecwj3GK50mnPrUpinTwA4xXmDiQGCk/aBYbvl1+X8YqldK86wZ1owVJ4u3mrKbRlXMma80J18qwiaTQ== dependencies: babel-plugin-syntax-dynamic-import "^6.18.0" babel-template "^6.26.0" @@ -1131,7 +963,6 @@ babel-plugin-dynamic-import-node@1.1.0: babel-plugin-istanbul@^4.1.4, babel-plugin-istanbul@^4.1.5: version "4.1.6" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" - integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== dependencies: babel-plugin-syntax-object-rest-spread "^6.13.0" find-up "^2.1.0" @@ -1141,57 +972,46 @@ babel-plugin-istanbul@^4.1.4, babel-plugin-istanbul@^4.1.5: babel-plugin-jest-hoist@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.3.tgz#7d8bcccadc2667f96a0dcc6afe1891875ee6c14a" - integrity sha512-zhvv4f6OTWy2bYevcJftwGCWXMFe7pqoz41IhMi4xna7xNsX5NygdagsrE0y6kkfuXq8UalwvPwKTyAxME2E/g== babel-plugin-jest-hoist@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.4.tgz#b9851906eab34c7bf6f8c895a2b08bea1a844c0b" - integrity sha512-DUvGfYaAIlkdnygVIEl0O4Av69NtuQWcrjMOv6DODPuhuGLDnbsARz3AwiiI/EkIMMlxQDUcrZ9yoyJvTNjcVQ== babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= babel-plugin-syntax-class-properties@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - integrity sha1-1+sjt5oxf4VDlixQW4J8fWysJ94= babel-plugin-syntax-dynamic-import@6.18.0, babel-plugin-syntax-dynamic-import@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - integrity sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo= babel-plugin-syntax-exponentiation-operator@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= babel-plugin-syntax-flow@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - integrity sha1-TDqyCiryaqIM0lmVw5jE63AxDI0= babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= babel-plugin-transform-async-to-generator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= dependencies: babel-helper-remap-async-to-generator "^6.24.1" babel-plugin-syntax-async-functions "^6.8.0" @@ -1200,7 +1020,6 @@ babel-plugin-transform-async-to-generator@^6.22.0: babel-plugin-transform-class-properties@6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" - integrity sha1-anl2PqYdM9NvN7YRqp3vgagbRqw= dependencies: babel-helper-function-name "^6.24.1" babel-plugin-syntax-class-properties "^6.8.0" @@ -1210,21 +1029,18 @@ babel-plugin-transform-class-properties@6.24.1: babel-plugin-transform-es2015-arrow-functions@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoping@^6.23.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= dependencies: babel-runtime "^6.26.0" babel-template "^6.26.0" @@ -1235,7 +1051,6 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0: babel-plugin-transform-es2015-classes@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= dependencies: babel-helper-define-map "^6.24.1" babel-helper-function-name "^6.24.1" @@ -1250,7 +1065,6 @@ babel-plugin-transform-es2015-classes@^6.23.0: babel-plugin-transform-es2015-computed-properties@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" @@ -1258,14 +1072,12 @@ babel-plugin-transform-es2015-computed-properties@^6.22.0: babel-plugin-transform-es2015-destructuring@6.23.0, babel-plugin-transform-es2015-destructuring@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-duplicate-keys@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1273,14 +1085,12 @@ babel-plugin-transform-es2015-duplicate-keys@^6.22.0: babel-plugin-transform-es2015-for-of@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-function-name@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" @@ -1289,14 +1099,12 @@ babel-plugin-transform-es2015-function-name@^6.22.0: babel-plugin-transform-es2015-literals@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= dependencies: babel-plugin-transform-es2015-modules-commonjs "^6.24.1" babel-runtime "^6.22.0" @@ -1305,7 +1113,6 @@ babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015 babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" - integrity sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo= dependencies: babel-plugin-transform-strict-mode "^6.24.1" babel-runtime "^6.26.0" @@ -1315,7 +1122,6 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-e babel-plugin-transform-es2015-modules-systemjs@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= dependencies: babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" @@ -1324,7 +1130,6 @@ babel-plugin-transform-es2015-modules-systemjs@^6.23.0: babel-plugin-transform-es2015-modules-umd@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= dependencies: babel-plugin-transform-es2015-modules-amd "^6.24.1" babel-runtime "^6.22.0" @@ -1333,7 +1138,6 @@ babel-plugin-transform-es2015-modules-umd@^6.23.0: babel-plugin-transform-es2015-object-super@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" @@ -1341,7 +1145,6 @@ babel-plugin-transform-es2015-object-super@^6.22.0: babel-plugin-transform-es2015-parameters@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= dependencies: babel-helper-call-delegate "^6.24.1" babel-helper-get-function-arity "^6.24.1" @@ -1353,7 +1156,6 @@ babel-plugin-transform-es2015-parameters@^6.23.0: babel-plugin-transform-es2015-shorthand-properties@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1361,14 +1163,12 @@ babel-plugin-transform-es2015-shorthand-properties@^6.22.0: babel-plugin-transform-es2015-spread@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-sticky-regex@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= dependencies: babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" @@ -1377,21 +1177,18 @@ babel-plugin-transform-es2015-sticky-regex@^6.22.0: babel-plugin-transform-es2015-template-literals@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-typeof-symbol@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-unicode-regex@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= dependencies: babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" @@ -1400,7 +1197,6 @@ babel-plugin-transform-es2015-unicode-regex@^6.22.0: babel-plugin-transform-exponentiation-operator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= dependencies: babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" babel-plugin-syntax-exponentiation-operator "^6.8.0" @@ -1409,7 +1205,6 @@ babel-plugin-transform-exponentiation-operator@^6.22.0: babel-plugin-transform-flow-strip-types@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - integrity sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988= dependencies: babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" @@ -1417,7 +1212,6 @@ babel-plugin-transform-flow-strip-types@^6.22.0: babel-plugin-transform-object-rest-spread@6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= dependencies: babel-plugin-syntax-object-rest-spread "^6.8.0" babel-runtime "^6.26.0" @@ -1425,21 +1219,18 @@ babel-plugin-transform-object-rest-spread@6.26.0: babel-plugin-transform-react-constant-elements@6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz#2f119bf4d2cdd45eb9baaae574053c604f6147dd" - integrity sha1-LxGb9NLN1F65uqrldAU8YE9hR90= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-react-display-name@^6.23.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - integrity sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-react-jsx-self@6.22.0, babel-plugin-transform-react-jsx-self@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" - integrity sha1-322AqdomEqEh5t3XVYvL7PBuY24= dependencies: babel-plugin-syntax-jsx "^6.8.0" babel-runtime "^6.22.0" @@ -1447,7 +1238,6 @@ babel-plugin-transform-react-jsx-self@6.22.0, babel-plugin-transform-react-jsx-s babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - integrity sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY= dependencies: babel-plugin-syntax-jsx "^6.8.0" babel-runtime "^6.22.0" @@ -1455,7 +1245,6 @@ babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx babel-plugin-transform-react-jsx@6.24.1, babel-plugin-transform-react-jsx@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - integrity sha1-hAoCjn30YN/DotKfDA2R9jduZqM= dependencies: babel-helper-builder-react-jsx "^6.24.1" babel-plugin-syntax-jsx "^6.8.0" @@ -1464,21 +1253,18 @@ babel-plugin-transform-react-jsx@6.24.1, babel-plugin-transform-react-jsx@^6.24. babel-plugin-transform-regenerator@6.26.0, babel-plugin-transform-regenerator@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= dependencies: regenerator-transform "^0.10.0" babel-plugin-transform-runtime@6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" - integrity sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4= dependencies: babel-runtime "^6.22.0" babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1486,7 +1272,6 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-preset-env@1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" - integrity sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA== dependencies: babel-plugin-check-es2015-constants "^6.22.0" babel-plugin-syntax-trailing-function-commas "^6.22.0" @@ -1522,14 +1307,12 @@ babel-preset-env@1.6.1: babel-preset-flow@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" - integrity sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0= dependencies: babel-plugin-transform-flow-strip-types "^6.22.0" babel-preset-jest@^22.0.1, babel-preset-jest@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.3.tgz#e92eef9813b7026ab4ca675799f37419b5a44156" - integrity sha512-a+M3LTEXTq3gxv0uBN9Qm6ahUl7a8pj923nFbCUdqFUSsf3YrX8Uc+C3MEwji5Af3LiQjSC7w4ooYewlz8HRTA== dependencies: babel-plugin-jest-hoist "^22.4.3" babel-plugin-syntax-object-rest-spread "^6.13.0" @@ -1537,7 +1320,6 @@ babel-preset-jest@^22.0.1, babel-preset-jest@^22.4.3: babel-preset-jest@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.4.tgz#ec9fbd8bcd7dfd24b8b5320e0e688013235b7c39" - integrity sha512-+dxMtOFwnSYWfum0NaEc0O03oSdwBsjx4tMSChRDPGwu/4wSY6Q6ANW3wkjKpJzzguaovRs/DODcT4hbSN8yiA== dependencies: babel-plugin-jest-hoist "^22.4.4" babel-plugin-syntax-object-rest-spread "^6.13.0" @@ -1545,7 +1327,6 @@ babel-preset-jest@^22.4.4: babel-preset-react-app@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-3.1.1.tgz#d3f06a79742f0e89d7afcb72e282d9809c850920" - integrity sha512-9fRHopNaGL5ScRZdPSoyxRaABKmkS2fx0HUJ5Yphan5G8QDFD7lETsPyY7El6b7YPT3sNrw9gfrWzl4/LsJcfA== dependencies: babel-plugin-dynamic-import-node "1.1.0" babel-plugin-syntax-dynamic-import "6.18.0" @@ -1564,7 +1345,6 @@ babel-preset-react-app@^3.1.1: babel-preset-react@6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" - integrity sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A= dependencies: babel-plugin-syntax-jsx "^6.3.13" babel-plugin-transform-react-display-name "^6.23.0" @@ -1576,7 +1356,6 @@ babel-preset-react@6.24.1: babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= dependencies: babel-core "^6.26.0" babel-runtime "^6.26.0" @@ -1589,7 +1368,6 @@ babel-register@^6.26.0: babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0, babel-runtime@^6.9.2: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" @@ -1597,7 +1375,6 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runti babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" @@ -1608,7 +1385,6 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" @@ -1623,7 +1399,6 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" @@ -1633,27 +1408,22 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26 babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - integrity sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg= balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base64-js@^1.0.2: version "1.2.3" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" - integrity sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w== base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== dependencies: cache-base "^1.0.1" class-utils "^0.3.5" @@ -1666,24 +1436,20 @@ base@^0.11.1: batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - integrity sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40= dependencies: tweetnacl "^0.14.3" big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== bin-links@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.2.tgz#fb74bd54bae6b7befc6c6221f25322ac830d9757" - integrity sha512-8eEHVgYP03nILphilltWjeIjMbKyJo3wvp9K816pHbhP301ismzw15mxAAEVQ/USUwcP++1uNrbERbp8lOA6Fg== dependencies: bluebird "^3.5.0" cmd-shim "^2.0.2" @@ -1694,34 +1460,28 @@ bin-links@^1.1.2: binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - integrity sha1-RqoXUftqL5PuXmibsQh9SxTGwgU= bit-twiddle@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bit-twiddle/-/bit-twiddle-1.0.2.tgz#0c6c1fabe2b23d17173d9a61b7b7093eb9e1769e" - integrity sha1-DGwfq+KyPRcXPZpht7cJPrnhdp4= block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= dependencies: inherits "~2.0.0" bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.1, bluebird@~3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== body-parser@1.18.2: version "1.18.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" - integrity sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ= dependencies: bytes "3.0.0" content-type "~1.0.4" @@ -1737,7 +1497,6 @@ body-parser@1.18.2: bonjour@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" - integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= dependencies: array-flatten "^2.1.0" deep-equal "^1.0.1" @@ -1749,33 +1508,28 @@ bonjour@^3.5.0: boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - integrity sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8= dependencies: hoek "2.x.x" boom@4.x.x: version "4.3.1" resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - integrity sha1-T4owBctKfjiJ90kDD9JbluAdLjE= dependencies: hoek "4.x.x" boom@5.x.x: version "5.2.0" resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - integrity sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw== dependencies: hoek "4.x.x" boxen@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== dependencies: ansi-align "^2.0.0" camelcase "^4.0.0" @@ -1788,7 +1542,6 @@ boxen@^1.2.1: brace-expansion@^1.0.0, brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -1796,12 +1549,10 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: brace@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/brace/-/brace-0.11.1.tgz#4896fcc9d544eef45f4bb7660db320d3b379fe58" - integrity sha1-SJb8ydVE7vRfS7dmDbMg07N5/lg= braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= dependencies: expand-range "^1.8.1" preserve "^0.2.0" @@ -1810,7 +1561,6 @@ braces@^1.8.2: braces@^2.3.0, braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== dependencies: arr-flatten "^1.1.0" array-unique "^0.3.2" @@ -1826,24 +1576,20 @@ braces@^2.3.0, braces@^2.3.1: brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" - integrity sha1-Ql1opY00R/AqBKqJQYf86K+Le44= browser-resolve@^1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - integrity sha1-j/CbCixCFxihBRwmCzLkj0QpOM4= dependencies: resolve "1.1.7" browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: buffer-xor "^1.0.3" cipher-base "^1.0.0" @@ -1855,7 +1601,6 @@ browserify-aes@^1.0.0, browserify-aes@^1.0.4: browserify-cipher@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== dependencies: browserify-aes "^1.0.4" browserify-des "^1.0.0" @@ -1864,7 +1609,6 @@ browserify-cipher@^1.0.0: browserify-des@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.1.tgz#3343124db6d7ad53e26a8826318712bdc8450f9c" - integrity sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw== dependencies: cipher-base "^1.0.1" des.js "^1.0.0" @@ -1873,7 +1617,6 @@ browserify-des@^1.0.0: browserify-rsa@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= dependencies: bn.js "^4.1.0" randombytes "^2.0.1" @@ -1881,7 +1624,6 @@ browserify-rsa@^4.0.0: browserify-sign@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= dependencies: bn.js "^4.1.1" browserify-rsa "^4.0.0" @@ -1894,14 +1636,12 @@ browserify-sign@^4.0.0: browserify-zlib@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== dependencies: pako "~1.0.5" browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - integrity sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk= dependencies: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" @@ -1909,7 +1649,6 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: browserslist@^2.1.2, browserslist@^2.5.1: version "2.11.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" - integrity sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA== dependencies: caniuse-lite "^1.0.30000792" electron-to-chromium "^1.3.30" @@ -1917,29 +1656,24 @@ browserslist@^2.1.2, browserslist@^2.5.1: bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= dependencies: node-int64 "^0.4.0" buffer-from@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" - integrity sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA== buffer-indexof@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= buffer@^4.3.0: version "4.9.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -1948,37 +1682,30 @@ buffer@^4.3.0: builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= byte-size@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.3.tgz#b7c095efc68eadf82985fccd9a2df43a74fa2ccd" - integrity sha512-JGC3EV2bCzJH/ENSh3afyJrH4vwxbHTuO5ljLoI5+2iJOcEpMgP8T782jH9b5qGxf2mSUIp1lfGnfKNrRHpvVg== bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= cacache@^10.0.4: version "10.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" - integrity sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA== dependencies: bluebird "^3.5.1" chownr "^1.0.1" @@ -1997,7 +1724,6 @@ cacache@^10.0.4: cacache@^11.0.1, cacache@^11.0.2: version "11.0.2" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.0.2.tgz#ff30541a05302200108a759e660e30786f788764" - integrity sha512-hMiz7LN4w8sdfmKsvNs80ao/vf2JCGWWdpu95JyY90AJZRbZJmgE71dCefRiNf8OCqiZQDcUBfYiLlUNu4/j5A== dependencies: bluebird "^3.5.1" chownr "^1.0.1" @@ -2017,7 +1743,6 @@ cacache@^11.0.1, cacache@^11.0.2: cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: collection-visit "^1.0.0" component-emitter "^1.2.1" @@ -2032,17 +1757,14 @@ cache-base@^1.0.1: call-limit@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.0.tgz#6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea" - integrity sha1-b9YbA/PaQqLNDsK2DwK9DnGZH+o= callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= dependencies: no-case "^2.2.0" upper-case "^1.1.1" @@ -2050,7 +1772,6 @@ camel-case@3.0.x: camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= dependencies: camelcase "^2.0.0" map-obj "^1.0.0" @@ -2058,27 +1779,22 @@ camelcase-keys@^2.0.0: camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= caniuse-api@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - integrity sha1-tTTnxzTE+B7F++isoq0kNUuWLGw= dependencies: browserslist "^1.3.6" caniuse-db "^1.0.30000529" @@ -2088,37 +1804,30 @@ caniuse-api@^1.5.2: caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: version "1.0.30000830" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000830.tgz#6e45255b345649fd15ff59072da1e12bb3de2f13" - integrity sha1-bkUlWzRWSf0V/1kHLaHhK7PeLxM= caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000792: version "1.0.30000830" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz#cb96b8a2dd3cbfe04acea2af3c4e894249095328" - integrity sha512-yMqGkujkoOIZfvOYiWdqPALgY/PVGiqCHUJb6yNq7xhI/pR+gQO0U2K6lRDqAiJv4+CIU3CtTLblNGw0QGnr6g== capture-stack-trace@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" - integrity sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0= case-sensitive-paths-webpack-plugin@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz#3d29ced8c1f124bf6f53846fb3f5894731fdc909" - integrity sha1-PSnO2MHxJL9vU4Rvs/WJRzH9yQk= caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" - integrity sha1-cVuW6phBWTzDMGeSP17GDr2k99c= caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= dependencies: align-text "^0.1.3" lazy-cache "^1.0.3" @@ -2126,7 +1835,6 @@ center-align@^0.1.1: chalk@1.1.3, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -2137,7 +1845,6 @@ chalk@1.1.3, chalk@^1.1.1, chalk@^1.1.3: chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - integrity sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" @@ -2146,7 +1853,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.2: chalk@^2.1.0: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" @@ -2155,12 +1861,10 @@ chalk@^2.1.0: chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= cheerio@^1.0.0-rc.2: version "1.0.0-rc.2" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" - integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= dependencies: css-select "~1.2.0" dom-serializer "~0.1.0" @@ -2172,7 +1876,6 @@ cheerio@^1.0.0-rc.2: chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= dependencies: anymatch "^1.3.0" async-each "^1.0.0" @@ -2188,7 +1891,6 @@ chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: chokidar@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" - integrity sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg== dependencies: anymatch "^2.0.0" async-each "^1.0.0" @@ -2207,24 +1909,20 @@ chokidar@^2.0.2: chownr@^1.0.1, chownr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" - integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE= ci-info@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" - integrity sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg== cidr-regex@^2.0.8: version "2.0.9" resolved "https://registry.yarnpkg.com/cidr-regex/-/cidr-regex-2.0.9.tgz#9c17bb2b18e15af07f7d0c3b994b961d687ed1c9" - integrity sha512-F7/fBRUU45FnvSPjXdpIrc++WRSBdCiSTlyq4ZNhLKOlHFNWgtzZ0Fd+zrqI/J1j0wmlx/f5ZQDmD2GcbrNcmw== dependencies: ip-regex "^2.1.0" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -2232,14 +1930,12 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: clap@^1.0.9: version "1.2.3" resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" - integrity sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA== dependencies: chalk "^1.1.3" class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== dependencies: arr-union "^3.1.0" define-property "^0.2.5" @@ -2249,29 +1945,24 @@ class-utils@^0.3.5: classnames@^2.2: version "2.2.5" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" - integrity sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0= classnames@^2.2.5: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" - integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== clean-css@4.1.x: version "4.1.11" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a" - integrity sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo= dependencies: source-map "0.5.x" cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= cli-columns@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-3.1.2.tgz#6732d972979efc2ae444a1f08e08fa139c96a18e" - integrity sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4= dependencies: string-width "^2.0.0" strip-ansi "^3.0.1" @@ -2279,14 +1970,12 @@ cli-columns@^3.1.2: cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= dependencies: restore-cursor "^2.0.0" cli-table2@^0.2.0, cli-table2@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97" - integrity sha1-LR738hig54biFFQFYtS9F3/jLZc= dependencies: lodash "^3.10.1" string-width "^1.0.1" @@ -2296,12 +1985,10 @@ cli-table2@^0.2.0, cli-table2@~0.2.0: cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= dependencies: center-align "^0.1.1" right-align "^0.1.1" @@ -2310,7 +1997,6 @@ cliui@^2.1.0: cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -2319,7 +2005,6 @@ cliui@^3.2.0: cliui@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" - integrity sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw== dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" @@ -2328,12 +2013,10 @@ cliui@^4.0.0: clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= cmd-shim@^2.0.2, cmd-shim@~2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" - integrity sha1-b8vamUg6j9FdfTChlspp1oii79s= dependencies: graceful-fs "^4.1.2" mkdirp "~0.5.0" @@ -2341,24 +2024,20 @@ cmd-shim@^2.0.2, cmd-shim@~2.0.2: co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= coa@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - integrity sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0= dependencies: q "^1.1.2" code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= dependencies: map-visit "^1.0.0" object-visit "^1.0.0" @@ -2366,26 +2045,22 @@ collection-visit@^1.0.0: color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" - integrity sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ== dependencies: color-name "^1.1.1" color-name@^1.0.0, color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= color-string@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - integrity sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE= dependencies: color-name "^1.0.0" color@^0.11.0: version "0.11.4" resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - integrity sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q= dependencies: clone "^1.0.2" color-convert "^1.3.0" @@ -2394,7 +2069,6 @@ color@^0.11.0: colormin@^1.0.5: version "1.1.2" resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - integrity sha1-6i90IKcrlogaOKrlnsEkpvcpgTM= dependencies: color "^0.11.0" css-color-names "0.0.4" @@ -2403,22 +2077,18 @@ colormin@^1.0.5: colors@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" - integrity sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q= colors@^1.1.2: version "1.3.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.0.tgz#5f20c9fef6945cb1134260aab33bfbdc8295e04e" - integrity sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw== colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= columnify@~1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" - integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= dependencies: strip-ansi "^3.0.0" wcwidth "^1.0.0" @@ -2426,63 +2096,44 @@ columnify@~1.5.4: combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - integrity sha1-cj599ugBrFYTETp+RFqbactjKBg= dependencies: delayed-stream "~1.0.0" commander@2.15.x, commander@^2.12.1, commander@^2.9.0, commander@~2.15.0: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== - -commander@^2.14.1: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" - integrity sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew== commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== - -common-tags@^1.4.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" - integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== common-tags@^1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.7.2.tgz#24d9768c63d253a56ecff93845b44b4df1d52771" - integrity sha512-joj9ZlUOjCrwdbmiLqafeUSgkUM74NqhLsZtSqDmhKudaIY197zTrb8JMl31fMnCUuxwFT23eC/oWvrZzDLRJQ== dependencies: babel-runtime "^6.26.0" commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= compare-versions@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.1.0.tgz#43310256a5c555aaed4193c04d8f154cf9c6efd5" - integrity sha512-4hAxDSBypT/yp2ySFD346So6Ragw5xmBn/e/agIGl3bZr6DLUqnoRZPusxKrXdYRZpgexO9daejmIenlq/wrIQ== component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= compressible@~2.0.13: version "2.0.13" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" - integrity sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k= dependencies: mime-db ">= 1.33.0 < 2" compression@^1.5.2: version "1.7.2" resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" - integrity sha1-qv+81qr4VLROuygDU9WtFlH1mmk= dependencies: accepts "~1.3.4" bytes "3.0.0" @@ -2495,12 +2146,10 @@ compression@^1.5.2: concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= concat-stream@^1.5.0, concat-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" inherits "^2.0.3" @@ -2510,7 +2159,6 @@ concat-stream@^1.5.0, concat-stream@^1.5.2: config-chain@~1.1.11: version "1.1.11" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2" - integrity sha1-q6CXR9++TD5w52am5BWG4YWfxvI= dependencies: ini "^1.3.4" proto-list "~1.2.1" @@ -2518,7 +2166,6 @@ config-chain@~1.1.11: configstore@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" - integrity sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw== dependencies: dot-prop "^4.1.0" graceful-fs "^4.1.2" @@ -2530,54 +2177,44 @@ configstore@^3.0.0: connect-history-api-fallback@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" - integrity sha1-sGhzk0vF40T+9hGhlqb6rgruAVo= console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= dependencies: date-now "^0.1.4" console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= content-disposition@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - integrity sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU= cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== dependencies: aproba "^1.1.1" fs-write-stream-atomic "^1.0.8" @@ -2589,34 +2226,28 @@ copy-concurrently@^1.0.0: copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= copy-to-clipboard@^3: version "3.0.8" resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.0.8.tgz#f4e82f4a8830dce4666b7eb8ded0c9bcc313aba9" - integrity sha512-c3GdeY8qxCHGezVb1EFQfHYK/8NZRemgcTIzPq7PuxjHAf/raKibn2QdhHPb/y6q74PMgH6yizaDZlRmw6QyKw== dependencies: toggle-selection "^1.0.3" core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= core-js@^2.4.0, core-js@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.5.tgz#b14dde936c640c0579a6b50cabcc132dd6127e3b" - integrity sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs= core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" - integrity sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A== dependencies: is-directory "^0.3.1" js-yaml "^3.4.3" @@ -2629,7 +2260,6 @@ cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: cosmiconfig@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" - integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== dependencies: is-directory "^0.3.1" js-yaml "^3.9.0" @@ -2639,7 +2269,6 @@ cosmiconfig@^4.0.0: coveralls@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.1.tgz#12e15914eaa29204e56869a5ece7b9e1492d2ae2" - integrity sha512-FAzXwiDOYLGDWH+zgoIA+8GbWv50hlx+kpEJyvzLKOdnIBv9uWoVl4DhqGgyUHpiRjAlF8KYZSipWXYtllWH6Q== dependencies: js-yaml "^3.6.1" lcov-parse "^0.0.10" @@ -2650,7 +2279,6 @@ coveralls@^3.0.1: cpx@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/cpx/-/cpx-1.5.0.tgz#185be018511d87270dedccc293171e37655ab88f" - integrity sha1-GFvgGFEdhycN7czCkxceN2VauI8= dependencies: babel-runtime "^6.9.2" chokidar "^1.6.0" @@ -2667,7 +2295,6 @@ cpx@^1.5.0: create-ecdh@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.1.tgz#44223dfed533193ba5ba54e0df5709b89acf1f82" - integrity sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ== dependencies: bn.js "^4.1.0" elliptic "^6.0.0" @@ -2675,14 +2302,12 @@ create-ecdh@^4.0.0: create-error-class@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" - integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= dependencies: capture-stack-trace "^1.0.0" create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== dependencies: cipher-base "^1.0.1" inherits "^2.0.1" @@ -2693,7 +2318,6 @@ create-hash@^1.1.0, create-hash@^1.1.2: create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== dependencies: cipher-base "^1.0.3" create-hash "^1.1.0" @@ -2705,7 +2329,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: cross-spawn@5.1.0, cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= dependencies: lru-cache "^4.0.1" shebang-command "^1.2.0" @@ -2714,7 +2337,6 @@ cross-spawn@5.1.0, cross-spawn@^5.0.1: cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" - integrity sha1-ElYDfsufDF9549bvE14wdwGEuYI= dependencies: lru-cache "^4.0.1" which "^1.2.9" @@ -2722,7 +2344,6 @@ cross-spawn@^3.0.0: cross-spawn@^6.0.4: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -2733,21 +2354,18 @@ cross-spawn@^6.0.4: cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - integrity sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g= dependencies: boom "2.x.x" cryptiles@3.x.x: version "3.1.2" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - integrity sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4= dependencies: boom "5.x.x" crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== dependencies: browserify-cipher "^1.0.0" browserify-sign "^4.0.0" @@ -2764,17 +2382,14 @@ crypto-browserify@^3.11.0: crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= css-loader@0.28.7: version "0.28.7" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.7.tgz#5f2ee989dd32edd907717f953317656160999c1b" - integrity sha512-GxMpax8a/VgcfRrVy0gXD6yLd5ePYbXX/5zGgTVYp4wXtJklS8Z2VaUArJgc//f6/Dzil7BaJObdSv8eKKCPgg== dependencies: babel-code-frame "^6.11.0" css-selector-tokenizer "^0.7.0" @@ -2794,7 +2409,6 @@ css-loader@0.28.7: css-select@^1.1.0, css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= dependencies: boolbase "~1.0.0" css-what "2.1" @@ -2804,7 +2418,6 @@ css-select@^1.1.0, css-select@~1.2.0: css-selector-tokenizer@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" - integrity sha1-5piEdK6MlTR3v15+/s/OzNnPTIY= dependencies: cssesc "^0.1.0" fastparse "^1.1.1" @@ -2813,17 +2426,14 @@ css-selector-tokenizer@^0.7.0: css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" - integrity sha1-lGfQMsOM+u+58teVASUwYvh/ob0= cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= "cssnano@>=2.6.1 <4": version "3.10.0" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - integrity sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg= dependencies: autoprefixer "^6.3.1" decamelize "^1.1.2" @@ -2861,7 +2471,6 @@ cssesc@^0.1.0: csso@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - integrity sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U= dependencies: clap "^1.0.9" source-map "^0.5.3" @@ -2869,50 +2478,42 @@ csso@~2.3.1: cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" - integrity sha1-uANhcMefB6kP8vFuIihAJ6JDhIs= "cssstyle@>= 0.2.37 < 0.3.0": version "0.2.37" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" - integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= dependencies: cssom "0.3.x" csstype@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.2.0.tgz#1656ef97553ac53b77090844a2531c6660ebd902" - integrity sha512-5YHWQgAtzKIA8trr2AVg6Jq5Fs5eAR1UqKbRJjgQQevNx3IAhD3S9wajvqJdmO7bgIxy0MA5lFVPzJYjmMlNeQ== currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= dependencies: array-find-index "^1.0.1" cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" - integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - integrity sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8= dependencies: es5-ext "^0.10.9" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" data-urls@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.0.tgz#24802de4e81c298ea8a9388bb0d8e461c774684f" - integrity sha512-ai40PPQR0Fn1lD2PPie79CibnlMN2AYiDhwFX/rZHVsxbs5kNJSjegqXIprhouGXlRdEnfybva7kqRGnB6mypA== dependencies: abab "^1.0.4" whatwg-mimetype "^2.0.0" @@ -2921,75 +2522,62 @@ data-urls@^1.0.0: date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" debug@3.1.0, debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" - integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= deep-equal@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" - integrity sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8= deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= deepmerge@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.1.0.tgz#511a54fff405fc346f0240bb270a3e9533a31102" - integrity sha512-Q89Z26KAfA3lpPGhbF6XMfYAm3jIV3avViy6KOJ2JLzFbeWHOvPQUu5aSJIWXap3gDZC2y1eF5HXEPI2wGqgvw== default-require-extensions@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= dependencies: strip-bom "^2.0.0" defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= dependencies: clone "^1.0.2" define-properties@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - integrity sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ= dependencies: foreach "^2.0.5" object-keys "^1.0.8" @@ -2997,21 +2585,18 @@ define-properties@^1.1.2: define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= dependencies: is-descriptor "^1.0.0" define-property@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== dependencies: is-descriptor "^1.0.2" isobject "^3.0.1" @@ -3019,12 +2604,10 @@ define-property@^2.0.2: defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= del@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - integrity sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= dependencies: globby "^5.0.0" is-path-cwd "^1.0.0" @@ -3037,7 +2620,6 @@ del@^2.2.2: del@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - integrity sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= dependencies: globby "^6.1.0" is-path-cwd "^1.0.0" @@ -3049,27 +2631,22 @@ del@^3.0.0: delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= depd@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - integrity sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k= depd@~1.1.1, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= des.js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" @@ -3077,39 +2654,32 @@ des.js@^1.0.0: destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= dependencies: repeating "^2.0.0" detect-indent@~5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= detect-node@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" - integrity sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc= detect-port-alt@1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" - integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== dependencies: address "^1.0.1" debug "^2.6.0" @@ -3117,7 +2687,6 @@ detect-port-alt@1.1.6: dezalgo@^1.0.0, dezalgo@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" - integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= dependencies: asap "^2.0.0" wrappy "1" @@ -3125,17 +2694,14 @@ dezalgo@^1.0.0, dezalgo@~1.0.3: diff-match-patch@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.1.tgz#d5f880213d82fbc124d2b95111fb3c033dbad7fa" - integrity sha512-A0QEhr4PxGUMEtKxd6X+JLnOTFd3BfIPSDpsc4dMvj+CbSaErDwTpoTo/nFJDMSrjxLW4BiNq+FbNisAAHhWeQ== diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== dependencies: bn.js "^4.1.0" miller-rabin "^4.0.0" @@ -3144,17 +2710,14 @@ diffie-hellman@^5.0.0: discontinuous-range@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" - integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= dns-packet@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg== dependencies: ip "^1.1.0" safe-buffer "^5.0.1" @@ -3162,26 +2725,22 @@ dns-packet@^1.3.1: dns-txt@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= dependencies: buffer-indexof "^1.0.0" dom-converter@~0.1: version "0.1.4" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" - integrity sha1-pF71cnuJDJv/5tfIduexnLDhfzs= dependencies: utila "~0.3" dom-helpers@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6" - integrity sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg== dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" - integrity sha1-BzxpdUbOB4DOI75KKOKT5AvDDII= dependencies: domelementtype "~1.1.1" entities "~1.1.1" @@ -3189,62 +2748,52 @@ dom-serializer@0, dom-serializer@~0.1.0: dom-urls@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/dom-urls/-/dom-urls-1.1.0.tgz#001ddf81628cd1e706125c7176f53ccec55d918e" - integrity sha1-AB3fgWKM0ecGElxxdvU8zsVdkY4= dependencies: urijs "^1.16.1" dom4@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/dom4/-/dom4-2.0.1.tgz#03000cbea1ec33b3dde8cfd7a0cf77587d27e9d5" - integrity sha512-pfO0omEczRlJAjJHV1iViFt10jN70cfkqlBjZ4D9mLvv4CvK3aypYAmIHjxlcZtu3gTQu/PtMz+vzezUM/W0pg== domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== domelementtype@1, domelementtype@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" - integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI= domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" - integrity sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs= domexception@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== dependencies: webidl-conversions "^4.0.2" domhandler@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" - integrity sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ= dependencies: domelementtype "1" domhandler@^2.3.0: version "2.4.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" - integrity sha1-iS5HAAqZvlW783dP/qBWHYh5wlk= dependencies: domelementtype "1" domutils@1.1: version "1.1.6" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" - integrity sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU= dependencies: domelementtype "1" domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= dependencies: dom-serializer "0" domelementtype "1" @@ -3252,7 +2801,6 @@ domutils@1.5.1: domutils@^1.5.1: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== dependencies: dom-serializer "0" domelementtype "1" @@ -3260,29 +2808,24 @@ domutils@^1.5.1: dot-prop@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== dependencies: is-obj "^1.0.0" dotenv-expand@4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-4.2.0.tgz#def1f1ca5d6059d24a766e587942c21106ce1275" - integrity sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU= dotenv@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" - integrity sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0= dotenv@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" - integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow== draft-js@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.10.5.tgz#bfa9beb018fe0533dbb08d6675c371a6b08fa742" - integrity sha512-LE6jSCV9nkPhfVX2ggcRLA4FKs6zWq9ceuO/88BpXdNCS7mjRTgs0NsV6piUCJX9YxMsB9An33wnkMmU2sD2Zg== dependencies: fbjs "^0.8.15" immutable "~3.7.4" @@ -3291,17 +2834,14 @@ draft-js@^0.10.5: duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= duplexer@^0.1.1, duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= duplexify@^3.4.2, duplexify@^3.5.3: version "3.5.4" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4" - integrity sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA== dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -3311,34 +2851,28 @@ duplexify@^3.4.2, duplexify@^3.5.3: earcut@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.1.3.tgz#ca579545f351941af7c3d0df49c9f7d34af99b0c" - integrity sha512-AxdCdWUk1zzK/NuZ7e1ljj6IGC+VAdC3Qb7QQDsXpfNrc5IM8tL9nNXUmEGE6jRHTfZ10zhzRhtDmWVsR5pd3A== ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - integrity sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU= dependencies: jsbn "~0.1.0" editor@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" - integrity sha1-YMf4e9YrzGqJT6jM1q+3gjok90I= ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: version "1.3.42" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9" - integrity sha1-lcM78B0MxAVVauyJn+Yf1NduoPk= elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - integrity sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8= dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -3351,31 +2885,26 @@ elliptic@^6.0.0: emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= dependencies: iconv-lite "~0.4.13" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== dependencies: once "^1.4.0" enhanced-resolve@^3.0.0, enhanced-resolve@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" - integrity sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24= dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" @@ -3385,12 +2914,10 @@ enhanced-resolve@^3.0.0, enhanced-resolve@^3.4.0: entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" - integrity sha1-blwtClYhtdra7O+AuQ7ftc13cvA= enzyme-adapter-react-16@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.1.1.tgz#a8f4278b47e082fbca14f5bfb1ee50ee650717b4" - integrity sha512-kC8pAtU2Jk3OJ0EG8Y2813dg9Ol0TXi7UNxHzHiWs30Jo/hj7alc//G1YpKUsPP1oKl9X+Lkx+WlGJpPYA+nvw== dependencies: enzyme-adapter-utils "^1.3.0" lodash "^4.17.4" @@ -3403,7 +2930,6 @@ enzyme-adapter-react-16@^1.1.1: enzyme-adapter-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.3.0.tgz#d6c85756826c257a8544d362cc7a67e97ea698c7" - integrity sha512-vVXSt6uDv230DIv+ebCG66T1Pm36Kv+m74L1TrF4kaE7e1V7Q/LcxO0QRkajk5cA6R3uu9wJf5h13wOTezTbjA== dependencies: lodash "^4.17.4" object.assign "^4.0.4" @@ -3412,7 +2938,6 @@ enzyme-adapter-utils@^1.3.0: enzyme@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.3.0.tgz#0971abd167f2d4bf3f5bd508229e1c4b6dc50479" - integrity sha512-l8csyPyLmtxskTz6pX9W8eDOyH1ckEtDttXk/vlFWCjv00SkjTjtoUrogqp4yEvMyneU9dUJoOLnqFoiHb8IHA== dependencies: cheerio "^1.0.0-rc.2" function.prototype.name "^1.0.3" @@ -3434,26 +2959,22 @@ enzyme@^3.3.0: err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" - integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= errno@^0.1.3, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== dependencies: prr "~1.0.1" error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - integrity sha1-+FWobOYa3E6GIcPNoh56dhLDqNw= dependencies: is-arrayish "^0.2.1" es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: version "1.11.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" - integrity sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA== dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -3464,7 +2985,6 @@ es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: es-to-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - integrity sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0= dependencies: is-callable "^1.1.1" is-date-object "^1.0.1" @@ -3473,7 +2993,6 @@ es-to-primitive@^1.1.1: es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.42" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.42.tgz#8c07dd33af04d5dcd1310b5cef13bea63a89ba8d" - integrity sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA== dependencies: es6-iterator "~2.0.3" es6-symbol "~3.1.1" @@ -3482,7 +3001,6 @@ es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= dependencies: d "1" es5-ext "^0.10.35" @@ -3491,7 +3009,6 @@ es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: es6-map@^0.1.3: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA= dependencies: d "1" es5-ext "~0.10.14" @@ -3503,19 +3020,16 @@ es6-map@^0.1.3: es6-promise@^4.0.3, es6-promise@^4.0.5: version "4.2.4" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - integrity sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ== es6-promisify@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= dependencies: es6-promise "^4.0.3" es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - integrity sha1-0rPsXU2ADO2BjbU40ol02wpzzLE= dependencies: d "1" es5-ext "~0.10.14" @@ -3526,7 +3040,6 @@ es6-set@~0.1.5: es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= dependencies: d "1" es5-ext "~0.10.14" @@ -3534,7 +3047,6 @@ es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: es6-weak-map@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - integrity sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8= dependencies: d "1" es5-ext "^0.10.14" @@ -3544,17 +3056,14 @@ es6-weak-map@^2.0.1: escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escodegen@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" - integrity sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -3566,7 +3075,6 @@ escodegen@^1.9.0: escope@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - integrity sha1-4Bl16BJ4GhY6ba392AOY3GTIicM= dependencies: es6-map "^0.1.3" es6-weak-map "^2.0.1" @@ -3576,44 +3084,36 @@ escope@^3.6.0: esprima@^2.6.0: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - integrity sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw== esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== dependencies: estraverse "^4.1.0" estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= event-emitter@~0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= dependencies: d "1" es5-ext "~0.10.14" @@ -3621,7 +3121,6 @@ event-emitter@~0.3.5: event-stream@~3.3.0: version "3.3.4" resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= dependencies: duplexer "~0.1.1" from "~0" @@ -3634,29 +3133,24 @@ event-stream@~3.3.0: eventemitter3@1.x.x: version "1.2.0" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" - integrity sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg= eventemitter3@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba" - integrity sha1-teEHm1n7XhuidxwKmTvgYKWMmbo= events@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= eventsource@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - integrity sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI= dependencies: original ">=0.0.5" evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== dependencies: md5.js "^1.3.4" safe-buffer "^5.1.1" @@ -3664,14 +3158,12 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: exec-sh@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" - integrity sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg== dependencies: merge "^1.1.3" execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -3684,7 +3176,6 @@ execa@^0.7.0: execa@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" - integrity sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -3697,19 +3188,16 @@ execa@^0.9.0: exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= dependencies: is-posix-bracket "^0.1.0" expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -3722,21 +3210,18 @@ expand-brackets@^2.1.4: expand-range@^1.8.1: version "1.8.2" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= dependencies: fill-range "^2.1.0" expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= dependencies: homedir-polyfill "^1.0.1" expect@^22.4.0, expect@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.3.tgz#d5a29d0a0e1fb2153557caef2674d4547e914674" - integrity sha512-XcNXEPehqn8b/jm8FYotdX0YrXn36qp4HWlrVT4ktwQas1l1LPxiVWncYnnL2eyMtKAmVIaG0XAp0QlrqJaxaA== dependencies: ansi-styles "^3.2.0" jest-diff "^22.4.3" @@ -3748,7 +3233,6 @@ expect@^22.4.0, expect@^22.4.3: express@^4.13.3: version "4.16.3" resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" - integrity sha1-avilAjUNsyRuzEvs9rWjTSL37VM= dependencies: accepts "~1.3.5" array-flatten "1.1.1" @@ -3784,14 +3268,12 @@ express@^4.13.3: extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" @@ -3799,12 +3281,10 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - integrity sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ= external-editor@^2.0.4: version "2.2.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== dependencies: chardet "^0.4.0" iconv-lite "^0.4.17" @@ -3813,14 +3293,12 @@ external-editor@^2.0.4: extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= dependencies: is-extglob "^1.0.0" extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== dependencies: array-unique "^0.3.2" define-property "^1.0.0" @@ -3834,7 +3312,6 @@ extglob@^2.0.4: extract-text-webpack-plugin@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7" - integrity sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ== dependencies: async "^2.4.1" loader-utils "^1.1.0" @@ -3844,58 +3321,48 @@ extract-text-webpack-plugin@3.0.2: extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastparse@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" - integrity sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg= faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" - integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ= dependencies: websocket-driver ">=0.5.1" faye-websocket@~0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - integrity sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg= dependencies: websocket-driver ">=0.5.1" fb-watchman@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= dependencies: bser "^2.0.0" fbjs@^0.8.15: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" - integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -3908,7 +3375,6 @@ fbjs@^0.8.15: fbjs@^0.8.16: version "0.8.16" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" - integrity sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s= dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -3921,31 +3387,26 @@ fbjs@^0.8.16: figgy-pudding@^3.0.0, figgy-pudding@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.1.0.tgz#a77ed2284175976c424b390b298569e9df86dd1e" - integrity sha512-Gi2vIue0ec6P/7LNpueGhLuvfF2ztuterl8YFBQn1yKgIS46noGxCbi+vviPdObNYtgUSh5FpHy5q0Cw9XhxKQ== figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= dependencies: escape-string-regexp "^1.0.5" file-loader@0.11.2: version "0.11.2" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34" - integrity sha512-N+uhF3mswIFeziHQjGScJ/yHXYt3DiLBeC+9vWW+WjUBiClMSOlV1YrXQi+7KM2aA3Rn4Bybgv+uXFQbfkzpvg== dependencies: loader-utils "^1.0.2" filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= fileset@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= dependencies: glob "^7.0.3" minimatch "^3.0.3" @@ -3953,12 +3414,10 @@ fileset@^2.0.2: filesize@3.5.11: version "3.5.11" resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" - integrity sha512-ZH7loueKBoDb7yG9esn1U+fgq7BzlzW6NRi5/rMdxIZ05dj7GFD/Xc5rq2CDt5Yq86CyfSYVyx4242QQNZbx1g== fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - integrity sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM= dependencies: is-number "^2.1.0" isobject "^2.0.0" @@ -3969,7 +3428,6 @@ fill-range@^2.1.0: fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" @@ -3979,7 +3437,6 @@ fill-range@^4.0.0: finalhandler@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== dependencies: debug "2.6.9" encodeurl "~1.0.2" @@ -3992,7 +3449,6 @@ finalhandler@1.1.1: find-cache-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= dependencies: commondir "^1.0.1" make-dir "^1.0.0" @@ -4001,17 +3457,14 @@ find-cache-dir@^1.0.0: find-index@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" - integrity sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ= find-npm-prefix@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" - integrity sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA== find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" @@ -4019,29 +3472,24 @@ find-up@^1.0.0: find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - integrity sha1-2uRqnXj74lKSJYzB54CkHZXAN4I= flexboxgrid-helpers@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/flexboxgrid-helpers/-/flexboxgrid-helpers-1.1.3.tgz#a8bbd15fd46dc9fd229e681bcfefb07b375068ab" - integrity sha1-qLvRX9Rtyf0inmgbz++wezdQaKs= flexboxgrid@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/flexboxgrid/-/flexboxgrid-6.3.1.tgz#e99898afc07b7047722bb81a958a5fba4d4e20fd" - integrity sha1-6ZiYr8B7cEdyK7galYpfuk1OIP0= flush-write-stream@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" - integrity sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw== dependencies: inherits "^2.0.1" readable-stream "^2.0.4" @@ -4049,29 +3497,24 @@ flush-write-stream@^1.0.0: for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= for-own@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= dependencies: for-in "^1.0.1" foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= fork-ts-checker-webpack-plugin@^0.2.8: version "0.2.10" resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.2.10.tgz#d0a4080e77e9f5d6e3b43cdce7d26658f9d250c6" - integrity sha1-0KQIDnfp9dbjtDzc59JmWPnSUMY= dependencies: babel-code-frame "^6.22.0" chalk "^1.1.3" @@ -4085,7 +3528,6 @@ fork-ts-checker-webpack-plugin@^0.2.8: form-data@~2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - integrity sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE= dependencies: asynckit "^0.4.0" combined-stream "^1.0.5" @@ -4094,7 +3536,6 @@ form-data@~2.1.1: form-data@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" - integrity sha1-SXBJi+YEwgwAXU9cI67NIda0kJk= dependencies: asynckit "^0.4.0" combined-stream "1.0.6" @@ -4103,24 +3544,20 @@ form-data@~2.3.1: forwarded@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= dependencies: map-cache "^0.2.2" fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= from2@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-1.3.0.tgz#88413baaa5f9a597cfde9221d86986cd3c061dfd" - integrity sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0= dependencies: inherits "~2.0.1" readable-stream "~1.1.10" @@ -4128,7 +3565,6 @@ from2@^1.3.0: from2@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= dependencies: inherits "^2.0.1" readable-stream "^2.0.0" @@ -4136,12 +3572,10 @@ from2@^2.1.0: from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" - integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= fs-extra@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" @@ -4150,7 +3584,6 @@ fs-extra@3.0.1: fs-extra@4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -4159,7 +3592,6 @@ fs-extra@4.0.3: fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= dependencies: graceful-fs "^4.1.2" jsonfile "^2.1.0" @@ -4170,14 +3602,12 @@ fs-extra@^0.30.0: fs-minipass@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== dependencies: minipass "^2.2.1" fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: version "1.2.10" resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36" - integrity sha1-t2Kb7AekAxolSP35n17PHMizHjY= dependencies: graceful-fs "^4.1.2" path-is-inside "^1.0.1" @@ -4186,7 +3616,6 @@ fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= dependencies: graceful-fs "^4.1.2" iferr "^0.1.5" @@ -4196,12 +3625,10 @@ fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.0.0, fsevents@^1.1.1, fsevents@^1.1.2, fsevents@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" - integrity sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q== dependencies: nan "^2.3.0" node-pre-gyp "^0.6.39" @@ -4209,7 +3636,6 @@ fsevents@^1.0.0, fsevents@^1.1.1, fsevents@^1.1.2, fsevents@^1.1.3: fstream-ignore@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - integrity sha1-nDHa40dnAY/h0kmyTa2mfQktoQU= dependencies: fstream "^1.0.0" inherits "2" @@ -4218,7 +3644,6 @@ fstream-ignore@^1.0.5: fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - integrity sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE= dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -4228,12 +3653,10 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== function.prototype.name@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.0.tgz#8bd763cc0af860a859cc5d49384d74b932cd2327" - integrity sha512-Bs0VRrTz4ghD8pTmbJQD1mZ8A/mN0ur/jGz+A6FBxPDUPkm1tNfF6bhTYPA7i7aF4lZJVr+OXTNNrnnIl58Wfg== dependencies: define-properties "^1.1.2" function-bind "^1.1.1" @@ -4242,7 +3665,6 @@ function.prototype.name@^1.0.3: gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -4256,31 +3678,26 @@ gauge@~2.7.3: gaze@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" - integrity sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU= dependencies: globule "^1.0.0" generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - integrity sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ= generate-object-property@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - integrity sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA= dependencies: is-property "^1.0.0" genfun@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" - integrity sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E= gentle-fs@^2.0.0, gentle-fs@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.0.1.tgz#585cfd612bfc5cd52471fdb42537f016a5ce3687" - integrity sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew== dependencies: aproba "^1.1.2" fs-vacuum "^1.2.10" @@ -4294,34 +3711,28 @@ gentle-fs@^2.0.0, gentle-fs@^2.0.1: get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - integrity sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U= get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= dependencies: glob-parent "^2.0.0" is-glob "^2.0.0" @@ -4329,14 +3740,12 @@ glob-base@^0.3.0: glob-parent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= dependencies: is-glob "^2.0.0" glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= dependencies: is-glob "^3.1.0" path-dirname "^1.0.0" @@ -4344,14 +3753,12 @@ glob-parent@^3.1.0: glob2base@^0.0.12: version "0.0.12" resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" - integrity sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY= dependencies: find-index "^0.1.1" glob@^6.0.4: version "6.0.4" resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" - integrity sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI= dependencies: inflight "^1.0.4" inherits "2" @@ -4362,7 +3769,6 @@ glob@^6.0.4: glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1, glob@~7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -4374,14 +3780,12 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1, gl global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU= dependencies: ini "^1.3.4" global-modules@1.0.0, global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== dependencies: global-prefix "^1.0.1" is-windows "^1.0.1" @@ -4390,7 +3794,6 @@ global-modules@1.0.0, global-modules@^1.0.0: global-prefix@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= dependencies: expand-tilde "^2.0.2" homedir-polyfill "^1.0.1" @@ -4401,12 +3804,10 @@ global-prefix@^1.0.1: globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - integrity sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= dependencies: array-union "^1.0.1" arrify "^1.0.0" @@ -4418,7 +3819,6 @@ globby@^5.0.0: globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= dependencies: array-union "^1.0.1" glob "^7.0.3" @@ -4429,7 +3829,6 @@ globby@^6.1.0: globule@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" - integrity sha1-HcScaCLdnoovoAuiopUAboZkvQk= dependencies: glob "~7.1.1" lodash "~4.17.4" @@ -4438,7 +3837,6 @@ globule@^1.0.0: got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= dependencies: create-error-class "^3.0.0" duplexer3 "^0.1.4" @@ -4455,29 +3853,24 @@ got@^6.7.1: graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@~4.1.11: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= gzip-size@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" - integrity sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA= dependencies: duplexer "^0.1.1" handle-thing@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" - integrity sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ= handlebars@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - integrity sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw= dependencies: async "^1.4.0" optimist "^0.6.1" @@ -4488,17 +3881,14 @@ handlebars@^4.0.3: har-schema@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - integrity sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4= har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - integrity sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0= dependencies: chalk "^1.1.1" commander "^2.9.0" @@ -4508,7 +3898,6 @@ har-validator@~2.0.6: har-validator@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - integrity sha1-M0gdDxu/9gDdID11gSpqX7oALio= dependencies: ajv "^4.9.1" har-schema "^1.0.5" @@ -4516,7 +3905,6 @@ har-validator@~4.2.1: har-validator@~5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0= dependencies: ajv "^5.1.0" har-schema "^2.0.0" @@ -4524,39 +3912,32 @@ har-validator@~5.0.3: has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= dependencies: ansi-regex "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= has-unicode@^2.0.0, has-unicode@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -4565,7 +3946,6 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -4574,12 +3954,10 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= dependencies: is-number "^3.0.0" kind-of "^4.0.0" @@ -4587,21 +3965,18 @@ has-values@^1.0.0: has@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - integrity sha1-hGFzP1OLCDfJNh45qauelwTcLyg= dependencies: function-bind "^1.0.2" hash-base@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" - integrity sha1-ZuodhW206KVHDK32/OI65SRO8uE= dependencies: inherits "^2.0.1" hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -4609,7 +3984,6 @@ hash-base@^3.0.0: hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== dependencies: inherits "^2.0.3" minimalistic-assert "^1.0.0" @@ -4617,7 +3991,6 @@ hash.js@^1.0.0, hash.js@^1.0.3: hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - integrity sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ= dependencies: boom "2.x.x" cryptiles "2.x.x" @@ -4627,7 +4000,6 @@ hawk@3.1.3, hawk@~3.1.3: hawk@~6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - integrity sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ== dependencies: boom "4.x.x" cryptiles "3.x.x" @@ -4637,12 +4009,10 @@ hawk@~6.0.2: he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= history@^4.7.2: version "4.7.2" resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b" - integrity sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA== dependencies: invariant "^2.2.1" loose-envify "^1.2.0" @@ -4653,7 +4023,6 @@ history@^4.7.2: hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" @@ -4662,22 +4031,18 @@ hmac-drbg@^1.0.0: hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - integrity sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0= hoek@4.x.x: version "4.2.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" - integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== hoist-non-react-statics@^2.3.0, hoist-non-react-statics@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40" - integrity sha512-6Bl6XsDT1ntE0lHbIhr4Kp2PGcleGZ66qu5Jqk8lc0Xc/IeG6gVLmwUGs/K0Us+L8VWoKgj0uWdPMataOsm31w== home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" @@ -4685,24 +4050,20 @@ home-or-tmp@^2.0.0: homedir-polyfill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" - integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= dependencies: parse-passwd "^1.0.0" hosted-git-info@^2.1.4: version "2.6.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" - integrity sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw== hosted-git-info@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.1.tgz#6e4cee78b01bb849dcf93527708c69fdbee410df" - integrity sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A== hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= dependencies: inherits "^2.0.1" obuf "^1.0.0" @@ -4712,24 +4073,20 @@ hpack.js@^2.1.6: html-comment-regex@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" - integrity sha1-ZouTd26q5V696POtRkswekljYl4= html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== dependencies: whatwg-encoding "^1.0.1" html-entities@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" - integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= html-minifier@^3.2.3: version "3.5.14" resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.14.tgz#88653b24b344274e3e3d7052f1541ebea054ac60" - integrity sha512-sZjw6zhQgyUnIlIPU+W80XpRjWjdxHtNcxjfyOskOsCTDKytcfLY04wsQY/83Yqb4ndoiD2FtauiL7Yg6uUQFQ== dependencies: camel-case "3.0.x" clean-css "4.1.x" @@ -4742,7 +4099,6 @@ html-minifier@^3.2.3: html-webpack-plugin@2.29.0: version "2.29.0" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.29.0.tgz#e987f421853d3b6938c8c4c8171842e5fd17af23" - integrity sha1-6Yf0IYU9O2k4yMTIFxhC5f0XryM= dependencies: bluebird "^3.4.7" html-minifier "^3.2.3" @@ -4754,7 +4110,6 @@ html-webpack-plugin@2.29.0: htmlparser2@^3.9.1: version "3.9.2" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" - integrity sha1-G9+HrMoPP55T+k/M6w9LTLsAszg= dependencies: domelementtype "^1.3.0" domhandler "^2.3.0" @@ -4766,7 +4121,6 @@ htmlparser2@^3.9.1: htmlparser2@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" - integrity sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4= dependencies: domelementtype "1" domhandler "2.1" @@ -4776,17 +4130,14 @@ htmlparser2@~3.3.0: http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= http-errors@1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - integrity sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY= dependencies: depd "1.1.1" inherits "2.0.3" @@ -4796,7 +4147,6 @@ http-errors@1.6.2: http-errors@~1.6.2: version "1.6.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= dependencies: depd "~1.1.2" inherits "2.0.3" @@ -4806,12 +4156,10 @@ http-errors@~1.6.2: http-parser-js@>=0.4.0: version "0.4.11" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.11.tgz#5b720849c650903c27e521633d94696ee95f3529" - integrity sha512-QCR5O2AjjMW8Mo4HyI1ctFcv+O99j/0g367V3YoVnrNw5hkDvAWZD0lWGcc+F4yN3V55USPCVix4efb75HxFfA== http-proxy-agent@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: agent-base "4" debug "3.1.0" @@ -4819,7 +4167,6 @@ http-proxy-agent@^2.1.0: http-proxy-middleware@~0.17.4: version "0.17.4" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" - integrity sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM= dependencies: http-proxy "^1.16.2" is-glob "^3.1.0" @@ -4829,7 +4176,6 @@ http-proxy-middleware@~0.17.4: http-proxy@^1.16.2: version "1.16.2" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" - integrity sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I= dependencies: eventemitter3 "1.x.x" requires-port "1.x.x" @@ -4837,7 +4183,6 @@ http-proxy@^1.16.2: http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - integrity sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8= dependencies: assert-plus "^0.2.0" jsprim "^1.2.2" @@ -4846,7 +4191,6 @@ http-signature@~1.1.0: http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" @@ -4855,12 +4199,10 @@ http-signature@~1.2.0: https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" - integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== dependencies: agent-base "^4.1.0" debug "^3.1.0" @@ -4868,14 +4210,12 @@ https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1: humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= dependencies: ms "^2.0.0" husky@^1.0.0-rc.6: version "1.0.0-rc.6" resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.0-rc.6.tgz#000f5ffe671015ae8c48da5c52b3390bbba9770d" - integrity sha512-glraqjyMBNAOlAs1JJTxELJbrBT7v9VNiIDerywshHLDnzdC4iqwhHTkWXsY+L8Clt1Gade2/CppLcxEwY/HgQ== dependencies: cosmiconfig "^4.0.0" execa "^0.9.0" @@ -4890,68 +4230,56 @@ husky@^1.0.0-rc.6: iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - integrity sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ== iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.21" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" - integrity sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw== dependencies: safer-buffer "^2.1.0" icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= icss-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" - integrity sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI= dependencies: postcss "^6.0.1" ieee754@^1.1.4: version "1.1.11" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" - integrity sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg== iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= iferr@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/iferr/-/iferr-1.0.2.tgz#e9fde49a9da06dc4a4194c6c9ed6d08305037a6d" - integrity sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg== ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== dependencies: minimatch "^3.0.4" immutable@^3.8.1: version "3.8.2" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" - integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM= immutable@~3.7.4: version "3.7.6" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" - integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= import-local@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/import-local/-/import-local-0.1.1.tgz#b1179572aacdc11c6a91009fb430dbcab5f668a8" - integrity sha1-sReVcqrNwRxqkQCftDDbyrX2aKg= dependencies: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" @@ -4959,7 +4287,6 @@ import-local@^0.1.1: import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" - integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== dependencies: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" @@ -4967,34 +4294,28 @@ import-local@^1.0.0: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= in-publish@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" - integrity sha1-4g/146KvwmkDILbcVSaCqcf631E= indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= dependencies: repeating "^2.0.0" indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= inflight@^1.0.4, inflight@~1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" @@ -5002,22 +4323,18 @@ inflight@^1.0.4, inflight@~1.0.6: inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== init-package-json@^1.10.3: version "1.10.3" resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" - integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== dependencies: glob "^7.1.1" npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" @@ -5031,7 +4348,6 @@ init-package-json@^1.10.3: inquirer@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" @@ -5051,132 +4367,110 @@ inquirer@3.3.0: internal-ip@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" - integrity sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w= dependencies: meow "^3.3.0" interpret@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" - integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= ip@^1.1.0, ip@^1.1.4, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= ipaddr.js@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b" - integrity sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs= is-absolute-url@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= dependencies: kind-of "^3.0.2" is-accessor-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== dependencies: kind-of "^6.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= dependencies: binary-extensions "^1.0.0" is-boolean-object@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.0.tgz#98f8b28030684219a95f375cfbd88ce3405dff93" - integrity sha1-mPiygDBoQhmpXzdc+9iM40Bd/5M= is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= dependencies: builtin-modules "^1.0.0" is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - integrity sha1-hut1OSgF3cM69xySoO7fdO52BLI= is-ci@^1.0.10, is-ci@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" - integrity sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg== dependencies: ci-info "^1.0.0" is-cidr@^2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-2.0.6.tgz#4b01c9693d8e18399dacd18a4f3d60ea5871ac60" - integrity sha512-A578p1dV22TgPXn6NCaDAPj6vJvYsBgAzUrAd28a4oldeXJjWqEUuSZOLIW3im51mazOKsoyVp8NU/OItlWacw== dependencies: cidr-regex "^2.0.8" is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= dependencies: kind-of "^3.0.2" is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== dependencies: kind-of "^6.0.0" is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== dependencies: is-accessor-descriptor "^0.1.6" is-data-descriptor "^0.1.4" @@ -5185,7 +4479,6 @@ is-descriptor@^0.1.0: is-descriptor@^1.0.0, is-descriptor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== dependencies: is-accessor-descriptor "^1.0.0" is-data-descriptor "^1.0.0" @@ -5194,91 +4487,76 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= is-equal-shallow@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= dependencies: is-primitive "^2.0.0" is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== dependencies: is-plain-object "^2.0.4" is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" - integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= dependencies: is-extglob "^1.0.0" is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= dependencies: is-extglob "^2.1.0" is-glob@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= dependencies: is-extglob "^2.1.1" is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" - integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA= dependencies: global-dirs "^0.1.0" is-path-inside "^1.0.0" @@ -5286,12 +4564,10 @@ is-installed-globally@^0.1.0: is-my-ip-valid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" - integrity sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ== is-my-json-valid@^2.12.4: version "2.17.2" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" - integrity sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg== dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" @@ -5302,200 +4578,164 @@ is-my-json-valid@^2.12.4: is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" - integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ= is-number-object@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.3.tgz#f265ab89a9f445034ef6aff15a8f00b00f551799" - integrity sha1-8mWrian0RQNO9q/xWo8AsA9VF5k= is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= dependencies: kind-of "^3.0.2" is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= dependencies: kind-of "^3.0.2" is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== is-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-odd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - integrity sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ== dependencies: is-number "^4.0.0" is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= is-path-in-cwd@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" - integrity sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" - integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= dependencies: path-is-inside "^1.0.1" is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - integrity sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ= is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= dependencies: has "^1.0.1" is-retry-allowed@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= is-root@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-root/-/is-root-1.0.0.tgz#07b6c233bc394cd9d02ba15c966bd6660d6342d5" - integrity sha1-B7bCM7w5TNnQK6FclmvWZg1jQtU= is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= is-string@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.4.tgz#cc3a9b69857d621e963725a24caeec873b826e64" - integrity sha1-zDqbaYV9Yh6WNyWiTK7shzuCbmQ= is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= is-svg@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" - integrity sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk= dependencies: html-comment-regex "^1.1.0" is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - integrity sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI= is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= ismobilejs@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/ismobilejs/-/ismobilejs-0.4.1.tgz#1a5f126c70fed39c93da380fa62cbae5723e7dc2" - integrity sha1-Gl8SbHD+05yT2jgPpiy65XI+fcI= isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= dependencies: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" @@ -5503,12 +4743,10 @@ isomorphic-fetch@^2.1.1: isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= istanbul-api@^1.1.14: version "1.3.1" resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" - integrity sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g== dependencies: async "^2.1.4" compare-versions "^3.1.0" @@ -5526,19 +4764,16 @@ istanbul-api@^1.1.14: istanbul-lib-coverage@^1.1.1, istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" - integrity sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A== istanbul-lib-hook@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz#ae556fd5a41a6e8efa0b1002b1e416dfeaf9816c" - integrity sha512-p3En6/oGkFQV55Up8ZPC2oLxvgSxD8CzA0yBrhRZSh3pfv3OFj9aSGVC0yoerAi/O4u7jUVnOGVX1eVFM+0tmQ== dependencies: append-transform "^0.4.0" istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.8.0: version "1.10.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" - integrity sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ== dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" @@ -5551,7 +4786,6 @@ istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.8.0: istanbul-lib-report@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" - integrity sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA== dependencies: istanbul-lib-coverage "^1.2.0" mkdirp "^0.5.1" @@ -5561,7 +4795,6 @@ istanbul-lib-report@^1.1.4: istanbul-lib-source-maps@^1.2.1: version "1.2.3" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" - integrity sha512-fDa0hwU/5sDXwAklXgAoCJCOsFsBplVQ6WBldz5UwaqOzmDhUK4nfuR7/G//G2lERlblUNJB8P6e8cXq3a7MlA== dependencies: debug "^3.1.0" istanbul-lib-coverage "^1.1.2" @@ -5572,7 +4805,6 @@ istanbul-lib-source-maps@^1.2.1: istanbul-lib-source-maps@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz#cc7ccad61629f4efff8e2f78adb8c522c9976ec7" - integrity sha512-UzuK0g1wyQijiaYQxj/CdNycFhAd2TLtO2obKQMTZrZ1jzEMRY3rvpASEKkaxbRR6brvdovfA03znPa/pXcejg== dependencies: debug "^3.1.0" istanbul-lib-coverage "^1.2.0" @@ -5583,21 +4815,18 @@ istanbul-lib-source-maps@^1.2.4: istanbul-reports@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" - integrity sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA== dependencies: handlebars "^4.0.3" jest-changed-files@^22.2.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.4.3.tgz#8882181e022c38bd46a2e4d18d44d19d90a90fb2" - integrity sha512-83Dh0w1aSkUNFhy5d2dvqWxi/y6weDwVVLU6vmK0cV9VpRxPzhTeGimbsbRDSnEoszhF937M4sDLLeS7Cu/Tmw== dependencies: throat "^4.0.0" jest-cli@^22.4.2: version "22.4.4" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.4.4.tgz#68cd2a2aae983adb1e6638248ca21082fd6d9e90" - integrity sha512-I9dsgkeyjVEEZj9wrGrqlH+8OlNob9Iptyl+6L5+ToOLJmHm4JwOPatin1b2Bzp5R5YRQJ+oiedx7o1H7wJzhA== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -5637,7 +4866,6 @@ jest-cli@^22.4.2: jest-config@^22.0.1, jest-config@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.3.tgz#0e9d57db267839ea31309119b41dc2fa31b76403" - integrity sha512-KSg3EOToCgkX+lIvenKY7J8s426h6ahXxaUFJxvGoEk0562Z6inWj1TnKoGycTASwiLD+6kSYFALcjdosq9KIQ== dependencies: chalk "^2.0.1" glob "^7.1.1" @@ -5654,7 +4882,6 @@ jest-config@^22.0.1, jest-config@^22.4.3: jest-config@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.4.tgz#72a521188720597169cd8b4ff86934ef5752d86a" - integrity sha512-9CKfo1GC4zrXSoMLcNeDvQBfgtqGTB1uP8iDIZ97oB26RCUb886KkKWhVcpyxVDOUxbhN+uzcBCeFe7w+Iem4A== dependencies: chalk "^2.0.1" glob "^7.1.1" @@ -5671,7 +4898,6 @@ jest-config@^22.4.4: jest-diff@^22.4.0, jest-diff@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.3.tgz#e18cc3feff0aeef159d02310f2686d4065378030" - integrity sha512-/QqGvCDP5oZOF6PebDuLwrB2BMD8ffJv6TAGAdEVuDx1+uEgrHpSFrfrOiMRx2eJ1hgNjlQrOQEHetVwij90KA== dependencies: chalk "^2.0.1" diff "^3.2.0" @@ -5681,14 +4907,12 @@ jest-diff@^22.4.0, jest-diff@^22.4.3: jest-docblock@^22.4.0, jest-docblock@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19" - integrity sha512-uPKBEAw7YrEMcXueMKZXn/rbMxBiSv48fSqy3uEnmgOlQhSX+lthBqHb1fKWNVmFqAp9E/RsSdBfiV31LbzaOg== dependencies: detect-newline "^2.1.0" jest-environment-jsdom@^22.4.1, jest-environment-jsdom@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz#d67daa4155e33516aecdd35afd82d4abf0fa8a1e" - integrity sha512-FviwfR+VyT3Datf13+ULjIMO5CSeajlayhhYQwpzgunswoaLIPutdbrnfUHEMyJCwvqQFaVtTmn9+Y8WCt6n1w== dependencies: jest-mock "^22.4.3" jest-util "^22.4.3" @@ -5697,7 +4921,6 @@ jest-environment-jsdom@^22.4.1, jest-environment-jsdom@^22.4.3: jest-environment-node@^22.4.1, jest-environment-node@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.3.tgz#54c4eaa374c83dd52a9da8759be14ebe1d0b9129" - integrity sha512-reZl8XF6t/lMEuPWwo9OLfttyC26A5AMgDyEQ6DBgZuyfyeNUzYT8BFo6uxCCP/Av/b7eb9fTi3sIHFPBzmlRA== dependencies: jest-mock "^22.4.3" jest-util "^22.4.3" @@ -5705,12 +4928,10 @@ jest-environment-node@^22.4.1, jest-environment-node@^22.4.3: jest-get-type@^22.1.0, jest-get-type@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" - integrity sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w== jest-haste-map@^22.4.2: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.4.3.tgz#25842fa2ba350200767ac27f658d58b9d5c2e20b" - integrity sha512-4Q9fjzuPVwnaqGKDpIsCSoTSnG3cteyk2oNVjBX12HHOaF1oxql+uUiqZb5Ndu7g/vTZfdNwwy4WwYogLh29DQ== dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" @@ -5723,7 +4944,6 @@ jest-haste-map@^22.4.2: jest-jasmine2@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.3.tgz#4daf64cd14c793da9db34a7c7b8dcfe52a745965" - integrity sha512-yZCPCJUcEY6R5KJB/VReo1AYI2b+5Ky+C+JA1v34jndJsRcLpU4IZX4rFJn7yDTtdNbO/nNqg+3SDIPNH2ecnw== dependencies: chalk "^2.0.1" co "^4.6.0" @@ -5740,7 +4960,6 @@ jest-jasmine2@^22.4.3: jest-jasmine2@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.4.tgz#c55f92c961a141f693f869f5f081a79a10d24e23" - integrity sha512-nK3vdUl50MuH7vj/8at7EQVjPGWCi3d5+6aCi7Gxy/XMWdOdbH1qtO/LjKbqD8+8dUAEH+BVVh7HkjpCWC1CSw== dependencies: chalk "^2.0.1" co "^4.6.0" @@ -5757,14 +4976,12 @@ jest-jasmine2@^22.4.4: jest-leak-detector@^22.4.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.4.3.tgz#2b7b263103afae8c52b6b91241a2de40117e5b35" - integrity sha512-NZpR/Ls7+ndO57LuXROdgCGz2RmUdC541tTImL9bdUtU3WadgFGm0yV+Ok4Fuia/1rLAn5KaJ+i76L6e3zGJYQ== dependencies: pretty-format "^22.4.3" jest-matcher-utils@^22.4.0, jest-matcher-utils@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff" - integrity sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA== dependencies: chalk "^2.0.1" jest-get-type "^22.4.3" @@ -5773,7 +4990,6 @@ jest-matcher-utils@^22.4.0, jest-matcher-utils@^22.4.3: jest-message-util@^22.4.0, jest-message-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.3.tgz#cf3d38aafe4befddbfc455e57d65d5239e399eb7" - integrity sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA== dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" @@ -5784,24 +5000,20 @@ jest-message-util@^22.4.0, jest-message-util@^22.4.3: jest-mock@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.4.3.tgz#f63ba2f07a1511772cdc7979733397df770aabc7" - integrity sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q== jest-regex-util@^22.1.0, jest-regex-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.4.3.tgz#a826eb191cdf22502198c5401a1fc04de9cef5af" - integrity sha512-LFg1gWr3QinIjb8j833bq7jtQopiwdAs67OGfkPrvy7uNUbVMfTXXcOKXJaeY5GgjobELkKvKENqq1xrUectWg== jest-resolve-dependencies@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.4.3.tgz#e2256a5a846732dc3969cb72f3c9ad7725a8195e" - integrity sha512-06czCMVToSN8F2U4EvgSB1Bv/56gc7MpCftZ9z9fBgUQM7dzHGCMBsyfVA6dZTx8v0FDcnALf7hupeQxaBCvpA== dependencies: jest-regex-util "^22.4.3" jest-resolve@^22.4.2, jest-resolve@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.3.tgz#0ce9d438c8438229aa9b916968ec6b05c1abb4ea" - integrity sha512-u3BkD/MQBmwrOJDzDIaxpyqTxYH+XqAXzVJP51gt29H8jpj3QgKof5GGO2uPGKGeA1yTMlpbMs1gIQ6U4vcRhw== dependencies: browser-resolve "^1.11.2" chalk "^2.0.1" @@ -5809,7 +5021,6 @@ jest-resolve@^22.4.2, jest-resolve@^22.4.3: jest-runner@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.4.4.tgz#dfca7b7553e0fa617e7b1291aeb7ce83e540a907" - integrity sha512-5S/OpB51igQW9xnkM5Tgd/7ZjiAuIoiJAVtvVTBcEBiXBIFzWM3BAMPBM19FX68gRV0KWyFuGKj0EY3M3aceeQ== dependencies: exit "^0.1.2" jest-config "^22.4.4" @@ -5826,7 +5037,6 @@ jest-runner@^22.4.4: jest-runtime@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.4.4.tgz#9ba7792fc75582a5be0f79af6f8fe8adea314048" - integrity sha512-WRTj9m///npte1YjuphCYX7GRY/c2YvJImU9t7qOwFcqHr4YMzmX6evP/3Sehz5DKW2Vi8ONYPCFWe36JVXxfw== dependencies: babel-core "^6.0.0" babel-jest "^22.4.4" @@ -5852,12 +5062,10 @@ jest-runtime@^22.4.4: jest-serializer@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.3.tgz#a679b81a7f111e4766235f4f0c46d230ee0f7436" - integrity sha512-uPaUAppx4VUfJ0QDerpNdF43F68eqKWCzzhUlKNDsUPhjOon7ZehR4C809GCqh765FoMRtTVUVnGvIoskkYHiw== jest-snapshot@^22.4.0, jest-snapshot@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.3.tgz#b5c9b42846ffb9faccb76b841315ba67887362d2" - integrity sha512-JXA0gVs5YL0HtLDCGa9YxcmmV2LZbwJ+0MfyXBBc5qpgkEYITQFJP7XNhcHFbUvRiniRpRbGVfJrOoYhhGE0RQ== dependencies: chalk "^2.0.1" jest-diff "^22.4.3" @@ -5869,7 +5077,6 @@ jest-snapshot@^22.4.0, jest-snapshot@^22.4.3: jest-util@^22.4.1, jest-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.3.tgz#c70fec8eec487c37b10b0809dc064a7ecf6aafac" - integrity sha512-rfDfG8wyC5pDPNdcnAlZgwKnzHvZDu8Td2NJI/jAGKEGxJPYiE4F0ss/gSAkG4778Y23Hvbz+0GMrDJTeo7RjQ== dependencies: callsites "^2.0.0" chalk "^2.0.1" @@ -5882,7 +5089,6 @@ jest-util@^22.4.1, jest-util@^22.4.3: jest-validate@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.3.tgz#0780954a5a7daaeec8d3c10834b9280865976b30" - integrity sha512-CfFM18W3GSP/xgmA4UouIx0ljdtfD2mjeBC6c89Gg17E44D4tQhAcTrZmf9djvipwU30kSTnk6CzcxdCCeSXfA== dependencies: chalk "^2.0.1" jest-config "^22.4.3" @@ -5893,7 +5099,6 @@ jest-validate@^22.4.3: jest-validate@^22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.4.tgz#1dd0b616ef46c995de61810d85f57119dbbcec4d" - integrity sha512-dmlf4CIZRGvkaVg3fa0uetepcua44DHtktHm6rcoNVtYlpwe6fEJRkMFsaUVcFHLzbuBJ2cPw9Gl9TKfnzMVwg== dependencies: chalk "^2.0.1" jest-config "^22.4.4" @@ -5904,14 +5109,12 @@ jest-validate@^22.4.4: jest-worker@^22.2.2, jest-worker@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.4.3.tgz#5c421417cba1c0abf64bf56bd5fb7968d79dd40b" - integrity sha512-B1ucW4fI8qVAuZmicFxI1R3kr2fNeYJyvIQ1rKcuLYnenFV5K5aMbxFj6J0i00Ju83S8jP2d7Dz14+AvbIHRYQ== dependencies: merge-stream "^1.0.1" jest@22.4.2: version "22.4.2" resolved "https://registry.yarnpkg.com/jest/-/jest-22.4.2.tgz#34012834a49bf1bdd3bc783850ab44e4499afc20" - integrity sha512-wD7dXWtfaQAgbNVsjFqzmuhg6nzwGsTRVea3FpSJ7GURhG+J536fw4mdoLB01DgiEozDDeF1ZMR/UlUszTsCrg== dependencies: import-local "^1.0.0" jest-cli "^22.4.2" @@ -5919,35 +5122,21 @@ jest@22.4.2: js-base64@^2.1.8: version "2.4.5" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.5.tgz#e293cd3c7c82f070d700fc7a1ca0a2e69f101f92" - integrity sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ== js-base64@^2.1.9: version "2.4.3" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" - integrity sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw== - -js-slang@0.1.19: - version "0.1.19" - resolved "https://registry.yarnpkg.com/js-slang/-/js-slang-0.1.19.tgz#7ef2b9616763c3d8f3144288d357130025ebdfda" - integrity sha512-X4JgpeDxUSEzn+ssnzXoO7lo6RfDD70V06ecVcRUt5QkV70s+HfcORiO5Cf+SgqUV4LC+2R5cBv0Yk5YSXvqHw== - dependencies: - "@types/acorn" "^4.0.3" - "@types/estree" "0.0.39" - acorn "^5.7.1" - astring "^1.2.0" - commander "^2.14.1" - common-tags "^1.4.0" - invariant "^2.2.2" + +"js-slang@file:../openorclosejsslang/dist": + version "0.0.0" js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" - integrity sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5955,7 +5144,6 @@ js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.0: js-yaml@^3.6.1: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5963,7 +5151,6 @@ js-yaml@^3.6.1: js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - integrity sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A= dependencies: argparse "^1.0.7" esprima "^2.6.0" @@ -5971,12 +5158,10 @@ js-yaml@~3.7.0: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= jsdom@^11.5.1: version "11.8.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.8.0.tgz#a52e9a7d2b931284f62c80dad5f17d7390499d8b" - integrity sha512-fZZSH6P8tVqYIQl0WKpZuQljPu2cW41Uj/c9omtyGwjwZCB8c82UAi7BSQs/F1FgWovmZsoU02z3k28eHp0Cdw== dependencies: abab "^1.0.4" acorn "^5.3.0" @@ -6008,95 +5193,78 @@ jsdom@^11.5.1: jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= json-loader@^0.5.4: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" - integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= dependencies: jsonify "~0.0.0" json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json3@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= optionalDependencies: graceful-fs "^4.1.6" jsonfile@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= optionalDependencies: graceful-fs "^4.1.6" jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= optionalDependencies: graceful-fs "^4.1.6" jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" - integrity sha1-T9kss04OnbPInIYi7PUfm5eMbLk= jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= dependencies: assert-plus "1.0.0" extsprintf "1.3.0" @@ -6106,82 +5274,68 @@ jsprim@^1.2.2: killable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" - integrity sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms= kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= dependencies: is-buffer "^1.1.5" kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= optionalDependencies: graceful-fs "^4.1.9" latest-version@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" - integrity sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU= dependencies: package-json "^4.0.0" lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= lazy-property@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazy-property/-/lazy-property-1.0.0.tgz#84ddc4b370679ba8bd4cdcfa4c06b43d57111147" - integrity sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc= lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= dependencies: invert-kv "^1.0.0" lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM= left-pad@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" - integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -6189,7 +5343,6 @@ levn@~0.3.0: libcipm@^1.6.2: version "1.6.3" resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-1.6.3.tgz#dc4052d710941547782d85bbdb3c77eedec733ff" - integrity sha512-WUEjQk1aZDECb2MFnAbx6o7sJbBJWrWwt9rbinOmpc0cLKWgYJOvKNqCUN3sl2P9LFqPsnVT4Aj5SPw4/xKI5A== dependencies: bin-links "^1.1.2" bluebird "^3.5.1" @@ -6208,7 +5361,6 @@ libcipm@^1.6.2: libnpmhook@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-4.0.1.tgz#63641654de772cbeb96a88527a7fd5456ec3c2d7" - integrity sha512-3qqpfqvBD1712WA6iGe0stkG40WwAeoWcujA6BlC0Be1JArQbqwabnEnZ0CRcD05Tf1fPYJYdCbSfcfedEJCOg== dependencies: figgy-pudding "^3.1.0" npm-registry-fetch "^3.0.0" @@ -6216,7 +5368,6 @@ libnpmhook@^4.0.1: libnpx@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.0.tgz#1bf4a1c9f36081f64935eb014041da10855e3102" - integrity sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ== dependencies: dotenv "^5.0.1" npm-package-arg "^6.0.0" @@ -6230,7 +5381,6 @@ libnpx@^10.2.0: load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -6241,7 +5391,6 @@ load-json-file@^1.0.0: load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -6251,7 +5400,6 @@ load-json-file@^2.0.0: load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= dependencies: graceful-fs "^4.1.2" parse-json "^4.0.0" @@ -6261,12 +5409,10 @@ load-json-file@^4.0.0: loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" - integrity sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI= loader-utils@^0.2.16, loader-utils@~0.2.2: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= dependencies: big.js "^3.1.3" emojis-list "^2.0.0" @@ -6276,7 +5422,6 @@ loader-utils@^0.2.16, loader-utils@~0.2.2: loader-utils@^1.0.2, loader-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= dependencies: big.js "^3.1.3" emojis-list "^2.0.0" @@ -6285,7 +5430,6 @@ loader-utils@^1.0.2, loader-utils@^1.1.0: locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= dependencies: p-locate "^2.0.0" path-exists "^3.0.0" @@ -6293,7 +5437,6 @@ locate-path@^2.0.0: lock-verify@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.0.2.tgz#148e4f85974915c9e3c34d694b7de9ecb18ee7a8" - integrity sha512-QNVwK0EGZBS4R3YQ7F1Ox8p41Po9VGl2QG/2GsuvTbkJZYSsPeWHKMbbH6iZMCHWSMww5nrJroZYnGzI4cePuw== dependencies: npm-package-arg "^5.1.2 || 6" semver "^5.4.1" @@ -6301,19 +5444,16 @@ lock-verify@^2.0.2: lockfile@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" - integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== dependencies: signal-exit "^3.0.2" lodash-es@^4.17.5, lodash-es@^4.2.1: version "4.17.8" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.8.tgz#6fa8c8c5d337481df0bdf1c0d899d42473121e45" - integrity sha512-I9mjAxengFAleSThFhhAhvba6fsO0hunb9/0sQ6qQihSZsJRBofv2rYH58WXaOb/O++eUmYpCLywSQ22GfU+sA== lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" - integrity sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg= dependencies: lodash._createset "~4.0.0" lodash._root "~3.0.0" @@ -6321,107 +5461,86 @@ lodash._baseuniq@~4.6.0: lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" - integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= lodash._root@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= lodash.clonedeep@^4.3.2, lodash.clonedeep@~4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= lodash.endswith@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" - integrity sha1-/tWawXOO0+I27dcGTsRWRIs3vAk= lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= lodash.isboolean@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" - integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= lodash.isequal@^4.1.1, lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= lodash.isfunction@^3.0.8: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" - integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== lodash.isobject@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" - integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= lodash.mergewith@^4.6.0: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash.startswith@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.startswith/-/lodash.startswith-4.2.1.tgz#c598c4adce188a27e53145731cdc6c0e7177600c" - integrity sha1-xZjErc4YiiflMUVzHNxsDnF3YAw= lodash.template@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" - integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= dependencies: lodash._reinterpolate "~3.0.0" lodash.templatesettings "^4.0.0" @@ -6429,66 +5548,54 @@ lodash.template@^4.4.0: lodash.templatesettings@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= dependencies: lodash._reinterpolate "~3.0.0" lodash.union@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= lodash.uniq@^4.5.0, lodash.uniq@~4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= lodash.without@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" - integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= "lodash@>=3.5 <5", lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - integrity sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw== lodash@^3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= lodash@^4.0.0, lodash@^4.17.10, lodash@~4.17.4: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== log-driver@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== loglevel@^1.4.1: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - integrity sha1-4PyVEztu8nbNyIh82vJKpvFW+Po= longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - integrity sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg= dependencies: js-tokens "^3.0.0" loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= dependencies: currently-unhandled "^0.4.1" signal-exit "^3.0.0" @@ -6496,17 +5603,14 @@ loud-rejection@^1.0.0: lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= lowercase-keys@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" - integrity sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -6514,7 +5618,6 @@ lru-cache@^4.0.1, lru-cache@^4.1.1: lru-cache@^4.1.2, lru-cache@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" - integrity sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -6522,24 +5625,20 @@ lru-cache@^4.1.2, lru-cache@^4.1.3: lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" - integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" - integrity sha1-WQTcU3w57G2+/q6QIycTX6hRHxI= make-dir@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" - integrity sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw== dependencies: pify "^3.0.0" "make-fetch-happen@^2.5.0 || 3 || 4", make-fetch-happen@^4.0.0, make-fetch-happen@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" - integrity sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ== dependencies: agentkeepalive "^3.4.1" cacache "^11.0.1" @@ -6556,7 +5655,6 @@ make-dir@^1.0.0: make-fetch-happen@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-3.0.0.tgz#7b661d2372fc4710ab5cc8e1fa3c290eea69a961" - integrity sha512-FmWY7gC0mL6Z4N86vE14+m719JKE4H0A+pyiOH18B025gF/C113pyfb4gHDDYP5cqnRMHOz06JGdmffC/SES+w== dependencies: agentkeepalive "^3.4.1" cacache "^10.0.4" @@ -6573,41 +5671,34 @@ make-fetch-happen@^3.0.0: makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= dependencies: tmpl "1.0.x" map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-stream@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" - integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: object-visit "^1.0.0" math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - integrity sha1-3oGf282E3M2PrlnGrreWFbnSZqw= md5.js@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" - integrity sha1-6b296UogpawYsENA/Fdk1bCdkB0= dependencies: hash-base "^3.0.0" inherits "^2.0.1" @@ -6615,24 +5706,20 @@ md5.js@^1.3.4: meant@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.1.tgz#66044fea2f23230ec806fb515efea29c44d2115d" - integrity sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg== media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= mem@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= dependencies: mimic-fn "^1.0.0" memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= dependencies: errno "^0.1.3" readable-stream "^2.0.1" @@ -6640,12 +5727,10 @@ memory-fs@^0.4.0, memory-fs@~0.4.1: memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= meow@^3.3.0, meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= dependencies: camelcase-keys "^2.0.0" decamelize "^1.1.2" @@ -6661,29 +5746,24 @@ meow@^3.3.0, meow@^3.7.0: merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= dependencies: readable-stream "^2.0.1" merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - integrity sha1-dTHjnUlJwoGma4xabgJl6LBYlNo= methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= dependencies: arr-diff "^2.0.0" array-unique "^0.2.1" @@ -6702,7 +5782,6 @@ micromatch@^2.1.5, micromatch@^2.3.11: micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -6721,7 +5800,6 @@ micromatch@^3.1.4, micromatch@^3.1.8: miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== dependencies: bn.js "^4.0.0" brorand "^1.0.1" @@ -6729,78 +5807,64 @@ miller-rabin@^4.0.0: "mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: version "1.33.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: version "2.1.18" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== dependencies: mime-db "~1.33.0" mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== mime@^1.4.1, mime@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== mini-signals@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/mini-signals/-/mini-signals-1.2.0.tgz#45b08013c5fae51a24aa1a935cd317c9ed721d74" - integrity sha1-RbCAE8X65RokqhqTXNMXye1yHXQ= minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimatch@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - integrity sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q= dependencies: brace-expansion "^1.0.0" minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= minipass@^2.2.1, minipass@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" - integrity sha512-/jAn9/tEX4gnpyRATxgHEOV6xbcyxgT7iUnxo9Y3+OB0zX00TgKIv/2FZCf5brBbICcwbLqVv2ImjvWWrQMSYw== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" @@ -6808,14 +5872,12 @@ minipass@^2.2.1, minipass@^2.3.3: minizlib@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" - integrity sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA== dependencies: minipass "^2.2.1" mississippi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" - integrity sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" @@ -6831,7 +5893,6 @@ mississippi@^2.0.0: mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" @@ -6847,7 +5908,6 @@ mississippi@^3.0.0: mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" @@ -6855,24 +5915,20 @@ mixin-deep@^1.2.0: mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" moment@^2.22.2: version "2.22.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" - integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= mousetrap@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.1.tgz#2a085f5c751294c75e7e81f6ec2545b29cbf42d9" - integrity sha1-KghfXHUSlMdefoH27CVFspy/Qtk= move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= dependencies: aproba "^1.1.1" copy-concurrently "^1.0.0" @@ -6884,22 +5940,18 @@ move-concurrently@^1.0.1: ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= ms@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= multicast-dns@^6.0.1: version "6.2.3" resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== dependencies: dns-packet "^1.3.1" thunky "^1.0.2" @@ -6907,17 +5959,14 @@ multicast-dns@^6.0.1: mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= nan@^2.10.0, nan@^2.3.0: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" - integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA== nanomatch@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" - integrity sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -6935,12 +5984,10 @@ nanomatch@^1.2.9: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= nearley@^2.7.10: version "2.13.0" resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.13.0.tgz#6e7b0f4e68bfc3e74c99eaef2eda39e513143439" - integrity sha512-ioYYogSaZhFlCpRizQgY3UT3G1qFXmHGY/5ozoFE3dMfiCRAeJfh+IPE3/eh9gCZvqLhPCWb4bLt7Bqzo+1mLQ== dependencies: nomnom "~1.6.2" railroad-diagrams "^1.0.0" @@ -6950,34 +5997,28 @@ nearley@^2.7.10: negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= neo-async@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" - integrity sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA== next-tick@1: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" - integrity sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA== no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== dependencies: lower-case "^1.1.1" node-fetch-npm@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" - integrity sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw== dependencies: encoding "^0.1.11" json-parse-better-errors "^1.0.0" @@ -6986,7 +6027,6 @@ node-fetch-npm@^2.0.2: node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== dependencies: encoding "^0.1.11" is-stream "^1.0.1" @@ -6994,12 +6034,10 @@ node-fetch@^1.0.1: node-forge@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" - integrity sha1-naYR6giYL0uUIGs760zJZl8gwwA= node-gyp@^3.3.1: version "3.6.2" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60" - integrity sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA= dependencies: fstream "^1.0.0" glob "^7.0.3" @@ -7018,7 +6056,6 @@ node-gyp@^3.3.1: node-gyp@^3.6.2: version "3.7.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.7.0.tgz#789478e8f6c45e277aa014f3e28f958f286f9203" - integrity sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg== dependencies: fstream "^1.0.0" glob "^7.0.3" @@ -7036,12 +6073,10 @@ node-gyp@^3.6.2: node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= node-libs-browser@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" - integrity sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg== dependencies: assert "^1.1.1" browserify-zlib "^0.2.0" @@ -7070,7 +6105,6 @@ node-libs-browser@^2.0.0: node-notifier@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" - integrity sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg== dependencies: growly "^1.3.0" semver "^5.4.1" @@ -7080,7 +6114,6 @@ node-notifier@^5.2.1: node-pre-gyp@^0.6.39: version "0.6.39" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" - integrity sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ== dependencies: detect-libc "^1.0.2" hawk "3.1.3" @@ -7097,7 +6130,6 @@ node-pre-gyp@^0.6.39: node-sass-chokidar@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/node-sass-chokidar/-/node-sass-chokidar-1.3.0.tgz#3839698dd1de23b491bb674417b5e6fffaf25270" - integrity sha512-g8n2RUSo3nBSmqo6ShD2uyDjuN7X81YyuJO253VDw7bkL84TQ4DEO0MpD7gpsWMUL44avQigHgOL+peLD8Uwuw== dependencies: async-foreach "^0.1.3" chokidar "^1.6.1" @@ -7111,7 +6143,6 @@ node-sass-chokidar@^1.3.0: node-sass@^4.7.2: version "4.9.0" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.0.tgz#d1b8aa855d98ed684d6848db929a20771cc2ae52" - integrity sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg== dependencies: async-foreach "^0.1.3" chalk "^1.1.1" @@ -7136,7 +6167,6 @@ node-sass@^4.7.2: nomnom@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" - integrity sha1-hKZqJgF0QI/Ft3oY+IjszET7aXE= dependencies: colors "0.5.x" underscore "~1.4.4" @@ -7144,14 +6174,12 @@ nomnom@~1.6.2: "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= dependencies: abbrev "1" nopt@^4.0.1, nopt@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= dependencies: abbrev "1" osenv "^0.1.4" @@ -7159,7 +6187,6 @@ nopt@^4.0.1, nopt@~4.0.1: normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.4.0, "normalize-package-data@~1.0.1 || ^2.0.0", normalize-package-data@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -7169,19 +6196,16 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package- normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= dependencies: remove-trailing-separator "^1.0.1" normalize-range@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= normalize-url@^1.4.0: version "1.9.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw= dependencies: object-assign "^4.0.1" prepend-http "^1.0.0" @@ -7191,17 +6215,14 @@ normalize-url@^1.4.0: normalize.css@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-7.0.0.tgz#abfb1dd82470674e0322b53ceb1aaf412938e4bf" - integrity sha1-q/sd2CRwZ04DIrU86xqvQSk45L8= normalize.css@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.0.tgz#14ac5e461612538a4ce9be90a7da23f86e718493" - integrity sha512-iXcbM3NWr0XkNyfiSBsoPezi+0V92P9nj84yVV1/UZxRUrGczgX/X91KMAGM0omWLY2+2Q1gKD/XRn4gQRDB2A== npm-audit-report@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.2.1.tgz#14813e9551f0f33088e7acc442e83ea6d627ef13" - integrity sha512-1eh6z0FivYQkLIU5xYcal8ssiGAgn0817u56EcF751HJD0m1PbAxurM/mc9WmAm3vhNZGkExleU/55VN/WRjFw== dependencies: cli-table2 "^0.2.0" console-control-strings "^1.1.0" @@ -7209,24 +6230,20 @@ npm-audit-report@^1.2.1: npm-bundled@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" - integrity sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow== npm-cache-filename@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz#ded306c5b0bfc870a9e9faf823bc5f283e05ae11" - integrity sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE= npm-install-checks@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-3.0.0.tgz#d4aecdfd51a53e3723b7b2f93b2ee28e307bc0d7" - integrity sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc= dependencies: semver "^2.3.0 || 3.x || 4 || 5" npm-lifecycle@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-2.0.3.tgz#696bedf1143371163e9cc16fe872357e25d8d90e" - integrity sha512-0U4Iim5ix2NHUT672G7FBpldJX0N2xKBjJqRTAzioEJjb6I6KpQXq+y1sB5EDSjKaAX8VCC9qPK31Jy+p3ix5A== dependencies: byline "^5.0.0" graceful-fs "^4.1.11" @@ -7240,12 +6257,10 @@ npm-lifecycle@^2.0.3: npm-logical-tree@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" - integrity sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg== "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^5.1.2 || 6", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" - integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== dependencies: hosted-git-info "^2.6.0" osenv "^0.1.5" @@ -7255,7 +6270,6 @@ npm-logical-tree@^1.2.1: npm-packlist@^1.1.10, npm-packlist@~1.1.10: version "1.1.10" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" - integrity sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -7263,7 +6277,6 @@ npm-packlist@^1.1.10, npm-packlist@~1.1.10: npm-pick-manifest@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.1.0.tgz#dc381bdd670c35d81655e1d5a94aa3dd4d87fce5" - integrity sha512-q9zLP8cTr8xKPmMZN3naxp1k/NxVFsjxN6uWuO1tiw9gxg7wZWQ/b5UTfzD0ANw2q1lQxdLKTeCCksq+bPSgbQ== dependencies: npm-package-arg "^6.0.0" semver "^5.4.1" @@ -7271,7 +6284,6 @@ npm-pick-manifest@^2.1.0: npm-profile@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-3.0.2.tgz#58d568f1b56ef769602fd0aed8c43fa0e0de0f57" - integrity sha512-rEJOFR6PbwOvvhGa2YTNOJQKNuc6RovJ6T50xPU7pS9h/zKPNCJ+VHZY2OFXyZvEi+UQYtHRTp8O/YM3tUD20A== dependencies: aproba "^1.1.2 || 2" make-fetch-happen "^2.5.0 || 3 || 4" @@ -7279,7 +6291,6 @@ npm-profile@^3.0.1: npm-registry-client@^8.5.1: version "8.5.1" resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-8.5.1.tgz#8115809c0a4b40938b8a109b8ea74d26c6f5d7f1" - integrity sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg== dependencies: concat-stream "^1.5.2" graceful-fs "^4.1.6" @@ -7298,7 +6309,6 @@ npm-registry-client@^8.5.1: npm-registry-fetch@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-1.1.1.tgz#710bc5947d9ee2c549375072dab6d5d17baf2eb2" - integrity sha512-ev+zxOXsgAqRsR8Rk+ErjgWOlbrXcqGdme94/VNdjDo1q8TSy10Pp8xgDv/ZmMk2jG/KvGtXUNG4GS3+l6xbDw== dependencies: bluebird "^3.5.1" figgy-pudding "^3.0.0" @@ -7310,7 +6320,6 @@ npm-registry-fetch@^1.1.0: npm-registry-fetch@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.1.1.tgz#e96bae698afdd45d4a01aca29e881fc0bc55206c" - integrity sha512-xBobENeenvjIG8PgQ1dy77AXTI25IbYhmA3DusMIfw/4EL5BaQ5e1V9trkPrqHvyjR3/T0cnH6o0Wt/IzcI5Ag== dependencies: bluebird "^3.5.1" figgy-pudding "^3.1.0" @@ -7321,7 +6330,6 @@ npm-registry-fetch@^3.0.0: npm-run-all@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.3.tgz#49f15b55a66bb4101664ce270cb18e7103f8f185" - integrity sha512-aOG0N3Eo/WW+q6sUIdzcV2COS8VnTZCmdji0VQIAZF3b+a3YWb0AD0vFIyjKec18A7beLGbaQ5jFTNI2bPt9Cg== dependencies: ansi-styles "^3.2.0" chalk "^2.1.0" @@ -7336,19 +6344,16 @@ npm-run-all@^4.1.3: npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" npm-user-validate@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" - integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= npm@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm/-/npm-6.1.0.tgz#d685cdfc1a812fb063f031af09bed7a5a68eedf1" - integrity sha512-e38cCtJ0lEjLXXpc4twEfj8Xw5hDLolc2Py87ueWnUhJfZ8GA/5RVIeD+XbSr1+aVRGsRsdtLdzUNO63PvQJ1w== dependencies: JSONStream "^1.3.2" abbrev "~1.1.1" @@ -7464,7 +6469,6 @@ npm@^6.0.0: "npmlog@0 || 1 || 2 || 3 || 4", "npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@~4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" @@ -7474,39 +6478,32 @@ npm@^6.0.0: nth-check@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" - integrity sha1-mSms32KPwsQQmN6rgqxYDPFJquQ= dependencies: boolbase "~1.0.0" num2fraction@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwmatcher@^1.4.3: version "1.4.4" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" - integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= object-assign@4.1.1, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" @@ -7515,29 +6512,24 @@ object-copy@^0.1.0: object-inspect@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.5.0.tgz#9d876c11e40f485c79215670281b767488f9bfe3" - integrity sha512-UmOFbHbwvv+XHj7BerrhVq+knjceBdkvU5AriwLMvhv2qi+e7DJzxfBeFpILEjVzCp+xA+W/pIf06RGPWlZNfw== object-is@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" - integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY= object-keys@^1.0.11, object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - integrity sha1-xUYBd4rVYPEULODgG8yotW0TQm0= object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= dependencies: isobject "^3.0.0" object.assign@^4.0.4, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== dependencies: define-properties "^1.1.2" function-bind "^1.1.1" @@ -7547,7 +6539,6 @@ object.assign@^4.0.4, object.assign@^4.1.0: object.entries@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" - integrity sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8= dependencies: define-properties "^1.1.2" es-abstract "^1.6.1" @@ -7557,7 +6548,6 @@ object.entries@^1.0.4: object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= dependencies: define-properties "^1.1.2" es-abstract "^1.5.1" @@ -7565,7 +6555,6 @@ object.getownpropertydescriptors@^2.0.3: object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= dependencies: for-own "^0.1.4" is-extendable "^0.1.1" @@ -7573,14 +6562,12 @@ object.omit@^2.0.0: object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" object.values@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" - integrity sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo= dependencies: define-properties "^1.1.2" es-abstract "^1.6.1" @@ -7590,57 +6577,48 @@ object.values@^1.0.4: obuf@^1.0.0, obuf@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= dependencies: ee-first "1.1.1" on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0, once@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= dependencies: mimic-fn "^1.0.0" opener@~1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" - integrity sha1-XG2ixdflgx6P+jlklQ+NZnSskLg= opn@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" - integrity sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ== dependencies: is-wsl "^1.1.0" opn@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - integrity sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g== dependencies: is-wsl "^1.1.0" optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= dependencies: minimist "~0.0.1" wordwrap "~0.0.2" @@ -7648,7 +6626,6 @@ optimist@^0.6.1: optionator@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" @@ -7660,31 +6637,26 @@ optionator@^0.8.1: original@>=0.0.5: version "1.0.0" resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" - integrity sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs= dependencies: url-parse "1.0.x" os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= dependencies: lcid "^1.0.0" os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== dependencies: execa "^0.7.0" lcid "^1.0.0" @@ -7693,12 +6665,10 @@ os-locale@^2.0.0: os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= osenv@0, osenv@^0.1.4, osenv@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" @@ -7706,36 +6676,30 @@ osenv@0, osenv@^0.1.4, osenv@^0.1.5: p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= p-limit@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" - integrity sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng== dependencies: p-try "^1.0.0" p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= dependencies: p-limit "^1.1.0" p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= package-json@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= dependencies: got "^6.7.1" registry-auth-token "^3.0.1" @@ -7745,7 +6709,6 @@ package-json@^4.0.0: pacote@^8.1.5, pacote@^8.1.6: version "8.1.6" resolved "https://registry.yarnpkg.com/pacote/-/pacote-8.1.6.tgz#8e647564d38156367e7a9dc47a79ca1ab278d46e" - integrity sha512-wTOOfpaAQNEQNtPEx92x9Y9kRWVu45v583XT8x2oEV2xRB74+xdqMZIeGW4uFvAyZdmSBtye+wKdyyLaT8pcmw== dependencies: bluebird "^3.5.1" cacache "^11.0.2" @@ -7776,12 +6739,10 @@ pacote@^8.1.5, pacote@^8.1.6: pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg== parallel-transform@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" - integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY= dependencies: cyclist "~0.2.2" inherits "^2.0.3" @@ -7790,14 +6751,12 @@ parallel-transform@^1.1.0: param-case@2.1.x: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= dependencies: no-case "^2.2.0" parse-asn1@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" - integrity sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw== dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -7808,7 +6767,6 @@ parse-asn1@^5.0.0: parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= dependencies: glob-base "^0.3.0" is-dotfile "^1.0.0" @@ -7818,14 +6776,12 @@ parse-glob@^3.0.4: parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= dependencies: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" @@ -7833,93 +6789,76 @@ parse-json@^4.0.0: parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= parse-uri@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-uri/-/parse-uri-1.0.0.tgz#2872dcc22f1a797acde1583d8a0ac29552ddac20" - integrity sha1-KHLcwi8aeXrN4Vg9igrClVLdrCA= parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== parse5@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" - integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== dependencies: "@types/node" "*" parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - integrity sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo= path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-is-inside@^1.0.1, path-is-inside@^1.0.2, path-is-inside@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - integrity sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME= path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= path-to-regexp@^1.0.1, path-to-regexp@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" - integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30= dependencies: isarray "0.0.1" path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -7928,28 +6867,24 @@ path-type@^1.0.0: path-type@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= dependencies: pify "^2.0.0" path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== dependencies: pify "^3.0.0" pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" - integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= dependencies: through "~2.3" pbkdf2@^3.0.3: version "3.0.14" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" - integrity sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA== dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -7960,39 +6895,32 @@ pbkdf2@^3.0.3: performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - integrity sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU= performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= pixi-filters@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/pixi-filters/-/pixi-filters-2.6.1.tgz#30b413f7fcdaafeac1bd50cad8be3aeb44897681" - integrity sha512-GJcnQjhYM0ipx11L9+6+BZA8tA7AynonsIp/K4EmZd7lmBc8lMRHIRM1r1khWn9QvEtY4WooW0T4QwskFOFwhA== dependencies: "@pixi/filter-adjustment" "^2.5.0" "@pixi/filter-advanced-bloom" "^2.6.0" @@ -8029,12 +6957,10 @@ pixi-filters@^2.6.1: pixi-gl-core@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/pixi-gl-core/-/pixi-gl-core-1.1.4.tgz#8b4b5c433b31e419bc379dc565ce1b835a91b372" - integrity sha1-i0tcQzsx5Bm8N53FZc4bg1qRs3I= pixi.js@^4.8.0: version "4.8.0" resolved "https://registry.yarnpkg.com/pixi.js/-/pixi.js-4.8.0.tgz#4b681140f4c40fdf75cbb773d69699da53a62fd5" - integrity sha512-sMhky4mknu15qpqPo7/0tttjuBoEDLI1jrBwytu8uXK4amK9jlgEBcsArhUVHUdAT982Pqol9qR1U40rG3CHUw== dependencies: bit-twiddle "^1.0.2" earcut "^2.1.3" @@ -8048,24 +6974,20 @@ pixi.js@^4.8.0: pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: find-up "^2.1.0" pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== popper.js@^1.12.9, popper.js@^1.14.1: version "1.14.3" resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095" - integrity sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU= portfinder@^1.0.9: version "1.0.13" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" - integrity sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek= dependencies: async "^1.5.2" debug "^2.2.0" @@ -8074,12 +6996,10 @@ portfinder@^1.0.9: posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= postcss-calc@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - integrity sha1-d7rnypKK2FcW4v2kLyYb98HWW14= dependencies: postcss "^5.0.2" postcss-message-helpers "^2.0.0" @@ -8088,7 +7008,6 @@ postcss-calc@^5.2.0: postcss-colormin@^2.1.8: version "2.2.2" resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - integrity sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks= dependencies: colormin "^1.0.5" postcss "^5.0.13" @@ -8097,7 +7016,6 @@ postcss-colormin@^2.1.8: postcss-convert-values@^2.3.4: version "2.6.1" resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - integrity sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0= dependencies: postcss "^5.0.11" postcss-value-parser "^3.1.2" @@ -8105,35 +7023,30 @@ postcss-convert-values@^2.3.4: postcss-discard-comments@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" - integrity sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0= dependencies: postcss "^5.0.14" postcss-discard-duplicates@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" - integrity sha1-uavye4isGIFYpesSq8riAmO5GTI= dependencies: postcss "^5.0.4" postcss-discard-empty@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - integrity sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU= dependencies: postcss "^5.0.14" postcss-discard-overridden@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - integrity sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg= dependencies: postcss "^5.0.16" postcss-discard-unused@^2.2.1: version "2.2.3" resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - integrity sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM= dependencies: postcss "^5.0.14" uniqs "^2.0.0" @@ -8141,7 +7054,6 @@ postcss-discard-unused@^2.2.1: postcss-filter-plugins@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" - integrity sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew= dependencies: postcss "^5.0.4" uniqid "^4.0.0" @@ -8149,14 +7061,12 @@ postcss-filter-plugins@^2.0.0: postcss-flexbugs-fixes@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-3.2.0.tgz#9b8b932c53f9cf13ba0f61875303e447c33dcc51" - integrity sha512-0AuD9HG1Ey3/3nqPWu9yqf7rL0KCPu5VgjDsjf5mzEcuo9H/z8nco/fljKgjsOUrZypa95MI0kS4xBZeBzz2lw== dependencies: postcss "^6.0.1" postcss-load-config@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" - integrity sha1-U56a/J3chiASHr+djDZz4M5Q0oo= dependencies: cosmiconfig "^2.1.0" object-assign "^4.1.0" @@ -8166,7 +7076,6 @@ postcss-load-config@^1.2.0: postcss-load-options@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" - integrity sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw= dependencies: cosmiconfig "^2.1.0" object-assign "^4.1.0" @@ -8174,7 +7083,6 @@ postcss-load-options@^1.2.0: postcss-load-plugins@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" - integrity sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI= dependencies: cosmiconfig "^2.1.1" object-assign "^4.1.0" @@ -8182,7 +7090,6 @@ postcss-load-plugins@^2.3.0: postcss-loader@2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.8.tgz#8c67ddb029407dfafe684a406cfc16bad2ce0814" - integrity sha512-KtXBiQ/r/WYW8LxTSJK7h8wLqvCMSub/BqmRnud/Mu8RzwflW9cmXxwsMwbn15TNv287Hcufdb3ZSs7xHKnG8Q== dependencies: loader-utils "^1.1.0" postcss "^6.0.0" @@ -8192,7 +7099,6 @@ postcss-loader@2.0.8: postcss-merge-idents@^2.1.5: version "2.1.7" resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - integrity sha1-TFUwMTwI4dWzu/PSu8dH4njuonA= dependencies: has "^1.0.1" postcss "^5.0.10" @@ -8201,14 +7107,12 @@ postcss-merge-idents@^2.1.5: postcss-merge-longhand@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - integrity sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg= dependencies: postcss "^5.0.4" postcss-merge-rules@^2.0.3: version "2.1.2" resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" - integrity sha1-0d9d+qexrMO+VT8OnhDofGG19yE= dependencies: browserslist "^1.5.2" caniuse-api "^1.5.2" @@ -8219,12 +7123,10 @@ postcss-merge-rules@^2.0.3: postcss-message-helpers@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - integrity sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4= postcss-minify-font-values@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - integrity sha1-S1jttWZB66fIR0qzUmyv17vey2k= dependencies: object-assign "^4.0.1" postcss "^5.0.4" @@ -8233,7 +7135,6 @@ postcss-minify-font-values@^1.0.2: postcss-minify-gradients@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - integrity sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE= dependencies: postcss "^5.0.12" postcss-value-parser "^3.3.0" @@ -8241,7 +7142,6 @@ postcss-minify-gradients@^1.0.1: postcss-minify-params@^1.0.4: version "1.2.2" resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - integrity sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM= dependencies: alphanum-sort "^1.0.1" postcss "^5.0.2" @@ -8251,7 +7151,6 @@ postcss-minify-params@^1.0.4: postcss-minify-selectors@^2.0.4: version "2.1.1" resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - integrity sha1-ssapjAByz5G5MtGkllCBFDEXNb8= dependencies: alphanum-sort "^1.0.2" has "^1.0.1" @@ -8261,14 +7160,12 @@ postcss-minify-selectors@^2.0.4: postcss-modules-extract-imports@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" - integrity sha1-thTJcgvmgW6u41+zpfqh26agXds= dependencies: postcss "^6.0.1" postcss-modules-local-by-default@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - integrity sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk= dependencies: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" @@ -8276,7 +7173,6 @@ postcss-modules-local-by-default@^1.0.1: postcss-modules-scope@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - integrity sha1-1upkmUx5+XtipytCb75gVqGUu5A= dependencies: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" @@ -8284,7 +7180,6 @@ postcss-modules-scope@^1.0.0: postcss-modules-values@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - integrity sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA= dependencies: icss-replace-symbols "^1.1.0" postcss "^6.0.1" @@ -8292,14 +7187,12 @@ postcss-modules-values@^1.1.0: postcss-normalize-charset@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - integrity sha1-757nEhLX/nWceO0WL2HtYrXLk/E= dependencies: postcss "^5.0.5" postcss-normalize-url@^3.0.7: version "3.0.8" resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - integrity sha1-EI90s/L82viRov+j6kWSJ5/HgiI= dependencies: is-absolute-url "^2.0.0" normalize-url "^1.4.0" @@ -8309,7 +7202,6 @@ postcss-normalize-url@^3.0.7: postcss-ordered-values@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - integrity sha1-7sbCpntsQSqNsgQud/6NpD+VwR0= dependencies: postcss "^5.0.4" postcss-value-parser "^3.0.1" @@ -8317,7 +7209,6 @@ postcss-ordered-values@^2.1.0: postcss-reduce-idents@^2.2.2: version "2.4.0" resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - integrity sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM= dependencies: postcss "^5.0.4" postcss-value-parser "^3.0.2" @@ -8325,14 +7216,12 @@ postcss-reduce-idents@^2.2.2: postcss-reduce-initial@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - integrity sha1-aPgGlfBF0IJjqHmtJA343WT2ROo= dependencies: postcss "^5.0.4" postcss-reduce-transforms@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - integrity sha1-/3b02CEkN7McKYpC0uFEQCV3GuE= dependencies: has "^1.0.1" postcss "^5.0.8" @@ -8341,7 +7230,6 @@ postcss-reduce-transforms@^1.0.3: postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - integrity sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A= dependencies: flatten "^1.0.2" indexes-of "^1.0.1" @@ -8350,7 +7238,6 @@ postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: postcss-svgo@^2.1.1: version "2.1.6" resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" - integrity sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0= dependencies: is-svg "^2.0.0" postcss "^5.0.14" @@ -8360,7 +7247,6 @@ postcss-svgo@^2.1.1: postcss-unique-selectors@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" - integrity sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0= dependencies: alphanum-sort "^1.0.1" postcss "^5.0.4" @@ -8369,12 +7255,10 @@ postcss-unique-selectors@^2.0.2: postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - integrity sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU= postcss-zindex@^2.0.1: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" - integrity sha1-0hCd3AVbka9n/EyzsCWUZjnSryI= dependencies: has "^1.0.1" postcss "^5.0.4" @@ -8383,7 +7267,6 @@ postcss-zindex@^2.0.1: postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: version "5.2.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" - integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg== dependencies: chalk "^1.1.3" js-base64 "^2.1.9" @@ -8393,7 +7276,6 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.13: version "6.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d" - integrity sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw== dependencies: chalk "^2.3.2" source-map "^0.6.1" @@ -8402,32 +7284,26 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.13: prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prepend-http@^1.0.0, prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= prettier@^1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.0.tgz#d26fc5894b9230de97629b39cae225b503724ce8" - integrity sha512-Wz0SMncgaglBzDcohH3ZIAi4nVpzOIEweFzCOmgVEoRSeO72b4dcKGfgxoRGVMaFlh1r7dlVaJ+f3CIHfeH6xg== pretty-bytes@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" - integrity sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk= pretty-error@^2.0.2: version "2.1.1" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" - integrity sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM= dependencies: renderkid "^2.0.1" utila "~0.4" @@ -8435,7 +7311,6 @@ pretty-error@^2.0.2: pretty-format@^22.4.0, pretty-format@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f" - integrity sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ== dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -8443,27 +7318,22 @@ pretty-format@^22.4.0, pretty-format@^22.4.3: private@^0.1.6, private@^0.1.7, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= promise-inflight@^1.0.1, promise-inflight@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= promise-retry@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" - integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= dependencies: err-code "^1.0.0" retry "^0.10.0" @@ -8471,28 +7341,24 @@ promise-retry@^1.1.1: promise@8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/promise/-/promise-8.0.1.tgz#e45d68b00a17647b6da711bf85ed6ed47208f450" - integrity sha1-5F1osAoXZHttpxG/he1u1HII9FA= dependencies: asap "~2.0.3" promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== dependencies: asap "~2.0.3" promzard@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= dependencies: read "1" prop-types@15.6.0: version "15.6.0" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" - integrity sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY= dependencies: fbjs "^0.8.16" loose-envify "^1.3.1" @@ -8501,7 +7367,6 @@ prop-types@15.6.0: prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1: version "15.6.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" - integrity sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ== dependencies: fbjs "^0.8.16" loose-envify "^1.3.1" @@ -8510,19 +7375,16 @@ prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1: proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= protoduck@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.0.tgz#752145e6be0ad834cb25716f670a713c860dce70" - integrity sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ== dependencies: genfun "^4.0.1" proxy-addr@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" - integrity sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ== dependencies: forwarded "~0.1.2" ipaddr.js "1.6.0" @@ -8530,24 +7392,20 @@ proxy-addr@~2.0.3: prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= ps-tree@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014" - integrity sha1-tCGyQUDWID8e08dplrRCewjowBQ= dependencies: event-stream "~3.3.0" pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= public-encrypt@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" - integrity sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q== dependencies: bn.js "^4.1.0" browserify-rsa "^4.0.0" @@ -8558,7 +7416,6 @@ public-encrypt@^4.0.0: pump@^2.0.0, pump@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -8566,7 +7423,6 @@ pump@^2.0.0, pump@^2.0.1: pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -8574,7 +7430,6 @@ pump@^3.0.0: pumpify@^1.3.3: version "1.4.0" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" - integrity sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA== dependencies: duplexify "^3.5.3" inherits "^2.0.3" @@ -8583,52 +7438,42 @@ pumpify@^1.3.3: punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= punycode@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= pupa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/pupa/-/pupa-1.0.0.tgz#9a9568a5af7e657b8462a6e9d5328743560ceff6" - integrity sha1-mpVopa9+ZXuEYqbp1TKHQ1YM7/Y= q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= qrcode-terminal@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" - integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== qs@6.5.1, qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - integrity sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A== qs@~6.3.0: version "6.3.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" - integrity sha1-51vV9uJoEioqDgvaYwslUMFmUCw= qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - integrity sha1-E+JtKK1rD/qpExLNO/cI7TUecjM= query-string@^4.1.0: version "4.3.4" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s= dependencies: object-assign "^4.1.0" strict-uri-encode "^1.0.0" @@ -8636,7 +7481,6 @@ query-string@^4.1.0: query-string@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a" - integrity sha512-pNB/Gr8SA8ff8KpUFM36o/WFAlthgaThka5bV19AD9PNTH20Pwq5Zxodif2YyHwrctp6SkL4GqlOot0qR/wGaw== dependencies: decode-uri-component "^0.2.0" strict-uri-encode "^2.0.0" @@ -8644,44 +7488,36 @@ query-string@^6.1.0: querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= querystringify@0.0.x: version "0.0.4" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" - integrity sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw= querystringify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" - integrity sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs= qw@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" - integrity sha1-77/cdA+a0FQwRCassYNBLMi5ltQ= raf@3.4.0, raf@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" - integrity sha512-pDP/NMRAXoTfrhCfyfSEwJAKLaxBU9eApMeBPB1TkDouZmvPerIClV8lTAd+uF8ZiTaVl69e1FCxQrAd/VTjGw== dependencies: performance-now "^2.1.0" railroad-diagrams@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" - integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234= randexp@0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" - integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== dependencies: discontinuous-range "1.0.0" ret "~0.1.10" @@ -8689,7 +7525,6 @@ randexp@0.4.6: randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - integrity sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how== dependencies: is-number "^3.0.0" kind-of "^4.0.0" @@ -8697,14 +7532,12 @@ randomatic@^1.1.3: randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A== dependencies: safe-buffer "^5.1.0" randomfill@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== dependencies: randombytes "^2.0.5" safe-buffer "^5.1.0" @@ -8712,12 +7545,10 @@ randomfill@^1.0.3: range-parser@^1.0.3, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= raw-body@2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" - integrity sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k= dependencies: bytes "3.0.0" http-errors "1.6.2" @@ -8727,7 +7558,6 @@ raw-body@2.3.2: rc@^1.0.1, rc@^1.1.6, rc@^1.1.7: version "1.2.6" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092" - integrity sha1-6xiYnG1PTxYsOZ953dKfODVWgJI= dependencies: deep-extend "~0.4.0" ini "~1.3.0" @@ -8737,12 +7567,10 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.1.7: re-resizable@^4.4.8: version "4.4.8" resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-4.4.8.tgz#1c7eedfd9b9ed1f83b3adfa7a97cda76881e4e57" - integrity sha512-5Nm4FL5wz41/5SYz8yJIM1kCcftxNPXxv3Yfa5qhkrGasHPgYzmzbbu1pcYM9vuCHog79EVwKWuz7zxDH52Gfw== react-ace@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/react-ace/-/react-ace-6.1.1.tgz#c8339b4f0a27401bff53f477f125d3d7eac2a090" - integrity sha512-QAreiks+wAtZ1vAw9t0OgYJMP8/8iAR+T5CmX9ACMdqS2P4J/1GJUBmAKfC7pAD7OnP4hkl17w7RhkuJ27iLwA== dependencies: brace "^0.11.0" diff-match-patch "^1.0.0" @@ -8753,7 +7581,6 @@ react-ace@^6.1.1: react-copy-to-clipboard@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.1.tgz#8eae107bb400be73132ed3b6a7b4fb156090208e" - integrity sha512-ELKq31/E3zjFs5rDWNCfFL4NvNFQvGRoJdAKReD/rUPA+xxiLPQmZBZBvy2vgH7V0GE9isIQpT9WXbwIVErYdA== dependencies: copy-to-clipboard "^3" prop-types "^15.5.8" @@ -8761,7 +7588,6 @@ react-copy-to-clipboard@^5.0.1: react-dev-utils@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-5.0.1.tgz#1f396e161fe44b595db1b186a40067289bf06613" - integrity sha512-+y92rG6pmXt3cpcg/NGmG4w/W309tWNSmyyPL8hCMxuCSg2UP/hUg3npACj2UZc8UKVSXexyLrCnxowizGoAsw== dependencies: address "1.0.3" babel-code-frame "6.26.0" @@ -8785,12 +7611,10 @@ react-dev-utils@^5.0.1: react-dom-factories@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.2.tgz#eb7705c4db36fb501b3aa38ff759616aa0ff96e0" - integrity sha1-63cFxNs2+1AbOqOP91lhaqD/luA= react-dom@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.3.1.tgz#6a3c90a4fb62f915bdbcf6204422d93a7d4ca573" - integrity sha512-2Infg89vzahq8nfVi1GkjPqq0vrBvf0f3T0+dTtyjq4f6HKOqKixAK25Vr593O3QTx4kw/vmUtAJwerlevNWOA== dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -8800,12 +7624,10 @@ react-dom@^16.3.1: react-error-overlay@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4" - integrity sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw== react-hotkeys@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/react-hotkeys/-/react-hotkeys-1.1.4.tgz#a0712aa2e0c03a759fd7885808598497a4dace72" - integrity sha1-oHEqouDAOnWf14hYCFmEl6TaznI= dependencies: lodash.isboolean "^3.0.3" lodash.isequal "^4.5.0" @@ -8816,17 +7638,14 @@ react-hotkeys@^1.1.4: react-is@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.1.tgz#ee66e6d8283224a83b3030e110056798488359ba" - integrity sha512-3XpazGqS5DEOLiuR6JQ2Sg6URq/33d1BHJVaUvtMz579KRhd2D0pqabNEe5czv785yzKBPZimOf0UNIXa3jw1A== react-is@^16.3.2: version "16.3.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.3.2.tgz#f4d3d0e2f5fbb6ac46450641eb2e25bf05d36b22" - integrity sha512-ybEM7YOr4yBgFd6w8dJqwxegqZGJNBZl6U27HnGKuTZmDvVrD5quWOK/wAnMywiZzW+Qsk+l4X2c70+thp/A8Q== react-mde@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/react-mde/-/react-mde-5.6.0.tgz#91a24496d03d97799d7464b084573b6621f1ea1b" - integrity sha512-F+Ba7rfltujClO91LQMSSGFKNm29LRW6p1jVtzE7PjJQzt+RqyAI4ShYBAfW6/VU1b/LCN4XJl4KiTOnzwuDeQ== dependencies: classnames "^2.2.5" npm "^6.0.0" @@ -8834,7 +7653,6 @@ react-mde@^5.6.0: react-popper@^0.8.2: version "0.8.3" resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-0.8.3.tgz#0f73333137c9fb0af6ec4074d2d0585a0a0461e1" - integrity sha1-D3MzMTfJ+wr27EB00tBYWgoEYeE= dependencies: popper.js "^1.12.9" prop-types "^15.6.0" @@ -8842,7 +7660,6 @@ react-popper@^0.8.2: react-reconciler@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.7.0.tgz#9614894103e5f138deeeb5eabaf3ee80eb1d026d" - integrity sha512-50JwZ3yNyMS8fchN+jjWEJOH3Oze7UmhxeoJLn2j6f3NjpfCRbcmih83XTWmzqtar/ivd5f7tvQhvvhism2fgg== dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -8852,7 +7669,6 @@ react-reconciler@^0.7.0: react-redux@^5.0.7: version "5.0.7" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.7.tgz#0dc1076d9afb4670f993ffaef44b8f8c1155a4c8" - integrity sha512-5VI8EV5hdgNgyjfmWzBbdrqUkrVRKlyTKk1sGH3jzM2M2Mhj/seQgPXaz6gVAj2lz/nz688AdTqMO18Lr24Zhg== dependencies: hoist-non-react-statics "^2.5.0" invariant "^2.0.0" @@ -8864,7 +7680,6 @@ react-redux@^5.0.7: react-router-dom@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.2.2.tgz#c8a81df3adc58bba8a76782e946cbd4eae649b8d" - integrity sha512-cHMFC1ZoLDfEaMFoKTjN7fry/oczMgRt5BKfMAkTu5zEuJvUiPp1J8d0eXSVTnBh6pxlbdqDhozunOOLtmKfPA== dependencies: history "^4.7.2" invariant "^2.2.2" @@ -8876,7 +7691,6 @@ react-router-dom@^4.2.2: react-router-redux@^5.0.0-alpha.9: version "5.0.0-alpha.9" resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-5.0.0-alpha.9.tgz#825431516e0e6f1fd93b8807f6bd595e23ec3d10" - integrity sha512-euSgNIANnRXr4GydIuwA7RZCefrLQzIw5WdXspS8NPYbV+FxrKSS9MKG7U9vb6vsKHONnA4VxrVNWfnMUnUQAw== dependencies: history "^4.7.2" prop-types "^15.6.0" @@ -8885,7 +7699,6 @@ react-router-redux@^5.0.0-alpha.9: react-router@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.2.0.tgz#61f7b3e3770daeb24062dae3eedef1b054155986" - integrity sha512-DY6pjwRhdARE4TDw7XjxjZsbx9lKmIcyZoZ+SDO7SBJ1KUeWNxT22Kara2AC7u6/c2SYEHlEDLnzBCcNhLE8Vg== dependencies: history "^4.7.2" hoist-non-react-statics "^2.3.0" @@ -8898,7 +7711,6 @@ react-router@^4.2.0: react-scripts-ts@^2.16.0: version "2.16.0" resolved "https://registry.yarnpkg.com/react-scripts-ts/-/react-scripts-ts-2.16.0.tgz#45f831a12139c3b59d6bb729c1b6ef51e0f22908" - integrity sha512-yDGiqlse3DSOIgerpgkhjrA457JtK5LOMLsS3iMN3x6H3wO6YBPfcSy/9A40kiIRFBiMMwe0zSftooNdOPT4WA== dependencies: autoprefixer "7.1.6" babel-jest "^22.1.0" @@ -8943,7 +7755,6 @@ react-scripts-ts@^2.16.0: react-test-renderer@^16.0.0-0: version "16.3.2" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.3.2.tgz#3d1ed74fda8db42521fdf03328e933312214749a" - integrity sha512-lL8WHIpCTMdSe+CRkt0rfMxBkJFyhVrpdQ54BaJRIrXf9aVmbeHbRA8GFRpTvohPN5tPzMabmrzW2PUfWCfWwQ== dependencies: fbjs "^0.8.16" object-assign "^4.1.1" @@ -8953,7 +7764,6 @@ react-test-renderer@^16.0.0-0: react-test-renderer@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.3.1.tgz#d9257936d8535bd40f57f3d5a84e7b0452fb17f2" - integrity sha512-emEcIPUowMjT5EQ+rrb0FAwVCzuJ+LKDweoYDh073v2/jHxrBDPUk8nzI5dofG3R+140+Bb9TMcT2Ez5OP6pQw== dependencies: fbjs "^0.8.16" object-assign "^4.1.1" @@ -8963,7 +7773,6 @@ react-test-renderer@^16.3.1: react-transition-group@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.3.1.tgz#31d611b33e143a5e0f2d94c348e026a0f3b474b6" - integrity sha512-hu4/LAOFSKjWt1+1hgnOv3ldxmt6lvZGTWz4KUkFrqzXrNDIVSu6txIcPszw7PNduR8en9YTN55JLRyd/L1ZiQ== dependencies: dom-helpers "^3.3.1" loose-envify "^1.3.1" @@ -8972,7 +7781,6 @@ react-transition-group@^2.3.1: react@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/react/-/react-16.3.1.tgz#4a2da433d471251c69b6033ada30e2ed1202cfd8" - integrity sha512-NbkxN9jsZ6+G+ICsLdC7/wUD26uNbvKU/RAxEWgc9kcdKvROt+5d5j2cNQm5PSFTQ4WNGsR3pa4qL2Q0/WSy1w== dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -8982,14 +7790,12 @@ react@^16.3.1: read-cmd-shim@^1.0.1, read-cmd-shim@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" - integrity sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs= dependencies: graceful-fs "^4.1.2" read-installed@~4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" - integrity sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc= dependencies: debuglog "^1.0.1" read-package-json "^2.0.0" @@ -9003,7 +7809,6 @@ read-installed@~4.0.3: "read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: version "2.0.13" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" - integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" @@ -9015,7 +7820,6 @@ read-installed@~4.0.3: read-package-tree@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.1.tgz#6218b187d6fac82289ce4387bbbaf8eef536ad63" - integrity sha512-2CNoRoh95LxY47LvqrehIAfUVda2JbuFE/HaGYs42bNrGG+ojbw1h3zOcPcQ+1GQ3+rkzNndZn85u1XyZ3UsIA== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" @@ -9026,7 +7830,6 @@ read-package-tree@^5.2.1: read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= dependencies: find-up "^1.0.0" read-pkg "^1.0.0" @@ -9034,7 +7837,6 @@ read-pkg-up@^1.0.1: read-pkg-up@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= dependencies: find-up "^2.0.0" read-pkg "^2.0.0" @@ -9042,7 +7844,6 @@ read-pkg-up@^2.0.0: read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" @@ -9051,7 +7852,6 @@ read-pkg@^1.0.0: read-pkg@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= dependencies: load-json-file "^2.0.0" normalize-package-data "^2.3.2" @@ -9060,7 +7860,6 @@ read-pkg@^2.0.0: read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= dependencies: load-json-file "^4.0.0" normalize-package-data "^2.3.2" @@ -9069,14 +7868,12 @@ read-pkg@^3.0.0: read@1, read@~1.0.1, read@~1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= dependencies: mute-stream "~0.0.4" "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -9089,7 +7886,6 @@ read@1, read@~1.0.1, read@~1.0.7: readable-stream@1.0: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -9099,7 +7895,6 @@ readable-stream@1.0: readable-stream@~1.1.10: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -9109,7 +7904,6 @@ readable-stream@~1.1.10: readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" - integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" @@ -9119,7 +7913,6 @@ readdir-scoped-modules@^1.0.0: readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - integrity sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg= dependencies: graceful-fs "^4.1.2" minimatch "^3.0.2" @@ -9129,21 +7922,18 @@ readdirp@^2.0.0: realpath-native@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" - integrity sha512-XJtlRJ9jf0E1H1SLeJyQ9PGzQD7S65h1pRXEcAeK48doKOnKxcgPeNohJvD5u/2sI9J1oke6E8bZHS/fmW1UiQ== dependencies: util.promisify "^1.0.0" recursive-readdir@2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.1.tgz#90ef231d0778c5ce093c9a48d74e5c5422d13a99" - integrity sha1-kO8jHQd4xc4JPJpI105cVCLROpk= dependencies: minimatch "3.0.3" redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= dependencies: indent-string "^2.1.0" strip-indent "^1.0.1" @@ -9151,7 +7941,6 @@ redent@^1.0.0: reduce-css-calc@^1.2.6: version "1.3.0" resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" - integrity sha1-dHyRTgSWFKTJz7umKYca0dKSdxY= dependencies: balanced-match "^0.4.2" math-expression-evaluator "^1.2.14" @@ -9160,26 +7949,22 @@ reduce-css-calc@^1.2.6: reduce-function-call@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" - integrity sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk= dependencies: balanced-match "^0.4.2" redux-mock-store@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/redux-mock-store/-/redux-mock-store-1.5.1.tgz#fca4335392e66605420b5559fe02fc5b8bb6d63c" - integrity sha512-B+iZ98ESHw4EAWVLKUknQlop1OdLKOayGRmd6KavNtC0zoSsycD8hTt0hEr1eUTw2gmYJOdfBY5QAgZweTUcLQ== dependencies: lodash.isplainobject "^4.0.6" redux-saga@^0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/redux-saga/-/redux-saga-0.15.6.tgz#8638dc522de6c6c0a496fe8b2b5466287ac2dc4d" - integrity sha1-hjjcUi3mxsCklv6LK1RmKHrC3E0= redux@^3.6.0, redux@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" - integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A== dependencies: lodash "^4.2.1" lodash-es "^4.2.1" @@ -9189,17 +7974,14 @@ redux@^3.6.0, redux@^3.7.2: regenerate@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" - integrity sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg== regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== regenerator-transform@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== dependencies: babel-runtime "^6.18.0" babel-types "^6.19.0" @@ -9208,14 +7990,12 @@ regenerator-transform@^0.10.0: regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== dependencies: is-equal-shallow "^0.1.3" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== dependencies: extend-shallow "^3.0.2" safe-regex "^1.1.0" @@ -9223,7 +8003,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - integrity sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs= dependencies: regenerate "^1.2.1" regjsgen "^0.2.0" @@ -9232,7 +8011,6 @@ regexpu-core@^1.0.0: regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= dependencies: regenerate "^1.2.1" regjsgen "^0.2.0" @@ -9241,7 +8019,6 @@ regexpu-core@^2.0.0: registry-auth-token@^3.0.1: version "3.3.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== dependencies: rc "^1.1.6" safe-buffer "^5.0.1" @@ -9249,41 +8026,34 @@ registry-auth-token@^3.0.1: registry-url@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= dependencies: rc "^1.0.1" regjsgen@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= regjsparser@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= dependencies: jsesc "~0.5.0" relateurl@0.2.x: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= remove-array-items@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.0.0.tgz#07bf42cb332f4cf6e85ead83b5e4e896d2326b21" - integrity sha1-B79CyzMvTPboXq2DteToltIyayE= remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= renderkid@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" - integrity sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk= dependencies: css-select "^1.1.0" dom-converter "~0.1" @@ -9294,31 +8064,26 @@ renderkid@^2.0.1: repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - integrity sha1-7wiaF40Ug7quTZPrmLT55OEdmQo= repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= dependencies: is-finite "^1.0.0" request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" - integrity sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY= dependencies: lodash "^4.13.1" request-promise-native@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" - integrity sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU= dependencies: request-promise-core "1.1.1" stealthy-require "^1.1.0" @@ -9327,7 +8092,6 @@ request-promise-native@^1.0.5: request@2: version "2.86.0" resolved "https://registry.yarnpkg.com/request/-/request-2.86.0.tgz#2b9497f449b0a32654c081a5cf426bbfb5bf5b69" - integrity sha512-BQZih67o9r+Ys94tcIW4S7Uu8pthjrQVxhsZ/weOwHbDfACxvIyvnAbzFQxjy1jMtvFSzv5zf4my6cZsJBbVzw== dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -9354,7 +8118,6 @@ request@2: request@2.81.0, "request@>=2.9.0 <2.82.0": version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - integrity sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA= dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" @@ -9382,7 +8145,6 @@ request@2.81.0, "request@>=2.9.0 <2.82.0": request@^2.74.0, request@^2.79.0, request@^2.86.0: version "2.87.0" resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" - integrity sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw== dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -9408,7 +8170,6 @@ request@^2.74.0, request@^2.79.0, request@^2.86.0: request@^2.83.0: version "2.85.0" resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" - integrity sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg== dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -9436,7 +8197,6 @@ request@^2.83.0: request@~2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" - integrity sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4= dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" @@ -9462,39 +8222,32 @@ request@~2.79.0: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-from-string@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= require-from-string@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= dependencies: resolve-from "^3.0.0" resolve-dir@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= dependencies: expand-tilde "^2.0.0" global-modules "^1.0.0" @@ -9502,46 +8255,38 @@ resolve-dir@^1.0.0: resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-pathname@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" - integrity sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg== resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= resolve@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" - integrity sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw== dependencies: path-parse "^1.0.5" resolve@^1.1.7, resolve@^1.3.2: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" - integrity sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw== dependencies: path-parse "^1.0.5" resource-loader@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/resource-loader/-/resource-loader-2.1.1.tgz#f03ec08dd26aae0b0dd2a24a6d312aec2b5a004d" - integrity sha512-jRMGYUfa4AGk9ib45Wxc93lobhQVoiCUAUkWqsbb/fhGPge97YT1S8aC0xBEQpolMsrdmB3o7SH8VmIEvIDOLA== dependencies: mini-signals "^1.1.1" parse-uri "^1.0.0" @@ -9549,7 +8294,6 @@ resource-loader@^2.1.1: restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= dependencies: onetime "^2.0.0" signal-exit "^3.0.2" @@ -9557,36 +8301,30 @@ restore-cursor@^2.0.0: ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== retry@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" - integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= dependencies: align-text "^0.1.1" rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== dependencies: glob "^7.0.5" ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" - integrity sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc= dependencies: hash-base "^2.0.0" inherits "^2.0.1" @@ -9594,7 +8332,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: rst-selector-parser@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" - integrity sha1-gbIw6i/MYGbInjRy3nlChdmwPZE= dependencies: lodash.flattendeep "^4.4.0" nearley "^2.7.10" @@ -9602,60 +8339,50 @@ rst-selector-parser@^2.2.3: run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= dependencies: is-promise "^2.1.0" run-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" - integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= dependencies: aproba "^1.1.1" rx-lite-aggregates@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= dependencies: rx-lite "*" rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - integrity sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg== safe-buffer@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sane@^2.0.0: version "2.5.0" resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.0.tgz#6359cd676f5efd9988b264d8ce3b827dd6b27bec" - integrity sha512-glfKd7YH4UCrh/7dD+UESsr8ylKWRE7UQPoXuz28FgmcF0ViJQhCTCCZHICRKxf8G8O1KdLEn20dcICK54c7ew== dependencies: anymatch "^2.0.0" exec-sh "^0.2.0" @@ -9670,7 +8397,6 @@ sane@^2.0.0: sass-graph@^2.1.1, sass-graph@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" - integrity sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k= dependencies: glob "^7.0.0" lodash "^4.0.0" @@ -9680,19 +8406,16 @@ sass-graph@^2.1.1, sass-graph@^2.2.4: sax@^1.2.4, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== schema-utils@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" - integrity sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8= dependencies: ajv "^5.0.0" schema-utils@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" - integrity sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA== dependencies: ajv "^6.1.0" ajv-keywords "^3.1.0" @@ -9700,7 +8423,6 @@ schema-utils@^0.4.5: scss-tokenizer@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" - integrity sha1-jrBtualyMzOCTT9VMGQRSYR85dE= dependencies: js-base64 "^2.1.8" source-map "^0.4.2" @@ -9708,36 +8430,30 @@ scss-tokenizer@^0.2.3: select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= selfsigned@^1.9.1: version "1.10.2" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.2.tgz#b4449580d99929b65b10a48389301a6592088758" - integrity sha1-tESVgNmZKbZbEKSDiTAaZZIIh1g= dependencies: node-forge "0.7.1" semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" - integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY= dependencies: semver "^5.0.3" "semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= send@0.16.2: version "0.16.2" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== dependencies: debug "2.6.9" depd "~1.1.2" @@ -9756,12 +8472,10 @@ send@0.16.2: serialize-javascript@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.4.0.tgz#7c958514db6ac2443a8abc062dc9f7886a7f6005" - integrity sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU= serve-index@^1.7.2: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= dependencies: accepts "~1.3.4" batch "0.6.1" @@ -9774,7 +8488,6 @@ serve-index@^1.7.2: serve-static@1.13.2: version "1.13.2" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" @@ -9784,22 +8497,18 @@ serve-static@1.13.2: serviceworker-cache-polyfill@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serviceworker-cache-polyfill/-/serviceworker-cache-polyfill-4.0.0.tgz#de19ee73bef21ab3c0740a37b33db62464babdeb" - integrity sha1-3hnuc77yGrPAdAo3sz22JGS6ves= set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -9809,7 +8518,6 @@ set-value@^0.4.3: set-value@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -9819,22 +8527,18 @@ set-value@^2.0.0: setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= setprototypeof@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - integrity sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ= setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -9842,7 +8546,6 @@ sha.js@^2.4.0, sha.js@^2.4.8: sha@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/sha/-/sha-2.0.1.tgz#6030822fbd2c9823949f8f72ed6411ee5cf25aae" - integrity sha1-YDCCL70smCOUn49y7WQR7lzyWq4= dependencies: graceful-fs "^4.1.2" readable-stream "^2.0.2" @@ -9850,19 +8553,16 @@ sha@~2.0.1: shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shell-quote@1.6.1, shell-quote@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= dependencies: array-filter "~0.0.0" array-map "~0.0.0" @@ -9872,49 +8572,40 @@ shell-quote@1.6.1, shell-quote@^1.6.1: shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== showdown@^1.8.6: version "1.8.6" resolved "https://registry.yarnpkg.com/showdown/-/showdown-1.8.6.tgz#91ea4ee3b7a5448aaca6820a4e27e690c6ad771c" - integrity sha1-kepO47elRIqspoIKTifmkMatdxw= dependencies: yargs "^10.0.3" signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== slide@^1.1.3, slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= smart-buffer@^1.0.13: version "1.1.15" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" - integrity sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY= smart-buffer@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" - integrity sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg== snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== dependencies: define-property "^1.0.0" isobject "^3.0.0" @@ -9923,14 +8614,12 @@ snapdragon-node@^2.0.1: snapdragon-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== dependencies: kind-of "^3.2.0" snapdragon@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== dependencies: base "^0.11.1" debug "^2.2.0" @@ -9944,21 +8633,18 @@ snapdragon@^0.8.1: sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - integrity sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg= dependencies: hoek "2.x.x" sntp@2.x.x: version "2.1.0" resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - integrity sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg== dependencies: hoek "4.x.x" sockjs-client@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" - integrity sha1-W6vjhrd15M8U51IJEUUmVAFsixI= dependencies: debug "^2.6.6" eventsource "0.1.6" @@ -9970,7 +8656,6 @@ sockjs-client@1.1.4: sockjs@0.3.18: version "0.3.18" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.18.tgz#d9b289316ca7df77595ef299e075f0f937eb4207" - integrity sha1-2bKJMWyn33dZXvKZ4HXw+TfrQgc= dependencies: faye-websocket "^0.10.0" uuid "^2.0.2" @@ -9978,7 +8663,6 @@ sockjs@0.3.18: socks-proxy-agent@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" - integrity sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA== dependencies: agent-base "^4.1.0" socks "^1.1.10" @@ -9986,7 +8670,6 @@ socks-proxy-agent@^3.0.1: socks-proxy-agent@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" - integrity sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw== dependencies: agent-base "~4.2.0" socks "~2.2.0" @@ -9994,7 +8677,6 @@ socks-proxy-agent@^4.0.0: socks@^1.1.10: version "1.1.10" resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" - integrity sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o= dependencies: ip "^1.1.4" smart-buffer "^1.0.13" @@ -10002,7 +8684,6 @@ socks@^1.1.10: socks@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.1.tgz#68ad678b3642fbc5d99c64c165bc561eab0215f9" - integrity sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w== dependencies: ip "^1.1.5" smart-buffer "^4.0.1" @@ -10010,19 +8691,16 @@ socks@~2.2.0: sort-keys@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= dependencies: is-plain-obj "^1.0.0" sorted-object@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/sorted-object/-/sorted-object-2.0.1.tgz#7d631f4bd3a798a24af1dffcfbfe83337a5df5fc" - integrity sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw= sorted-union-stream@~2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz#c7794c7e077880052ff71a8d4a2dbb4a9a638ac7" - integrity sha1-x3lMfgd4gAUv9xqNSi27Sppjisc= dependencies: from2 "^1.3.0" stream-iterate "^1.1.0" @@ -10030,12 +8708,10 @@ sorted-union-stream@~2.1.3: source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" - integrity sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A== source-map-loader@^0.2.1: version "0.2.3" resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.3.tgz#d4b0c8cd47d54edce3e6bfa0f523f452b5b0e521" - integrity sha512-MYbFX9DYxmTQFfy2v8FC1XZwpwHKYxg3SK8Wb7VPBKuhDjz8gi9re2819MsG4p49HDyiOSUKlmZ+nQBArW5CGw== dependencies: async "^2.5.0" loader-utils "~0.2.2" @@ -10044,7 +8720,6 @@ source-map-loader@^0.2.1: source-map-resolve@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" - integrity sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A== dependencies: atob "^2.0.0" decode-uri-component "^0.2.0" @@ -10055,43 +8730,36 @@ source-map-resolve@^0.5.0: source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== dependencies: source-map "^0.5.6" source-map-support@^0.5.0: version "0.5.4" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.4.tgz#54456efa89caa9270af7cd624cc2f123e51fbae8" - integrity sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg== dependencies: source-map "^0.6.0" source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.4.2, source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - integrity sha1-66T12pwNyZneaAMti092FzZSA2s= dependencies: amdefine ">=0.0.4" source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" - integrity sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" @@ -10099,12 +8767,10 @@ spdx-correct@^3.0.0: spdx-exceptions@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" - integrity sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" @@ -10112,12 +8778,10 @@ spdx-expression-parse@^3.0.0: spdx-license-ids@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" - integrity sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA== spdy-transport@^2.0.18: version "2.1.0" resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" - integrity sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g== dependencies: debug "^2.6.8" detect-node "^2.0.3" @@ -10130,7 +8794,6 @@ spdy-transport@^2.0.18: spdy@^3.4.1: version "3.4.7" resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" - integrity sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw= dependencies: debug "^2.6.8" handle-thing "^1.2.5" @@ -10142,26 +8805,22 @@ spdy@^3.4.1: split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== dependencies: extend-shallow "^3.0.0" split@0.3: version "0.3.3" resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" - integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= dependencies: through "2" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: version "1.14.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" - integrity sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s= dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -10176,24 +8835,20 @@ sshpk@^1.7.0: ssri@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" - integrity sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ== dependencies: safe-buffer "^5.1.1" ssri@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.0.tgz#fc21bfc90e03275ac3e23d5a42e38b8a1cbc130d" - integrity sha512-zYOGfVHPhxyzwi8MdtdNyxv3IynWCIM4jYReR48lqu0VngxgH1c+C6CmipRdJ55eVByTJV/gboFEEI7TEQI8DA== stack-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" - integrity sha1-1PM6tU6OOHeLDKXP07OvsS22hiA= static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= dependencies: define-property "^0.2.5" object-copy "^0.1.0" @@ -10201,29 +8856,24 @@ static-extend@^0.1.1: "statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2": version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= statuses@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== stdout-stream@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" - integrity sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s= dependencies: readable-stream "^2.0.1" stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= dependencies: inherits "~2.0.1" readable-stream "^2.0.2" @@ -10231,14 +8881,12 @@ stream-browserify@^2.0.1: stream-combiner@~0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= dependencies: duplexer "~0.1.1" stream-each@^1.1.0: version "1.2.2" resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" - integrity sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA== dependencies: end-of-stream "^1.1.0" stream-shift "^1.0.0" @@ -10246,7 +8894,6 @@ stream-each@^1.1.0: stream-http@^2.7.2: version "2.8.1" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.1.tgz#d0441be1a457a73a733a8a7b53570bebd9ef66a4" - integrity sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A== dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" @@ -10257,7 +8904,6 @@ stream-http@^2.7.2: stream-iterate@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/stream-iterate/-/stream-iterate-1.2.0.tgz#2bd7c77296c1702a46488b8ad41f79865eecd4e1" - integrity sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE= dependencies: readable-stream "^2.1.5" stream-shift "^1.0.0" @@ -10265,22 +8911,18 @@ stream-iterate@^1.1.0: stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= dependencies: astral-regex "^1.0.0" strip-ansi "^4.0.0" @@ -10288,7 +8930,6 @@ string-length@^2.0.0: string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -10297,7 +8938,6 @@ string-width@^1.0.1, string-width@^1.0.2: string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" @@ -10305,7 +8945,6 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: string.prototype.padend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" - integrity sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA= dependencies: define-properties "^1.1.2" es-abstract "^1.4.3" @@ -10314,67 +8953,56 @@ string.prototype.padend@^3.0.0: string_decoder@^1.0.0, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - integrity sha1-TkhM1N5aC7vuGORjB3EKioFiGHg= strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0, strip-ansi@~4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= dependencies: is-utf8 "^0.2.0" strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= strip-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= dependencies: get-stdin "^4.0.1" strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= style-loader@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.0.tgz#7258e788f0fee6a42d710eaf7d6c2412a4c50759" - integrity sha512-9mx9sC9nX1dgP96MZOODpGC6l1RzQBITI2D5WJhu+wnbrSYVKLGuy14XJSLVQih/0GFrPpjelt+s//VcZQ2Evw== dependencies: loader-utils "^1.0.2" schema-utils "^0.3.0" @@ -10382,40 +9010,34 @@ style-loader@0.19.0: subarg@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" - integrity sha1-9izxdYHplrSPyWVpn1TAauJouNI= dependencies: minimist "^1.1.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= supports-color@^3.1.2, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" supports-color@^4.2.1: version "4.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - integrity sha1-vnoN5ITexcXN34s9WRJQRJEvY1s= dependencies: has-flag "^2.0.0" supports-color@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" - integrity sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg== dependencies: has-flag "^3.0.0" svgo@^0.7.0: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" - integrity sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U= dependencies: coa "~1.0.1" colors "~1.1.2" @@ -10428,7 +9050,6 @@ svgo@^0.7.0: sw-precache-webpack-plugin@0.11.4: version "0.11.4" resolved "https://registry.yarnpkg.com/sw-precache-webpack-plugin/-/sw-precache-webpack-plugin-0.11.4.tgz#a695017e54eed575551493a519dc1da8da2dc5e0" - integrity sha1-ppUBflTu1XVVFJOlGdwdqNotxeA= dependencies: del "^2.2.2" sw-precache "^5.1.1" @@ -10437,7 +9058,6 @@ sw-precache-webpack-plugin@0.11.4: sw-precache@^5.1.1: version "5.2.1" resolved "https://registry.yarnpkg.com/sw-precache/-/sw-precache-5.2.1.tgz#06134f319eec68f3b9583ce9a7036b1c119f7179" - integrity sha512-8FAy+BP/FXE+ILfiVTt+GQJ6UEf4CVHD9OfhzH0JX+3zoy2uFk7Vn9EfXASOtVmmIVbL3jE/W8Z66VgPSZcMhw== dependencies: dom-urls "^1.1.0" es6-promise "^4.0.5" @@ -10453,7 +9073,6 @@ sw-precache@^5.1.1: sw-toolbox@^3.4.0: version "3.6.0" resolved "https://registry.yarnpkg.com/sw-toolbox/-/sw-toolbox-3.6.0.tgz#26df1d1c70348658e4dea2884319149b7b3183b5" - integrity sha1-Jt8dHHA0hljk3qKIQxkUm3sxg7U= dependencies: path-to-regexp "^1.0.1" serviceworker-cache-polyfill "^4.0.0" @@ -10461,22 +9080,18 @@ sw-toolbox@^3.4.0: symbol-observable@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= tapable@^0.2.7: version "0.2.8" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" - integrity sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI= tar-pack@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - integrity sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg== dependencies: debug "^2.2.0" fstream "^1.0.10" @@ -10490,7 +9105,6 @@ tar-pack@^3.4.0: tar@^2.0.0, tar@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - integrity sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE= dependencies: block-stream "*" fstream "^1.0.2" @@ -10499,7 +9113,6 @@ tar@^2.0.0, tar@^2.2.1: tar@^4.4.1, tar@^4.4.3: version "4.4.4" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" - integrity sha512-mq9ixIYfNF9SK0IS/h2HKMu8Q2iaCuhDDsZhdEag/FHv8fOaYld4vN7ouMgcSSt5WKZzPs8atclTcJm36OTh4w== dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" @@ -10512,14 +9125,12 @@ tar@^4.4.1, tar@^4.4.3: term-size@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= dependencies: execa "^0.7.0" test-exclude@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" - integrity sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ== dependencies: arrify "^1.0.1" micromatch "^3.1.8" @@ -10530,17 +9141,14 @@ test-exclude@^4.2.1: text-table@0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= through2@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - integrity sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= dependencies: readable-stream "^2.1.5" xtend "~4.0.1" @@ -10548,68 +9156,56 @@ through2@^2.0.0: through@2, "through@>=2.2.7 <3", through@^2.3.6, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= thunky@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" - integrity sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E= time-stamp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" - integrity sha1-lcakRTDhW6jW9KPsuMOj+sRto1c= timed-out@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= timers-browserify@^2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" - integrity sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw== dependencies: setimmediate "^1.0.4" tiny-relative-date@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" - integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= dependencies: kind-of "^3.0.2" to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= dependencies: is-number "^3.0.0" repeat-string "^1.6.1" @@ -10617,7 +9213,6 @@ to-regex-range@^2.1.0: to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== dependencies: define-property "^2.0.2" extend-shallow "^3.0.2" @@ -10627,48 +9222,40 @@ to-regex@^3.0.1, to-regex@^3.0.2: toggle-selection@^1.0.3: version "1.0.6" resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" - integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI= toposort@^1.0.0: version "1.0.6" resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec" - integrity sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw= tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== dependencies: punycode "^1.4.1" tr46@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= dependencies: punycode "^2.1.0" trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= "true-case-path@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" - integrity sha1-fskRMJJHZsf1c74wIMNPj9/QDWI= dependencies: glob "^6.0.4" ts-jest@22.0.1: version "22.0.1" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-22.0.1.tgz#48942936a466c2e76e259b02e2f1356f1839afc3" - integrity sha512-bc781gViU95lRZF0kzkHiincwmVu96jbC8MFk2SXUCrSj3Zx8sMC6c6gJnIluVQkm8yYaBl5ucqLnwHNRl5l0Q== dependencies: babel-core "^6.24.1" babel-plugin-istanbul "^4.1.4" @@ -10684,7 +9271,6 @@ ts-jest@22.0.1: ts-loader@^2.3.7: version "2.3.7" resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-2.3.7.tgz#a9028ced473bee12f28a75f9c5b139979d33f2fc" - integrity sha512-8t3bu2FcEkXb+D4L+Cn8qiK2E2C6Ms4/GQChvz6IMbVurcFHLXrhW4EMtfaol1a1ASQACZGDUGit4NHnX9g7hQ== dependencies: chalk "^2.0.1" enhanced-resolve "^3.0.0" @@ -10694,7 +9280,6 @@ ts-loader@^2.3.7: tsconfig-paths-webpack-plugin@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-2.0.0.tgz#7652dc684bb3206c8e7e446831ca01cbf4d11772" - integrity sha512-reAnVEGP7mNwOcXXYxQpsH7uY8blNJM/xgN2KYttVX+qkwfqA+nhRPpA7Fnomnlhm5Jz0EoSVwk4rtQu8hC54g== dependencies: chalk "^2.3.0" tsconfig-paths "^3.1.1" @@ -10702,7 +9287,6 @@ tsconfig-paths-webpack-plugin@^2.0.0: tsconfig-paths@^3.1.1: version "3.3.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.3.0.tgz#bc265cb2afe89880488d0fbdbbbd850eca66206e" - integrity sha512-A7mka4Ltft41LKPUTigt6/5lMVBVN2elJNEE2Tz0pcWdgbSXZjrC0MCcZzj5keFWO8mLE7d8w9pFf15QRREYnQ== dependencies: deepmerge "^2.0.1" minimist "^1.2.0" @@ -10712,24 +9296,20 @@ tsconfig-paths@^3.1.1: tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" - integrity sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ== tslint-config-prettier@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.10.0.tgz#5063c413d43de4f6988c73727f65ecfc239054ec" - integrity sha512-WghvT/oYVV6UGhkHyAVUjcJYmqnYJgw8nfYOmsnTeBdpNeyPfhQTwZ+qa63cni2VE/6J29VP/7ijWcuaVlVcqg== tslint-react@^3.2.0: version "3.5.1" resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.5.1.tgz#a5ca48034bf583fb63b42763bb89fa23062d5390" - integrity sha512-ndS/iOOGrasATcf5YU3JxoIwPGVykjrKhzmlVsRdT1xzl/RbNg9n627rtAGbCjkQepyiaQYgxWQT5G/qUpQCaA== dependencies: tsutils "^2.13.1" tslint@^5.7.0: version "5.9.1" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" - integrity sha1-ElX4ej/1frCw4fDmEKi0dIBGya4= dependencies: babel-code-frame "^6.22.0" builtin-modules "^1.1.1" @@ -10747,43 +9327,36 @@ tslint@^5.7.0: tsutils@^2.12.1, tsutils@^2.13.1: version "2.26.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.26.1.tgz#9e4a0cb9ff173863f34c22a961969081270d1878" - integrity sha512-bnm9bcjOqOr1UljleL94wVCDlpa6KjfGaTkefeLch4GRafgDkROxPizbB/FxTEdI++5JqhxczRy/Qub0syNqZA== dependencies: tslib "^1.8.1" tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" tunnel-agent@~0.4.1: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - integrity sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us= tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" type-is@~1.6.15, type-is@~1.6.16: version "1.6.16" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== dependencies: media-typer "0.3.0" mime-types "~2.1.18" @@ -10791,32 +9364,26 @@ type-is@~1.6.15, type-is@~1.6.16: typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typesafe-actions@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/typesafe-actions/-/typesafe-actions-1.1.2.tgz#af88ede3ee254be425c3e0e02de11b182830ae48" - integrity sha512-4SparTfwBOWjegg89Ls5Ia0L6N8mXu7tb/REA5KYEfRohsLM9Uc8jtAa8bRAhtCg1cQJnvJJMjljI7dfu1JjVg== typescript@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" - integrity sha512-Ao/f6d/4EPLq0YwzsQz8iXflezpTkQzqAyenTiw4kCUGr1uPiFLC3+fZ+gMZz6eeI/qdRUqvC+HxIJzUAzEFdg== ua-parser-js@^0.7.18: version "0.7.18" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" - integrity sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA== ua-parser-js@^0.7.9: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" - integrity sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g== uglify-es@^3.3.4: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== dependencies: commander "~2.13.0" source-map "~0.6.1" @@ -10824,7 +9391,6 @@ uglify-es@^3.3.4: uglify-js@3.3.x, uglify-js@^3.0.13: version "3.3.21" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.21.tgz#851a34cbb31840ecb881968ed07dd3a61e7264a0" - integrity sha512-uy82472lH8tshK3jS3c5IFb5MmNKd/5qyBd0ih8sM42L3jWvxnE339U9gZU1zufnLVs98Stib9twq8dLm2XYCA== dependencies: commander "~2.15.0" source-map "~0.6.1" @@ -10832,7 +9398,6 @@ uglify-js@3.3.x, uglify-js@^3.0.13: uglify-js@^2.6, uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= dependencies: source-map "~0.5.1" yargs "~3.10.0" @@ -10842,12 +9407,10 @@ uglify-js@^2.6, uglify-js@^2.8.29: uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= uglifyjs-webpack-plugin@^0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" - integrity sha1-uVH0q7a9YX5m9j64kUmOORdj4wk= dependencies: source-map "^0.5.6" uglify-js "^2.8.29" @@ -10856,7 +9419,6 @@ uglifyjs-webpack-plugin@^0.4.6: uglifyjs-webpack-plugin@^1.1.8: version "1.2.4" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz#5eec941b2e9b8538be0a20fc6eda25b14c7c1043" - integrity sha512-z0IbjpW8b3O/OVn+TTZN4pI29RN1zktFBXLIzzfZ+++cUtZ1ERSlLWgpE/5OERuEUs1ijVQnpYAkSlpoVmQmSQ== dependencies: cacache "^10.0.4" find-cache-dir "^1.0.0" @@ -10870,22 +9432,18 @@ uglifyjs-webpack-plugin@^1.1.8: uid-number@0.0.6, uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= umask@^1.1.0, umask@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" - integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= underscore@~1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= dependencies: arr-union "^3.1.0" get-value "^2.0.6" @@ -10895,55 +9453,46 @@ union-value@^1.0.0: uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= uniqid@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" - integrity sha1-iSIN32t1GuUrX3JISGNShZa7hME= dependencies: macaddress "^0.2.8" uniqs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= unique-filename@^1.1.0, unique-filename@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" - integrity sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM= dependencies: unique-slug "^2.0.0" unique-slug@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" - integrity sha1-22Z258fMBimHj/GWCXx4hVrp9Ks= dependencies: imurmurhash "^0.1.4" unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= dependencies: crypto-random-string "^1.0.0" universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" - integrity sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc= unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= dependencies: has-value "^0.3.1" isobject "^3.0.0" @@ -10951,17 +9500,14 @@ unset-value@^1.0.0: unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= upath@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.4.tgz#ee2321ba0a786c50973db043a50b7bcba822361d" - integrity sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw== update-notifier@^2.3.0, update-notifier@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" - integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== dependencies: boxen "^1.2.1" chalk "^2.0.1" @@ -10977,29 +9523,24 @@ update-notifier@^2.3.0, update-notifier@^2.5.0: upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= uri-js@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa" - integrity sha1-+QuFhQf4HepNz7s8TD2/orVX+qo= dependencies: punycode "^2.1.0" urijs@^1.16.1: version "1.19.1" resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.1.tgz#5b0ff530c0cbde8386f6342235ba5ca6e995d25a" - integrity sha512-xVrGVi94ueCJNrBSTjWqjvtgvl3cyOTThp2zaMaFNGp3F542TR6sM3f2o8RqZl+AwteClSVmoCyt0ka4RjQOQg== urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-loader@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" - integrity sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q== dependencies: loader-utils "^1.0.2" mime "^1.4.1" @@ -11008,14 +9549,12 @@ url-loader@0.6.2: url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= dependencies: prepend-http "^1.0.1" url-parse@1.0.x: version "1.0.5" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" - integrity sha1-CFSGBCKv3P7+tsllxmLUgAFpkns= dependencies: querystringify "0.0.x" requires-port "1.0.x" @@ -11023,7 +9562,6 @@ url-parse@1.0.x: url-parse@^1.1.8: version "1.3.0" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.3.0.tgz#04a06c420d22beb9804f7ada2d57ad13160a4258" - integrity sha512-zPvPA3T7P6M+0iNsgX+iAcAz4GshKrowtQBHHc/28tVsBc8jK7VRCNX+2GEcoE6zDB6XqXhcyiUWPVZY6C70Cg== dependencies: querystringify "~1.0.0" requires-port "~1.0.0" @@ -11031,7 +9569,6 @@ url-parse@^1.1.8: url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= dependencies: punycode "1.3.2" querystring "0.2.0" @@ -11039,24 +9576,20 @@ url@^0.11.0: use@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" - integrity sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw== dependencies: kind-of "^6.0.2" util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= util-extend@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" - integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= util.promisify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== dependencies: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" @@ -11064,49 +9597,40 @@ util.promisify@^1.0.0: util@0.10.3, util@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= dependencies: inherits "2.0.1" utila@~0.3: version "0.3.3" resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" - integrity sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY= utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= utility-types@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-2.0.0.tgz#3c9fe26914a1c7b8aff690e8f941e76b091d3149" - integrity sha512-/ilZGby7cs2OmvJuhRiqczKtjEY5lcdt2oaI/Q+VFepOAgQNgGRwTbRa0mtN1CIb7Kkw5dSsCKXMU29+jLP8jw== utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= uuid@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" - integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= uuid@^3.0.0, uuid@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" - integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== uuid@^3.2.1: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" - integrity sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -11114,29 +9638,24 @@ validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= dependencies: builtins "^1.0.3" value-equal@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" - integrity sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw== vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= vendors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" - integrity sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI= verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -11145,35 +9664,30 @@ verror@1.10.0: vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= dependencies: indexof "0.0.1" w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= dependencies: browser-process-hrtime "^0.1.2" walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= dependencies: makeerror "1.0.x" warning@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" - integrity sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w= dependencies: loose-envify "^1.0.0" watch@~0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" - integrity sha1-KAlUdsbffJDJYxOJkMClQj60uYY= dependencies: exec-sh "^0.2.0" minimist "^1.2.0" @@ -11181,7 +9695,6 @@ watch@~0.18.0: watchpack@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed" - integrity sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA== dependencies: chokidar "^2.0.2" graceful-fs "^4.1.2" @@ -11190,26 +9703,22 @@ watchpack@^1.4.0: wbuf@^1.1.0, wbuf@^1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== dependencies: minimalistic-assert "^1.0.0" wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= dependencies: defaults "^1.0.3" webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== webpack-dev-middleware@^1.11.0: version "1.12.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" - integrity sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A== dependencies: memory-fs "~0.4.1" mime "^1.5.0" @@ -11220,7 +9729,6 @@ webpack-dev-middleware@^1.11.0: webpack-dev-server@2.9.4: version "2.9.4" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.4.tgz#7883e61759c6a4b33e9b19ec4037bd4ab61428d1" - integrity sha512-thrqC0EQEoSjXeYgP6pUXcUCZ+LNrKsDPn+mItLnn5VyyNZOJKd06hUP5vqkYwL8nWWXsii0loSF9NHNccT6ow== dependencies: ansi-html "0.0.7" array-includes "^3.0.3" @@ -11253,7 +9761,6 @@ webpack-dev-server@2.9.4: webpack-manifest-plugin@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-1.3.2.tgz#5ea8ee5756359ddc1d98814324fe43496349a7d4" - integrity sha512-MX60Bv2G83Zks9pi3oLOmRgnPAnwrlMn+lftMrWBm199VQjk46/xgzBi9lPfpZldw2+EI2S+OevuLIaDuxCWRw== dependencies: fs-extra "^0.30.0" lodash ">=3.5 <5" @@ -11261,7 +9768,6 @@ webpack-manifest-plugin@1.3.2: webpack-sources@^1.0.1, webpack-sources@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" - integrity sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw== dependencies: source-list-map "^2.0.0" source-map "~0.6.1" @@ -11269,7 +9775,6 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: webpack@3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" - integrity sha512-5ZXLWWsMqHKFr5y0N3Eo5IIisxeEeRAajNq4mELb/WELOR7srdbQk2N5XiyNy2A/AgvlR3AmeBCZJW8lHrolbw== dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -11297,7 +9802,6 @@ webpack@3.8.1: websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" - integrity sha1-DK+dLXVdk67gSdS90NP+LMoqJOs= dependencies: http-parser-js ">=0.4.0" websocket-extensions ">=0.1.1" @@ -11305,34 +9809,28 @@ websocket-driver@>=0.5.1: websocket-extensions@>=0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" - integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" - integrity sha512-jLBwwKUhi8WtBfsMQlL4bUUcT8sMkAtQinscJAe/M4KHCkHuUJAF6vuB0tueNIw4c8ziO6AkRmgY+jL3a0iiPw== dependencies: iconv-lite "0.4.19" whatwg-fetch@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" - integrity sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ= whatwg-fetch@>=0.10.0: version "2.0.4" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" - integrity sha512-FKxhYLytBQiUKjkYteN71fAUA3g6KpNXoho1isLiLSB3N1G4F35Q5vUxWfKFhBwi5IWF27VE6WxhrnnC+m0Mew== whatwg-url@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" - integrity sha512-Z0CVh/YE217Foyb488eo+iBv+r7eAQ0wSTyApi9n06jhcA3z6Nidg/EGvl0UFkg7kMdKxfBzzr+o9JF+cevgMg== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.0" @@ -11341,77 +9839,64 @@ whatwg-url@^6.4.0: whet.extend@~0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - integrity sha1-+HfVv2SMl+WqVC+twW1qJZucEaE= which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= which@1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== dependencies: isexe "^2.0.0" which@~1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" wide-align@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - integrity sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w== dependencies: string-width "^1.0.2" widest-line@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" - integrity sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM= dependencies: string-width "^2.1.1" window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= worker-farm@^1.5.2, worker-farm@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" - integrity sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ== dependencies: errno "~0.1.7" wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -11419,12 +9904,10 @@ wrap-ansi@^2.0.0: wrappy@1, wrappy@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" @@ -11433,7 +9916,6 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: ws@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" - integrity sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA== dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" @@ -11441,77 +9923,64 @@ ws@^4.0.0: xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" - integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== xtend@^4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" - integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" - integrity sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw= dependencies: camelcase "^3.0.0" yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" - integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= dependencies: camelcase "^3.0.0" yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= dependencies: camelcase "^4.1.0" yargs-parser@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - integrity sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ== dependencies: camelcase "^4.1.0" yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= dependencies: camelcase "^4.1.0" yargs@^10.0.3: version "10.1.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" - integrity sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig== dependencies: cliui "^4.0.0" decamelize "^1.1.1" @@ -11529,7 +9998,6 @@ yargs@^10.0.3: yargs@^11.0.0: version "11.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== dependencies: cliui "^4.0.0" decamelize "^1.1.1" @@ -11547,7 +10015,6 @@ yargs@^11.0.0: yargs@^6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" - integrity sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg= dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -11566,7 +10033,6 @@ yargs@^6.6.0: yargs@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" - integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg= dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -11585,7 +10051,6 @@ yargs@^7.0.0: yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" - integrity sha1-YpmpBVsc78lp/355wdkY3Osiw2A= dependencies: camelcase "^4.1.0" cliui "^3.2.0" @@ -11604,7 +10069,6 @@ yargs@^8.0.2: yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= dependencies: camelcase "^1.0.2" cliui "^2.1.0" From 1b33af9d7477751b8c7e43b68cf10c6a044ef7b0 Mon Sep 17 00:00:00 2001 From: "Open O. Close" <3646725+openorclose@users.noreply.github.com> Date: Thu, 7 Feb 2019 12:17:22 +0800 Subject: [PATCH 005/111] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9e03b3e1df..3b9b8dde12 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ `"js-slang": "file:../openorclosejsslang/dist",` +note that this will copy the files over, and any changes after that will not be reflected. ## Original Readme below From c370da6fd86fcb5006113fbfe7ac0ada76a8f2df Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Sun, 10 Feb 2019 14:56:19 +0800 Subject: [PATCH 006/111] missionOverviews missionOverviews can now be added --- src/actions/actionTypes.ts | 1 + src/actions/session.ts | 5 + src/components/assessment/index.tsx | 2 + .../commons/ImportFromFileComponent.tsx | 94 +++++++++++++++++++ src/reducers/session.ts | 23 ++++- 5 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 src/components/commons/ImportFromFileComponent.tsx diff --git a/src/actions/actionTypes.ts b/src/actions/actionTypes.ts index 6e58cd64e3..ff10256846 100644 --- a/src/actions/actionTypes.ts +++ b/src/actions/actionTypes.ts @@ -59,6 +59,7 @@ export const SUBMIT_ANSWER = 'SUBMIT_ANSWER' export const SUBMIT_ASSESSMENT = 'SUBMIT_ASSESSMENT' export const SUBMIT_GRADING = 'SUBMIT_GRADING' export const UPDATE_HISTORY_HELPERS = 'UPDATE_HISTORY_HELPERS' +export const UPDATE_ASSESSMENT_OVERVIEW = 'UPDATE_ASSESSMENT_OVERVIEW' export const UPDATE_ASSESSMENT_OVERVIEWS = 'UPDATE_ASSESSMENT_OVERVIEWS' export const UPDATE_ASSESSMENT = 'UPDATE_ASSESSMENT' export const UPDATE_GRADING_OVERVIEWS = 'UPDATE_GRADING_OVERVIEWS' diff --git a/src/actions/session.ts b/src/actions/session.ts index bacd76adc3..5d36d84219 100644 --- a/src/actions/session.ts +++ b/src/actions/session.ts @@ -99,6 +99,11 @@ export const updateHistoryHelpers: ActionCreator = (loc: st payload: loc }) +export const updateAssessmentOverview = (overview: IAssessmentOverview) => ({ + type: actionTypes.UPDATE_ASSESSMENT_OVERVIEW, + payload: overview +}) + export const updateAssessmentOverviews = (overviews: IAssessmentOverview[]) => ({ type: actionTypes.UPDATE_ASSESSMENT_OVERVIEWS, payload: overviews diff --git a/src/components/assessment/index.tsx b/src/components/assessment/index.tsx index 2f9f557b1a..c260842f71 100644 --- a/src/components/assessment/index.tsx +++ b/src/components/assessment/index.tsx @@ -33,6 +33,7 @@ import { import { OwnProps as AssessmentProps } from '../assessment/AssessmentWorkspace' import { controlButton } from '../commons' import ContentDisplay from '../commons/ContentDisplay' +import ImportFromFileComponent from '../commons/ImportFromFileComponent' import Markdown from '../commons/Markdown' const DEFAULT_QUESTION_ID: number = 0 @@ -170,6 +171,7 @@ class Assessment extends React.Component { {upcomingCardsCollapsible} {openedCardsCollapsible} {closedCardsCollapsible} + ) } diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx new file mode 100644 index 0000000000..522c66edc8 --- /dev/null +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -0,0 +1,94 @@ +import * as React from 'react' +import { connect, MapDispatchToProps } from "react-redux" +import { bindActionCreators, Dispatch } from 'redux' +import { parseString } from 'xml2js' +import { updateAssessment, updateAssessmentOverview} from '../../actions/session' +import { + AssessmentCategories, + AssessmentStatuses, + GradingStatuses, + // IAssessment, + IAssessmentOverview +} from '../../components/assessment/assessmentShape' +// import { IDispatchProps } from '../../components/assessment' + + +const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch) => + bindActionCreators( + { + newAssessment: updateAssessment, + newAssessmentOverview: updateAssessmentOverview + }, + dispatch + ) + +const capitalizeFirstLetter = (str: string) => { + return str.charAt(0).toUpperCase() + str.slice(1); +} + +const makeAssessmentOverview = (task: any) => { + const rawOverview = task.$; + return { + category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, + closeAt: rawOverview.duedate, + coverImage: rawOverview.coverimage, + grade: 1, + id: 7, + maxGrade: 3000, + maxXp: 1000, + openAt: rawOverview.startdate, + title: rawOverview.title, + shortSummary: task.WEBSUMMARY[0], + status: AssessmentStatuses.not_attempted, + story: rawOverview.story, + xp: 0, + gradingStatus: "none" as GradingStatuses + } +} + +class ImportFromFileComponent extends React.Component{ + public fileReader : FileReader; + public constructor(props: any) { + super(props); + this.handleFileRead = this.handleFileRead.bind(this); + this.handleChangeFile = this.handleChangeFile.bind(this); + } + + public render(){ + return( +
+ +
+ ) + } + + private handleFileRead = (e: any) => { + const content = this.fileReader.result; + if (content) { + parseString(content, (err: any, result: any) => { + // tslint:disable-next-line:no-console + console.dir(result); + const task = result.CONTENT.TASK[0]; + const overview: IAssessmentOverview = makeAssessmentOverview(task); + this.props.newAssessmentOverview(overview); + }); + } + // You can set content in state and show it in render. + } + + private handleChangeFile = (e: any) => { + const files = e.target.files + if (e.target.files){ + this.fileReader = new FileReader(); + this.fileReader.onloadend = this.handleFileRead; + this.fileReader.readAsText(files[0]); + } + } +} + +export default connect(null, mapDispatchToProps)(ImportFromFileComponent) \ No newline at end of file diff --git a/src/reducers/session.ts b/src/reducers/session.ts index 7e84d6995d..1e4b9fa2f8 100644 --- a/src/reducers/session.ts +++ b/src/reducers/session.ts @@ -6,6 +6,7 @@ import { SET_TOKENS, SET_USER, UPDATE_ASSESSMENT, + UPDATE_ASSESSMENT_OVERVIEW, UPDATE_ASSESSMENT_OVERVIEWS, UPDATE_GRADING, UPDATE_GRADING_OVERVIEWS, @@ -49,10 +50,28 @@ export const reducer: Reducer = (state = defaultSession, action: ...state, assessments: newAssessments } - case UPDATE_ASSESSMENT_OVERVIEWS: + case UPDATE_ASSESSMENT_OVERVIEW: + const newOverviews = Object.assign([], state.assessmentOverviews); + newOverviews.push(action.payload); return { ...state, - assessmentOverviews: action.payload + assessmentOverviews: newOverviews + } + case UPDATE_ASSESSMENT_OVERVIEWS: + if (state.assessmentOverviews){ + const updatedOverviews = Object.assign([], state.assessmentOverviews); + const usedIDs = new Set(); + state.assessmentOverviews.forEach((x: any) => {usedIDs.add(x.id)}); + action.payload.forEach((x: any) => {if (!usedIDs.has(x.id)) {updatedOverviews.push(x)}}) + return { + ...state, + assessmentOverviews: updatedOverviews + } + } else{ + return { + ...state, + assessmentOverviews: action.payload + } } case UPDATE_GRADING: const newGradings = new Map(state.gradings) From 481f7b673bebebb2e09b786075e15c92bf3e8e2f Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Sun, 10 Feb 2019 15:40:27 +0800 Subject: [PATCH 007/111] minorOverviewChanges --- src/components/commons/ImportFromFileComponent.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index 522c66edc8..e9cab25282 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -46,8 +46,8 @@ const makeAssessmentOverview = (task: any) => { } } -class ImportFromFileComponent extends React.Component{ - public fileReader : FileReader; +export class ImportFromFileComponent extends React.Component{ + private fileReader : FileReader; public constructor(props: any) { super(props); this.handleFileRead = this.handleFileRead.bind(this); @@ -71,9 +71,9 @@ class ImportFromFileComponent extends React.Component{ const content = this.fileReader.result; if (content) { parseString(content, (err: any, result: any) => { - // tslint:disable-next-line:no-console - console.dir(result); const task = result.CONTENT.TASK[0]; + // tslint:disable-next-line:no-console + console.dir(task); const overview: IAssessmentOverview = makeAssessmentOverview(task); this.props.newAssessmentOverview(overview); }); From c5a7a79b49056d8b388030083528d6381fed9773 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Sun, 10 Feb 2019 16:07:25 +0800 Subject: [PATCH 008/111] minorOverviewChanges1 --- src/components/commons/ImportFromFileComponent.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index e9cab25282..fa6acd37f5 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { connect, MapDispatchToProps } from "react-redux" +import { connect, MapDispatchToProps, MapStateToProps } from "react-redux" import { bindActionCreators, Dispatch } from 'redux' import { parseString } from 'xml2js' import { updateAssessment, updateAssessmentOverview} from '../../actions/session' @@ -7,13 +7,19 @@ import { AssessmentCategories, AssessmentStatuses, GradingStatuses, - // IAssessment, + IAssessment, IAssessmentOverview } from '../../components/assessment/assessmentShape' // import { IDispatchProps } from '../../components/assessment' +export interface IDispatchProps { + newAssessment: (overview: IAssessment) => void + newAssessmentOverview: (assessment: IAssessmentOverview) => void +} + +const mapStateToProps: MapStateToProps<{}, any, {}> = (_, ownProps) => ownProps -const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch) => +const mapDispatchToProps: MapDispatchToProps = (dispatch: Dispatch) => bindActionCreators( { newAssessment: updateAssessment, @@ -91,4 +97,4 @@ export class ImportFromFileComponent extends React.Component{ } } -export default connect(null, mapDispatchToProps)(ImportFromFileComponent) \ No newline at end of file +export default connect(mapStateToProps, mapDispatchToProps)(ImportFromFileComponent) \ No newline at end of file From 2578241a9df28f6e1e7b7592c9bed8295e23e0c2 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Sun, 10 Feb 2019 17:57:00 +0800 Subject: [PATCH 009/111] AddedAssignmentSupport --- .../commons/ImportFromFileComponent.tsx | 98 ++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index fa6acd37f5..42e0e106f6 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -5,11 +5,17 @@ import { parseString } from 'xml2js' import { updateAssessment, updateAssessmentOverview} from '../../actions/session' import { AssessmentCategories, - AssessmentStatuses, + AssessmentStatuses, + ExternalLibraryNames, GradingStatuses, IAssessment, - IAssessmentOverview + IAssessmentOverview, + IMCQQuestion, + IProgrammingQuestion, + Library, + MCQChoice } from '../../components/assessment/assessmentShape' +import { externalLibraries } from '../../reducers/externalLibraries' // import { IDispatchProps } from '../../components/assessment' export interface IDispatchProps { @@ -52,6 +58,92 @@ const makeAssessmentOverview = (task: any) => { } } +const makeAssessment = (task: any) => { + const rawOverview = task.$; + return { + category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, + id: 7, + longSummary: task.TEXT[0], + missionPDF: "google.com", + questions: makeQuestions(task), + title: rawOverview.title, + } +} + +const mockGlobals: Array<[string, any]> = [ + ['testNumber', 3.141592653589793], + ['testString', 'who dat boi'], + ['testBooleanTrue', true], + ['testBooleanFalse', false], + ['testBooleanUndefined', undefined], + ['testBooleanNull', null], + ['testObject', { a: 1, b: 2 }], + ['testArray', [1, 2, 'a', 'b']] +] + +const mockSoundLibrary: Library = { + chapter: 1, + external: { + name: ExternalLibraryNames.SOUND, + symbols: externalLibraries.get(ExternalLibraryNames.SOUND)! + }, + globals: mockGlobals +} + +const makeQuestions = (task: any) => { + const questions: Array = []; + task.PROBLEMS[0].PROBLEM.forEach( + (problem: any, curId: number) => { + const question = { + comment: null, + content: problem.TEXT[0], + id: curId, + library: mockSoundLibrary, + type: problem.$.type, + grader: { + name: "fake person", + id: 1, + }, + gradedAt: '2038-06-18T05:24:26.026Z', + xp: 0, + grade: 0, + maxGrade: problem.$.maxgrade, + maxXp: problem.$.maxxp, + } + let qn: IProgrammingQuestion | IMCQQuestion; + if (question.type === "programming"){ + qn = { + ...question, + answer: problem.SNIPPET[0].TEMPLATE[0], + solutionTemplate: problem.SNIPPET[0].SOLUTION[0], + } + questions.push(qn); + } + if (question.type === "mcq"){ + const choicess: MCQChoice[] = []; + let ans = 0; + problem.CHOICE.forEach( + (choice: any, i: number) => { + choicess.push({ + content: choice.TEXT[0], + hint: null + }); + ans = choice.$.correct === "true" ? i : ans; + } + ) + qn = { + ...question, + answer: problem.SNIPPET[0].SOLUTION[0], + choices: choicess, + solution: ans + } + questions.push(qn); + } + } + ) + return questions; +} + export class ImportFromFileComponent extends React.Component{ private fileReader : FileReader; public constructor(props: any) { @@ -82,6 +174,8 @@ export class ImportFromFileComponent extends React.Component{ console.dir(task); const overview: IAssessmentOverview = makeAssessmentOverview(task); this.props.newAssessmentOverview(overview); + const assessment: IAssessment = makeAssessment(task); + this.props.newAssessment(assessment); }); } // You can set content in state and show it in render. From 7f083509a92d5bd062c0ed3f53996bafe3fd9d69 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Sun, 10 Feb 2019 19:15:37 +0800 Subject: [PATCH 010/111] minorOverviewChanges2 --- .../commons/ImportFromFileComponent.tsx | 237 +++++++++--------- src/reducers/session.ts | 32 +-- 2 files changed, 130 insertions(+), 139 deletions(-) diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index 42e0e106f6..71d64c11ed 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -1,25 +1,25 @@ import * as React from 'react' -import { connect, MapDispatchToProps, MapStateToProps } from "react-redux" +import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux' import { bindActionCreators, Dispatch } from 'redux' import { parseString } from 'xml2js' -import { updateAssessment, updateAssessmentOverview} from '../../actions/session' -import { - AssessmentCategories, - AssessmentStatuses, - ExternalLibraryNames, - GradingStatuses, - IAssessment, - IAssessmentOverview, - IMCQQuestion, +import { updateAssessment, updateAssessmentOverview } from '../../actions/session' +import { + AssessmentCategories, + AssessmentStatuses, + ExternalLibraryNames, + GradingStatuses, + IAssessment, + IAssessmentOverview, + IMCQQuestion, IProgrammingQuestion, - Library, - MCQChoice + Library, + MCQChoice } from '../../components/assessment/assessmentShape' import { externalLibraries } from '../../reducers/externalLibraries' // import { IDispatchProps } from '../../components/assessment' export interface IDispatchProps { - newAssessment: (overview: IAssessment) => void + newAssessment: (overview: IAssessment) => void newAssessmentOverview: (assessment: IAssessmentOverview) => void } @@ -35,13 +35,13 @@ const mapDispatchToProps: MapDispatchToProps = (dispatch: Di ) const capitalizeFirstLetter = (str: string) => { - return str.charAt(0).toUpperCase() + str.slice(1); + return str.charAt(0).toUpperCase() + str.slice(1) } const makeAssessmentOverview = (task: any) => { - const rawOverview = task.$; - return { - category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, + const rawOverview = task.$ + return { + category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, closeAt: rawOverview.duedate, coverImage: rawOverview.coverimage, grade: 1, @@ -50,24 +50,24 @@ const makeAssessmentOverview = (task: any) => { maxXp: 1000, openAt: rawOverview.startdate, title: rawOverview.title, - shortSummary: task.WEBSUMMARY[0], + shortSummary: task.WEBSUMMARY ? task.WEBSUMMARY[0] : '', status: AssessmentStatuses.not_attempted, story: rawOverview.story, xp: 0, - gradingStatus: "none" as GradingStatuses - } + gradingStatus: 'none' as GradingStatuses + } } -const makeAssessment = (task: any) => { - const rawOverview = task.$; - return { - category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, - id: 7, - longSummary: task.TEXT[0], - missionPDF: "google.com", - questions: makeQuestions(task), - title: rawOverview.title, - } +const makeAssessment = (task: any) => { + const rawOverview = task.$ + return { + category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, + id: 7, + longSummary: task.TEXT[0], + missionPDF: 'google.com', + questions: makeQuestions(task), + title: rawOverview.title + } } const mockGlobals: Array<[string, any]> = [ @@ -91,104 +91,95 @@ const mockSoundLibrary: Library = { } const makeQuestions = (task: any) => { - const questions: Array = []; - task.PROBLEMS[0].PROBLEM.forEach( - (problem: any, curId: number) => { - const question = { - comment: null, - content: problem.TEXT[0], - id: curId, - library: mockSoundLibrary, - type: problem.$.type, - grader: { - name: "fake person", - id: 1, - }, - gradedAt: '2038-06-18T05:24:26.026Z', - xp: 0, - grade: 0, - maxGrade: problem.$.maxgrade, - maxXp: problem.$.maxxp, - } - let qn: IProgrammingQuestion | IMCQQuestion; - if (question.type === "programming"){ - qn = { - ...question, - answer: problem.SNIPPET[0].TEMPLATE[0], - solutionTemplate: problem.SNIPPET[0].SOLUTION[0], - } - questions.push(qn); - } - if (question.type === "mcq"){ - const choicess: MCQChoice[] = []; - let ans = 0; - problem.CHOICE.forEach( - (choice: any, i: number) => { - choicess.push({ - content: choice.TEXT[0], - hint: null - }); - ans = choice.$.correct === "true" ? i : ans; - } - ) - qn = { - ...question, - answer: problem.SNIPPET[0].SOLUTION[0], - choices: choicess, - solution: ans - } - questions.push(qn); - } - } - ) - return questions; + const questions: Array = [] + task.PROBLEMS[0].PROBLEM.forEach((problem: any, curId: number) => { + const question = { + comment: null, + content: problem.TEXT[0], + id: curId, + library: mockSoundLibrary, + type: problem.$.type, + grader: { + name: 'fake person', + id: 1 + }, + gradedAt: '2038-06-18T05:24:26.026Z', + xp: 0, + grade: 0, + maxGrade: problem.$.maxgrade, + maxXp: problem.$.maxxp + } + let qn: IProgrammingQuestion | IMCQQuestion + if (question.type === 'programming') { + qn = { + ...question, + answer: problem.SNIPPET[0].TEMPLATE[0], + solutionTemplate: problem.SNIPPET[0].SOLUTION[0] + } + questions.push(qn) + } + if (question.type === 'mcq') { + const choicess: MCQChoice[] = [] + let ans = 0 + problem.CHOICE.forEach((choice: any, i: number) => { + choicess.push({ + content: choice.TEXT[0], + hint: null + }) + ans = choice.$.correct === 'true' ? i : ans + }) + qn = { + ...question, + answer: problem.SNIPPET[0].SOLUTION[0], + choices: choicess, + solution: ans + } + questions.push(qn) + } + }) + return questions } -export class ImportFromFileComponent extends React.Component{ - private fileReader : FileReader; - public constructor(props: any) { - super(props); - this.handleFileRead = this.handleFileRead.bind(this); - this.handleChangeFile = this.handleChangeFile.bind(this); +export class ImportFromFileComponent extends React.Component { + private fileReader: FileReader + public constructor(props: any) { + super(props) + this.handleFileRead = this.handleFileRead.bind(this) + this.handleChangeFile = this.handleChangeFile.bind(this) } - public render(){ - return( -
- -
- ) - } + public render() { + return ( +
+ +
+ ) + } - private handleFileRead = (e: any) => { - const content = this.fileReader.result; - if (content) { - parseString(content, (err: any, result: any) => { - const task = result.CONTENT.TASK[0]; - // tslint:disable-next-line:no-console - console.dir(task); - const overview: IAssessmentOverview = makeAssessmentOverview(task); - this.props.newAssessmentOverview(overview); - const assessment: IAssessment = makeAssessment(task); - this.props.newAssessment(assessment); - }); - } - // You can set content in state and show it in render. - } + private handleFileRead = (e: any) => { + const content = this.fileReader.result + if (content) { + parseString(content, (err: any, result: any) => { + const task = result.CONTENT.TASK[0] + // tslint:disable-next-line:no-console + console.dir(task) + const overview: IAssessmentOverview = makeAssessmentOverview(task) + this.props.newAssessmentOverview(overview) + const assessment: IAssessment = makeAssessment(task) + this.props.newAssessment(assessment) + }) + } + // You can set content in state and show it in render. + } - private handleChangeFile = (e: any) => { - const files = e.target.files - if (e.target.files){ - this.fileReader = new FileReader(); - this.fileReader.onloadend = this.handleFileRead; - this.fileReader.readAsText(files[0]); - } - } + private handleChangeFile = (e: any) => { + const files = e.target.files + if (e.target.files) { + this.fileReader = new FileReader() + this.fileReader.onloadend = this.handleFileRead + this.fileReader.readAsText(files[0]) + } + } } -export default connect(mapStateToProps, mapDispatchToProps)(ImportFromFileComponent) \ No newline at end of file +export default connect(mapStateToProps, mapDispatchToProps)(ImportFromFileComponent) diff --git a/src/reducers/session.ts b/src/reducers/session.ts index 1e4b9fa2f8..8cf7ca523f 100644 --- a/src/reducers/session.ts +++ b/src/reducers/session.ts @@ -51,28 +51,28 @@ export const reducer: Reducer = (state = defaultSession, action: assessments: newAssessments } case UPDATE_ASSESSMENT_OVERVIEW: - const newOverviews = Object.assign([], state.assessmentOverviews); - newOverviews.push(action.payload); + const newOverviews = Object.assign([], state.assessmentOverviews) + newOverviews.push(action.payload) return { ...state, assessmentOverviews: newOverviews } case UPDATE_ASSESSMENT_OVERVIEWS: - if (state.assessmentOverviews){ - const updatedOverviews = Object.assign([], state.assessmentOverviews); - const usedIDs = new Set(); - state.assessmentOverviews.forEach((x: any) => {usedIDs.add(x.id)}); - action.payload.forEach((x: any) => {if (!usedIDs.has(x.id)) {updatedOverviews.push(x)}}) - return { - ...state, - assessmentOverviews: updatedOverviews - } - } else{ - return { - ...state, - assessmentOverviews: action.payload - } + // if (state.assessmentOverviews){ + // const updatedOverviews = Object.assign([], action.payload); + // const usedIDs = new Set(); + // action.payload.forEach((x: any) => {usedIDs.add(x.id)}); + // state.assessmentOverviews.forEach((x: any) => {if (!usedIDs.has(x.id)) {updatedOverviews.push(x)}}) + // return { + // ...state, + // assessmentOverviews: updatedOverviews + // } + // } else{ + return { + ...state, + assessmentOverviews: action.payload } + // } case UPDATE_GRADING: const newGradings = new Map(state.gradings) newGradings.set(action.payload.submissionId, action.payload.grading) From 166fd75699d3e79a90742954e81249911950db6d Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Wed, 13 Feb 2019 19:38:59 +0800 Subject: [PATCH 011/111] placed xmlpharser in alt file --- .../commons/ImportFromFileComponent.tsx | 124 +----------- src/utils/xmlParser.ts | 184 ++++++++++++++++++ 2 files changed, 189 insertions(+), 119 deletions(-) create mode 100644 src/utils/xmlParser.ts diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index 71d64c11ed..b081b7078e 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -4,23 +4,15 @@ import { bindActionCreators, Dispatch } from 'redux' import { parseString } from 'xml2js' import { updateAssessment, updateAssessmentOverview } from '../../actions/session' import { - AssessmentCategories, - AssessmentStatuses, - ExternalLibraryNames, - GradingStatuses, IAssessment, IAssessmentOverview, - IMCQQuestion, - IProgrammingQuestion, - Library, - MCQChoice } from '../../components/assessment/assessmentShape' -import { externalLibraries } from '../../reducers/externalLibraries' +import { makeAssessment, makeAssessmentOverview } from '../../utils/xmlParser' // import { IDispatchProps } from '../../components/assessment' export interface IDispatchProps { - newAssessment: (overview: IAssessment) => void - newAssessmentOverview: (assessment: IAssessmentOverview) => void + newAssessment: (assessment: IAssessment) => void + newAssessmentOverview: (overview: IAssessmentOverview) => void } const mapStateToProps: MapStateToProps<{}, any, {}> = (_, ownProps) => ownProps @@ -34,112 +26,6 @@ const mapDispatchToProps: MapDispatchToProps = (dispatch: Di dispatch ) -const capitalizeFirstLetter = (str: string) => { - return str.charAt(0).toUpperCase() + str.slice(1) -} - -const makeAssessmentOverview = (task: any) => { - const rawOverview = task.$ - return { - category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, - closeAt: rawOverview.duedate, - coverImage: rawOverview.coverimage, - grade: 1, - id: 7, - maxGrade: 3000, - maxXp: 1000, - openAt: rawOverview.startdate, - title: rawOverview.title, - shortSummary: task.WEBSUMMARY ? task.WEBSUMMARY[0] : '', - status: AssessmentStatuses.not_attempted, - story: rawOverview.story, - xp: 0, - gradingStatus: 'none' as GradingStatuses - } -} - -const makeAssessment = (task: any) => { - const rawOverview = task.$ - return { - category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, - id: 7, - longSummary: task.TEXT[0], - missionPDF: 'google.com', - questions: makeQuestions(task), - title: rawOverview.title - } -} - -const mockGlobals: Array<[string, any]> = [ - ['testNumber', 3.141592653589793], - ['testString', 'who dat boi'], - ['testBooleanTrue', true], - ['testBooleanFalse', false], - ['testBooleanUndefined', undefined], - ['testBooleanNull', null], - ['testObject', { a: 1, b: 2 }], - ['testArray', [1, 2, 'a', 'b']] -] - -const mockSoundLibrary: Library = { - chapter: 1, - external: { - name: ExternalLibraryNames.SOUND, - symbols: externalLibraries.get(ExternalLibraryNames.SOUND)! - }, - globals: mockGlobals -} - -const makeQuestions = (task: any) => { - const questions: Array = [] - task.PROBLEMS[0].PROBLEM.forEach((problem: any, curId: number) => { - const question = { - comment: null, - content: problem.TEXT[0], - id: curId, - library: mockSoundLibrary, - type: problem.$.type, - grader: { - name: 'fake person', - id: 1 - }, - gradedAt: '2038-06-18T05:24:26.026Z', - xp: 0, - grade: 0, - maxGrade: problem.$.maxgrade, - maxXp: problem.$.maxxp - } - let qn: IProgrammingQuestion | IMCQQuestion - if (question.type === 'programming') { - qn = { - ...question, - answer: problem.SNIPPET[0].TEMPLATE[0], - solutionTemplate: problem.SNIPPET[0].SOLUTION[0] - } - questions.push(qn) - } - if (question.type === 'mcq') { - const choicess: MCQChoice[] = [] - let ans = 0 - problem.CHOICE.forEach((choice: any, i: number) => { - choicess.push({ - content: choice.TEXT[0], - hint: null - }) - ans = choice.$.correct === 'true' ? i : ans - }) - qn = { - ...question, - answer: problem.SNIPPET[0].SOLUTION[0], - choices: choicess, - solution: ans - } - questions.push(qn) - } - }) - return questions -} - export class ImportFromFileComponent extends React.Component { private fileReader: FileReader public constructor(props: any) { @@ -163,9 +49,9 @@ export class ImportFromFileComponent extends React.Component { const task = result.CONTENT.TASK[0] // tslint:disable-next-line:no-console console.dir(task) - const overview: IAssessmentOverview = makeAssessmentOverview(task) + const overview: IAssessmentOverview = makeAssessmentOverview(result) this.props.newAssessmentOverview(overview) - const assessment: IAssessment = makeAssessment(task) + const assessment: IAssessment = makeAssessment(result) this.props.newAssessment(assessment) }) } diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts new file mode 100644 index 0000000000..727c95efcf --- /dev/null +++ b/src/utils/xmlParser.ts @@ -0,0 +1,184 @@ +import { + AssessmentCategories, + AssessmentStatuses, + ExternalLibraryNames, + GradingStatuses, + IAssessment, + IAssessmentOverview, + IMCQQuestion, + IProgrammingQuestion, + IQuestion, + Library, + MCQChoice +} from '../components/assessment/assessmentShape' +import { externalLibraries } from '../reducers/externalLibraries' + +const capitalizeFirstLetter = (str: string) => { + return str.charAt(0).toUpperCase() + str.slice(1) +} + +export const makeAssessmentOverview = (result: any) : IAssessmentOverview => { + const task = result.CONTENT.TASK[0]; + const rawOverview = task.$; + return { + category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, + closeAt: rawOverview.duedate, + coverImage: rawOverview.coverimage, + grade: 1, + id: 7, + maxGrade: 3000, + maxXp: 1000, + openAt: rawOverview.startdate, + title: rawOverview.title, + shortSummary: task.WEBSUMMARY ? task.WEBSUMMARY[0] : '', + status: AssessmentStatuses.editing, + story: rawOverview.story, + xp: 0, + gradingStatus: 'none' as GradingStatuses + } +} + +export const makeAssessment = (result: any) : IAssessment => { + const task = result.CONTENT.TASK[0]; + const rawOverview = task.$; + return { + category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, + id: 7, + longSummary: task.TEXT[0], + missionPDF: 'google.com', + questions: makeQuestions(task), + title: rawOverview.title + } +} + +const mockGlobals: Array<[string, any]> = [ + ['testNumber', 3.141592653589793], + ['testString', 'who dat boi'], + ['testBooleanTrue', true], + ['testBooleanFalse', false], + ['testBooleanUndefined', undefined], + ['testBooleanNull', null], + ['testObject', { a: 1, b: 2 }], + ['testArray', [1, 2, 'a', 'b']] +] + +const mockSoundLibrary: Library = { + chapter: 1, + external: { + name: ExternalLibraryNames.SOUND, + symbols: externalLibraries.get(ExternalLibraryNames.SOUND)! + }, + globals: mockGlobals +} + +const makeQuestions = (task: any) : IQuestion[] => { + const questions: Array = [] + task.PROBLEMS[0].PROBLEM.forEach((problem: any, curId: number) => { + const question: IQuestion = { + answer: null, + comment: null, + content: problem.TEXT[0], + id: curId, + library: mockSoundLibrary, + type: problem.$.type, + grader: { + name: 'fake person', + id: 1 + }, + gradedAt: '2038-06-18T05:24:26.026Z', + xp: 0, + grade: 0, + maxGrade: problem.$.maxgrade, + maxXp: problem.$.maxxp + } + if (question.type === 'programming') { + questions.push(makeProgramming(problem, question)) + } + if (question.type === 'mcq') { + questions.push(makeMCQ(problem, question)); + } + }) + return questions +} + +const makeMCQ = (problem: any, question: IQuestion) : IMCQQuestion => { + const choicesVal: MCQChoice[] = [] + let solutionVal = 0 + problem.CHOICE.forEach((choice: any, i: number) => { + choicesVal.push({ + content: choice.TEXT[0], + hint: null + }) + solutionVal = choice.$.correct === 'true' ? i : solutionVal + }) + return { + ...question, + type: "mcq", + answer: problem.SNIPPET[0].SOLUTION[0], + choices: choicesVal, + solution: solutionVal + } +} + +const makeProgramming = (problem: any, question: IQuestion): IProgrammingQuestion => { + return { + ...question, + answer: problem.SNIPPET[0].TEMPLATE[0], + solutionTemplate: problem.SNIPPET[0].SOLUTION[0], + type: 'programming' + } +} + + +export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOverview): any => { + let task: any = {}; + task.$ = { + kind: overview.category.toLowerCase(), + duedate: overview.closeAt, + coverimage: overview.coverImage, + startdate: overview.openAt, + title: overview.title, + story: overview.story + }; + + task.WEBSUMMARY = [overview.shortSummary]; + task.TEXT = [assessment.longSummary]; + task.PROBLEMS = []; + + assessment.questions.forEach((question: IProgrammingQuestion | IMCQQuestion) => { + let problem = { + $: { + type: question.type, + maxgrade: question.maxGrade, + maxxp: question.maxXp + }, + SNIPPET: [ + { + SOLUTION: [question.answer], + TEMPLATE: [question.answer] + } + ], + TEXT: [question.content], + CHOICE: [] as any[], + } + + if (question.type === 'programming') { + problem.SNIPPET[0].TEMPLATE[0] = question.solutionTemplate; + } + + if (question.type === 'mcq') { + problem.SNIPPET[0].SOLUTION[0] = question.answer; + question.choices.forEach((choice: MCQChoice, i: number) => { + problem.CHOICE.push({ + $: { + correct: (question.solution === i) ? 'true' : 'false', + }, + TEXT: [choice.content], + }) + }) + } + + task.PROBLEMS.push(problem); + }); + return task; +} From 399cfdb1408157e119aca74dfb82e3d9d9ec0ba3 Mon Sep 17 00:00:00 2001 From: Open Close Date: Wed, 13 Feb 2019 21:42:40 +0800 Subject: [PATCH 012/111] update js-slang to version 0.2.0 --- package.json | 4 +--- public/externalLibs/list.js | 7 ------- src/actions/interpreter.ts | 2 +- src/components/workspace/Repl.tsx | 2 +- src/mocks/context.ts | 12 +++++------ src/reducers/states.ts | 2 +- src/sagas/index.ts | 2 +- src/utils/slangHelper.ts | 6 +++--- yarn.lock | 35 ++++++++++++++++++++++++------- 9 files changed, 42 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index c8620f0e31..9c2e67505c 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,6 @@ } }, "dependencies": { - "acorn": "^5.7.1", - "acorn-walk": "^6.1.1", "ag-grid": "^18.0.1", "ag-grid-react": "^18.0.0", "astring": "^1.3.0", @@ -38,7 +36,7 @@ "draft-js": "^0.10.5", "flexboxgrid": "^6.3.1", "flexboxgrid-helpers": "^1.1.3", - "js-slang": "file:../openorclosejsslang/dist", + "js-slang": "0.2.0", "lodash": "^4.17.10", "lz-string": "^1.4.4", "moment": "^2.22.2", diff --git a/public/externalLibs/list.js b/public/externalLibs/list.js index 73dae688f4..795e171afa 100644 --- a/public/externalLibs/list.js +++ b/public/externalLibs/list.js @@ -167,13 +167,6 @@ function for_each(fun, xs) { return true } -// list_to_string returns a string that represents the argument list. -// It applies itself recursively on the elements of the given list. -// When it encounters a non-list, it applies stringify to it. -function list_to_string(l) { - return interop_1.stringify(l) -} - // reverse reverses the argument list // reverse throws an exception if the argument is not a list. function reverse(xs) { diff --git a/src/actions/interpreter.ts b/src/actions/interpreter.ts index f5087bb634..176ae7bbf6 100644 --- a/src/actions/interpreter.ts +++ b/src/actions/interpreter.ts @@ -1,4 +1,4 @@ -import { SourceError, Value } from 'js-slang/types' +import { SourceError, Value } from 'js-slang/dist/types' import * as actionTypes from './actionTypes' import { WorkspaceLocation } from './workspaces' diff --git a/src/components/workspace/Repl.tsx b/src/components/workspace/Repl.tsx index b9a12a76f2..11c2e581c6 100644 --- a/src/components/workspace/Repl.tsx +++ b/src/components/workspace/Repl.tsx @@ -1,6 +1,6 @@ import { Card } from '@blueprintjs/core' import { parseError } from 'js-slang' -import { stringify } from 'js-slang/interop' +import { stringify } from 'js-slang/dist/interop' import * as React from 'react' import { HotKeys } from 'react-hotkeys' diff --git a/src/mocks/context.ts b/src/mocks/context.ts index 7357e3c73d..e5eaaa34a7 100644 --- a/src/mocks/context.ts +++ b/src/mocks/context.ts @@ -1,9 +1,9 @@ import { parse } from 'acorn' -import * as es from 'estree' -import { createContext } from 'js-slang' -import Closure from 'js-slang/closure' -import { Context, Frame } from 'js-slang/types' -import { TypeError } from 'js-slang/utils/rttc' +import createContext from 'js-slang/dist/createContext' +import { Context, Frame } from 'js-slang/dist/types' +import { TypeError } from 'js-slang/dist/utils/rttc' +import Closure from 'js-slang/dist/closure' +import { FunctionExpression } from 'estree' export function mockContext(chapter = 1): Context { return createContext(chapter) @@ -31,7 +31,7 @@ export function mockRuntimeContext(): Context { } export function mockClosure(): Closure { - return new Closure({} as es.FunctionExpression, {} as Frame, {} as Context) + return new Closure({} as FunctionExpression, {} as Frame, {} as Context) } export function mockTypeError(): TypeError { diff --git a/src/reducers/states.ts b/src/reducers/states.ts index a6b4ca406a..b27f6d3bfe 100644 --- a/src/reducers/states.ts +++ b/src/reducers/states.ts @@ -1,5 +1,5 @@ import { Context } from 'js-slang' -import { SourceError } from 'js-slang/types' +import { SourceError } from 'js-slang/dist/types' import { WorkspaceLocation, WorkspaceLocations } from '../actions/workspaces' import { Grading, GradingOverview } from '../components/academy/grading/gradingShape' diff --git a/src/sagas/index.ts b/src/sagas/index.ts index bdbd74d0b3..49515ed5da 100644 --- a/src/sagas/index.ts +++ b/src/sagas/index.ts @@ -1,5 +1,5 @@ import { Context, interrupt, runInContext } from 'js-slang' -import { InterruptedError } from 'js-slang/interpreter-errors' +import { InterruptedError } from 'js-slang/dist/interpreter-errors' import { compressToEncodedURIComponent } from 'lz-string' import * as qs from 'query-string' import { delay, SagaIterator } from 'redux-saga' diff --git a/src/utils/slangHelper.ts b/src/utils/slangHelper.ts index b3e3fffd5b..50d8880270 100644 --- a/src/utils/slangHelper.ts +++ b/src/utils/slangHelper.ts @@ -1,7 +1,7 @@ /* tslint:disable: ban-types*/ -import { createContext as createSlangContext } from 'js-slang' -import { stringify } from 'js-slang/interop' -import { Value } from 'js-slang/types' +import createSlangContext from 'js-slang/dist/createContext' +import { stringify } from 'js-slang/dist/interop' +import { Value } from 'js-slang/dist/types' import { handleConsoleLog } from '../actions' diff --git a/yarn.lock b/yarn.lock index 271648f3ad..476afb0b49 100644 --- a/yarn.lock +++ b/yarn.lock @@ -247,7 +247,7 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/estree@*", "@types/estree@^0.0.39": +"@types/estree@*", "@types/estree@0.0.39", "@types/estree@^0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" @@ -395,9 +395,9 @@ acorn@^5.0.0, acorn@^5.3.0: version "5.5.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" -acorn@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" +acorn@^6.0.5: + version "6.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.0.tgz#b0a3be31752c97a0f7013c5f4903b71a05db6818" address@1.0.3, address@^1.0.1: version "1.0.3" @@ -676,6 +676,10 @@ astring@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/astring/-/astring-1.3.0.tgz#7ed6ff7d317df5d4a7a06a42b5097774d8d48e01" +astring@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/astring/-/astring-1.3.1.tgz#3c9ac29c945717f361ca00964dcf6442381742d7" + async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -2103,6 +2107,10 @@ commander@2.15.x, commander@^2.12.1, commander@^2.9.0, commander@~2.15.0: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" +commander@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -2113,6 +2121,10 @@ common-tags@^1.7.2: dependencies: babel-runtime "^6.26.0" +common-tags@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -4374,7 +4386,7 @@ interpret@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2: +invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -5127,8 +5139,17 @@ js-base64@^2.1.9: version "2.4.3" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" -"js-slang@file:../openorclosejsslang/dist": - version "0.0.0" +js-slang@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/js-slang/-/js-slang-0.2.0.tgz#15b998d2e67bc2834421235f96408b4015bb322c" + dependencies: + "@types/estree" "0.0.39" + acorn "^6.0.5" + acorn-walk "^6.1.1" + astring "^1.3.1" + commander "^2.19.0" + common-tags "^1.8.0" + invariant "^2.2.4" js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" From 29e1c09aab4fe833afd0a49c9d93776edf827b8d Mon Sep 17 00:00:00 2001 From: Open Close Date: Wed, 13 Feb 2019 23:07:07 +0800 Subject: [PATCH 013/111] update acorn, fix order of imports --- package.json | 1 + src/mocks/context.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9c2e67505c..512b16b612 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ } }, "dependencies": { + "acorn": "6.1.0", "ag-grid": "^18.0.1", "ag-grid-react": "^18.0.0", "astring": "^1.3.0", diff --git a/src/mocks/context.ts b/src/mocks/context.ts index e5eaaa34a7..21cb1aabcc 100644 --- a/src/mocks/context.ts +++ b/src/mocks/context.ts @@ -1,9 +1,9 @@ import { parse } from 'acorn' +import { FunctionExpression } from 'estree' +import Closure from 'js-slang/dist/closure' import createContext from 'js-slang/dist/createContext' import { Context, Frame } from 'js-slang/dist/types' import { TypeError } from 'js-slang/dist/utils/rttc' -import Closure from 'js-slang/dist/closure' -import { FunctionExpression } from 'estree' export function mockContext(chapter = 1): Context { return createContext(chapter) From 3858146ec4d1db4b3a2e5ce8f789c9d567b92c30 Mon Sep 17 00:00:00 2001 From: Open Close Date: Wed, 13 Feb 2019 23:49:01 +0800 Subject: [PATCH 014/111] update readme --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b748305f65..e12856737f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,3 @@ -# TESTING Cadet Frontend, 1920 js-slang - -1. Follow the instructions on js-slang to transpile your own copy -2. Edit line 41 of package.json to link to the dist directory of your js-slang: - -`"js-slang": "file:../openorclosejsslang/dist",` - -note that this will copy the files over, and any changes after that will not be reflected. - - -## Original Readme below - [![Build Status](https://travis-ci.org/source-academy/cadet-frontend.svg?branch=master)](https://travis-ci.org/source-academy/cadet-frontend) [![Coverage Status](https://coveralls.io/repos/github/source-academy/cadet-frontend/badge.svg?branch=travis)](https://coveralls.io/github/source-academy/cadet-frontend?branch=travis) @@ -31,6 +19,17 @@ In package.json, change line 19: to: "start-js": "set PORT=80 & react-scripts-ts start", +## For Testing of js-slang + +1. Follow the instructions on js-slang to transpile your own copy +2. Edit line 41 of package.json in this project to link to the directory of your js-slang and then run `yarn`: + +`"js-slang": "file:path/to/js-slang",` + +Note that this copies your files over, any future changes will not be reflected. + +You may try [this](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af) for a smoother experience. + ## Application Structure 1. `actions` contains action creators, one file per reducer, combined in index. From 0f2f2d24a02225e9454625b9c50c109618debb5b Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Thu, 14 Feb 2019 16:10:59 +0800 Subject: [PATCH 015/111] created editing folder copy of assessment, may be merged later --- src/utils/xmlParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 727c95efcf..95a7000cae 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -131,7 +131,7 @@ const makeProgramming = (problem: any, question: IQuestion): IProgrammingQuestio export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOverview): any => { - let task: any = {}; + const task: any = {}; task.$ = { kind: overview.category.toLowerCase(), duedate: overview.closeAt, @@ -146,7 +146,7 @@ export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOv task.PROBLEMS = []; assessment.questions.forEach((question: IProgrammingQuestion | IMCQQuestion) => { - let problem = { + const problem = { $: { type: question.type, maxgrade: question.maxGrade, From 7208138a453879c8284f640b52c88beba8f271f3 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Thu, 14 Feb 2019 23:12:36 +0800 Subject: [PATCH 016/111] added interface --- src/utils/xmlParseStrShapes.ts | 53 +++++++++++++++++++++++++++ src/utils/xmlParser.ts | 66 ++++++++++++++++++++-------------- 2 files changed, 92 insertions(+), 27 deletions(-) create mode 100644 src/utils/xmlParseStrShapes.ts diff --git a/src/utils/xmlParseStrShapes.ts b/src/utils/xmlParseStrShapes.ts new file mode 100644 index 0000000000..1bdb845b62 --- /dev/null +++ b/src/utils/xmlParseStrShapes.ts @@ -0,0 +1,53 @@ +import { + IQuestion +} from '../components/assessment/assessmentShape' + +export interface IXmlParseStrTask { + $: IXmlParseStrOverview, + TEXT: string[], + WEBSUMMARY?: string[], + PROBLEMS: Array<{PROBLEM: IXmlParseStrProblem[]}>, + READING: string[], + DEPLOYMENT: any, +} + +export interface IXmlParseStrOverview { + coverimage: string, + duedate: string, + kind: string, + title: string, + startdate: string, + story: string | null +} + +export interface IXmlParseStrProblem { + $: { + type: IQuestion["type"], + maxgrade: number, + maxxp: number + }, + TEXT: string[] +} + +export interface IXmlParseStrPProblem extends IXmlParseStrProblem { + SNIPPET: Array<{ + TEMPLATE: string[], + SOLUTION: Array, + GRADER: string[] + }>, + TEXT: string[] +} + +export interface IXmlParseStrCProblem extends IXmlParseStrProblem { + CHOICE: IXmlParseStrProblemChoice[], + SNIPPET: { + SOLUTION: string[] + }, +} + +export interface IXmlParseStrProblemChoice { + $: { + correct: string + }, + TEXT: string[] +} \ No newline at end of file diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 95a7000cae..5b70ff4664 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -1,7 +1,6 @@ import { AssessmentCategories, AssessmentStatuses, - ExternalLibraryNames, GradingStatuses, IAssessment, IAssessmentOverview, @@ -11,15 +10,24 @@ import { Library, MCQChoice } from '../components/assessment/assessmentShape' -import { externalLibraries } from '../reducers/externalLibraries' +import { + IXmlParseStrCProblem, + IXmlParseStrOverview, + IXmlParseStrPProblem, + IXmlParseStrProblem, + IXmlParseStrProblemChoice, + IXmlParseStrTask +} from '../utils/xmlParseStrShapes'; + + const capitalizeFirstLetter = (str: string) => { return str.charAt(0).toUpperCase() + str.slice(1) } export const makeAssessmentOverview = (result: any) : IAssessmentOverview => { - const task = result.CONTENT.TASK[0]; - const rawOverview = task.$; + const task : IXmlParseStrTask = result.CONTENT.TASK[0]; + const rawOverview : IXmlParseStrOverview = task.$; return { category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, closeAt: rawOverview.duedate, @@ -31,7 +39,7 @@ export const makeAssessmentOverview = (result: any) : IAssessmentOverview => { openAt: rawOverview.startdate, title: rawOverview.title, shortSummary: task.WEBSUMMARY ? task.WEBSUMMARY[0] : '', - status: AssessmentStatuses.editing, + status: AssessmentStatuses.attempting, story: rawOverview.story, xp: 0, gradingStatus: 'none' as GradingStatuses @@ -39,8 +47,8 @@ export const makeAssessmentOverview = (result: any) : IAssessmentOverview => { } export const makeAssessment = (result: any) : IAssessment => { - const task = result.CONTENT.TASK[0]; - const rawOverview = task.$; + const task : IXmlParseStrTask = result.CONTENT.TASK[0]; + const rawOverview : IXmlParseStrOverview = task.$; return { category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, id: 7, @@ -62,24 +70,27 @@ const mockGlobals: Array<[string, any]> = [ ['testArray', [1, 2, 'a', 'b']] ] -const mockSoundLibrary: Library = { - chapter: 1, - external: { - name: ExternalLibraryNames.SOUND, - symbols: externalLibraries.get(ExternalLibraryNames.SOUND)! - }, - globals: mockGlobals +const makeLibrary = (task: IXmlParseStrTask) : Library => { + const symbolsVal : string[] = ["hi"]; + return { + chapter: task.DEPLOYMENT.$.interpreter, + external: { + name: task.DEPLOYMENT[0].EXTERNAL.$.name, + symbols: symbolsVal + }, + globals: mockGlobals + } } -const makeQuestions = (task: any) : IQuestion[] => { +const makeQuestions = (task: IXmlParseStrTask) : IQuestion[] => { const questions: Array = [] - task.PROBLEMS[0].PROBLEM.forEach((problem: any, curId: number) => { + task.PROBLEMS[0].PROBLEM.forEach((problem: IXmlParseStrProblem, curId: number) => { const question: IQuestion = { answer: null, comment: null, content: problem.TEXT[0], id: curId, - library: mockSoundLibrary, + library: makeLibrary(task), type: problem.$.type, grader: { name: 'fake person', @@ -92,19 +103,19 @@ const makeQuestions = (task: any) : IQuestion[] => { maxXp: problem.$.maxxp } if (question.type === 'programming') { - questions.push(makeProgramming(problem, question)) + questions.push(makeProgramming(problem as IXmlParseStrPProblem, question)) } if (question.type === 'mcq') { - questions.push(makeMCQ(problem, question)); + questions.push(makeMCQ(problem as IXmlParseStrCProblem, question)); } }) return questions } -const makeMCQ = (problem: any, question: IQuestion) : IMCQQuestion => { +const makeMCQ = (problem: IXmlParseStrCProblem, question: IQuestion) : IMCQQuestion => { const choicesVal: MCQChoice[] = [] let solutionVal = 0 - problem.CHOICE.forEach((choice: any, i: number) => { + problem.CHOICE.forEach((choice: IXmlParseStrProblemChoice, i: number) => { choicesVal.push({ content: choice.TEXT[0], hint: null @@ -114,25 +125,25 @@ const makeMCQ = (problem: any, question: IQuestion) : IMCQQuestion => { return { ...question, type: "mcq", - answer: problem.SNIPPET[0].SOLUTION[0], + answer: problem.SNIPPET[0].SOLUTION[0] as number, choices: choicesVal, solution: solutionVal } } -const makeProgramming = (problem: any, question: IQuestion): IProgrammingQuestion => { +const makeProgramming = (problem: IXmlParseStrPProblem, question: IQuestion): IProgrammingQuestion => { return { ...question, - answer: problem.SNIPPET[0].TEMPLATE[0], - solutionTemplate: problem.SNIPPET[0].SOLUTION[0], + answer: problem.SNIPPET[0].TEMPLATE[0] as string, + solutionTemplate: problem.SNIPPET[0].SOLUTION[0] as string, type: 'programming' } } -export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOverview): any => { +export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOverview): IXmlParseStrTask => { const task: any = {}; - task.$ = { + const rawOverview : IXmlParseStrOverview = { kind: overview.category.toLowerCase(), duedate: overview.closeAt, coverimage: overview.coverImage, @@ -140,6 +151,7 @@ export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOv title: overview.title, story: overview.story }; + task.$ = rawOverview; task.WEBSUMMARY = [overview.shortSummary]; task.TEXT = [assessment.longSummary]; From 94e639c38e4792c917cb42c4359b951693aadfc9 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Fri, 15 Feb 2019 12:51:23 +0800 Subject: [PATCH 017/111] library parsing --- package.json | 6 +- src/utils/xmlParseStrShapes.ts | 24 ++- src/utils/xmlParser.ts | 23 +-- yarn.lock | 262 ++++++++++++++++++++++++++------- 4 files changed, 243 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 699451ed0c..743996eeb5 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ } }, "dependencies": { + "@types/xml2js": "^0.4.3", "acorn": "6.1.0", "ag-grid": "^18.0.1", "ag-grid-react": "^18.0.0", @@ -65,7 +66,8 @@ "redux-saga": "^0.15.6", "showdown": "^1.8.7", "typesafe-actions": "^3.0.0", - "utility-types": "^2.0.0" + "utility-types": "^2.0.0", + "xml2js": "^0.4.19" }, "devDependencies": { "@blueprintjs/core": "^2.1.1", @@ -76,7 +78,7 @@ "@types/common-tags": "^1.4.0", "@types/dotenv": "^4.0.3", "@types/draft-js": "^0.10.23", - "@types/enzyme": "^3.1.17", + "@types/enzyme": "3.1.3", "@types/enzyme-adapter-react-16": "^1.0.2", "@types/estree": "^0.0.39", "@types/invariant": "^2.2.29", diff --git a/src/utils/xmlParseStrShapes.ts b/src/utils/xmlParseStrShapes.ts index 1bdb845b62..61ffa7ec15 100644 --- a/src/utils/xmlParseStrShapes.ts +++ b/src/utils/xmlParseStrShapes.ts @@ -1,14 +1,32 @@ import { + ExternalLibraryNames, IQuestion } from '../components/assessment/assessmentShape' export interface IXmlParseStrTask { $: IXmlParseStrOverview, - TEXT: string[], - WEBSUMMARY?: string[], + DEPLOYMENT: IXmlParseStrDeployment[], + GLOBAL: Array<{ + IDENTIFIER: string[], + VALUE: string[] + }>, + GRADERDEPLOYMENT: IXmlParseStrDeployment[], PROBLEMS: Array<{PROBLEM: IXmlParseStrProblem[]}>, READING: string[], - DEPLOYMENT: any, + TEXT: string[], + WEBSUMMARY?: string[], +} + +export interface IXmlParseStrDeployment{ + $: { + interpreter: string, + }, + EXTERNAL: Array<{ + $: { + name: ExternalLibraryNames, + }, + SYMBOL: string[], + }> } export interface IXmlParseStrOverview { diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 5b70ff4664..2ada7ba509 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -20,7 +20,6 @@ import { } from '../utils/xmlParseStrShapes'; - const capitalizeFirstLetter = (str: string) => { return str.charAt(0).toUpperCase() + str.slice(1) } @@ -59,26 +58,20 @@ export const makeAssessment = (result: any) : IAssessment => { } } -const mockGlobals: Array<[string, any]> = [ - ['testNumber', 3.141592653589793], - ['testString', 'who dat boi'], - ['testBooleanTrue', true], - ['testBooleanFalse', false], - ['testBooleanUndefined', undefined], - ['testBooleanNull', null], - ['testObject', { a: 1, b: 2 }], - ['testArray', [1, 2, 'a', 'b']] -] +const altEval = (str: string) : any => { + return Function('"use strict";return (' + str + ')')(); +} const makeLibrary = (task: IXmlParseStrTask) : Library => { - const symbolsVal : string[] = ["hi"]; + const symbolsVal : string[] = task.DEPLOYMENT[0].EXTERNAL[0].SYMBOL || []; + const globalsVal = task.GLOBAL.map((x) => [x.IDENTIFIER[0], altEval(x.VALUE[0])]) as Array<[string, any]>; return { - chapter: task.DEPLOYMENT.$.interpreter, + chapter: parseInt(task.DEPLOYMENT[0].$.interpreter, 10), external: { - name: task.DEPLOYMENT[0].EXTERNAL.$.name, + name: task.DEPLOYMENT[0].EXTERNAL[0].$.name, symbols: symbolsVal }, - globals: mockGlobals + globals: globalsVal, } } diff --git a/yarn.lock b/yarn.lock index 2a55c49de9..6461294df0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -246,9 +246,10 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/enzyme@^3.1.17": - version "3.1.18" - resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.18.tgz#4b984b9a3eb9fd025c4d77e0f53d3301c3c31ef9" +"@types/enzyme@3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.3.tgz#e10f3675c28e555cf968e41538b6632a4dede8ae" + integrity sha512-a33HnyJxh7C2KvKl0dc2oeVKnvIWOOHOU7NrBjUs/QmO17uF+Lqo1UuFE1u30UjcZFCRsc/XJJXc6ecRyu6NCQ== dependencies: "@types/cheerio" "*" "@types/react" "*" @@ -257,6 +258,11 @@ version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + "@types/history@*": version "4.6.2" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.2.tgz#12cfaba693ba20f114ed5765467ff25fdf67ddb0" @@ -355,6 +361,14 @@ version "1.7.5" resolved "https://registry.yarnpkg.com/@types/showdown/-/showdown-1.7.5.tgz#91061f2f16d5bdf66b186185999ed675a8908b6a" +"@types/xml2js@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@types/xml2js/-/xml2js-0.4.3.tgz#2f41bfc74d5a4022511721f872ed395a210ad3b7" + integrity sha512-Pv2HGRE4gWLs31In7nsyXEH4uVVsd0HNV9i2dyASvtDIlOtSTr1eczPLDpdEuyv5LWH5LT20GIXwPjkshKWI1g== + dependencies: + "@types/events" "*" + "@types/node" "*" + JSONStream@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.3.tgz#27b4b8fbbfeab4e71bcf551e7f27be8d952239bf" @@ -645,6 +659,15 @@ array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" +array.prototype.flat@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.1.tgz#812db8f02cad24d3fab65dd67eabe3b8903494a4" + integrity sha512-rVqIs330nLJvfC7JqYvEWwqVr5QjYF1ib02i3YJtR/fICO6527Tjpc/e4Mvmxh3GIePPreRXMdaGyC99YphWEw== + dependencies: + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -1884,6 +1907,7 @@ chardet@^0.4.0: cheerio@^1.0.0-rc.2: version "1.0.0-rc.2" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" + integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= dependencies: css-select "~1.2.0" dom-serializer "~0.1.0" @@ -2115,10 +2139,6 @@ colormin@^1.0.5: css-color-names "0.0.4" has "^1.0.1" -colors@0.5.x: - version "0.5.1" - resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" - colors@^1.1.2: version "1.3.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.0.tgz#5f20c9fef6945cb1134260aab33bfbdc8295e04e" @@ -2641,6 +2661,13 @@ define-properties@^1.1.2: foreach "^2.0.5" object-keys "^1.0.8" +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -2769,6 +2796,7 @@ diffie-hellman@^5.0.0: discontinuous-range@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" + integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= dns-equal@^1.0.0: version "1.0.0" @@ -2797,13 +2825,21 @@ dom-helpers@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6" -dom-serializer@0, dom-serializer@~0.1.0: +dom-serializer@0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" dependencies: domelementtype "~1.1.1" entities "~1.1.1" +dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + dom-urls@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/dom-urls/-/dom-urls-1.1.0.tgz#001ddf81628cd1e706125c7176f53ccec55d918e" @@ -2818,10 +2854,15 @@ domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" -domelementtype@1, domelementtype@^1.3.0: +domelementtype@1: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" +domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" @@ -2839,8 +2880,9 @@ domhandler@2.1: domelementtype "1" domhandler@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== dependencies: domelementtype "1" @@ -2860,6 +2902,7 @@ domutils@1.5.1: domutils@^1.5.1: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== dependencies: dom-serializer "0" domelementtype "1" @@ -2970,7 +3013,12 @@ enhanced-resolve@^3.0.0, enhanced-resolve@^3.4.0: object-assign "^4.0.1" tapable "^0.2.7" -entities@^1.1.1, entities@~1.1.1: +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" @@ -2995,25 +3043,29 @@ enzyme-adapter-utils@^1.3.0: prop-types "^15.6.0" enzyme@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.3.0.tgz#0971abd167f2d4bf3f5bd508229e1c4b6dc50479" + version "3.8.0" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.8.0.tgz#646d2d5d0798cb98fdec39afcee8a53237b47ad5" + integrity sha512-bfsWo5nHyZm1O1vnIsbwdfhU989jk+squU9NKvB+Puwo5j6/Wg9pN5CO0YJelm98Dao3NPjkDZk+vvgwpMwYxw== dependencies: + array.prototype.flat "^1.2.1" cheerio "^1.0.0-rc.2" - function.prototype.name "^1.0.3" - has "^1.0.1" + function.prototype.name "^1.1.0" + has "^1.0.3" is-boolean-object "^1.0.0" - is-callable "^1.1.3" + is-callable "^1.1.4" is-number-object "^1.0.3" is-string "^1.0.4" is-subset "^0.1.1" - lodash "^4.17.4" - object-inspect "^1.5.0" + lodash.escape "^4.0.1" + lodash.isequal "^4.5.0" + object-inspect "^1.6.0" object-is "^1.0.1" object.assign "^4.1.0" object.entries "^1.0.4" object.values "^1.0.4" raf "^3.4.0" rst-selector-parser "^2.2.3" + string.prototype.trim "^1.1.2" err-code@^1.0.0: version "1.1.2" @@ -3031,6 +3083,18 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.10.0, es-abstract@^1.12.0, es-abstract@^1.5.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== + dependencies: + es-to-primitive "^1.2.0" + function-bind "^1.1.1" + has "^1.0.3" + is-callable "^1.1.4" + is-regex "^1.0.4" + object-keys "^1.0.12" + es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: version "1.11.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" @@ -3049,6 +3113,15 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.42" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.42.tgz#8c07dd33af04d5dcd1310b5cef13bea63a89ba8d" @@ -3736,9 +3809,10 @@ function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" -function.prototype.name@^1.0.3: +function.prototype.name@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.0.tgz#8bd763cc0af860a859cc5d49384d74b932cd2327" + integrity sha512-Bs0VRrTz4ghD8pTmbJQD1mZ8A/mN0ur/jGz+A6FBxPDUPkm1tNfF6bhTYPA7i7aF4lZJVr+OXTNNrnnIl58Wfg== dependencies: define-properties "^1.1.2" function-bind "^1.1.1" @@ -4038,6 +4112,13 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + hash-base@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" @@ -4184,15 +4265,16 @@ html-webpack-plugin@2.29.0: toposort "^1.0.0" htmlparser2@^3.9.1: - version "3.9.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== dependencies: - domelementtype "^1.3.0" + domelementtype "^1.3.1" domhandler "^2.3.0" domutils "^1.5.1" entities "^1.1.1" inherits "^2.0.1" - readable-stream "^2.0.2" + readable-stream "^3.1.1" htmlparser2@~3.3.0: version "3.3.0" @@ -4507,6 +4589,7 @@ is-binary-path@^1.0.0: is-boolean-object@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.0.tgz#98f8b28030684219a95f375cfbd88ce3405dff93" + integrity sha1-mPiygDBoQhmpXzdc+9iM40Bd/5M= is-buffer@^1.1.5: version "1.1.6" @@ -4522,6 +4605,11 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== + is-ci@^1.0.10, is-ci@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" @@ -4650,6 +4738,7 @@ is-npm@^1.0.0: is-number-object@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.3.tgz#f265ab89a9f445034ef6aff15a8f00b00f551799" + integrity sha1-8mWrian0RQNO9q/xWo8AsA9VF5k= is-number@^2.1.0: version "2.1.0" @@ -4740,10 +4829,12 @@ is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: is-string@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.4.tgz#cc3a9b69857d621e963725a24caeec873b826e64" + integrity sha1-zDqbaYV9Yh6WNyWiTK7shzuCbmQ= is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= is-svg@^2.0.0: version "2.1.0" @@ -4755,6 +4846,13 @@ is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + dependencies: + has-symbols "^1.0.0" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -5567,9 +5665,15 @@ lodash.endswith@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" +lodash.escape@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" + integrity sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg= + lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= lodash.get@^4.4.2: version "4.4.2" @@ -5640,7 +5744,7 @@ lodash.without@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" -"lodash@>=3.5 <5", lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0: +"lodash@>=3.5 <5", lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" @@ -5652,7 +5756,7 @@ lodash@^4.0.0, lodash@~4.17.4: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@^4.17.11: +lodash@^4.15.0, lodash@^4.17.11: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -6032,6 +6136,11 @@ moment@^2.22.2: version "2.22.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" +moo@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/moo/-/moo-0.4.3.tgz#3f847a26f31cf625a956a87f2b10fbc013bfd10e" + integrity sha512-gFD2xGCl8YFgGHsqJ9NKRVdwlioeW3mI1iqfLNYQOv0+6JRwG58Zk9DIGQgyIaffSYaO1xsKnMaYzzNr1KyIAw== + mousetrap@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.1.tgz#2a085f5c751294c75e7e81f6ec2545b29cbf42d9" @@ -6100,10 +6209,12 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" nearley@^2.7.10: - version "2.13.0" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.13.0.tgz#6e7b0f4e68bfc3e74c99eaef2eda39e513143439" + version "2.16.0" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.16.0.tgz#77c297d041941d268290ec84b739d0ee297e83a7" + integrity sha512-Tr9XD3Vt/EujXbZBv6UAHYoLUSMQAxSsTnm9K3koXzjzNWY195NqALeyrzLZBKzAkL3gl92BcSogqrHjD8QuUg== dependencies: - nomnom "~1.6.2" + commander "^2.19.0" + moo "^0.4.3" railroad-diagrams "^1.0.0" randexp "0.4.6" semver "^5.4.1" @@ -6300,13 +6411,6 @@ node-sass@^4.9.3: stdout-stream "^1.4.0" "true-case-path" "^1.0.2" -nomnom@~1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" - dependencies: - colors "0.5.x" - underscore "~1.4.4" - "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -6660,18 +6764,25 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.5.0.tgz#9d876c11e40f485c79215670281b767488f9bfe3" +object-inspect@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" + integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== object-is@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" + integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY= object-keys@^1.0.11, object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" +object-keys@^1.0.12: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.0.tgz#11bd22348dd2e096a045ab06f6c85bcc340fa032" + integrity sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg== + object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -6681,6 +6792,7 @@ object-visit@^1.0.0: object.assign@^4.0.4, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== dependencies: define-properties "^1.1.2" function-bind "^1.1.1" @@ -6688,13 +6800,14 @@ object.assign@^4.0.4, object.assign@^4.1.0: object-keys "^1.0.11" object.entries@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" + integrity sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" object.getownpropertydescriptors@^2.0.3: version "2.0.3" @@ -6952,6 +7065,7 @@ parse5@4.0.0: parse5@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== dependencies: "@types/node" "*" @@ -7668,19 +7782,28 @@ qw@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" -raf@3.4.0, raf@^3.4.0: +raf@3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" dependencies: performance-now "^2.1.0" +raf@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== + dependencies: + performance-now "^2.1.0" + railroad-diagrams@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" + integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234= randexp@0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" + integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== dependencies: discontinuous-range "1.0.0" ret "~0.1.10" @@ -8073,6 +8196,15 @@ readable-stream@1.0: isarray "0.0.1" string_decoder "~0.10.x" +readable-stream@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.1.1.tgz#ed6bbc6c5ba58b090039ff18ce670515795aeb06" + integrity sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readable-stream@~1.1.10: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -8499,6 +8631,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: rst-selector-parser@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" + integrity sha1-gbIw6i/MYGbInjRy3nlChdmwPZE= dependencies: lodash.flattendeep "^4.4.0" nearley "^2.7.10" @@ -8570,7 +8703,7 @@ sass-graph@^2.1.1, sass-graph@^2.2.4: scss-tokenizer "^0.2.3" yargs "^7.0.0" -sax@^1.2.4, sax@~1.2.1: +sax@>=0.6.0, sax@^1.2.4, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -9124,12 +9257,28 @@ string.prototype.padend@^3.0.0: es-abstract "^1.4.3" function-bind "^1.0.2" +string.prototype.trim@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" + integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo= + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.0" + function-bind "^1.0.2" + string_decoder@^1.0.0, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: safe-buffer "~5.1.0" +string_decoder@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + dependencies: + safe-buffer "~5.1.0" + string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -9626,10 +9775,6 @@ umask@^1.1.0, umask@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" -underscore@~1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -9778,7 +9923,7 @@ use@^3.1.0: dependencies: kind-of "^6.0.2" -util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -10127,6 +10272,19 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" +xml2js@^0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" + integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== + dependencies: + sax ">=0.6.0" + xmlbuilder "~9.0.1" + +xmlbuilder@~9.0.1: + version "9.0.7" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= + xtend@^4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From dfaf29af56872ea37b480525be6bfb68bc079129 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Fri, 15 Feb 2019 22:21:50 +0800 Subject: [PATCH 018/111] Local storage Missions are now loaded in local storage --- src/actions/actionTypes.ts | 1 - src/actions/session.ts | 5 ---- src/components/academy/index.tsx | 2 +- src/components/assessment/index.tsx | 29 +++++++++++++++++-- .../commons/ImportFromFileComponent.tsx | 16 ++++++---- src/reducers/session.ts | 19 ------------ src/utils/xmlParser.ts | 22 ++++++++++---- 7 files changed, 55 insertions(+), 39 deletions(-) diff --git a/src/actions/actionTypes.ts b/src/actions/actionTypes.ts index ff10256846..6e58cd64e3 100644 --- a/src/actions/actionTypes.ts +++ b/src/actions/actionTypes.ts @@ -59,7 +59,6 @@ export const SUBMIT_ANSWER = 'SUBMIT_ANSWER' export const SUBMIT_ASSESSMENT = 'SUBMIT_ASSESSMENT' export const SUBMIT_GRADING = 'SUBMIT_GRADING' export const UPDATE_HISTORY_HELPERS = 'UPDATE_HISTORY_HELPERS' -export const UPDATE_ASSESSMENT_OVERVIEW = 'UPDATE_ASSESSMENT_OVERVIEW' export const UPDATE_ASSESSMENT_OVERVIEWS = 'UPDATE_ASSESSMENT_OVERVIEWS' export const UPDATE_ASSESSMENT = 'UPDATE_ASSESSMENT' export const UPDATE_GRADING_OVERVIEWS = 'UPDATE_GRADING_OVERVIEWS' diff --git a/src/actions/session.ts b/src/actions/session.ts index 5d36d84219..bacd76adc3 100644 --- a/src/actions/session.ts +++ b/src/actions/session.ts @@ -99,11 +99,6 @@ export const updateHistoryHelpers: ActionCreator = (loc: st payload: loc }) -export const updateAssessmentOverview = (overview: IAssessmentOverview) => ({ - type: actionTypes.UPDATE_ASSESSMENT_OVERVIEW, - payload: overview -}) - export const updateAssessmentOverviews = (overviews: IAssessmentOverview[]) => ({ type: actionTypes.UPDATE_ASSESSMENT_OVERVIEWS, payload: overviews diff --git a/src/components/academy/index.tsx b/src/components/academy/index.tsx index 6ec690e380..2389dd1079 100644 --- a/src/components/academy/index.tsx +++ b/src/components/academy/index.tsx @@ -26,7 +26,7 @@ const assessmentRenderFactory = (cat: AssessmentCategory) => ( routerProps: RouteComponentProps ) => -const assessmentRegExp = ':assessmentId(\\d+)?/:questionId(\\d+)?' +const assessmentRegExp = ':assessmentId(-?\\d+)?/:questionId(\\d+)?' const gradingRegExp = ':submissionId(\\d+)?/:questionId(\\d+)?' export const Academy: React.SFC = props => ( diff --git a/src/components/assessment/index.tsx b/src/components/assessment/index.tsx index c260842f71..c640ec6374 100644 --- a/src/components/assessment/index.tsx +++ b/src/components/assessment/index.tsx @@ -87,7 +87,20 @@ class Assessment extends React.Component { public render() { const assessmentId: number | null = stringParamToInt(this.props.match.params.assessmentId) const questionId: number = - stringParamToInt(this.props.match.params.questionId) || DEFAULT_QUESTION_ID + stringParamToInt(this.props.match.params.questionId) || DEFAULT_QUESTION_ID; + + // If mission for testing is to render, create workspace + const editingOverview = localStorage.getItem("MissionEditingOverviewSA"); + if (assessmentId === -1 && editingOverview) { + const overview = JSON.parse(editingOverview) + const assessmentProps: AssessmentProps = { + assessmentId, + questionId, + notAttempted: overview.status === AssessmentStatuses.not_attempted, + closeDate: overview.closeAt + } + return + } // If there is an assessment to render, create a workspace. The assessment // overviews must still be loaded for this, to send the due date. @@ -136,6 +149,17 @@ class Assessment extends React.Component { makeOverviewCard(overview, index, this.setBetchaAssessment, true, true) ) + /** Mission editing card, stored in local storage and have index of -1. */ + const missionEditingCard = editingOverview ? + makeOverviewCard( + JSON.parse(editingOverview), + -1, + this.setBetchaAssessment, + true, + false + ) : + null; + /** Render cards */ const upcomingCardsCollapsible = upcomingCards.length > 0 ? ( @@ -168,10 +192,11 @@ class Assessment extends React.Component { ) : null display = ( <> + + {missionEditingCard} {upcomingCardsCollapsible} {openedCardsCollapsible} {closedCardsCollapsible} - ) } diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index b081b7078e..035590e54f 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -2,17 +2,15 @@ import * as React from 'react' import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux' import { bindActionCreators, Dispatch } from 'redux' import { parseString } from 'xml2js' -import { updateAssessment, updateAssessmentOverview } from '../../actions/session' +import { updateAssessment } from '../../actions/session' import { IAssessment, IAssessmentOverview, } from '../../components/assessment/assessmentShape' import { makeAssessment, makeAssessmentOverview } from '../../utils/xmlParser' -// import { IDispatchProps } from '../../components/assessment' export interface IDispatchProps { newAssessment: (assessment: IAssessment) => void - newAssessmentOverview: (overview: IAssessmentOverview) => void } const mapStateToProps: MapStateToProps<{}, any, {}> = (_, ownProps) => ownProps @@ -21,7 +19,6 @@ const mapDispatchToProps: MapDispatchToProps = (dispatch: Di bindActionCreators( { newAssessment: updateAssessment, - newAssessmentOverview: updateAssessmentOverview }, dispatch ) @@ -34,6 +31,13 @@ export class ImportFromFileComponent extends React.Component { this.handleChangeFile = this.handleChangeFile.bind(this) } + public componentDidMount(){ + const assessment = localStorage.getItem("MissionEditingAssessmentSA"); + if (assessment) { + this.props.newAssessment(JSON.parse(assessment)); + } + } + public render() { return (
@@ -50,8 +54,10 @@ export class ImportFromFileComponent extends React.Component { // tslint:disable-next-line:no-console console.dir(task) const overview: IAssessmentOverview = makeAssessmentOverview(result) - this.props.newAssessmentOverview(overview) + localStorage.setItem("MissionEditingOverviewSA", JSON.stringify(overview)); + const assessment: IAssessment = makeAssessment(result) + localStorage.setItem("MissionEditingAssessmentSA", JSON.stringify(assessment)); this.props.newAssessment(assessment) }) } diff --git a/src/reducers/session.ts b/src/reducers/session.ts index 8cf7ca523f..7e84d6995d 100644 --- a/src/reducers/session.ts +++ b/src/reducers/session.ts @@ -6,7 +6,6 @@ import { SET_TOKENS, SET_USER, UPDATE_ASSESSMENT, - UPDATE_ASSESSMENT_OVERVIEW, UPDATE_ASSESSMENT_OVERVIEWS, UPDATE_GRADING, UPDATE_GRADING_OVERVIEWS, @@ -50,29 +49,11 @@ export const reducer: Reducer = (state = defaultSession, action: ...state, assessments: newAssessments } - case UPDATE_ASSESSMENT_OVERVIEW: - const newOverviews = Object.assign([], state.assessmentOverviews) - newOverviews.push(action.payload) - return { - ...state, - assessmentOverviews: newOverviews - } case UPDATE_ASSESSMENT_OVERVIEWS: - // if (state.assessmentOverviews){ - // const updatedOverviews = Object.assign([], action.payload); - // const usedIDs = new Set(); - // action.payload.forEach((x: any) => {usedIDs.add(x.id)}); - // state.assessmentOverviews.forEach((x: any) => {if (!usedIDs.has(x.id)) {updatedOverviews.push(x)}}) - // return { - // ...state, - // assessmentOverviews: updatedOverviews - // } - // } else{ return { ...state, assessmentOverviews: action.payload } - // } case UPDATE_GRADING: const newGradings = new Map(state.gradings) newGradings.set(action.payload.submissionId, action.payload.grading) diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 2ada7ba509..4b28a98efc 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -19,6 +19,7 @@ import { IXmlParseStrTask } from '../utils/xmlParseStrShapes'; +const editingId = -1; const capitalizeFirstLetter = (str: string) => { return str.charAt(0).toUpperCase() + str.slice(1) @@ -32,7 +33,7 @@ export const makeAssessmentOverview = (result: any) : IAssessmentOverview => { closeAt: rawOverview.duedate, coverImage: rawOverview.coverimage, grade: 1, - id: 7, + id: editingId, maxGrade: 3000, maxXp: 1000, openAt: rawOverview.startdate, @@ -50,7 +51,7 @@ export const makeAssessment = (result: any) : IAssessment => { const rawOverview : IXmlParseStrOverview = task.$; return { category: capitalizeFirstLetter(rawOverview.kind) as AssessmentCategories, - id: 7, + id: editingId, longSummary: task.TEXT[0], missionPDF: 'google.com', questions: makeQuestions(task), @@ -63,12 +64,20 @@ const altEval = (str: string) : any => { } const makeLibrary = (task: IXmlParseStrTask) : Library => { - const symbolsVal : string[] = task.DEPLOYMENT[0].EXTERNAL[0].SYMBOL || []; - const globalsVal = task.GLOBAL.map((x) => [x.IDENTIFIER[0], altEval(x.VALUE[0])]) as Array<[string, any]>; + const external = task.DEPLOYMENT[0].EXTERNAL; + const nameVal = external ? + external[0].$.name + : "NONE"; + const symbolsVal : string[] = external ? + external[0].SYMBOL + : []; + const globalsVal = task.GLOBAL ? + task.GLOBAL.map((x) => [x.IDENTIFIER[0], altEval(x.VALUE[0])]) as Array<[string, any]> + : []; return { chapter: parseInt(task.DEPLOYMENT[0].$.interpreter, 10), external: { - name: task.DEPLOYMENT[0].EXTERNAL[0].$.name, + name: nameVal, symbols: symbolsVal }, globals: globalsVal, @@ -76,6 +85,7 @@ const makeLibrary = (task: IXmlParseStrTask) : Library => { } const makeQuestions = (task: IXmlParseStrTask) : IQuestion[] => { + const libraryVal = makeLibrary(task); const questions: Array = [] task.PROBLEMS[0].PROBLEM.forEach((problem: IXmlParseStrProblem, curId: number) => { const question: IQuestion = { @@ -83,7 +93,7 @@ const makeQuestions = (task: IXmlParseStrTask) : IQuestion[] => { comment: null, content: problem.TEXT[0], id: curId, - library: makeLibrary(task), + library: libraryVal, type: problem.$.type, grader: { name: 'fake person', From a76447d65de544463fb4216589f2bc7d891d6a92 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Fri, 15 Feb 2019 22:44:20 +0800 Subject: [PATCH 019/111] packages fixed --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 743996eeb5..8cb4235d1f 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ } }, "dependencies": { - "@types/xml2js": "^0.4.3", "acorn": "6.1.0", "ag-grid": "^18.0.1", "ag-grid-react": "^18.0.0", @@ -78,7 +77,7 @@ "@types/common-tags": "^1.4.0", "@types/dotenv": "^4.0.3", "@types/draft-js": "^0.10.23", - "@types/enzyme": "3.1.3", + "@types/enzyme": "3.1.7", "@types/enzyme-adapter-react-16": "^1.0.2", "@types/estree": "^0.0.39", "@types/invariant": "^2.2.29", @@ -98,6 +97,7 @@ "@types/react-test-renderer": "^16.0.1", "@types/redux-mock-store": "^0.0.13", "@types/showdown": "^1.7.5", + "@types/xml2js": "^0.4.3", "babel-core": "6", "babel-runtime": "^6.23.0", "coveralls": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 6461294df0..8c07eebd5e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -246,10 +246,10 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/enzyme@3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.3.tgz#e10f3675c28e555cf968e41538b6632a4dede8ae" - integrity sha512-a33HnyJxh7C2KvKl0dc2oeVKnvIWOOHOU7NrBjUs/QmO17uF+Lqo1UuFE1u30UjcZFCRsc/XJJXc6ecRyu6NCQ== +"@types/enzyme@3.1.7": + version "3.1.7" + resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.7.tgz#358a28dda8df6841db665659278437d04571a094" + integrity sha512-PJJGg9XEDCqzDs/Y3w0H//3J2NIjyH2V2CV/paP9TuQYanI/qDuMd4wKBpNUfbjNK5Bh0axn+sv01sYfJslMsA== dependencies: "@types/cheerio" "*" "@types/react" "*" From f40f54713c3a163f94d85a7fd2a1c7c3e102415a Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Mon, 18 Feb 2019 13:22:35 +0800 Subject: [PATCH 020/111] export library --- src/components/assessment/assessmentShape.ts | 2 +- src/utils/xmlParseStrShapes.ts | 4 ++-- src/utils/xmlParser.ts | 19 ++++++++++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/assessment/assessmentShape.ts b/src/components/assessment/assessmentShape.ts index adce781e4b..d7e524edae 100644 --- a/src/components/assessment/assessmentShape.ts +++ b/src/components/assessment/assessmentShape.ts @@ -106,7 +106,7 @@ export enum QuestionTypes { export type QuestionType = keyof typeof QuestionTypes /** Constants for external library names */ -export enum ExternalLibraryNames { +enum ExternalLibraryNames { NONE = 'NONE', TWO_DIM_RUNES = 'TWO_DIM_RUNES', THREE_DIM_RUNES = 'THREE_DIM_RUNES', diff --git a/src/utils/xmlParseStrShapes.ts b/src/utils/xmlParseStrShapes.ts index 61ffa7ec15..2372cb1fcb 100644 --- a/src/utils/xmlParseStrShapes.ts +++ b/src/utils/xmlParseStrShapes.ts @@ -1,5 +1,5 @@ import { - ExternalLibraryNames, + ExternalLibraryName, IQuestion } from '../components/assessment/assessmentShape' @@ -23,7 +23,7 @@ export interface IXmlParseStrDeployment{ }, EXTERNAL: Array<{ $: { - name: ExternalLibraryNames, + name: ExternalLibraryName, }, SYMBOL: string[], }> diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 4b28a98efc..88212440c7 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -11,6 +11,7 @@ import { MCQChoice } from '../components/assessment/assessmentShape' import { + IXmlParseStrDeployment, IXmlParseStrCProblem, IXmlParseStrOverview, IXmlParseStrPProblem, @@ -67,7 +68,7 @@ const makeLibrary = (task: IXmlParseStrTask) : Library => { const external = task.DEPLOYMENT[0].EXTERNAL; const nameVal = external ? external[0].$.name - : "NONE"; + : 'NONE'; const symbolsVal : string[] = external ? external[0].SYMBOL : []; @@ -160,6 +161,21 @@ export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOv task.TEXT = [assessment.longSummary]; task.PROBLEMS = []; + const library : Library = assessment.questions[0].library; + const deployment : IXmlParseStrDeployment = { + $: { + interpreter: library.chapter.toString() + }, + EXTERNAL: [{ + $: { + name: library.external.name, + }, + SYMBOL: library.external.symbols, + }] + } + + task.DEPLOYMENT = deployment; + assessment.questions.forEach((question: IProgrammingQuestion | IMCQQuestion) => { const problem = { $: { @@ -195,5 +211,6 @@ export const assessmentToXml = (assessment: IAssessment, overview: IAssessmentOv task.PROBLEMS.push(problem); }); + return task; } From 3c1457e07a276ebb8d8a9e3a0cae968688d40711 Mon Sep 17 00:00:00 2001 From: Shuming Date: Mon, 18 Feb 2019 21:14:07 +0800 Subject: [PATCH 021/111] Added Template Reset Feature --- .../assessment/AssessmentWorkspace.tsx | 81 ++++++++++++++++--- .../AssessmentWorkspace.tsx.snap | 48 +++++++++++ src/components/workspace/ControlBar.tsx | 9 ++- src/styles/_academy.scss | 3 +- 4 files changed, 127 insertions(+), 14 deletions(-) diff --git a/src/components/assessment/AssessmentWorkspace.tsx b/src/components/assessment/AssessmentWorkspace.tsx index 3bc08155e7..84bbbfecaf 100644 --- a/src/components/assessment/AssessmentWorkspace.tsx +++ b/src/components/assessment/AssessmentWorkspace.tsx @@ -1,4 +1,13 @@ -import { Button, Card, Dialog, NonIdealState, Spinner } from '@blueprintjs/core' +import { + Button, + ButtonGroup, + Card, + Classes, + Dialog, + Intent, + NonIdealState, + Spinner +} from '@blueprintjs/core' import { IconNames } from '@blueprintjs/icons' import * as React from 'react' @@ -6,6 +15,7 @@ import { InterpreterOutput, IWorkspaceState } from '../../reducers/states' import { beforeNow } from '../../utils/dateHelpers' import { history } from '../../utils/history' import { assessmentCategoryLink } from '../../utils/paramParseHelpers' +import { controlButton } from '../commons' import Markdown from '../commons/Markdown' import Workspace, { WorkspaceProps } from '../workspace' import { ControlBarProps } from '../workspace/ControlBar' @@ -67,13 +77,15 @@ export type DispatchProps = { class AssessmentWorkspace extends React.Component< AssessmentWorkspaceProps, - { showOverlay: boolean } + { showOverlay: boolean; showResetOverlay: boolean } > { public constructor(props: AssessmentWorkspaceProps) { super(props) this.state = { - showOverlay: false + showOverlay: false, + showResetOverlay: false } + this.props.handleEditorValueChange('') } /** @@ -86,6 +98,20 @@ class AssessmentWorkspace extends React.Component< if (this.props.questionId === 0 && this.props.notAttempted) { this.setState({ showOverlay: true }) } + if (this.props.assessment) { + const question: IQuestion = this.props.assessment.questions[ + this.props.questionId >= this.props.assessment.questions.length + ? this.props.assessment.questions.length - 1 + : this.props.questionId + ] + this.props.handleEditorValueChange( + question.type === QuestionTypes.programming + ? question.answer !== null + ? ((question as IProgrammingQuestion).answer as string) + : (question as IProgrammingQuestion).solutionTemplate + : '' + ) + } } /** @@ -119,24 +145,53 @@ class AssessmentWorkspace extends React.Component< ) + + const resetOverlay = ( + +
+ + +
+
+ + {controlButton('Cancel', null, () => this.setState({ showResetOverlay: false }), { + minimal: false + })} + {controlButton( + 'Confirm', + null, + () => { + this.setState({ showResetOverlay: false }) + this.props.handleEditorValueChange( + (this.props.assessment!.questions[questionId] as IProgrammingQuestion) + .solutionTemplate + ) + this.props.handleUpdateHasUnsavedChanges(true) + }, + { minimal: false, intent: Intent.DANGER } + )} + +
+
+ ) /* If questionId is out of bounds, set it to the max. */ const questionId = this.props.questionId >= this.props.assessment.questions.length ? this.props.assessment.questions.length - 1 : this.props.questionId const question: IQuestion = this.props.assessment.questions[questionId] - const editorValue = - question.type === QuestionTypes.programming - ? question.answer !== null - ? ((question as IProgrammingQuestion).answer as string) - : (question as IProgrammingQuestion).solutionTemplate - : null const workspaceProps: WorkspaceProps = { controlBarProps: this.controlBarProps(this.props, questionId), editorProps: question.type === QuestionTypes.programming ? { - editorValue: editorValue!, + editorValue: this.props.editorValue!, handleEditorEval: this.props.handleEditorEval, handleEditorValueChange: this.props.handleEditorValueChange, handleUpdateHasUnsavedChanges: this.props.handleUpdateHasUnsavedChanges @@ -165,6 +220,7 @@ class AssessmentWorkspace extends React.Component< return (
{overlay} + {resetOverlay}
) @@ -194,7 +250,7 @@ class AssessmentWorkspace extends React.Component< ? question.answer !== null ? ((question as IProgrammingQuestion).answer as string) : (question as IProgrammingQuestion).solutionTemplate - : null + : '' this.props.handleUpdateCurrentAssessmentId(assessmentId, questionId) this.props.handleResetWorkspace({ editorValue }) this.props.handleClearContext(question.library) @@ -285,6 +341,9 @@ class AssessmentWorkspace extends React.Component< this.props.assessment!.questions[questionId].id, this.props.editorValue! ), + onClickReset: () => { + this.setState({ showResetOverlay: true }) + }, questionProgress: [questionId + 1, this.props.assessment!.questions.length], sourceChapter: this.props.assessment!.questions[questionId].library.chapter } diff --git a/src/components/assessment/__tests__/__snapshots__/AssessmentWorkspace.tsx.snap b/src/components/assessment/__tests__/__snapshots__/AssessmentWorkspace.tsx.snap index dc954779c5..a3a3c8643e 100644 --- a/src/components/assessment/__tests__/__snapshots__/AssessmentWorkspace.tsx.snap +++ b/src/components/assessment/__tests__/__snapshots__/AssessmentWorkspace.tsx.snap @@ -10,6 +10,22 @@ exports[`AssessmentWorkspace page with MCQ question renders correctly 1`] = ` + +
+ + +
+
+ + + Cancel + + + Confirm + + +
+
" `; @@ -22,6 +38,22 @@ exports[`AssessmentWorkspace page with overdue assessment renders correctly 1`] + +
+ + +
+
+ + + Cancel + + + Confirm + + +
+
" `; @@ -34,6 +66,22 @@ exports[`AssessmentWorkspace page with programming question renders correctly 1` + +
+ + +
+
+ + + Cancel + + + Confirm + + +
+
" `; diff --git a/src/components/workspace/ControlBar.tsx b/src/components/workspace/ControlBar.tsx index 98c4f18176..56f3b4fb58 100644 --- a/src/components/workspace/ControlBar.tsx +++ b/src/components/workspace/ControlBar.tsx @@ -34,6 +34,7 @@ export type ControlBarProps = { onClickPrevious?(): any onClickReturn?(): any onClickSave?(): any + onClickReset?(): any } interface IChapter { @@ -59,7 +60,8 @@ class ControlBar extends React.PureComponent { hasShareButton: true, onClickNext: () => {}, onClickPrevious: () => {}, - onClickSave: () => {} + onClickSave: () => {}, + onClickReset: () => {} } private shareInputElem: HTMLInputElement @@ -127,10 +129,13 @@ class ControlBar extends React.PureComponent { this.props.hasChapterSelect && this.props.externalLibraryName !== undefined ? externalSelect(this.props.externalLibraryName, this.props.handleExternalSelect!) : undefined + const resetButton = this.props.hasSaveButton + ? controlButton('Reset', IconNames.REPEAT, this.props.onClickReset) + : undefined return (
{this.props.isRunning ? stopButton : runButton} {saveButton} - {shareButton} {chapterSelectButton} {externalSelectButton} + {shareButton} {chapterSelectButton} {externalSelectButton} {resetButton}
) } diff --git a/src/styles/_academy.scss b/src/styles/_academy.scss index e584891821..1905c06a4a 100644 --- a/src/styles/_academy.scss +++ b/src/styles/_academy.scss @@ -129,7 +129,8 @@ } } -.betcha-dialog { +.betcha-dialog, +.assessment-reset { span.warning { font-weight: bold; color: firebrick; From 71ed095b4e1d188d4e2767052bb06a73264b5cf0 Mon Sep 17 00:00:00 2001 From: Kai Zhe Date: Tue, 19 Feb 2019 01:51:40 +0800 Subject: [PATCH 022/111] Added UI to edit assessmentsOverview --- src/components/assessment/__tests__/index.tsx | 3 +- src/components/assessment/index.tsx | 133 ++++++++++++++++-- src/containers/assessment/index.ts | 5 +- 3 files changed, 126 insertions(+), 15 deletions(-) diff --git a/src/components/assessment/__tests__/index.tsx b/src/components/assessment/__tests__/index.tsx index ee97b85a73..bf001cae49 100644 --- a/src/components/assessment/__tests__/index.tsx +++ b/src/components/assessment/__tests__/index.tsx @@ -5,13 +5,14 @@ import { MemoryRouter } from 'react-router' import Assessment, { IAssessmentProps } from '../' import { mockAssessmentOverviews } from '../../../mocks/assessmentAPI' import { mockRouterProps } from '../../../mocks/components' -import { AssessmentCategories } from '../assessmentShape' +import { AssessmentCategories, IAssessment } from '../assessmentShape' const defaultProps: IAssessmentProps = { assessmentCategory: AssessmentCategories.Mission, assessmentOverviews: undefined, handleAssessmentOverviewFetch: () => {}, handleSubmitAssessment: (id: number) => {}, + newAssessment: (assessment: IAssessment) => {}, isStudent: false, ...mockRouterProps('/academy/missions', {}) } diff --git a/src/components/assessment/index.tsx b/src/components/assessment/index.tsx index c640ec6374..6f98e0dc8c 100644 --- a/src/components/assessment/index.tsx +++ b/src/components/assessment/index.tsx @@ -28,6 +28,7 @@ import { AssessmentCategory, AssessmentStatuses, GradingStatuses, + IAssessment, IAssessmentOverview } from '../assessment/assessmentShape' import { OwnProps as AssessmentProps } from '../assessment/AssessmentWorkspace' @@ -35,6 +36,7 @@ import { controlButton } from '../commons' import ContentDisplay from '../commons/ContentDisplay' import ImportFromFileComponent from '../commons/ImportFromFileComponent' import Markdown from '../commons/Markdown' +// import { AnyAction } from 'redux'; const DEFAULT_QUESTION_ID: number = 0 @@ -52,6 +54,7 @@ export interface IAssessmentProps export interface IDispatchProps { handleAssessmentOverviewFetch: () => void handleSubmitAssessment: (id: number) => void + newAssessment: (assessment: IAssessment) => void } export interface IOwnProps { @@ -68,6 +71,7 @@ type State = { showClosedAssessments: boolean showOpenedAssessments: boolean showUpcomingAssessments: boolean + editOverview: string } class Assessment extends React.Component { @@ -80,17 +84,18 @@ class Assessment extends React.Component { betchaAssessment: null, showClosedAssessments: false, showOpenedAssessments: true, - showUpcomingAssessments: true + showUpcomingAssessments: true, + editOverview: '' } } public render() { const assessmentId: number | null = stringParamToInt(this.props.match.params.assessmentId) const questionId: number = - stringParamToInt(this.props.match.params.questionId) || DEFAULT_QUESTION_ID; + stringParamToInt(this.props.match.params.questionId) || DEFAULT_QUESTION_ID // If mission for testing is to render, create workspace - const editingOverview = localStorage.getItem("MissionEditingOverviewSA"); + const editingOverview = localStorage.getItem('MissionEditingOverviewSA') if (assessmentId === -1 && editingOverview) { const overview = JSON.parse(editingOverview) const assessmentProps: AssessmentProps = { @@ -150,15 +155,15 @@ class Assessment extends React.Component { ) /** Mission editing card, stored in local storage and have index of -1. */ - const missionEditingCard = editingOverview ? - makeOverviewCard( - JSON.parse(editingOverview), - -1, - this.setBetchaAssessment, - true, - false - ) : - null; + const missionEditingCard = editingOverview + ? this.makeEditingOverviewCard( + JSON.parse(editingOverview), + -1, + this.setBetchaAssessment, + true, + false + ) + : null /** Render cards */ const upcomingCardsCollapsible = @@ -295,6 +300,110 @@ class Assessment extends React.Component { this.setBetchaAssessmentNull() } } + + private editOverview = (field: string, value: any) => { + const overviewString: string | null = localStorage.getItem('MissionEditingOverviewSA') + if (overviewString) { + const overview = JSON.parse(overviewString) + overview[field] = value + localStorage.setItem('MissionEditingOverviewSA', JSON.stringify(overview)) + this.props.newAssessment(overview) + } + } + + private handleEditOverview = (field: string) => (e: any) => + this.editOverview(field, e.target.value) + private toggleEditField = (field: string) => (e: any) => { + this.setState({ editOverview: field }) + } + + private makeEditingOverviewCard = ( + overview: IAssessmentOverview, + index: number, + setBetchaAssessment: (assessment: IAssessmentOverview | null) => void, + renderAttemptButton: boolean, + renderGradingStatus: boolean + ) => ( +
+ You can edit this card + +
+ +
+
+ {this.makeEditingOverviewCardTitle( + overview, + index, + setBetchaAssessment, + renderGradingStatus + )} +
+
+ {' '} + {beforeNow(overview.openAt) + ? `Grade: ${overview.grade} / ${overview.maxGrade}` + : `Max Grade: ${overview.maxGrade}`}{' '} +
+
+
+
+ {' '} + {beforeNow(overview.openAt) + ? `XP: ${overview.xp} / ${overview.maxXp}` + : `Max XP: ${overview.maxXp}`}{' '} +
+
+
+ {this.state.editOverview === 'shortSummary' ? ( + + ) : ( + + )} +
+
+ + +
+ {this.state.editOverview === "date" + ? [, + ] + : (beforeNow(overview.openAt) + ? `Due: ${getPrettyDate(overview.closeAt)}` + : `Opens at: ${getPrettyDate(overview.openAt)}`)} +
+
+ {renderAttemptButton ? makeOverviewCardButton(overview) : null} +
+
+
+
+ ) + + private makeEditingOverviewCardTitle = ( + overview: IAssessmentOverview, + index: number, + setBetchaAssessment: (assessment: IAssessmentOverview | null) => void, + renderGradingStatus: boolean + ) => ( +
+ +

+ { this.state.editOverview === 'title' + ? + : overview.title }{' '} + {renderGradingStatus ? makeGradingStatus(overview.gradingStatus) : null} +

+
+
{makeSubmissionButton(overview, index, setBetchaAssessment)}
+
+ ) } /** diff --git a/src/containers/assessment/index.ts b/src/containers/assessment/index.ts index f1cd9405c7..8de20110ee 100644 --- a/src/containers/assessment/index.ts +++ b/src/containers/assessment/index.ts @@ -2,7 +2,7 @@ import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux' import { withRouter } from 'react-router' import { bindActionCreators, Dispatch } from 'redux' -import { fetchAssessmentOverviews, submitAssessment } from '../../actions/session' +import { fetchAssessmentOverviews, submitAssessment, updateAssessment } from '../../actions/session' import Assessment, { IDispatchProps, IOwnProps, IStateProps } from '../../components/assessment' import { IAssessmentOverview } from '../../components/assessment/assessmentShape' import { IState, Role } from '../../reducers/states' @@ -23,7 +23,8 @@ const mapDispatchToProps: MapDispatchToProps = (dispatch: Di bindActionCreators( { handleAssessmentOverviewFetch: fetchAssessmentOverviews, - handleSubmitAssessment: submitAssessment + handleSubmitAssessment: submitAssessment, + newAssessment: updateAssessment, }, dispatch ) From 358fbc48fb1261156af4715d9f5be8b5c36cf7fc Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Wed, 20 Feb 2019 11:22:57 +0800 Subject: [PATCH 023/111] Moved edititngOverviewCard logic new file edititngOverviewCard --- .../assessment/EditingOverviewCard.tsx | 173 ++++++++++++++++++ src/components/assessment/assessmentShape.ts | 2 +- src/components/assessment/index.tsx | 162 ++++------------ .../commons/ImportFromFileComponent.tsx | 14 +- src/utils/xmlParser.ts | 2 +- 5 files changed, 224 insertions(+), 129 deletions(-) create mode 100644 src/components/assessment/EditingOverviewCard.tsx diff --git a/src/components/assessment/EditingOverviewCard.tsx b/src/components/assessment/EditingOverviewCard.tsx new file mode 100644 index 0000000000..6296496783 --- /dev/null +++ b/src/components/assessment/EditingOverviewCard.tsx @@ -0,0 +1,173 @@ +import { + Button, + Card, + Elevation, + Icon, + IconName, + Intent, + Text, +} from '@blueprintjs/core' +import { IconNames } from '@blueprintjs/icons' +import * as React from 'react' +import { NavLink } from 'react-router-dom' + +import defaultCoverImage from '../../assets/default_cover_image.jpg' +import { getPrettyDate } from '../../utils/dateHelpers' +import { assessmentCategoryLink } from '../../utils/paramParseHelpers' +import { + IAssessmentOverview +} from '../assessment/assessmentShape' +import { controlButton } from '../commons' +import Markdown from '../commons/Markdown' + +const DEFAULT_QUESTION_ID: number = 0 + +type Props = { + overview: IAssessmentOverview, + updateEditingOverview: (overview: IAssessmentOverview) => void +} + +interface IState { + editingOverviewField: string +} + + +export class EditingOverviewCard extends React.Component { + public constructor(props: Props) { + super(props) + this.state = { + editingOverviewField: '' + } + } + + public render() { + return
+ {this.makeEditingOverviewCard(this.props.overview)} +
; + } + + private saveEditOverview = () => { + this.setState({ + editingOverviewField: '' + }) + localStorage.setItem('MissionEditingOverviewSA', JSON.stringify(this.props.overview)); + } + + private handleEditOverview = (field: keyof IAssessmentOverview) => (e: React.ChangeEvent) =>{ + const overview = { + ...this.props.overview, + [field]: e.target.value + } + this.props.updateEditingOverview(overview); + } + + private toggleEditField = (field: string) => (e: any) => { + this.setState({ editingOverviewField: field }) + } + + private makeEditingOverviewCard = ( + overview: IAssessmentOverview + ) => ( +
+ You can edit this card + +
+ +
+
+ {this.makeEditingOverviewCardTitle( + overview, + overview.title + )} +
+
+ {' '} + {`Max Grade: ${overview.maxGrade}`} + {' '} +
+
+
+
+ {' '} + {`Max XP: ${overview.maxXp}`} + {' '} +
+
+
+ {this.state.editingOverviewField === 'shortSummary' ? ( + + ) : ( + + )} +
+
+ + +
+ {this.state.editingOverviewField === "date" + ? [, + ] + : `Opens at: ${getPrettyDate(overview.openAt)} and Due: ${getPrettyDate(overview.closeAt)}`} +
+
+ {makeOverviewCardButton(overview)} +
+
+
+
+ ) + + private makeEditingOverviewCardTitle = ( + overview: IAssessmentOverview, + title: string + ) => ( +
+ +

+ { this.state.editingOverviewField === 'title' + ? + : title }{' '} +

+
+
{this.makeSubmissionButton(overview)}
+
+ ) + + private makeSubmissionButton = ( + overview: IAssessmentOverview + ) => ( + + ) + +} + +const makeOverviewCardButton = (overview: IAssessmentOverview) => { + const icon: IconName = IconNames.EDIT; + const label: string = "Edit mission"; + return ( + + {controlButton(label, icon)} + + ) +} diff --git a/src/components/assessment/assessmentShape.ts b/src/components/assessment/assessmentShape.ts index d7e524edae..adce781e4b 100644 --- a/src/components/assessment/assessmentShape.ts +++ b/src/components/assessment/assessmentShape.ts @@ -106,7 +106,7 @@ export enum QuestionTypes { export type QuestionType = keyof typeof QuestionTypes /** Constants for external library names */ -enum ExternalLibraryNames { +export enum ExternalLibraryNames { NONE = 'NONE', TWO_DIM_RUNES = 'TWO_DIM_RUNES', THREE_DIM_RUNES = 'THREE_DIM_RUNES', diff --git a/src/components/assessment/index.tsx b/src/components/assessment/index.tsx index 6f98e0dc8c..157bc2bac2 100644 --- a/src/components/assessment/index.tsx +++ b/src/components/assessment/index.tsx @@ -32,6 +32,7 @@ import { IAssessmentOverview } from '../assessment/assessmentShape' import { OwnProps as AssessmentProps } from '../assessment/AssessmentWorkspace' +import { EditingOverviewCard } from '../assessment/EditingOverviewCard' import { controlButton } from '../commons' import ContentDisplay from '../commons/ContentDisplay' import ImportFromFileComponent from '../commons/ImportFromFileComponent' @@ -72,6 +73,7 @@ type State = { showOpenedAssessments: boolean showUpcomingAssessments: boolean editOverview: string + editingOverview: IAssessmentOverview | null; } class Assessment extends React.Component { @@ -85,7 +87,18 @@ class Assessment extends React.Component { showClosedAssessments: false, showOpenedAssessments: true, showUpcomingAssessments: true, - editOverview: '' + editOverview: '', + editingOverview: null + } + } + + public componentDidMount(){ + const editingOverviewStr = localStorage.getItem('MissionEditingOverviewSA'); + if (editingOverviewStr) { + this.setState({ + ...this.state, + editingOverview: JSON.parse(editingOverviewStr) + }) } } @@ -95,21 +108,23 @@ class Assessment extends React.Component { stringParamToInt(this.props.match.params.questionId) || DEFAULT_QUESTION_ID // If mission for testing is to render, create workspace - const editingOverview = localStorage.getItem('MissionEditingOverviewSA') - if (assessmentId === -1 && editingOverview) { - const overview = JSON.parse(editingOverview) - const assessmentProps: AssessmentProps = { - assessmentId, - questionId, - notAttempted: overview.status === AssessmentStatuses.not_attempted, - closeDate: overview.closeAt + if (assessmentId === -1) { + const editingOverviewStr = localStorage.getItem('MissionEditingOverviewSA'); + if (editingOverviewStr){ + const overview = JSON.parse(editingOverviewStr) + const assessmentProps: AssessmentProps = { + assessmentId, + questionId, + notAttempted: overview.status === AssessmentStatuses.not_attempted, + closeDate: overview.closeAt + } + return } - return } // If there is an assessment to render, create a workspace. The assessment // overviews must still be loaded for this, to send the due date. - if (assessmentId !== null && this.props.assessmentOverviews !== undefined) { + else if (assessmentId !== null && this.props.assessmentOverviews !== undefined) { const overview = this.props.assessmentOverviews.filter(a => a.id === assessmentId)[0] const assessmentProps: AssessmentProps = { assessmentId, @@ -154,15 +169,12 @@ class Assessment extends React.Component { makeOverviewCard(overview, index, this.setBetchaAssessment, true, true) ) - /** Mission editing card, stored in local storage and have index of -1. */ - const missionEditingCard = editingOverview - ? this.makeEditingOverviewCard( - JSON.parse(editingOverview), - -1, - this.setBetchaAssessment, - true, - false - ) + /** Mission editing card */ + const missionEditingCard = this.state.editingOverview + ? : null /** Render cards */ @@ -197,7 +209,9 @@ class Assessment extends React.Component { ) : null display = ( <> - + {missionEditingCard} {upcomingCardsCollapsible} {openedCardsCollapsible} @@ -301,109 +315,11 @@ class Assessment extends React.Component { } } - private editOverview = (field: string, value: any) => { - const overviewString: string | null = localStorage.getItem('MissionEditingOverviewSA') - if (overviewString) { - const overview = JSON.parse(overviewString) - overview[field] = value - localStorage.setItem('MissionEditingOverviewSA', JSON.stringify(overview)) - this.props.newAssessment(overview) - } - } - - private handleEditOverview = (field: string) => (e: any) => - this.editOverview(field, e.target.value) - private toggleEditField = (field: string) => (e: any) => { - this.setState({ editOverview: field }) + private updateEditingOverview = (overview: IAssessmentOverview) => { + this.setState({ + editingOverview: overview + }) } - - private makeEditingOverviewCard = ( - overview: IAssessmentOverview, - index: number, - setBetchaAssessment: (assessment: IAssessmentOverview | null) => void, - renderAttemptButton: boolean, - renderGradingStatus: boolean - ) => ( -
- You can edit this card - -
- -
-
- {this.makeEditingOverviewCardTitle( - overview, - index, - setBetchaAssessment, - renderGradingStatus - )} -
-
- {' '} - {beforeNow(overview.openAt) - ? `Grade: ${overview.grade} / ${overview.maxGrade}` - : `Max Grade: ${overview.maxGrade}`}{' '} -
-
-
-
- {' '} - {beforeNow(overview.openAt) - ? `XP: ${overview.xp} / ${overview.maxXp}` - : `Max XP: ${overview.maxXp}`}{' '} -
-
-
- {this.state.editOverview === 'shortSummary' ? ( - - ) : ( - - )} -
-
- - -
- {this.state.editOverview === "date" - ? [, - ] - : (beforeNow(overview.openAt) - ? `Due: ${getPrettyDate(overview.closeAt)}` - : `Opens at: ${getPrettyDate(overview.openAt)}`)} -
-
- {renderAttemptButton ? makeOverviewCardButton(overview) : null} -
-
-
-
- ) - - private makeEditingOverviewCardTitle = ( - overview: IAssessmentOverview, - index: number, - setBetchaAssessment: (assessment: IAssessmentOverview | null) => void, - renderGradingStatus: boolean - ) => ( -
- -

- { this.state.editOverview === 'title' - ? - : overview.title }{' '} - {renderGradingStatus ? makeGradingStatus(overview.gradingStatus) : null} -

-
-
{makeSubmissionButton(overview, index, setBetchaAssessment)}
-
- ) } /** diff --git a/src/components/commons/ImportFromFileComponent.tsx b/src/components/commons/ImportFromFileComponent.tsx index 035590e54f..22e5c18f11 100644 --- a/src/components/commons/ImportFromFileComponent.tsx +++ b/src/components/commons/ImportFromFileComponent.tsx @@ -23,7 +23,12 @@ const mapDispatchToProps: MapDispatchToProps = (dispatch: Di dispatch ) -export class ImportFromFileComponent extends React.Component { +type Props = { + newAssessment: (assessment: IAssessment) => void, + updateEditingOverview: (overview: IAssessmentOverview) => void +} + +export class ImportFromFileComponent extends React.Component { private fileReader: FileReader public constructor(props: any) { super(props) @@ -53,12 +58,13 @@ export class ImportFromFileComponent extends React.Component { const task = result.CONTENT.TASK[0] // tslint:disable-next-line:no-console console.dir(task) - const overview: IAssessmentOverview = makeAssessmentOverview(result) + const overview: IAssessmentOverview = makeAssessmentOverview(result); localStorage.setItem("MissionEditingOverviewSA", JSON.stringify(overview)); + this.props.updateEditingOverview(overview); - const assessment: IAssessment = makeAssessment(result) + const assessment: IAssessment = makeAssessment(result); localStorage.setItem("MissionEditingAssessmentSA", JSON.stringify(assessment)); - this.props.newAssessment(assessment) + this.props.newAssessment(assessment); }) } // You can set content in state and show it in render. diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 88212440c7..bff96f9582 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -11,8 +11,8 @@ import { MCQChoice } from '../components/assessment/assessmentShape' import { - IXmlParseStrDeployment, IXmlParseStrCProblem, + IXmlParseStrDeployment, IXmlParseStrOverview, IXmlParseStrPProblem, IXmlParseStrProblem, From efc4e76906dc80fae6c391f8442845e4a5c09836 Mon Sep 17 00:00:00 2001 From: Ger Hean Date: Wed, 20 Feb 2019 16:23:53 +0800 Subject: [PATCH 024/111] export added --- package.json | 2 + .../assessment/EditingOverviewCard.tsx | 111 ++++++++++++------ .../commons/ImportFromFileComponent.tsx | 4 +- src/utils/xmlParser.ts | 37 +++++- yarn.lock | 15 +++ 5 files changed, 128 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 8cb4235d1f..5ac879c2a2 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "react-router": "^4.2.0", "react-router-dom": "^4.2.2", "react-router-redux": "^5.0.0-alpha.9", + "react-textarea-autosize": "^7.1.0", "react-transition-group": "^2.3.1", "redux": "^3.7.2", "redux-mock-store": "^1.5.1", @@ -95,6 +96,7 @@ "@types/react-router-dom": "^4.2.6", "@types/react-router-redux": "^5.0.13", "@types/react-test-renderer": "^16.0.1", + "@types/react-textarea-autosize": "^4.3.3", "@types/redux-mock-store": "^0.0.13", "@types/showdown": "^1.7.5", "@types/xml2js": "^0.4.3", diff --git a/src/components/assessment/EditingOverviewCard.tsx b/src/components/assessment/EditingOverviewCard.tsx index 6296496783..e3c441714c 100644 --- a/src/components/assessment/EditingOverviewCard.tsx +++ b/src/components/assessment/EditingOverviewCard.tsx @@ -10,13 +10,14 @@ import { import { IconNames } from '@blueprintjs/icons' import * as React from 'react' import { NavLink } from 'react-router-dom' +import Textarea from 'react-textarea-autosize'; import defaultCoverImage from '../../assets/default_cover_image.jpg' import { getPrettyDate } from '../../utils/dateHelpers' import { assessmentCategoryLink } from '../../utils/paramParseHelpers' -import { - IAssessmentOverview -} from '../assessment/assessmentShape' +import { exportXml } from '../../utils/xmlParser' + +import { IAssessmentOverview } from '../assessment/assessmentShape' import { controlButton } from '../commons' import Markdown from '../commons/Markdown' @@ -28,15 +29,23 @@ type Props = { } interface IState { - editingOverviewField: string + editingOverviewField: string, + fieldValue: any } +const textareaStyle = { + "height": "100%", + "width": "100%", + "overflow": "hidden" as "hidden", + "resize": "none" as "none" +} export class EditingOverviewCard extends React.Component { public constructor(props: Props) { super(props) this.state = { - editingOverviewField: '' + editingOverviewField: '', + fieldValue: '' } } @@ -46,37 +55,62 @@ export class EditingOverviewCard extends React.Component { ; } - private saveEditOverview = () => { + private saveEditOverview = (field: keyof IAssessmentOverview) => (e: any) =>{ + const overview = { + ...this.props.overview, + [field]: this.state.fieldValue + } this.setState({ - editingOverviewField: '' + editingOverviewField: '', + fieldValue:'' }) - localStorage.setItem('MissionEditingOverviewSA', JSON.stringify(this.props.overview)); + localStorage.setItem('MissionEditingOverviewSA', JSON.stringify(overview)); + this.props.updateEditingOverview(overview); } - private handleEditOverview = (field: keyof IAssessmentOverview) => (e: React.ChangeEvent) =>{ - const overview = { - ...this.props.overview, - [field]: e.target.value - } - this.props.updateEditingOverview(overview); + private handleEditOverview = () => (e: any) =>{ + this.setState({ + fieldValue:e.target.value + }) } - private toggleEditField = (field: string) => (e: any) => { - this.setState({ editingOverviewField: field }) + private toggleEditField = (field: keyof IAssessmentOverview) => (e: any) => { + this.setState({ + editingOverviewField: field, + fieldValue: this.props.overview[field] + }) } + private handleExportXml = () => (e: any) => { + exportXml(); + } + + private makeEditingOverviewTextarea = (field: keyof IAssessmentOverview) => +