@lingk/sync 1.1.43 → 1.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,7 @@ module.exports =
68
68
  /* 0 */
69
69
  /***/ function(module, exports, __webpack_require__) {
70
70
 
71
- module.exports = __webpack_require__(54);
71
+ module.exports = __webpack_require__(71);
72
72
 
73
73
 
74
74
  /***/ },
@@ -79,31 +79,43 @@ module.exports =
79
79
 
80
80
  /***/ },
81
81
  /* 2 */,
82
- /* 3 */
82
+ /* 3 */,
83
+ /* 4 */
83
84
  /***/ function(module, exports) {
84
85
 
85
86
  module.exports = require("react-bootstrap");
86
87
 
87
88
  /***/ },
88
- /* 4 */,
89
89
  /* 5 */,
90
90
  /* 6 */,
91
91
  /* 7 */,
92
92
  /* 8 */,
93
93
  /* 9 */,
94
94
  /* 10 */,
95
- /* 11 */
96
- /***/ function(module, exports) {
97
-
98
- module.exports = require("moment");
99
-
100
- /***/ },
95
+ /* 11 */,
101
96
  /* 12 */,
102
97
  /* 13 */,
103
98
  /* 14 */,
104
99
  /* 15 */,
105
100
  /* 16 */,
106
- /* 17 */
101
+ /* 17 */,
102
+ /* 18 */,
103
+ /* 19 */,
104
+ /* 20 */,
105
+ /* 21 */,
106
+ /* 22 */,
107
+ /* 23 */,
108
+ /* 24 */,
109
+ /* 25 */,
110
+ /* 26 */
111
+ /***/ function(module, exports) {
112
+
113
+ module.exports = require("moment");
114
+
115
+ /***/ },
116
+ /* 27 */,
117
+ /* 28 */,
118
+ /* 29 */
107
119
  /***/ function(module, exports, __webpack_require__) {
108
120
 
109
121
  /* WEBPACK VAR INJECTION */(function(global) {/*!
@@ -116,9 +128,9 @@ module.exports =
116
128
 
117
129
  'use strict'
118
130
 
119
- var base64 = __webpack_require__(68)
120
- var ieee754 = __webpack_require__(70)
121
- var isArray = __webpack_require__(71)
131
+ var base64 = __webpack_require__(78)
132
+ var ieee754 = __webpack_require__(98)
133
+ var isArray = __webpack_require__(99)
122
134
 
123
135
  exports.Buffer = Buffer
124
136
  exports.SlowBuffer = SlowBuffer
@@ -1899,16 +1911,19 @@ module.exports =
1899
1911
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1900
1912
 
1901
1913
  /***/ },
1902
- /* 18 */,
1903
- /* 19 */,
1904
- /* 20 */,
1905
- /* 21 */,
1906
- /* 22 */,
1907
- /* 23 */,
1908
- /* 24 */,
1909
- /* 25 */,
1910
- /* 26 */,
1911
- /* 27 */
1914
+ /* 30 */,
1915
+ /* 31 */,
1916
+ /* 32 */,
1917
+ /* 33 */,
1918
+ /* 34 */,
1919
+ /* 35 */,
1920
+ /* 36 */,
1921
+ /* 37 */,
1922
+ /* 38 */,
1923
+ /* 39 */,
1924
+ /* 40 */,
1925
+ /* 41 */,
1926
+ /* 42 */
1912
1927
  /***/ function(module, exports, __webpack_require__) {
1913
1928
 
1914
1929
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -1916,7 +1931,7 @@ module.exports =
1916
1931
 
1917
1932
  (function(mod) {
1918
1933
  if (true) // CommonJS
1919
- mod(__webpack_require__(69));
1934
+ mod(__webpack_require__(79));
1920
1935
  else if (typeof define == "function" && define.amd) // AMD
1921
1936
  define(["../../lib/codemirror"], mod);
1922
1937
  else // Plain browser env
@@ -1939,7 +1954,7 @@ module.exports =
1939
1954
  var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
1940
1955
  var operator = kw("operator"), atom = {type: "atom", style: "atom"};
1941
1956
 
1942
- var jsKeywords = {
1957
+ return {
1943
1958
  "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
1944
1959
  "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
1945
1960
  "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
@@ -1951,35 +1966,6 @@ module.exports =
1951
1966
  "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
1952
1967
  "await": C
1953
1968
  };
1954
-
1955
- // Extend the 'normal' keywords with the TypeScript language extensions
1956
- if (isTS) {
1957
- var type = {type: "variable", style: "type"};
1958
- var tsKeywords = {
1959
- // object-like things
1960
- "interface": kw("class"),
1961
- "implements": C,
1962
- "namespace": C,
1963
- "module": kw("module"),
1964
- "enum": kw("module"),
1965
-
1966
- // scope modifiers
1967
- "public": kw("modifier"),
1968
- "private": kw("modifier"),
1969
- "protected": kw("modifier"),
1970
- "abstract": kw("modifier"),
1971
- "readonly": kw("modifier"),
1972
-
1973
- // types
1974
- "string": type, "number": type, "boolean": type, "any": type
1975
- };
1976
-
1977
- for (var attr in tsKeywords) {
1978
- jsKeywords[attr] = tsKeywords[attr];
1979
- }
1980
- }
1981
-
1982
- return jsKeywords;
1983
1969
  }();
1984
1970
 
1985
1971
  var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
@@ -2017,17 +2003,10 @@ module.exports =
2017
2003
  return ret(ch);
2018
2004
  } else if (ch == "=" && stream.eat(">")) {
2019
2005
  return ret("=>", "operator");
2020
- } else if (ch == "0" && stream.eat(/x/i)) {
2021
- stream.eatWhile(/[\da-f]/i);
2022
- return ret("number", "number");
2023
- } else if (ch == "0" && stream.eat(/o/i)) {
2024
- stream.eatWhile(/[0-7]/i);
2025
- return ret("number", "number");
2026
- } else if (ch == "0" && stream.eat(/b/i)) {
2027
- stream.eatWhile(/[01]/i);
2006
+ } else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
2028
2007
  return ret("number", "number");
2029
2008
  } else if (/\d/.test(ch)) {
2030
- stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
2009
+ stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
2031
2010
  return ret("number", "number");
2032
2011
  } else if (ch == "/") {
2033
2012
  if (stream.eat("*")) {
@@ -2038,7 +2017,7 @@ module.exports =
2038
2017
  return ret("comment", "comment");
2039
2018
  } else if (expressionAllowed(stream, state, 1)) {
2040
2019
  readRegexp(stream);
2041
- stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
2020
+ stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
2042
2021
  return ret("regexp", "string-2");
2043
2022
  } else {
2044
2023
  stream.eat("=");
@@ -2068,7 +2047,7 @@ module.exports =
2068
2047
  var kw = keywords[word]
2069
2048
  return ret(kw.type, kw.style, word)
2070
2049
  }
2071
- if (word == "async" && stream.match(/^\s*[\(\w]/, false))
2050
+ if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
2072
2051
  return ret("async", "keyword", word)
2073
2052
  }
2074
2053
  return ret("variable", "variable", word)
@@ -2207,35 +2186,68 @@ module.exports =
2207
2186
  pass.apply(null, arguments);
2208
2187
  return true;
2209
2188
  }
2189
+ function inList(name, list) {
2190
+ for (var v = list; v; v = v.next) if (v.name == name) return true
2191
+ return false;
2192
+ }
2210
2193
  function register(varname) {
2211
- function inList(list) {
2212
- for (var v = list; v; v = v.next)
2213
- if (v.name == varname) return true;
2214
- return false;
2215
- }
2216
2194
  var state = cx.state;
2217
2195
  cx.marked = "def";
2218
2196
  if (state.context) {
2219
- if (inList(state.localVars)) return;
2220
- state.localVars = {name: varname, next: state.localVars};
2197
+ if (state.lexical.info == "var" && state.context && state.context.block) {
2198
+ // FIXME function decls are also not block scoped
2199
+ var newContext = registerVarScoped(varname, state.context)
2200
+ if (newContext != null) {
2201
+ state.context = newContext
2202
+ return
2203
+ }
2204
+ } else if (!inList(varname, state.localVars)) {
2205
+ state.localVars = new Var(varname, state.localVars)
2206
+ return
2207
+ }
2208
+ }
2209
+ // Fall through means this is global
2210
+ if (parserConfig.globalVars && !inList(varname, state.globalVars))
2211
+ state.globalVars = new Var(varname, state.globalVars)
2212
+ }
2213
+ function registerVarScoped(varname, context) {
2214
+ if (!context) {
2215
+ return null
2216
+ } else if (context.block) {
2217
+ var inner = registerVarScoped(varname, context.prev)
2218
+ if (!inner) return null
2219
+ if (inner == context.prev) return context
2220
+ return new Context(inner, context.vars, true)
2221
+ } else if (inList(varname, context.vars)) {
2222
+ return context
2221
2223
  } else {
2222
- if (inList(state.globalVars)) return;
2223
- if (parserConfig.globalVars)
2224
- state.globalVars = {name: varname, next: state.globalVars};
2224
+ return new Context(context.prev, new Var(varname, context.vars), false)
2225
2225
  }
2226
2226
  }
2227
2227
 
2228
+ function isModifier(name) {
2229
+ return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
2230
+ }
2231
+
2228
2232
  // Combinators
2229
2233
 
2230
- var defaultVars = {name: "this", next: {name: "arguments"}};
2234
+ function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
2235
+ function Var(name, next) { this.name = name; this.next = next }
2236
+
2237
+ var defaultVars = new Var("this", new Var("arguments", null))
2231
2238
  function pushcontext() {
2232
- cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
2233
- cx.state.localVars = defaultVars;
2239
+ cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
2240
+ cx.state.localVars = defaultVars
2241
+ }
2242
+ function pushblockcontext() {
2243
+ cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
2244
+ cx.state.localVars = null
2234
2245
  }
2235
2246
  function popcontext() {
2236
- cx.state.localVars = cx.state.context.vars;
2237
- cx.state.context = cx.state.context.prev;
2247
+ cx.state.localVars = cx.state.context.vars
2248
+ cx.state.context = cx.state.context.prev
2238
2249
  }
2250
+ popcontext.lex = true
2239
2251
  function pushlex(type, info) {
2240
2252
  var result = function() {
2241
2253
  var state = cx.state, indent = state.indented;
@@ -2267,12 +2279,12 @@ module.exports =
2267
2279
  }
2268
2280
 
2269
2281
  function statement(type, value) {
2270
- if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
2282
+ if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
2271
2283
  if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
2272
2284
  if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
2273
2285
  if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
2274
2286
  if (type == "debugger") return cont(expect(";"));
2275
- if (type == "{") return cont(pushlex("}"), block, poplex);
2287
+ if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
2276
2288
  if (type == ";") return cont();
2277
2289
  if (type == "if") {
2278
2290
  if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
@@ -2281,42 +2293,51 @@ module.exports =
2281
2293
  }
2282
2294
  if (type == "function") return cont(functiondef);
2283
2295
  if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
2296
+ if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
2284
2297
  if (type == "variable") {
2285
- if (isTS && value == "type") {
2298
+ if (isTS && value == "declare") {
2299
+ cx.marked = "keyword"
2300
+ return cont(statement)
2301
+ } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
2286
2302
  cx.marked = "keyword"
2287
- return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
2288
- } if (isTS && value == "declare") {
2303
+ if (value == "enum") return cont(enumdef);
2304
+ else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
2305
+ else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
2306
+ } else if (isTS && value == "namespace") {
2307
+ cx.marked = "keyword"
2308
+ return cont(pushlex("form"), expression, block, poplex)
2309
+ } else if (isTS && value == "abstract") {
2289
2310
  cx.marked = "keyword"
2290
2311
  return cont(statement)
2291
2312
  } else {
2292
2313
  return cont(pushlex("stat"), maybelabel);
2293
2314
  }
2294
2315
  }
2295
- if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"),
2296
- block, poplex, poplex);
2316
+ if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
2317
+ block, poplex, poplex, popcontext);
2297
2318
  if (type == "case") return cont(expression, expect(":"));
2298
2319
  if (type == "default") return cont(expect(":"));
2299
- if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
2300
- statement, poplex, popcontext);
2301
- if (type == "class") return cont(pushlex("form"), className, poplex);
2320
+ if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
2302
2321
  if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
2303
2322
  if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
2304
- if (type == "module") return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
2305
2323
  if (type == "async") return cont(statement)
2306
2324
  if (value == "@") return cont(expression, statement)
2307
2325
  return pass(pushlex("stat"), expression, expect(";"), poplex);
2308
2326
  }
2309
- function expression(type) {
2310
- return expressionInner(type, false);
2327
+ function maybeCatchBinding(type) {
2328
+ if (type == "(") return cont(funarg, expect(")"))
2329
+ }
2330
+ function expression(type, value) {
2331
+ return expressionInner(type, value, false);
2311
2332
  }
2312
- function expressionNoComma(type) {
2313
- return expressionInner(type, true);
2333
+ function expressionNoComma(type, value) {
2334
+ return expressionInner(type, value, true);
2314
2335
  }
2315
2336
  function parenExpr(type) {
2316
2337
  if (type != "(") return pass()
2317
2338
  return cont(pushlex(")"), expression, expect(")"), poplex)
2318
2339
  }
2319
- function expressionInner(type, noComma) {
2340
+ function expressionInner(type, value, noComma) {
2320
2341
  if (cx.state.fatArrowAt == cx.stream.start) {
2321
2342
  var body = noComma ? arrowBodyNoComma : arrowBody;
2322
2343
  if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
@@ -2326,7 +2347,7 @@ module.exports =
2326
2347
  var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
2327
2348
  if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
2328
2349
  if (type == "function") return cont(functiondef, maybeop);
2329
- if (type == "class") return cont(pushlex("form"), classExpression, poplex);
2350
+ if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
2330
2351
  if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
2331
2352
  if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
2332
2353
  if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
@@ -2334,6 +2355,7 @@ module.exports =
2334
2355
  if (type == "{") return contCommasep(objprop, "}", null, maybeop);
2335
2356
  if (type == "quasi") return pass(quasi, maybeop);
2336
2357
  if (type == "new") return cont(maybeTarget(noComma));
2358
+ if (type == "import") return cont(expression);
2337
2359
  return cont();
2338
2360
  }
2339
2361
  function maybeexpression(type) {
@@ -2351,6 +2373,8 @@ module.exports =
2351
2373
  if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
2352
2374
  if (type == "operator") {
2353
2375
  if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
2376
+ if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false))
2377
+ return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
2354
2378
  if (value == "?") return cont(expression, expect(":"), expr);
2355
2379
  return cont(expr);
2356
2380
  }
@@ -2422,10 +2446,11 @@ module.exports =
2422
2446
  return cont(afterprop);
2423
2447
  } else if (type == "jsonld-keyword") {
2424
2448
  return cont(afterprop);
2425
- } else if (type == "modifier") {
2449
+ } else if (isTS && isModifier(value)) {
2450
+ cx.marked = "keyword"
2426
2451
  return cont(objprop)
2427
2452
  } else if (type == "[") {
2428
- return cont(expression, expect("]"), afterprop);
2453
+ return cont(expression, maybetype, expect("]"), afterprop);
2429
2454
  } else if (type == "spread") {
2430
2455
  return cont(expressionNoComma, afterprop);
2431
2456
  } else if (value == "*") {
@@ -2477,20 +2502,32 @@ module.exports =
2477
2502
  if (value == "?") return cont(maybetype);
2478
2503
  }
2479
2504
  }
2505
+ function mayberettype(type) {
2506
+ if (isTS && type == ":") {
2507
+ if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
2508
+ else return cont(typeexpr)
2509
+ }
2510
+ }
2511
+ function isKW(_, value) {
2512
+ if (value == "is") {
2513
+ cx.marked = "keyword"
2514
+ return cont()
2515
+ }
2516
+ }
2480
2517
  function typeexpr(type, value) {
2518
+ if (value == "keyof" || value == "typeof") {
2519
+ cx.marked = "keyword"
2520
+ return cont(value == "keyof" ? typeexpr : expressionNoComma)
2521
+ }
2481
2522
  if (type == "variable" || value == "void") {
2482
- if (value == "keyof") {
2483
- cx.marked = "keyword"
2484
- return cont(typeexpr)
2485
- } else {
2486
- cx.marked = "type"
2487
- return cont(afterType)
2488
- }
2523
+ cx.marked = "type"
2524
+ return cont(afterType)
2489
2525
  }
2490
2526
  if (type == "string" || type == "number" || type == "atom") return cont(afterType);
2491
2527
  if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
2492
2528
  if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
2493
2529
  if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
2530
+ if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
2494
2531
  }
2495
2532
  function maybeReturnType(type) {
2496
2533
  if (type == "=>") return cont(typeexpr)
@@ -2507,24 +2544,32 @@ module.exports =
2507
2544
  return cont(expression, maybetype, expect("]"), typeprop)
2508
2545
  }
2509
2546
  }
2510
- function typearg(type) {
2511
- if (type == "variable") return cont(typearg)
2512
- else if (type == ":") return cont(typeexpr)
2547
+ function typearg(type, value) {
2548
+ if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
2549
+ if (type == ":") return cont(typeexpr)
2550
+ return pass(typeexpr)
2513
2551
  }
2514
2552
  function afterType(type, value) {
2515
2553
  if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
2516
- if (value == "|" || type == ".") return cont(typeexpr)
2554
+ if (value == "|" || type == "." || value == "&") return cont(typeexpr)
2517
2555
  if (type == "[") return cont(expect("]"), afterType)
2518
- if (value == "extends") return cont(typeexpr)
2556
+ if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
2519
2557
  }
2520
2558
  function maybeTypeArgs(_, value) {
2521
2559
  if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
2522
2560
  }
2523
- function vardef() {
2561
+ function typeparam() {
2562
+ return pass(typeexpr, maybeTypeDefault)
2563
+ }
2564
+ function maybeTypeDefault(_, value) {
2565
+ if (value == "=") return cont(typeexpr)
2566
+ }
2567
+ function vardef(_, value) {
2568
+ if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
2524
2569
  return pass(pattern, maybetype, maybeAssign, vardefCont);
2525
2570
  }
2526
2571
  function pattern(type, value) {
2527
- if (type == "modifier") return cont(pattern)
2572
+ if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
2528
2573
  if (type == "variable") { register(value); return cont(); }
2529
2574
  if (type == "spread") return cont(pattern);
2530
2575
  if (type == "[") return contCommasep(pattern, "]");
@@ -2549,7 +2594,8 @@ module.exports =
2549
2594
  function maybeelse(type, value) {
2550
2595
  if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
2551
2596
  }
2552
- function forspec(type) {
2597
+ function forspec(type, value) {
2598
+ if (value == "await") return cont(forspec);
2553
2599
  if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
2554
2600
  }
2555
2601
  function forspec1(type) {
@@ -2573,12 +2619,13 @@ module.exports =
2573
2619
  function functiondef(type, value) {
2574
2620
  if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
2575
2621
  if (type == "variable") {register(value); return cont(functiondef);}
2576
- if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext);
2577
- if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef)
2622
+ if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
2623
+ if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
2578
2624
  }
2579
2625
  function funarg(type, value) {
2580
2626
  if (value == "@") cont(expression, funarg)
2581
- if (type == "spread" || type == "modifier") return cont(funarg);
2627
+ if (type == "spread") return cont(funarg);
2628
+ if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
2582
2629
  return pass(pattern, maybetype, maybeAssign);
2583
2630
  }
2584
2631
  function classExpression(type, value) {
@@ -2590,15 +2637,17 @@ module.exports =
2590
2637
  if (type == "variable") {register(value); return cont(classNameAfter);}
2591
2638
  }
2592
2639
  function classNameAfter(type, value) {
2593
- if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, classNameAfter)
2594
- if (value == "extends" || value == "implements" || (isTS && type == ","))
2640
+ if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
2641
+ if (value == "extends" || value == "implements" || (isTS && type == ",")) {
2642
+ if (value == "implements") cx.marked = "keyword";
2595
2643
  return cont(isTS ? typeexpr : expression, classNameAfter);
2644
+ }
2596
2645
  if (type == "{") return cont(pushlex("}"), classBody, poplex);
2597
2646
  }
2598
2647
  function classBody(type, value) {
2599
- if (type == "modifier" || type == "async" ||
2648
+ if (type == "async" ||
2600
2649
  (type == "variable" &&
2601
- (value == "static" || value == "get" || value == "set") &&
2650
+ (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
2602
2651
  cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
2603
2652
  cx.marked = "keyword";
2604
2653
  return cont(classBody);
@@ -2608,7 +2657,7 @@ module.exports =
2608
2657
  return cont(isTS ? classfield : functiondef, classBody);
2609
2658
  }
2610
2659
  if (type == "[")
2611
- return cont(expression, expect("]"), isTS ? classfield : functiondef, classBody)
2660
+ return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody)
2612
2661
  if (value == "*") {
2613
2662
  cx.marked = "keyword";
2614
2663
  return cont(classBody);
@@ -2635,6 +2684,7 @@ module.exports =
2635
2684
  }
2636
2685
  function afterImport(type) {
2637
2686
  if (type == "string") return cont();
2687
+ if (type == "(") return pass(expression);
2638
2688
  return pass(importSpec, maybeMoreImports, maybeFrom);
2639
2689
  }
2640
2690
  function importSpec(type, value) {
@@ -2656,6 +2706,12 @@ module.exports =
2656
2706
  if (type == "]") return cont();
2657
2707
  return pass(commasep(expressionNoComma, "]"));
2658
2708
  }
2709
+ function enumdef() {
2710
+ return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
2711
+ }
2712
+ function enummember() {
2713
+ return pass(pattern, maybeAssign);
2714
+ }
2659
2715
 
2660
2716
  function isContinuedStatement(state, textAfter) {
2661
2717
  return state.lastType == "operator" || state.lastType == "," ||
@@ -2679,7 +2735,7 @@ module.exports =
2679
2735
  cc: [],
2680
2736
  lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
2681
2737
  localVars: parserConfig.localVars,
2682
- context: parserConfig.localVars && {vars: parserConfig.localVars},
2738
+ context: parserConfig.localVars && new Context(null, null, false),
2683
2739
  indented: basecolumn || 0
2684
2740
  };
2685
2741
  if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
@@ -2720,7 +2776,7 @@ module.exports =
2720
2776
  lexical = lexical.prev;
2721
2777
  var type = lexical.type, closing = firstChar == type;
2722
2778
 
2723
- if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
2779
+ if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
2724
2780
  else if (type == "form" && firstChar == "{") return lexical.indented;
2725
2781
  else if (type == "form") return lexical.indented + indentUnit;
2726
2782
  else if (type == "stat")
@@ -2769,14 +2825,19 @@ module.exports =
2769
2825
 
2770
2826
 
2771
2827
  /***/ },
2772
- /* 28 */,
2773
- /* 29 */
2828
+ /* 43 */,
2829
+ /* 44 */,
2830
+ /* 45 */,
2831
+ /* 46 */,
2832
+ /* 47 */,
2833
+ /* 48 */,
2834
+ /* 49 */
2774
2835
  /***/ function(module, exports) {
2775
2836
 
2776
2837
  // removed by extract-text-webpack-plugin
2777
2838
 
2778
2839
  /***/ },
2779
- /* 30 */
2840
+ /* 50 */
2780
2841
  /***/ function(module, exports, __webpack_require__) {
2781
2842
 
2782
2843
  /* WEBPACK VAR INJECTION */(function(Buffer) {/* cpexcel.js (C) 2013-present SheetJS -- http://sheetjs.com */
@@ -4285,45 +4346,42 @@ module.exports =
4285
4346
  return cpt;
4286
4347
  }));
4287
4348
 
4288
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer))
4349
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29).Buffer))
4289
4350
 
4290
4351
  /***/ },
4291
- /* 31 */
4352
+ /* 51 */
4292
4353
  /***/ function(module, exports) {
4293
4354
 
4294
4355
  module.exports = require("react-codemirror2");
4295
4356
 
4296
4357
  /***/ },
4297
- /* 32 */
4358
+ /* 52 */
4298
4359
  /***/ function(module, exports) {
4299
4360
 
4300
4361
  /* (ignored) */
4301
4362
 
4302
4363
  /***/ },
4303
- /* 33 */,
4304
- /* 34 */,
4305
- /* 35 */,
4306
- /* 36 */,
4307
- /* 37 */,
4308
- /* 38 */,
4309
- /* 39 */,
4310
- /* 40 */,
4311
- /* 41 */,
4312
- /* 42 */,
4313
- /* 43 */,
4314
- /* 44 */,
4315
- /* 45 */,
4316
- /* 46 */,
4317
- /* 47 */,
4318
- /* 48 */
4364
+ /* 53 */,
4365
+ /* 54 */,
4366
+ /* 55 */,
4367
+ /* 56 */,
4368
+ /* 57 */,
4369
+ /* 58 */,
4370
+ /* 59 */,
4371
+ /* 60 */,
4372
+ /* 61 */,
4373
+ /* 62 */,
4374
+ /* 63 */,
4375
+ /* 64 */,
4376
+ /* 65 */
4319
4377
  /***/ function(module, exports) {
4320
4378
 
4321
4379
  module.exports = require("react-dropzone");
4322
4380
 
4323
4381
  /***/ },
4324
- /* 49 */,
4325
- /* 50 */,
4326
- /* 51 */
4382
+ /* 66 */,
4383
+ /* 67 */,
4384
+ /* 68 */
4327
4385
  /***/ function(module, exports, __webpack_require__) {
4328
4386
 
4329
4387
  'use strict';
@@ -4338,7 +4396,7 @@ module.exports =
4338
4396
 
4339
4397
  var _react2 = _interopRequireDefault(_react);
4340
4398
 
4341
- var _clipboard = __webpack_require__(57);
4399
+ var _clipboard = __webpack_require__(75);
4342
4400
 
4343
4401
  var _clipboard2 = _interopRequireDefault(_clipboard);
4344
4402
 
@@ -4469,7 +4527,7 @@ module.exports =
4469
4527
  exports.default = AdapterSecret;
4470
4528
 
4471
4529
  /***/ },
4472
- /* 52 */
4530
+ /* 69 */
4473
4531
  /***/ function(module, exports, __webpack_require__) {
4474
4532
 
4475
4533
  'use strict';
@@ -4486,23 +4544,23 @@ module.exports =
4486
4544
 
4487
4545
  var _react2 = _interopRequireDefault(_react);
4488
4546
 
4489
- var _reactDropzone = __webpack_require__(48);
4547
+ var _reactDropzone = __webpack_require__(65);
4490
4548
 
4491
4549
  var _reactDropzone2 = _interopRequireDefault(_reactDropzone);
4492
4550
 
4493
- var _papaparse = __webpack_require__(76);
4551
+ var _papaparse = __webpack_require__(106);
4494
4552
 
4495
4553
  var _papaparse2 = _interopRequireDefault(_papaparse);
4496
4554
 
4497
- var _xlsx = __webpack_require__(75);
4555
+ var _xlsx = __webpack_require__(105);
4498
4556
 
4499
4557
  var _xlsx2 = _interopRequireDefault(_xlsx);
4500
4558
 
4501
- var _moment = __webpack_require__(11);
4559
+ var _moment = __webpack_require__(26);
4502
4560
 
4503
4561
  var _moment2 = _interopRequireDefault(_moment);
4504
4562
 
4505
- var _reactBootstrap = __webpack_require__(3);
4563
+ var _reactBootstrap = __webpack_require__(4);
4506
4564
 
4507
4565
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4508
4566
 
@@ -4521,7 +4579,7 @@ module.exports =
4521
4579
  f = Math.floor(Math.log(a) / Math.log(c));return parseFloat((a / Math.pow(c, f)).toFixed(d)) + " " + e[f];
4522
4580
  }
4523
4581
 
4524
- var extensionBlacklist = ['xml', 'zip', 'tar', 'gz'];
4582
+ var extensionBlacklist = ['zip', 'tar', 'gz'];
4525
4583
 
4526
4584
  var FlatFile = function (_Component) {
4527
4585
  _inherits(FlatFile, _Component);
@@ -4540,33 +4598,27 @@ module.exports =
4540
4598
  console.log('err when trying to parse json = ' + err);
4541
4599
  }
4542
4600
  if (json) {
4543
- var _ret = function () {
4544
- var fields = [];
4545
- json.forEach(function (row) {
4546
- Object.keys(row).forEach(function (col) {
4547
- if (!fields.find(function (f) {
4548
- return f.label === col;
4549
- })) {
4550
- fields.push({
4551
- label: col,
4552
- name: col,
4553
- type: row[col] && _typeof(row[col])
4554
- });
4555
- }
4556
- });
4601
+ var fields = [];
4602
+ json.forEach(function (row) {
4603
+ Object.keys(row).forEach(function (col) {
4604
+ if (!fields.find(function (f) {
4605
+ return f.label === col;
4606
+ })) {
4607
+ fields.push({
4608
+ label: col,
4609
+ name: col,
4610
+ type: row[col] && _typeof(row[col])
4611
+ });
4612
+ }
4557
4613
  });
4558
- var meta = {
4559
- name: file.name,
4560
- type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
4561
- byteSize: file.size,
4562
- properties: fields
4563
- };
4564
- return {
4565
- v: meta
4566
- };
4567
- }();
4568
-
4569
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
4614
+ });
4615
+ var meta = {
4616
+ name: file.name,
4617
+ type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
4618
+ byteSize: file.size,
4619
+ properties: fields
4620
+ };
4621
+ return meta;
4570
4622
  }
4571
4623
  };
4572
4624
 
@@ -4612,82 +4664,90 @@ module.exports =
4612
4664
  var extension = file.name.substr(file.name.lastIndexOf('.') + 1, file.name.length);
4613
4665
  var blacklisted = extensionBlacklist.includes(extension);
4614
4666
  if (!blacklisted) {
4615
- (function () {
4616
- var isXLS = extension === 'xlsx' || extension === 'xls';
4617
-
4618
- var reader = new FileReader();
4619
- reader.onload = function (e) {
4620
-
4621
- // PARSE METADATA
4622
- var data = e.target.result;
4623
- var csv = null;
4624
- if (isXLS) {
4625
- (function () {
4626
- var sheetCounter = 0;
4627
- var binary = data;
4628
- /*const bytes = new Uint8Array(data)
4629
- for (var i = 0; i < length; i++) {
4630
- binary += String.fromCharCode(bytes[i]);
4631
- }*/
4632
- var workbook = _xlsx2.default.read(binary, { type: 'binary' });
4633
- var sheetNames = workbook.SheetNames.filter(function (sn) {
4634
- return sn !== 'Export Summary';
4635
- });
4636
- sheetNames.forEach(function (sn) {
4637
- csv = _xlsx2.default.utils.sheet_to_csv(workbook.Sheets[sn]);
4638
- _this.parseCSV(file, csv).then(function (xlsMeta) {
4639
- meta = meta.concat(Object.assign({}, xlsMeta, {
4640
- sheetName: sn,
4641
- fileType: extension
4642
- }));
4643
- sheetCounter += 1;
4644
- counter += 1;
4645
- if (counter >= fs.length && sheetCounter === sheetNames.length) {
4646
- _this.setState({ meta: meta });
4647
- _this.props.onDrop();
4648
- }
4649
- });
4650
- });
4651
- })();
4652
- } else if (extension === 'csv') {
4653
- _this.parseCSV(file, csv).then(function (csvMeta) {
4654
- meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4667
+ var isXLS = extension === 'xlsx' || extension === 'xls';
4668
+
4669
+ var reader = new FileReader();
4670
+ reader.onload = function (e) {
4671
+
4672
+ // PARSE METADATA
4673
+ var data = e.target.result;
4674
+ var csv = null;
4675
+ if (isXLS) {
4676
+ var sheetCounter = 0;
4677
+ var binary = data;
4678
+ /*const bytes = new Uint8Array(data)
4679
+ for (var i = 0; i < length; i++) {
4680
+ binary += String.fromCharCode(bytes[i]);
4681
+ }*/
4682
+ var workbook = _xlsx2.default.read(binary, { type: 'binary' });
4683
+ var sheetNames = workbook.SheetNames.filter(function (sn) {
4684
+ return sn !== 'Export Summary';
4685
+ });
4686
+ sheetNames.forEach(function (sn) {
4687
+ csv = _xlsx2.default.utils.sheet_to_csv(workbook.Sheets[sn]);
4688
+ _this.parseCSV(file, csv).then(function (xlsMeta) {
4689
+ meta = meta.concat(Object.assign({}, xlsMeta, {
4690
+ sheetName: sn,
4691
+ fileType: extension
4692
+ }));
4693
+ sheetCounter += 1;
4655
4694
  counter += 1;
4656
- if (counter === fs.length) {
4695
+ if (counter >= fs.length && sheetCounter === sheetNames.length) {
4657
4696
  _this.setState({ meta: meta });
4658
4697
  _this.props.onDrop();
4659
4698
  }
4660
4699
  });
4661
- } else if (extension === 'json' || extension === 'jsonl') {
4662
- var d = data;
4663
- if (extension === 'jsonl') {
4664
- d = _this.parseJsonLines(data);
4700
+ });
4701
+ } else if (extension === 'csv') {
4702
+ _this.parseCSV(file, csv).then(function (csvMeta) {
4703
+ meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4704
+ counter += 1;
4705
+ if (counter === fs.length) {
4706
+ _this.setState({ meta: meta });
4707
+ _this.props.onDrop();
4665
4708
  }
4666
- var fileMeta = _this.parseJsonFile(d, file);
4667
- if (fileMeta) {
4668
- meta = meta.concat(Object.assign({}, fileMeta, { fileType: extension }));
4669
- counter += 1;
4670
- if (counter === fs.length) {
4671
- _this.setState({ meta: meta });
4672
- _this.props.onDrop();
4673
- }
4709
+ });
4710
+ } else if (extension === 'json' || extension === 'jsonl') {
4711
+ var d = data;
4712
+ if (extension === 'jsonl') {
4713
+ d = _this.parseJsonLines(data);
4714
+ }
4715
+ var fileMeta = _this.parseJsonFile(d, file);
4716
+ if (fileMeta) {
4717
+ meta = meta.concat(Object.assign({}, fileMeta, { fileType: extension }));
4718
+ counter += 1;
4719
+ if (counter === fs.length) {
4720
+ _this.setState({ meta: meta });
4721
+ _this.props.onDrop();
4674
4722
  }
4675
4723
  }
4676
-
4677
- // ADD TO CONTENTS, TO UPLOAD
4678
- fileContents = fileContents.concat(file);
4679
- contentCounter += 1;
4680
- if (contentCounter === fs.length) {
4681
- _this.setState({ fileContents: fileContents });
4724
+ } else if (extension === 'txt' || extension === 'xml') {
4725
+ var csvMeta = {
4726
+ name: file.name,
4727
+ type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
4728
+ byteSize: file.size
4729
+ };
4730
+ meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4731
+ counter += 1;
4732
+ if (counter === fs.length) {
4733
+ _this.setState({ meta: meta });
4734
+ _this.props.onDrop();
4682
4735
  }
4683
- }; // end file reader on load callback
4736
+ }
4684
4737
 
4685
- if (isXLS) {
4686
- reader.readAsBinaryString(file); // read as array buffer???
4687
- } else {
4688
- reader.readAsText(file);
4738
+ // ADD TO CONTENTS, TO UPLOAD
4739
+ fileContents = fileContents.concat(file);
4740
+ contentCounter += 1;
4741
+ if (contentCounter === fs.length) {
4742
+ _this.setState({ fileContents: fileContents });
4689
4743
  }
4690
- })();
4744
+ }; // end file reader on load callback
4745
+
4746
+ if (isXLS) {
4747
+ reader.readAsBinaryString(file); // read as array buffer???
4748
+ } else {
4749
+ reader.readAsText(file);
4750
+ }
4691
4751
  } else {
4692
4752
  _this.setState({ dropError: 'File type not accepted.' });
4693
4753
  setTimeout(function () {
@@ -5004,7 +5064,7 @@ module.exports =
5004
5064
  exports.default = FlatFile;
5005
5065
 
5006
5066
  /***/ },
5007
- /* 53 */
5067
+ /* 70 */
5008
5068
  /***/ function(module, exports, __webpack_require__) {
5009
5069
 
5010
5070
  'use strict';
@@ -5019,7 +5079,7 @@ module.exports =
5019
5079
 
5020
5080
  var _react2 = _interopRequireDefault(_react);
5021
5081
 
5022
- __webpack_require__(29);
5082
+ __webpack_require__(49);
5023
5083
 
5024
5084
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5025
5085
 
@@ -5032,8 +5092,8 @@ module.exports =
5032
5092
  // SKIP ON SERVER-SIDE RENDERING
5033
5093
  var codemirror = null;
5034
5094
  if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
5035
- codemirror = __webpack_require__(31);
5036
- __webpack_require__(27);
5095
+ codemirror = __webpack_require__(51);
5096
+ __webpack_require__(42);
5037
5097
  }
5038
5098
 
5039
5099
  function unCamelize(text) {
@@ -5188,7 +5248,7 @@ module.exports =
5188
5248
  exports.default = Google;
5189
5249
 
5190
5250
  /***/ },
5191
- /* 54 */
5251
+ /* 71 */
5192
5252
  /***/ function(module, exports, __webpack_require__) {
5193
5253
 
5194
5254
  'use strict';
@@ -5203,23 +5263,27 @@ module.exports =
5203
5263
 
5204
5264
  var _react2 = _interopRequireDefault(_react);
5205
5265
 
5206
- var _flatfile = __webpack_require__(52);
5266
+ var _flatfile = __webpack_require__(69);
5207
5267
 
5208
5268
  var _flatfile2 = _interopRequireDefault(_flatfile);
5209
5269
 
5210
- var _google = __webpack_require__(53);
5270
+ var _google = __webpack_require__(70);
5211
5271
 
5212
5272
  var _google2 = _interopRequireDefault(_google);
5213
5273
 
5214
- var _adaptersecret = __webpack_require__(51);
5274
+ var _adaptersecret = __webpack_require__(68);
5215
5275
 
5216
5276
  var _adaptersecret2 = _interopRequireDefault(_adaptersecret);
5217
5277
 
5218
- var _oauth = __webpack_require__(55);
5278
+ var _websocket = __webpack_require__(74);
5279
+
5280
+ var _websocket2 = _interopRequireDefault(_websocket);
5281
+
5282
+ var _oauth = __webpack_require__(72);
5219
5283
 
5220
5284
  var _oauth2 = _interopRequireDefault(_oauth);
5221
5285
 
5222
- var _sftp = __webpack_require__(56);
5286
+ var _sftp = __webpack_require__(73);
5223
5287
 
5224
5288
  var _sftp2 = _interopRequireDefault(_sftp);
5225
5289
 
@@ -5273,12 +5337,23 @@ module.exports =
5273
5337
  _createClass(EnvSection, [{
5274
5338
  key: 'componentWillMount',
5275
5339
  value: function componentWillMount() {
5276
- var creds = this.props.creds;
5277
-
5278
-
5279
- this.setState({ actualCreds: Object.assign({}, creds, {
5280
- rootUrl: creds.rootUrl || 'https://'
5281
- }) });
5340
+ var _props = this.props,
5341
+ creds = _props.creds,
5342
+ config = _props.config;
5343
+
5344
+ if (config.type === 'SFTP') {
5345
+ this.setState({ actualCreds: Object.assign({}, creds, {
5346
+ filePattern: '*.*'
5347
+ }) });
5348
+ } else if (config.type === 'LingkWebSocket') {
5349
+ this.setState({ actualCreds: Object.assign({}, creds, {
5350
+ rootUrl: creds.rootUrl || 'wss://'
5351
+ }) });
5352
+ } else {
5353
+ this.setState({ actualCreds: Object.assign({}, creds, {
5354
+ rootUrl: creds.rootUrl || 'https://'
5355
+ }) });
5356
+ }
5282
5357
  }
5283
5358
  }, {
5284
5359
  key: 'componentWillReceiveProps',
@@ -5302,27 +5377,26 @@ module.exports =
5302
5377
  value: function render() {
5303
5378
  var _this2 = this;
5304
5379
 
5305
- var _props = this.props,
5306
- config = _props.config,
5307
- tenantKey = _props.tenantKey,
5308
- accountKey = _props.accountKey,
5309
- wizard = _props.wizard,
5310
- adapterSecret = _props.adapterSecret,
5311
- checkOauthCreds = _props.checkOauthCreds,
5312
- fileSchema = _props.fileSchema,
5313
- getOauthUrl = _props.getOauthUrl,
5314
- generateNewAdapterSecret = _props.generateNewAdapterSecret,
5315
- setCsvFields = _props.setCsvFields,
5316
- check = _props.check,
5317
- checking = _props.checking,
5318
- inputs = _props.inputs,
5319
- envCheckResult = _props.envCheckResult,
5320
- clearCsvFields = _props.clearCsvFields,
5321
- formValues = _props.formValues,
5322
- change = _props.change,
5323
- downloadFileFromAws = _props.downloadFileFromAws,
5324
- deleteFlatFile = _props.deleteFlatFile;
5325
-
5380
+ var _props2 = this.props,
5381
+ config = _props2.config,
5382
+ tenantKey = _props2.tenantKey,
5383
+ accountKey = _props2.accountKey,
5384
+ wizard = _props2.wizard,
5385
+ adapterSecret = _props2.adapterSecret,
5386
+ checkOauthCreds = _props2.checkOauthCreds,
5387
+ fileSchema = _props2.fileSchema,
5388
+ getOauthUrl = _props2.getOauthUrl,
5389
+ generateNewAdapterSecret = _props2.generateNewAdapterSecret,
5390
+ setCsvFields = _props2.setCsvFields,
5391
+ check = _props2.check,
5392
+ checking = _props2.checking,
5393
+ inputs = _props2.inputs,
5394
+ envCheckResult = _props2.envCheckResult,
5395
+ clearCsvFields = _props2.clearCsvFields,
5396
+ formValues = _props2.formValues,
5397
+ change = _props2.change,
5398
+ downloadFileFromAws = _props2.downloadFileFromAws,
5399
+ deleteFlatFile = _props2.deleteFlatFile;
5326
5400
 
5327
5401
  var Button = inputs.Button;
5328
5402
  var Spinner = inputs.Spinner;
@@ -5340,6 +5414,8 @@ module.exports =
5340
5414
 
5341
5415
  var isAdapter = config && (config.metadataEndpoint === 'testconnection' || config.metadataEndpoint === 'adaptermetadata');
5342
5416
 
5417
+ var isWebSocket = config.type === 'LingkWebSocket';
5418
+
5343
5419
  var isAWS = config.type.startsWith('AWS');
5344
5420
 
5345
5421
  var isSFTP = config.type === 'SFTP';
@@ -5382,7 +5458,9 @@ module.exports =
5382
5458
  }) : isSFTP ? _react2.default.createElement(_sftp2.default, { config: config, creds: creds, onChange: this.onChange,
5383
5459
  credsDisabledCheck: credsDisabledCheck, inputs: inputs,
5384
5460
  onCheck: check
5385
- }) : _react2.default.createElement(
5461
+ }) : isWebSocket ? _react2.default.createElement(_websocket2.default, { creds: creds, onChange: this.onChange, checking: checking,
5462
+ credsDisabledCheck: credsDisabledCheck, inputs: inputs, credKeyPress: this.credKeyPress,
5463
+ onCheck: check, actualCreds: this.state.actualCreds, envCheckResult: envCheckResult }) : _react2.default.createElement(
5386
5464
  'div',
5387
5465
  null,
5388
5466
  !noRootUrl && _react2.default.createElement(
@@ -5541,7 +5619,7 @@ module.exports =
5541
5619
  };
5542
5620
 
5543
5621
  /***/ },
5544
- /* 55 */
5622
+ /* 72 */
5545
5623
  /***/ function(module, exports, __webpack_require__) {
5546
5624
 
5547
5625
  'use strict';
@@ -5820,7 +5898,7 @@ module.exports =
5820
5898
  exports.default = Oauth;
5821
5899
 
5822
5900
  /***/ },
5823
- /* 56 */
5901
+ /* 73 */
5824
5902
  /***/ function(module, exports, __webpack_require__) {
5825
5903
 
5826
5904
  'use strict';
@@ -5835,7 +5913,7 @@ module.exports =
5835
5913
 
5836
5914
  var _react2 = _interopRequireDefault(_react);
5837
5915
 
5838
- __webpack_require__(29);
5916
+ __webpack_require__(49);
5839
5917
 
5840
5918
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5841
5919
 
@@ -5848,8 +5926,8 @@ module.exports =
5848
5926
  // SKIP ON SERVER-SIDE RENDERING
5849
5927
  var codemirror = null;
5850
5928
  if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
5851
- codemirror = __webpack_require__(31);
5852
- __webpack_require__(27);
5929
+ codemirror = __webpack_require__(51);
5930
+ __webpack_require__(42);
5853
5931
  }
5854
5932
 
5855
5933
  function unCamelize(text) {
@@ -6049,7 +6127,126 @@ module.exports =
6049
6127
  exports.default = SFTP;
6050
6128
 
6051
6129
  /***/ },
6052
- /* 57 */
6130
+ /* 74 */
6131
+ /***/ function(module, exports, __webpack_require__) {
6132
+
6133
+ 'use strict';
6134
+
6135
+ Object.defineProperty(exports, "__esModule", {
6136
+ value: true
6137
+ });
6138
+
6139
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
6140
+
6141
+ var _react = __webpack_require__(1);
6142
+
6143
+ var _react2 = _interopRequireDefault(_react);
6144
+
6145
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6146
+
6147
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6148
+
6149
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6150
+
6151
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
6152
+
6153
+ var WebSocket = function (_Component) {
6154
+ _inherits(WebSocket, _Component);
6155
+
6156
+ function WebSocket() {
6157
+ _classCallCheck(this, WebSocket);
6158
+
6159
+ return _possibleConstructorReturn(this, (WebSocket.__proto__ || Object.getPrototypeOf(WebSocket)).apply(this, arguments));
6160
+ }
6161
+
6162
+ _createClass(WebSocket, [{
6163
+ key: 'render',
6164
+ value: function render() {
6165
+ var _props = this.props,
6166
+ creds = _props.creds,
6167
+ checking = _props.checking,
6168
+ onChange = _props.onChange,
6169
+ credsDisabledCheck = _props.credsDisabledCheck,
6170
+ inputs = _props.inputs,
6171
+ onCheck = _props.onCheck,
6172
+ credKeyPress = _props.credKeyPress,
6173
+ actualCreds = _props.actualCreds,
6174
+ envCheckResult = _props.envCheckResult;
6175
+
6176
+
6177
+ var Input = inputs.Input;
6178
+ var Spinner = inputs.Spinner;
6179
+ var Button = inputs.Button;
6180
+ var hasEndpoint = creds && creds.rootUrl && creds.rootUrl.length > 8 && creds.query;
6181
+
6182
+ return _react2.default.createElement(
6183
+ 'div',
6184
+ { style: { marginLeft: 16 } },
6185
+ _react2.default.createElement(
6186
+ 'div',
6187
+ { style: { display: 'inline-block', width: 300 } },
6188
+ _react2.default.createElement(
6189
+ 'label',
6190
+ { htmlFor: 'rootUrl', className: 'labelz' },
6191
+ 'Data Source Endpoint'
6192
+ ),
6193
+ _react2.default.createElement(Input, { name: 'rootUrl',
6194
+ onKeyPress: credKeyPress,
6195
+ value: actualCreds.rootUrl || '',
6196
+ onChange: onChange })
6197
+ ),
6198
+ _react2.default.createElement('br', null),
6199
+ _react2.default.createElement('br', null),
6200
+ _react2.default.createElement(
6201
+ 'div',
6202
+ { style: { display: 'inline-block', width: 300 } },
6203
+ _react2.default.createElement(
6204
+ 'label',
6205
+ { htmlFor: 'rootUrl', className: 'labelz' },
6206
+ 'Enter Sample Query'
6207
+ ),
6208
+ _react2.default.createElement(Input, { name: 'query',
6209
+ onKeyPress: credKeyPress,
6210
+ value: actualCreds.query || '',
6211
+ onChange: onChange })
6212
+ ),
6213
+ _react2.default.createElement(
6214
+ Button,
6215
+ {
6216
+ type: 'brand',
6217
+ onClick: function onClick() {
6218
+ return onCheck(creds);
6219
+ },
6220
+ style: { marginLeft: 8, marginBottom: 2, height: 30, lineHeight: '10px', marginTop: -1 },
6221
+ disabled: !hasEndpoint || credsDisabledCheck },
6222
+ _react2.default.createElement(
6223
+ 'span',
6224
+ { style: { display: 'inline-block', verticalAlign: 'top', marginTop: 3 } },
6225
+ 'Test Connection'
6226
+ ),
6227
+ '\xA0\xA0'
6228
+ ),
6229
+ _react2.default.createElement(
6230
+ 'div',
6231
+ { style: { display: 'inline-block', marginLeft: 12 } },
6232
+ checking && _react2.default.createElement(Spinner, null),
6233
+ envCheckResult && _react2.default.createElement(
6234
+ 'span',
6235
+ null,
6236
+ envCheckResult
6237
+ )
6238
+ )
6239
+ );
6240
+ }
6241
+ }]);
6242
+
6243
+ return WebSocket;
6244
+ }(_react.Component);
6245
+
6246
+ exports.default = WebSocket;
6247
+
6248
+ /***/ },
6249
+ /* 75 */
6053
6250
  /***/ function(module, exports, __webpack_require__) {
6054
6251
 
6055
6252
  "use strict";
@@ -6230,17 +6427,9 @@ module.exports =
6230
6427
  });
6231
6428
 
6232
6429
  /***/ },
6233
- /* 58 */,
6234
- /* 59 */,
6235
- /* 60 */,
6236
- /* 61 */,
6237
- /* 62 */,
6238
- /* 63 */,
6239
- /* 64 */,
6240
- /* 65 */,
6241
- /* 66 */,
6242
- /* 67 */,
6243
- /* 68 */
6430
+ /* 76 */,
6431
+ /* 77 */,
6432
+ /* 78 */
6244
6433
  /***/ function(module, exports) {
6245
6434
 
6246
6435
  'use strict'
@@ -6259,68 +6448,102 @@ module.exports =
6259
6448
  revLookup[code.charCodeAt(i)] = i
6260
6449
  }
6261
6450
 
6451
+ // Support decoding URL-safe base64 strings, as Node.js does.
6452
+ // See: https://en.wikipedia.org/wiki/Base64#URL_applications
6262
6453
  revLookup['-'.charCodeAt(0)] = 62
6263
6454
  revLookup['_'.charCodeAt(0)] = 63
6264
6455
 
6265
- function placeHoldersCount (b64) {
6456
+ function getLens (b64) {
6266
6457
  var len = b64.length
6458
+
6267
6459
  if (len % 4 > 0) {
6268
6460
  throw new Error('Invalid string. Length must be a multiple of 4')
6269
6461
  }
6270
6462
 
6271
- // the number of equal signs (place holders)
6272
- // if there are two placeholders, than the two characters before it
6273
- // represent one byte
6274
- // if there is only one, then the three characters before it represent 2 bytes
6275
- // this is just a cheap hack to not do indexOf twice
6276
- return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
6463
+ // Trim off extra bytes after placeholder bytes are found
6464
+ // See: https://github.com/beatgammit/base64-js/issues/42
6465
+ var validLen = b64.indexOf('=')
6466
+ if (validLen === -1) validLen = len
6467
+
6468
+ var placeHoldersLen = validLen === len
6469
+ ? 0
6470
+ : 4 - (validLen % 4)
6471
+
6472
+ return [validLen, placeHoldersLen]
6277
6473
  }
6278
6474
 
6475
+ // base64 is 4/3 + up to two characters of the original data
6279
6476
  function byteLength (b64) {
6280
- // base64 is 4/3 + up to two characters of the original data
6281
- return b64.length * 3 / 4 - placeHoldersCount(b64)
6477
+ var lens = getLens(b64)
6478
+ var validLen = lens[0]
6479
+ var placeHoldersLen = lens[1]
6480
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
6481
+ }
6482
+
6483
+ function _byteLength (b64, validLen, placeHoldersLen) {
6484
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
6282
6485
  }
6283
6486
 
6284
6487
  function toByteArray (b64) {
6285
- var i, j, l, tmp, placeHolders, arr
6286
- var len = b64.length
6287
- placeHolders = placeHoldersCount(b64)
6488
+ var tmp
6489
+ var lens = getLens(b64)
6490
+ var validLen = lens[0]
6491
+ var placeHoldersLen = lens[1]
6492
+
6493
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
6288
6494
 
6289
- arr = new Arr(len * 3 / 4 - placeHolders)
6495
+ var curByte = 0
6290
6496
 
6291
6497
  // if there are placeholders, only get up to the last complete 4 chars
6292
- l = placeHolders > 0 ? len - 4 : len
6498
+ var len = placeHoldersLen > 0
6499
+ ? validLen - 4
6500
+ : validLen
6293
6501
 
6294
- var L = 0
6502
+ for (var i = 0; i < len; i += 4) {
6503
+ tmp =
6504
+ (revLookup[b64.charCodeAt(i)] << 18) |
6505
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
6506
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
6507
+ revLookup[b64.charCodeAt(i + 3)]
6508
+ arr[curByte++] = (tmp >> 16) & 0xFF
6509
+ arr[curByte++] = (tmp >> 8) & 0xFF
6510
+ arr[curByte++] = tmp & 0xFF
6511
+ }
6295
6512
 
6296
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
6297
- tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
6298
- arr[L++] = (tmp >> 16) & 0xFF
6299
- arr[L++] = (tmp >> 8) & 0xFF
6300
- arr[L++] = tmp & 0xFF
6513
+ if (placeHoldersLen === 2) {
6514
+ tmp =
6515
+ (revLookup[b64.charCodeAt(i)] << 2) |
6516
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
6517
+ arr[curByte++] = tmp & 0xFF
6301
6518
  }
6302
6519
 
6303
- if (placeHolders === 2) {
6304
- tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
6305
- arr[L++] = tmp & 0xFF
6306
- } else if (placeHolders === 1) {
6307
- tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
6308
- arr[L++] = (tmp >> 8) & 0xFF
6309
- arr[L++] = tmp & 0xFF
6520
+ if (placeHoldersLen === 1) {
6521
+ tmp =
6522
+ (revLookup[b64.charCodeAt(i)] << 10) |
6523
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
6524
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
6525
+ arr[curByte++] = (tmp >> 8) & 0xFF
6526
+ arr[curByte++] = tmp & 0xFF
6310
6527
  }
6311
6528
 
6312
6529
  return arr
6313
6530
  }
6314
6531
 
6315
6532
  function tripletToBase64 (num) {
6316
- return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
6533
+ return lookup[num >> 18 & 0x3F] +
6534
+ lookup[num >> 12 & 0x3F] +
6535
+ lookup[num >> 6 & 0x3F] +
6536
+ lookup[num & 0x3F]
6317
6537
  }
6318
6538
 
6319
6539
  function encodeChunk (uint8, start, end) {
6320
6540
  var tmp
6321
6541
  var output = []
6322
6542
  for (var i = start; i < end; i += 3) {
6323
- tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
6543
+ tmp =
6544
+ ((uint8[i] << 16) & 0xFF0000) +
6545
+ ((uint8[i + 1] << 8) & 0xFF00) +
6546
+ (uint8[i + 2] & 0xFF)
6324
6547
  output.push(tripletToBase64(tmp))
6325
6548
  }
6326
6549
  return output.join('')
@@ -6330,37 +6553,40 @@ module.exports =
6330
6553
  var tmp
6331
6554
  var len = uint8.length
6332
6555
  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
6333
- var output = ''
6334
6556
  var parts = []
6335
6557
  var maxChunkLength = 16383 // must be multiple of 3
6336
6558
 
6337
6559
  // go through the array every three bytes, we'll deal with trailing stuff later
6338
6560
  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
6339
- parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
6561
+ parts.push(encodeChunk(
6562
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
6563
+ ))
6340
6564
  }
6341
6565
 
6342
6566
  // pad the end with zeros, but make sure to not forget the extra bytes
6343
6567
  if (extraBytes === 1) {
6344
6568
  tmp = uint8[len - 1]
6345
- output += lookup[tmp >> 2]
6346
- output += lookup[(tmp << 4) & 0x3F]
6347
- output += '=='
6569
+ parts.push(
6570
+ lookup[tmp >> 2] +
6571
+ lookup[(tmp << 4) & 0x3F] +
6572
+ '=='
6573
+ )
6348
6574
  } else if (extraBytes === 2) {
6349
- tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
6350
- output += lookup[tmp >> 10]
6351
- output += lookup[(tmp >> 4) & 0x3F]
6352
- output += lookup[(tmp << 2) & 0x3F]
6353
- output += '='
6575
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
6576
+ parts.push(
6577
+ lookup[tmp >> 10] +
6578
+ lookup[(tmp >> 4) & 0x3F] +
6579
+ lookup[(tmp << 2) & 0x3F] +
6580
+ '='
6581
+ )
6354
6582
  }
6355
6583
 
6356
- parts.push(output)
6357
-
6358
6584
  return parts.join('')
6359
6585
  }
6360
6586
 
6361
6587
 
6362
6588
  /***/ },
6363
- /* 69 */
6589
+ /* 79 */
6364
6590
  /***/ function(module, exports, __webpack_require__) {
6365
6591
 
6366
6592
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -7111,6 +7337,16 @@ module.exports =
7111
7337
  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
7112
7338
  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
7113
7339
 
7340
+ function collapsedSpanAround(line, ch) {
7341
+ var sps = sawCollapsedSpans && line.markedSpans, found;
7342
+ if (sps) { for (var i = 0; i < sps.length; ++i) {
7343
+ var sp = sps[i];
7344
+ if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
7345
+ (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
7346
+ } }
7347
+ return found
7348
+ }
7349
+
7114
7350
  // Test whether there exists a collapsed span that partially
7115
7351
  // overlaps (covers the start or end, but not both) of a new span.
7116
7352
  // Such overlap is not allowed.
@@ -9145,12 +9381,11 @@ module.exports =
9145
9381
  var lineObj = getLine(doc, lineN);
9146
9382
  for (;;) {
9147
9383
  var found = coordsCharInner(cm, lineObj, lineN, x, y);
9148
- var merged = collapsedSpanAtEnd(lineObj);
9149
- var mergedPos = merged && merged.find(0, true);
9150
- if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
9151
- { lineN = lineNo(lineObj = mergedPos.to.line); }
9152
- else
9153
- { return found }
9384
+ var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));
9385
+ if (!collapsed) { return found }
9386
+ var rangeEnd = collapsed.find(1);
9387
+ if (rangeEnd.line == lineN) { return rangeEnd }
9388
+ lineObj = getLine(doc, lineN = rangeEnd.line);
9154
9389
  }
9155
9390
  }
9156
9391
 
@@ -9641,8 +9876,10 @@ module.exports =
9641
9876
  // Read and store the height of line widgets associated with the
9642
9877
  // given line.
9643
9878
  function updateWidgetHeight(line) {
9644
- if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
9645
- { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }
9879
+ if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
9880
+ var w = line.widgets[i], parent = w.node.parentNode;
9881
+ if (parent) { w.height = parent.offsetHeight; }
9882
+ } }
9646
9883
  }
9647
9884
 
9648
9885
  // Compute the lines that are visible in a given viewport (defaults
@@ -9908,6 +10145,7 @@ module.exports =
9908
10145
  this.cm = cm;
9909
10146
  var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
9910
10147
  var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
10148
+ vert.tabIndex = horiz.tabIndex = -1;
9911
10149
  place(vert); place(horiz);
9912
10150
 
9913
10151
  on(vert, "scroll", function () {
@@ -11159,7 +11397,7 @@ module.exports =
11159
11397
 
11160
11398
  if ((hist.lastOp == opId ||
11161
11399
  hist.lastOrigin == change.origin && change.origin &&
11162
- ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||
11400
+ ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
11163
11401
  change.origin.charAt(0) == "*")) &&
11164
11402
  (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
11165
11403
  // Merge this change into the last event
@@ -11588,7 +11826,8 @@ module.exports =
11588
11826
 
11589
11827
  // Revert a change stored in a document's history.
11590
11828
  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
11591
- if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) { return }
11829
+ var suppress = doc.cm && doc.cm.state.suppressEdits;
11830
+ if (suppress && !allowSelectionOnly) { return }
11592
11831
 
11593
11832
  var hist = doc.history, event, selAfter = doc.sel;
11594
11833
  var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
@@ -11613,8 +11852,10 @@ module.exports =
11613
11852
  return
11614
11853
  }
11615
11854
  selAfter = event;
11616
- }
11617
- else { break }
11855
+ } else if (suppress) {
11856
+ source.push(event);
11857
+ return
11858
+ } else { break }
11618
11859
  }
11619
11860
 
11620
11861
  // Build up a reverse change object to add to the opposite history
@@ -11770,7 +12011,7 @@ module.exports =
11770
12011
  function replaceRange(doc, code, from, to, origin) {
11771
12012
  if (!to) { to = from; }
11772
12013
  if (cmp(to, from) < 0) { var assign;
11773
- (assign = [to, from], from = assign[0], to = assign[1], assign); }
12014
+ (assign = [to, from], from = assign[0], to = assign[1]); }
11774
12015
  if (typeof code == "string") { code = doc.splitLines(code); }
11775
12016
  makeChange(doc, {from: from, to: to, text: code, origin: origin});
11776
12017
  }
@@ -11866,10 +12107,10 @@ module.exports =
11866
12107
  }
11867
12108
 
11868
12109
  LeafChunk.prototype = {
11869
- chunkSize: function chunkSize() { return this.lines.length },
12110
+ chunkSize: function() { return this.lines.length },
11870
12111
 
11871
12112
  // Remove the n lines at offset 'at'.
11872
- removeInner: function removeInner(at, n) {
12113
+ removeInner: function(at, n) {
11873
12114
  var this$1 = this;
11874
12115
 
11875
12116
  for (var i = at, e = at + n; i < e; ++i) {
@@ -11882,13 +12123,13 @@ module.exports =
11882
12123
  },
11883
12124
 
11884
12125
  // Helper used to collapse a small branch into a single leaf.
11885
- collapse: function collapse(lines) {
12126
+ collapse: function(lines) {
11886
12127
  lines.push.apply(lines, this.lines);
11887
12128
  },
11888
12129
 
11889
12130
  // Insert the given array of lines at offset 'at', count them as
11890
12131
  // having the given height.
11891
- insertInner: function insertInner(at, lines, height) {
12132
+ insertInner: function(at, lines, height) {
11892
12133
  var this$1 = this;
11893
12134
 
11894
12135
  this.height += height;
@@ -11897,7 +12138,7 @@ module.exports =
11897
12138
  },
11898
12139
 
11899
12140
  // Used to iterate over a part of the tree.
11900
- iterN: function iterN(at, n, op) {
12141
+ iterN: function(at, n, op) {
11901
12142
  var this$1 = this;
11902
12143
 
11903
12144
  for (var e = at + n; at < e; ++at)
@@ -11921,9 +12162,9 @@ module.exports =
11921
12162
  }
11922
12163
 
11923
12164
  BranchChunk.prototype = {
11924
- chunkSize: function chunkSize() { return this.size },
12165
+ chunkSize: function() { return this.size },
11925
12166
 
11926
- removeInner: function removeInner(at, n) {
12167
+ removeInner: function(at, n) {
11927
12168
  var this$1 = this;
11928
12169
 
11929
12170
  this.size -= n;
@@ -11949,13 +12190,13 @@ module.exports =
11949
12190
  }
11950
12191
  },
11951
12192
 
11952
- collapse: function collapse(lines) {
12193
+ collapse: function(lines) {
11953
12194
  var this$1 = this;
11954
12195
 
11955
12196
  for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
11956
12197
  },
11957
12198
 
11958
- insertInner: function insertInner(at, lines, height) {
12199
+ insertInner: function(at, lines, height) {
11959
12200
  var this$1 = this;
11960
12201
 
11961
12202
  this.size += lines.length;
@@ -11984,7 +12225,7 @@ module.exports =
11984
12225
  },
11985
12226
 
11986
12227
  // When a node has grown, check whether it should be split.
11987
- maybeSpill: function maybeSpill() {
12228
+ maybeSpill: function() {
11988
12229
  if (this.children.length <= 10) { return }
11989
12230
  var me = this;
11990
12231
  do {
@@ -12006,7 +12247,7 @@ module.exports =
12006
12247
  me.parent.maybeSpill();
12007
12248
  },
12008
12249
 
12009
- iterN: function iterN(at, n, op) {
12250
+ iterN: function(at, n, op) {
12010
12251
  var this$1 = this;
12011
12252
 
12012
12253
  for (var i = 0; i < this.children.length; ++i) {
@@ -12090,7 +12331,7 @@ module.exports =
12090
12331
  }
12091
12332
  return true
12092
12333
  });
12093
- signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
12334
+ if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
12094
12335
  return widget
12095
12336
  }
12096
12337
 
@@ -12948,11 +13189,11 @@ module.exports =
12948
13189
  }
12949
13190
 
12950
13191
  var keyNames = {
12951
- 3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
13192
+ 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
12952
13193
  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
12953
13194
  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
12954
13195
  46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
12955
- 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete",
13196
+ 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete", 145: "ScrollLock",
12956
13197
  173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
12957
13198
  221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
12958
13199
  63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
@@ -13099,6 +13340,9 @@ module.exports =
13099
13340
  if (presto && event.keyCode == 34 && event["char"]) { return false }
13100
13341
  var name = keyNames[event.keyCode];
13101
13342
  if (name == null || event.altGraphKey) { return false }
13343
+ // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
13344
+ // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
13345
+ if (event.keyCode == 3 && event.code) { name = event.code; }
13102
13346
  return addModifierNames(name, event, noShift)
13103
13347
  }
13104
13348
 
@@ -13438,18 +13682,26 @@ module.exports =
13438
13682
  // for bound mouse clicks.
13439
13683
 
13440
13684
  var stopSeq = new Delayed;
13685
+
13441
13686
  function dispatchKey(cm, name, e, handle) {
13442
13687
  var seq = cm.state.keySeq;
13443
13688
  if (seq) {
13444
13689
  if (isModifierKey(name)) { return "handled" }
13445
- stopSeq.set(50, function () {
13446
- if (cm.state.keySeq == seq) {
13447
- cm.state.keySeq = null;
13448
- cm.display.input.reset();
13449
- }
13450
- });
13451
- name = seq + " " + name;
13690
+ if (/\'$/.test(name))
13691
+ { cm.state.keySeq = null; }
13692
+ else
13693
+ { stopSeq.set(50, function () {
13694
+ if (cm.state.keySeq == seq) {
13695
+ cm.state.keySeq = null;
13696
+ cm.display.input.reset();
13697
+ }
13698
+ }); }
13699
+ if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
13452
13700
  }
13701
+ return dispatchKeyInner(cm, name, e, handle)
13702
+ }
13703
+
13704
+ function dispatchKeyInner(cm, name, e, handle) {
13453
13705
  var result = lookupKeyForEditor(cm, name, handle);
13454
13706
 
13455
13707
  if (result == "multi")
@@ -13462,10 +13714,6 @@ module.exports =
13462
13714
  restartBlink(cm);
13463
13715
  }
13464
13716
 
13465
- if (seq && !result && /\'$/.test(name)) {
13466
- e_preventDefault(e);
13467
- return true
13468
- }
13469
13717
  return !!result
13470
13718
  }
13471
13719
 
@@ -13677,8 +13925,8 @@ module.exports =
13677
13925
  var dragEnd = operation(cm, function (e) {
13678
13926
  if (webkit) { display.scroller.draggable = false; }
13679
13927
  cm.state.draggingText = false;
13680
- off(document, "mouseup", dragEnd);
13681
- off(document, "mousemove", mouseMove);
13928
+ off(display.wrapper.ownerDocument, "mouseup", dragEnd);
13929
+ off(display.wrapper.ownerDocument, "mousemove", mouseMove);
13682
13930
  off(display.scroller, "dragstart", dragStart);
13683
13931
  off(display.scroller, "drop", dragEnd);
13684
13932
  if (!moved) {
@@ -13687,7 +13935,7 @@ module.exports =
13687
13935
  { extendSelection(cm.doc, pos, null, null, behavior.extend); }
13688
13936
  // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
13689
13937
  if (webkit || ie && ie_version == 9)
13690
- { setTimeout(function () {document.body.focus(); display.input.focus();}, 20); }
13938
+ { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }
13691
13939
  else
13692
13940
  { display.input.focus(); }
13693
13941
  }
@@ -13702,8 +13950,8 @@ module.exports =
13702
13950
  dragEnd.copy = !behavior.moveOnDrag;
13703
13951
  // IE's approach to draggable
13704
13952
  if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
13705
- on(document, "mouseup", dragEnd);
13706
- on(document, "mousemove", mouseMove);
13953
+ on(display.wrapper.ownerDocument, "mouseup", dragEnd);
13954
+ on(display.wrapper.ownerDocument, "mousemove", mouseMove);
13707
13955
  on(display.scroller, "dragstart", dragStart);
13708
13956
  on(display.scroller, "drop", dragEnd);
13709
13957
 
@@ -13835,19 +14083,19 @@ module.exports =
13835
14083
  counter = Infinity;
13836
14084
  e_preventDefault(e);
13837
14085
  display.input.focus();
13838
- off(document, "mousemove", move);
13839
- off(document, "mouseup", up);
14086
+ off(display.wrapper.ownerDocument, "mousemove", move);
14087
+ off(display.wrapper.ownerDocument, "mouseup", up);
13840
14088
  doc.history.lastSelOrigin = null;
13841
14089
  }
13842
14090
 
13843
14091
  var move = operation(cm, function (e) {
13844
- if (!e_button(e)) { done(e); }
14092
+ if (e.buttons === 0 || !e_button(e)) { done(e); }
13845
14093
  else { extend(e); }
13846
14094
  });
13847
14095
  var up = operation(cm, done);
13848
14096
  cm.state.selectingText = up;
13849
- on(document, "mousemove", move);
13850
- on(document, "mouseup", up);
14097
+ on(display.wrapper.ownerDocument, "mousemove", move);
14098
+ on(display.wrapper.ownerDocument, "mouseup", up);
13851
14099
  }
13852
14100
 
13853
14101
  // Used when mouse-selecting to adjust the anchor to the proper side
@@ -13977,6 +14225,7 @@ module.exports =
13977
14225
  clearCaches(cm);
13978
14226
  regChange(cm);
13979
14227
  }, true);
14228
+
13980
14229
  option("lineSeparator", null, function (cm, val) {
13981
14230
  cm.doc.lineSep = val;
13982
14231
  if (!val) { return }
@@ -14383,7 +14632,7 @@ module.exports =
14383
14632
 
14384
14633
  var paste = cm.state.pasteIncoming || origin == "paste";
14385
14634
  var textLines = splitLinesAuto(inserted), multiPaste = null;
14386
- // When pasing N lines into N selections, insert one line per selection
14635
+ // When pasting N lines into N selections, insert one line per selection
14387
14636
  if (paste && sel.ranges.length > 1) {
14388
14637
  if (lastCopied && lastCopied.text.join("\n") == inserted) {
14389
14638
  if (sel.ranges.length % lastCopied.text.length == 0) {
@@ -15119,8 +15368,12 @@ module.exports =
15119
15368
  this.showMultipleSelections(info);
15120
15369
  };
15121
15370
 
15371
+ ContentEditableInput.prototype.getSelection = function () {
15372
+ return this.cm.display.wrapper.ownerDocument.getSelection()
15373
+ };
15374
+
15122
15375
  ContentEditableInput.prototype.showPrimarySelection = function () {
15123
- var sel = window.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
15376
+ var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
15124
15377
  var from = prim.from(), to = prim.to();
15125
15378
 
15126
15379
  if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
@@ -15187,13 +15440,13 @@ module.exports =
15187
15440
  };
15188
15441
 
15189
15442
  ContentEditableInput.prototype.rememberSelection = function () {
15190
- var sel = window.getSelection();
15443
+ var sel = this.getSelection();
15191
15444
  this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
15192
15445
  this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
15193
15446
  };
15194
15447
 
15195
15448
  ContentEditableInput.prototype.selectionInEditor = function () {
15196
- var sel = window.getSelection();
15449
+ var sel = this.getSelection();
15197
15450
  if (!sel.rangeCount) { return false }
15198
15451
  var node = sel.getRangeAt(0).commonAncestorContainer;
15199
15452
  return contains(this.div, node)
@@ -15228,14 +15481,14 @@ module.exports =
15228
15481
  };
15229
15482
 
15230
15483
  ContentEditableInput.prototype.selectionChanged = function () {
15231
- var sel = window.getSelection();
15484
+ var sel = this.getSelection();
15232
15485
  return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
15233
15486
  sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
15234
15487
  };
15235
15488
 
15236
15489
  ContentEditableInput.prototype.pollSelection = function () {
15237
15490
  if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
15238
- var sel = window.getSelection(), cm = this.cm;
15491
+ var sel = this.getSelection(), cm = this.cm;
15239
15492
  // On Android Chrome (version 56, at least), backspacing into an
15240
15493
  // uneditable block element will put the cursor in that element,
15241
15494
  // and then, because it's not editable, hide the virtual keyboard.
@@ -15369,7 +15622,7 @@ module.exports =
15369
15622
  };
15370
15623
 
15371
15624
  ContentEditableInput.prototype.onKeyPress = function (e) {
15372
- if (e.charCode == 0) { return }
15625
+ if (e.charCode == 0 || this.composing) { return }
15373
15626
  e.preventDefault();
15374
15627
  if (!this.cm.isReadOnly())
15375
15628
  { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
@@ -15409,12 +15662,13 @@ module.exports =
15409
15662
  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
15410
15663
 
15411
15664
  function domTextBetween(cm, from, to, fromLine, toLine) {
15412
- var text = "", closing = false, lineSep = cm.doc.lineSeparator();
15665
+ var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
15413
15666
  function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
15414
15667
  function close() {
15415
15668
  if (closing) {
15416
15669
  text += lineSep;
15417
- closing = false;
15670
+ if (extraLinebreak) { text += lineSep; }
15671
+ closing = extraLinebreak = false;
15418
15672
  }
15419
15673
  }
15420
15674
  function addText(str) {
@@ -15426,8 +15680,8 @@ module.exports =
15426
15680
  function walk(node) {
15427
15681
  if (node.nodeType == 1) {
15428
15682
  var cmText = node.getAttribute("cm-text");
15429
- if (cmText != null) {
15430
- addText(cmText || node.textContent.replace(/\u200b/g, ""));
15683
+ if (cmText) {
15684
+ addText(cmText);
15431
15685
  return
15432
15686
  }
15433
15687
  var markerID = node.getAttribute("cm-marker"), range$$1;
@@ -15438,19 +15692,24 @@ module.exports =
15438
15692
  return
15439
15693
  }
15440
15694
  if (node.getAttribute("contenteditable") == "false") { return }
15441
- var isBlock = /^(pre|div|p)$/i.test(node.nodeName);
15695
+ var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
15696
+ if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
15697
+
15442
15698
  if (isBlock) { close(); }
15443
15699
  for (var i = 0; i < node.childNodes.length; i++)
15444
15700
  { walk(node.childNodes[i]); }
15701
+
15702
+ if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
15445
15703
  if (isBlock) { closing = true; }
15446
15704
  } else if (node.nodeType == 3) {
15447
- addText(node.nodeValue);
15705
+ addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
15448
15706
  }
15449
15707
  }
15450
15708
  for (;;) {
15451
15709
  walk(from);
15452
15710
  if (from == to) { break }
15453
15711
  from = from.nextSibling;
15712
+ extraLinebreak = false;
15454
15713
  }
15455
15714
  return text
15456
15715
  }
@@ -15551,13 +15810,10 @@ module.exports =
15551
15810
  var this$1 = this;
15552
15811
 
15553
15812
  var input = this, cm = this.cm;
15813
+ this.createField(display);
15814
+ var te = this.textarea;
15554
15815
 
15555
- // Wraps and hides input textarea
15556
- var div = this.wrapper = hiddenTextarea();
15557
- // The semihidden textarea that is focused when the editor is
15558
- // focused, and receives input.
15559
- var te = this.textarea = div.firstChild;
15560
- display.wrapper.insertBefore(div, display.wrapper.firstChild);
15816
+ display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
15561
15817
 
15562
15818
  // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
15563
15819
  if (ios) { te.style.width = "0px"; }
@@ -15624,6 +15880,14 @@ module.exports =
15624
15880
  });
15625
15881
  };
15626
15882
 
15883
+ TextareaInput.prototype.createField = function (_display) {
15884
+ // Wraps and hides input textarea
15885
+ this.wrapper = hiddenTextarea();
15886
+ // The semihidden textarea that is focused when the editor is
15887
+ // focused, and receives input.
15888
+ this.textarea = this.wrapper.firstChild;
15889
+ };
15890
+
15627
15891
  TextareaInput.prototype.prepareSelection = function () {
15628
15892
  // Redraw the selection and/or cursor
15629
15893
  var cm = this.cm, display = cm.display, doc = cm.doc;
@@ -16017,7 +16281,7 @@ module.exports =
16017
16281
 
16018
16282
  addLegacyProps(CodeMirror$1);
16019
16283
 
16020
- CodeMirror$1.version = "5.31.0";
16284
+ CodeMirror$1.version = "5.38.0";
16021
16285
 
16022
16286
  return CodeMirror$1;
16023
16287
 
@@ -16025,12 +16289,30 @@ module.exports =
16025
16289
 
16026
16290
 
16027
16291
  /***/ },
16028
- /* 70 */
16292
+ /* 80 */,
16293
+ /* 81 */,
16294
+ /* 82 */,
16295
+ /* 83 */,
16296
+ /* 84 */,
16297
+ /* 85 */,
16298
+ /* 86 */,
16299
+ /* 87 */,
16300
+ /* 88 */,
16301
+ /* 89 */,
16302
+ /* 90 */,
16303
+ /* 91 */,
16304
+ /* 92 */,
16305
+ /* 93 */,
16306
+ /* 94 */,
16307
+ /* 95 */,
16308
+ /* 96 */,
16309
+ /* 97 */,
16310
+ /* 98 */
16029
16311
  /***/ function(module, exports) {
16030
16312
 
16031
16313
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
16032
16314
  var e, m
16033
- var eLen = nBytes * 8 - mLen - 1
16315
+ var eLen = (nBytes * 8) - mLen - 1
16034
16316
  var eMax = (1 << eLen) - 1
16035
16317
  var eBias = eMax >> 1
16036
16318
  var nBits = -7
@@ -16043,12 +16325,12 @@ module.exports =
16043
16325
  e = s & ((1 << (-nBits)) - 1)
16044
16326
  s >>= (-nBits)
16045
16327
  nBits += eLen
16046
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
16328
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
16047
16329
 
16048
16330
  m = e & ((1 << (-nBits)) - 1)
16049
16331
  e >>= (-nBits)
16050
16332
  nBits += mLen
16051
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
16333
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
16052
16334
 
16053
16335
  if (e === 0) {
16054
16336
  e = 1 - eBias
@@ -16063,7 +16345,7 @@ module.exports =
16063
16345
 
16064
16346
  exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
16065
16347
  var e, m, c
16066
- var eLen = nBytes * 8 - mLen - 1
16348
+ var eLen = (nBytes * 8) - mLen - 1
16067
16349
  var eMax = (1 << eLen) - 1
16068
16350
  var eBias = eMax >> 1
16069
16351
  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
@@ -16096,7 +16378,7 @@ module.exports =
16096
16378
  m = 0
16097
16379
  e = eMax
16098
16380
  } else if (e + eBias >= 1) {
16099
- m = (value * c - 1) * Math.pow(2, mLen)
16381
+ m = ((value * c) - 1) * Math.pow(2, mLen)
16100
16382
  e = e + eBias
16101
16383
  } else {
16102
16384
  m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
@@ -16115,7 +16397,7 @@ module.exports =
16115
16397
 
16116
16398
 
16117
16399
  /***/ },
16118
- /* 71 */
16400
+ /* 99 */
16119
16401
  /***/ function(module, exports) {
16120
16402
 
16121
16403
  var toString = {}.toString;
@@ -16126,7 +16408,7 @@ module.exports =
16126
16408
 
16127
16409
 
16128
16410
  /***/ },
16129
- /* 72 */
16411
+ /* 100 */
16130
16412
  /***/ function(module, exports) {
16131
16413
 
16132
16414
  // shim for using process in browser
@@ -16299,6 +16581,10 @@ module.exports =
16299
16581
  process.removeListener = noop;
16300
16582
  process.removeAllListeners = noop;
16301
16583
  process.emit = noop;
16584
+ process.prependListener = noop;
16585
+ process.prependOnceListener = noop;
16586
+
16587
+ process.listeners = function (name) { return [] }
16302
16588
 
16303
16589
  process.binding = function (name) {
16304
16590
  throw new Error('process.binding is not supported');
@@ -16312,7 +16598,9 @@ module.exports =
16312
16598
 
16313
16599
 
16314
16600
  /***/ },
16315
- /* 73 */
16601
+ /* 101 */,
16602
+ /* 102 */,
16603
+ /* 103 */
16316
16604
  /***/ function(module, exports) {
16317
16605
 
16318
16606
  /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
@@ -16320,7 +16608,7 @@ module.exports =
16320
16608
  /* WEBPACK VAR INJECTION */}.call(exports, {}))
16321
16609
 
16322
16610
  /***/ },
16323
- /* 74 */
16611
+ /* 104 */
16324
16612
  /***/ function(module, exports, __webpack_require__) {
16325
16613
 
16326
16614
  var require;var require;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*
@@ -16339,7 +16627,7 @@ module.exports =
16339
16627
  */
16340
16628
  (function(e){
16341
16629
  if("object"==typeof exports&&"undefined"!=typeof module&&"undefined"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();
16342
- else if("function"=="function"&&__webpack_require__(73)&&"undefined"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}
16630
+ else if("function"=="function"&&__webpack_require__(103)&&"undefined"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}
16343
16631
  else{
16344
16632
  var f;
16345
16633
  "undefined"!=typeof window?f=window:
@@ -25323,10 +25611,10 @@ module.exports =
25323
25611
  (9)
25324
25612
  }));
25325
25613
 
25326
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer, (function() { return this; }())))
25614
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29).Buffer, (function() { return this; }())))
25327
25615
 
25328
25616
  /***/ },
25329
- /* 75 */
25617
+ /* 105 */
25330
25618
  /***/ function(module, exports, __webpack_require__) {
25331
25619
 
25332
25620
  /* WEBPACK VAR INJECTION */(function(global, Buffer, process) {/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
@@ -25335,13 +25623,13 @@ module.exports =
25335
25623
  /*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
25336
25624
  var XLSX = {};
25337
25625
  function make_xlsx_lib(XLSX){
25338
- XLSX.version = '0.13.4';
25626
+ XLSX.version = '0.13.5';
25339
25627
  var current_codepage = 1200, current_ansi = 1252;
25340
25628
  /*global cptable:true, window */
25341
25629
  if(true) {
25342
25630
  if(typeof cptable === 'undefined') {
25343
- if(typeof global !== 'undefined') global.cptable = __webpack_require__(30);
25344
- else if(typeof window !== 'undefined') window.cptable = __webpack_require__(30);
25631
+ if(typeof global !== 'undefined') global.cptable = __webpack_require__(50);
25632
+ else if(typeof window !== 'undefined') window.cptable = __webpack_require__(50);
25345
25633
  }
25346
25634
  }
25347
25635
 
@@ -26490,7 +26778,7 @@ module.exports =
26490
26778
  return (c === -1) ? p : p.slice(c+1);
26491
26779
  }
26492
26780
  var fs;
26493
- function get_fs() { return fs || (fs = __webpack_require__(32)); }
26781
+ function get_fs() { return fs || (fs = __webpack_require__(52)); }
26494
26782
  function parse(file, options) {
26495
26783
  if(file.length < 512) throw new Error("CFB file size " + file.length + " < 512");
26496
26784
  var mver = 3;
@@ -27178,7 +27466,7 @@ module.exports =
27178
27466
 
27179
27467
  if("function" !== 'undefined' && typeof module !== 'undefined' && typeof DO_NOT_EXPORT_CFB === 'undefined') { module.exports = CFB; }
27180
27468
  var _fs;
27181
- if(true) try { _fs = __webpack_require__(32); } catch(e) {}
27469
+ if(true) try { _fs = __webpack_require__(52); } catch(e) {}
27182
27470
 
27183
27471
  /* normalize data for blob ctor */
27184
27472
  function blobify(data) {
@@ -27439,7 +27727,7 @@ module.exports =
27439
27727
  if(typeof JSZipSync !== 'undefined') jszip = JSZipSync;
27440
27728
  if(true) {
27441
27729
  if(typeof module !== 'undefined' && module.exports) {
27442
- if(typeof jszip === 'undefined') jszip = __webpack_require__(74);
27730
+ if(typeof jszip === 'undefined') jszip = __webpack_require__(104);
27443
27731
  }
27444
27732
  }
27445
27733
 
@@ -27522,7 +27810,7 @@ module.exports =
27522
27810
  var htmlcharegex = /[\u0000-\u001f]/g;
27523
27811
  function escapehtml(text){
27524
27812
  var s = text + '';
27525
- return s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return "&#x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
27813
+ return s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\n/g, "<br/>").replace(htmlcharegex,function(s) { return "&#x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
27526
27814
  }
27527
27815
 
27528
27816
  function escapexlml(text){
@@ -28060,7 +28348,7 @@ module.exports =
28060
28348
  var crypto;
28061
28349
  if(typeof _crypto !== 'undefined') crypto = _crypto;
28062
28350
  else if(true) {
28063
- try { crypto = __webpack_require__(77); }
28351
+ try { crypto = __webpack_require__(107); }
28064
28352
  catch(e) { crypto = null; }
28065
28353
  }
28066
28354
 
@@ -39200,13 +39488,13 @@ module.exports =
39200
39488
  /* 18.2.5 definedName CT_DefinedName + */
39201
39489
  case '<definedName': {
39202
39490
  dname = {};
39203
- dname.Name = y.name;
39491
+ dname.Name = utf8read(y.name);
39204
39492
  if(y.comment) dname.Comment = y.comment;
39205
39493
  if(y.localSheetId) dname.Sheet = +y.localSheetId;
39206
39494
  dnstart = idx + x.length;
39207
39495
  } break;
39208
39496
  case '</definedName>': {
39209
- dname.Ref = data.slice(dnstart, idx);
39497
+ dname.Ref = unescapexml(utf8read(data.slice(dnstart, idx)));
39210
39498
  wb.Names.push(dname);
39211
39499
  } break;
39212
39500
  case '<definedName/>': break;
@@ -40607,7 +40895,7 @@ module.exports =
40607
40895
  if(!((wb||{}).Workbook||{}).Names) return "";
40608
40896
  var names = wb.Workbook.Names;
40609
40897
  var out = [];
40610
- outer: for(var i = 0; i < names.length; ++i) {
40898
+ for(var i = 0; i < names.length; ++i) {
40611
40899
  var n = names[i];
40612
40900
  if(n.Sheet != idx) continue;
40613
40901
  /*switch(n.Name) {
@@ -43475,7 +43763,6 @@ module.exports =
43475
43763
  function make_html_row(ws, r, R, o) {
43476
43764
  var M = (ws['!merges'] ||[]);
43477
43765
  var oo = [];
43478
- var nullcell = "<td>" + (o.editable ? '<span contenteditable="true"></span>' : "" ) + "</td>";
43479
43766
  for(var C = r.s.c; C <= r.e.c; ++C) {
43480
43767
  var RS = 0, CS = 0;
43481
43768
  for(var j = 0; j < M.length; ++j) {
@@ -43487,13 +43774,12 @@ module.exports =
43487
43774
  if(RS < 0) continue;
43488
43775
  var coord = encode_cell({r:R,c:C});
43489
43776
  var cell = o.dense ? (ws[R]||[])[C] : ws[coord];
43490
- if(!cell || cell.v == null) { oo.push(nullcell); continue; }
43491
- /* TODO: html entities */
43492
- var w = cell.h || escapexml(cell.w || (format_cell(cell), cell.w) || "");
43493
43777
  var sp = {};
43494
43778
  if(RS > 1) sp.rowspan = RS;
43495
43779
  if(CS > 1) sp.colspan = CS;
43496
- sp.t = cell.t;
43780
+ /* TODO: html entities */
43781
+ var w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || "")) || "";
43782
+ sp.t = cell && cell.t || 'z';
43497
43783
  if(o.editable) w = '<span contenteditable="true">' + w + '</span>';
43498
43784
  sp.id = "sjs-" + coord;
43499
43785
  oo.push(writextag('td', w, sp));
@@ -43679,7 +43965,7 @@ module.exports =
43679
43965
  }
43680
43966
  if(merges.length) ws['!merges'] = merges;
43681
43967
  if(rowinfo.length) ws["!rows"] = rowinfo;
43682
- sheetag.name = utf8read(sheetag['名称'] || sheetag.name);
43968
+ sheetag.name = sheetag['名称'] || sheetag.name;
43683
43969
  if(typeof JSON !== 'undefined') JSON.stringify(sheetag);
43684
43970
  SheetNames.push(sheetag.name);
43685
43971
  Sheets[sheetag.name] = ws;
@@ -45433,7 +45719,7 @@ module.exports =
45433
45719
  })(utils);
45434
45720
 
45435
45721
  if(has_buf && "function" != 'undefined') (function() {
45436
- var Readable = __webpack_require__(78).Readable;
45722
+ var Readable = __webpack_require__(108).Readable;
45437
45723
 
45438
45724
  var write_csv_stream = function(sheet, opts) {
45439
45725
  var stream = Readable();
@@ -45578,18 +45864,18 @@ module.exports =
45578
45864
  /*exported XLS, ODS */
45579
45865
  var XLS = XLSX, ODS = XLSX;
45580
45866
 
45581
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(17).Buffer, __webpack_require__(72)))
45867
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(29).Buffer, __webpack_require__(100)))
45582
45868
 
45583
45869
  /***/ },
45584
- /* 76 */
45870
+ /* 106 */
45585
45871
  /***/ function(module, exports) {
45586
45872
 
45587
45873
  module.exports = require("papaparse");
45588
45874
 
45589
45875
  /***/ },
45590
- /* 77 */
45591
- 32,
45592
- /* 78 */
45593
- 32
45876
+ /* 107 */
45877
+ 52,
45878
+ /* 108 */
45879
+ 52
45594
45880
  /******/ ])));
45595
45881
  //# sourceMappingURL=credentialSections.js.map