aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--README.md10
-rw-r--r--docs/style-generator/index.html10714
-rw-r--r--docs/style-generator/style-generator.3de3c5f3.map1
-rw-r--r--docs/style-generator/style-generator.90798390.css1
-rw-r--r--docs/style-generator/style-generator.e65d4760.js39
-rw-r--r--examples/Example02.elm8
-rw-r--r--examples/Outdoors.elm1079
-rw-r--r--examples/Styles/Dark.elm2888
-rw-r--r--examples/Styles/Light.elm2906
-rw-r--r--examples/Styles/Outdoors.elm4267
-rw-r--r--examples/Styles/Satellite.elm24
-rw-r--r--examples/Styles/SatelliteStreets.elm2939
-rw-r--r--examples/Styles/Streets.elm3737
-rw-r--r--examples/index.html10
-rw-r--r--examples/index.js9
-rw-r--r--examples/package-lock.json8007
-rw-r--r--examples/package.json20
-rw-r--r--package-lock.json3058
-rw-r--r--package.json4
-rw-r--r--src/Mapbox/Expression.elm10
-rw-r--r--style-generator/elm.json1
-rw-r--r--style-generator/index.html10
-rw-r--r--style-generator/index.js81
-rw-r--r--style-generator/package-lock.json7157
-rw-r--r--style-generator/package.json25
-rw-r--r--style-generator/readme.md7
-rw-r--r--style-generator/src/Color.elm104
-rw-r--r--style-generator/src/Decoder.elm707
-rw-r--r--style-generator/src/Decoder/Expression.elm345
-rw-r--r--style-generator/src/Decoder/Generic.elm52
-rw-r--r--style-generator/src/Decoder/Helpers.elm9
-rw-r--r--style-generator/src/Decoder/Legacy.elm110
-rw-r--r--style-generator/src/Lib.elm101
-rw-r--r--style-generator/src/Main.elm209
-rw-r--r--style-generator/src/MyElm/Advanced.elm46
-rw-r--r--style-generator/src/MyElm/Stringify.elm282
-rw-r--r--style-generator/src/MyElm/Syntax.elm678
-rw-r--r--style-generator/src/MyElm/Types.elm56
-rw-r--r--style-generator/src/Writer.elm640
40 files changed, 36989 insertions, 13364 deletions
diff --git a/.gitignore b/.gitignore
index 50cb329..ba5b4d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@ elm-stuff/
examples/example01.js
node_modules/
dist/
+.cache
+.env
diff --git a/README.md b/README.md
index 5a41b02..b65c18a 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ probably the easiest is to add:
If you are running a module bundler, you should be able to
```javascript
-import elmMapbox from "elm-mapbox";
+import {registerCustomElement, registerPorts} from "elm-mapbox";
```
instead.
@@ -58,8 +58,6 @@ It is important that these operations proceed in this order, i.e. the custom ele
Additionally, you may pass in your mapbox token as an option through this method:
```javascript
-import elmMapbox from "elm-mapbox";
-
elmMapbox.registerCustomElement({token: 'pk45.rejkgnwejk'});
var app = Elm.MyApp.init();
elmMapbox.registerPorts(app);
@@ -233,7 +231,9 @@ view model =
```
### [Generating the Elm Style Code](https://code.gampleman.eu/elm-mapbox/style-generator/)
-There is a very rough version of a [tool that can help generate styles](https://code.gampleman.eu/elm-mapbox/style-generator/) for this library. It is very alpha at the moment, so please be tolerant with its failures.
+There is a very rough version of a [tool that can help generate styles](https://code.gampleman.eu/elm-mapbox/style-generator/) for this library.
+
+The [examples/Styles](https://github.com/gampleman/elm-mapbox/tree/master/examples/Styles) folder has the default Mapbox styles as code, which you can use to start of your project.
### Support
@@ -269,6 +269,6 @@ The `elmMapbox.registerPorts` function accepts an option object that takes the f
### License
-(c) Jakub Hampl 2018
+(c) Jakub Hampl 2018, 2019
MIT License
diff --git a/docs/style-generator/index.html b/docs/style-generator/index.html
index a85638d..c3638e1 100644
--- a/docs/style-generator/index.html
+++ b/docs/style-generator/index.html
@@ -1,10713 +1 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="UTF-8">
- <title>Main</title>
-</head>
-
-<body>
-<div id="elm-f0111bc4e658d0f98db96260c16f7e49"></div>
-<script>
-(function(scope){
-'use strict';
-
-function F(arity, fun, wrapper) {
- wrapper.a = arity;
- wrapper.f = fun;
- return wrapper;
-}
-
-function F2(fun) {
- return F(2, fun, function(a) { return function(b) { return fun(a,b); }; })
-}
-function F3(fun) {
- return F(3, fun, function(a) {
- return function(b) { return function(c) { return fun(a, b, c); }; };
- });
-}
-function F4(fun) {
- return F(4, fun, function(a) { return function(b) { return function(c) {
- return function(d) { return fun(a, b, c, d); }; }; };
- });
-}
-function F5(fun) {
- return F(5, fun, function(a) { return function(b) { return function(c) {
- return function(d) { return function(e) { return fun(a, b, c, d, e); }; }; }; };
- });
-}
-function F6(fun) {
- return F(6, fun, function(a) { return function(b) { return function(c) {
- return function(d) { return function(e) { return function(f) {
- return fun(a, b, c, d, e, f); }; }; }; }; };
- });
-}
-function F7(fun) {
- return F(7, fun, function(a) { return function(b) { return function(c) {
- return function(d) { return function(e) { return function(f) {
- return function(g) { return fun(a, b, c, d, e, f, g); }; }; }; }; }; };
- });
-}
-function F8(fun) {
- return F(8, fun, function(a) { return function(b) { return function(c) {
- return function(d) { return function(e) { return function(f) {
- return function(g) { return function(h) {
- return fun(a, b, c, d, e, f, g, h); }; }; }; }; }; }; };
- });
-}
-function F9(fun) {
- return F(9, fun, function(a) { return function(b) { return function(c) {
- return function(d) { return function(e) { return function(f) {
- return function(g) { return function(h) { return function(i) {
- return fun(a, b, c, d, e, f, g, h, i); }; }; }; }; }; }; }; };
- });
-}
-
-function A2(fun, a, b) {
- return fun.a === 2 ? fun.f(a, b) : fun(a)(b);
-}
-function A3(fun, a, b, c) {
- return fun.a === 3 ? fun.f(a, b, c) : fun(a)(b)(c);
-}
-function A4(fun, a, b, c, d) {
- return fun.a === 4 ? fun.f(a, b, c, d) : fun(a)(b)(c)(d);
-}
-function A5(fun, a, b, c, d, e) {
- return fun.a === 5 ? fun.f(a, b, c, d, e) : fun(a)(b)(c)(d)(e);
-}
-function A6(fun, a, b, c, d, e, f) {
- return fun.a === 6 ? fun.f(a, b, c, d, e, f) : fun(a)(b)(c)(d)(e)(f);
-}
-function A7(fun, a, b, c, d, e, f, g) {
- return fun.a === 7 ? fun.f(a, b, c, d, e, f, g) : fun(a)(b)(c)(d)(e)(f)(g);
-}
-function A8(fun, a, b, c, d, e, f, g, h) {
- return fun.a === 8 ? fun.f(a, b, c, d, e, f, g, h) : fun(a)(b)(c)(d)(e)(f)(g)(h);
-}
-function A9(fun, a, b, c, d, e, f, g, h, i) {
- return fun.a === 9 ? fun.f(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i);
-}
-
-
-
-
-var _List_Nil = { $: 0 };
-var _List_Nil_UNUSED = { $: '[]' };
-
-function _List_Cons(hd, tl) { return { $: 1, a: hd, b: tl }; }
-function _List_Cons_UNUSED(hd, tl) { return { $: '::', a: hd, b: tl }; }
-
-
-var _List_cons = F2(_List_Cons);
-
-function _List_fromArray(arr)
-{
- var out = _List_Nil;
- for (var i = arr.length; i--; )
- {
- out = _List_Cons(arr[i], out);
- }
- return out;
-}
-
-function _List_toArray(xs)
-{
- for (var out = []; xs.b; xs = xs.b) // WHILE_CONS
- {
- out.push(xs.a);
- }
- return out;
-}
-
-var _List_map2 = F3(function(f, xs, ys)
-{
- for (var arr = []; xs.b && ys.b; xs = xs.b, ys = ys.b) // WHILE_CONSES
- {
- arr.push(A2(f, xs.a, ys.a));
- }
- return _List_fromArray(arr);
-});
-
-var _List_map3 = F4(function(f, xs, ys, zs)
-{
- for (var arr = []; xs.b && ys.b && zs.b; xs = xs.b, ys = ys.b, zs = zs.b) // WHILE_CONSES
- {
- arr.push(A3(f, xs.a, ys.a, zs.a));
- }
- return _List_fromArray(arr);
-});
-
-var _List_map4 = F5(function(f, ws, xs, ys, zs)
-{
- for (var arr = []; ws.b && xs.b && ys.b && zs.b; ws = ws.b, xs = xs.b, ys = ys.b, zs = zs.b) // WHILE_CONSES
- {
- arr.push(A4(f, ws.a, xs.a, ys.a, zs.a));
- }
- return _List_fromArray(arr);
-});
-
-var _List_map5 = F6(function(f, vs, ws, xs, ys, zs)
-{
- for (var arr = []; vs.b && ws.b && xs.b && ys.b && zs.b; vs = vs.b, ws = ws.b, xs = xs.b, ys = ys.b, zs = zs.b) // WHILE_CONSES
- {
- arr.push(A5(f, vs.a, ws.a, xs.a, ys.a, zs.a));
- }
- return _List_fromArray(arr);
-});
-
-var _List_sortBy = F2(function(f, xs)
-{
- return _List_fromArray(_List_toArray(xs).sort(function(a, b) {
- return _Utils_cmp(f(a), f(b));
- }));
-});
-
-var _List_sortWith = F2(function(f, xs)
-{
- return _List_fromArray(_List_toArray(xs).sort(function(a, b) {
- var ord = A2(f, a, b);
- return ord === elm$core$Basics$EQ ? 0 : ord === elm$core$Basics$LT ? -1 : 1;
- }));
-});
-
-
-
-// EQUALITY
-
-function _Utils_eq(x, y)
-{
- for (
- var pair, stack = [], isEqual = _Utils_eqHelp(x, y, 0, stack);
- isEqual && (pair = stack.pop());
- isEqual = _Utils_eqHelp(pair.a, pair.b, 0, stack)
- )
- {}
-
- return isEqual;
-}
-
-function _Utils_eqHelp(x, y, depth, stack)
-{
- if (depth > 100)
- {
- stack.push(_Utils_Tuple2(x,y));
- return true;
- }
-
- if (x === y)
- {
- return true;
- }
-
- if (typeof x !== 'object' || x === null || y === null)
- {
- typeof x === 'function' && _Debug_crash(5);
- return false;
- }
-
- /**_UNUSED/
- if (x.$ === 'Set_elm_builtin')
- {
- x = elm$core$Set$toList(x);
- y = elm$core$Set$toList(y);
- }
- if (x.$ === 'RBNode_elm_builtin' || x.$ === 'RBEmpty_elm_builtin')
- {
- x = elm$core$Dict$toList(x);
- y = elm$core$Dict$toList(y);
- }
- //*/
-
- /**/
- if (x.$ < 0)
- {
- x = elm$core$Dict$toList(x);
- y = elm$core$Dict$toList(y);
- }
- //*/
-
- for (var key in x)
- {
- if (!_Utils_eqHelp(x[key], y[key], depth + 1, stack))
- {
- return false;
- }
- }
- return true;
-}
-
-var _Utils_equal = F2(_Utils_eq);
-var _Utils_notEqual = F2(function(a, b) { return !_Utils_eq(a,b); });
-
-
-
-// COMPARISONS
-
-// Code in Generate/JavaScript.hs, Basics.js, and List.js depends on
-// the particular integer values assigned to LT, EQ, and GT.
-
-function _Utils_cmp(x, y, ord)
-{
- if (typeof x !== 'object')
- {
- return x === y ? /*EQ*/ 0 : x < y ? /*LT*/ -1 : /*GT*/ 1;
- }
-
- /**_UNUSED/
- if (x instanceof String)
- {
- var a = x.valueOf();
- var b = y.valueOf();
- return a === b ? 0 : a < b ? -1 : 1;
- }
- //*/
-
- /**/
- if (!x.$)
- //*/
- /**_UNUSED/
- if (x.$[0] === '#')
- //*/
- {
- return (ord = _Utils_cmp(x.a, y.a))
- ? ord
- : (ord = _Utils_cmp(x.b, y.b))
- ? ord
- : _Utils_cmp(x.c, y.c);
- }
-
- // traverse conses until end of a list or a mismatch
- for (; x.b && y.b && !(ord = _Utils_cmp(x.a, y.a)); x = x.b, y = y.b) {} // WHILE_CONSES
- return ord || (x.b ? /*GT*/ 1 : y.b ? /*LT*/ -1 : /*EQ*/ 0);
-}
-
-var _Utils_lt = F2(function(a, b) { return _Utils_cmp(a, b) < 0; });
-var _Utils_le = F2(function(a, b) { return _Utils_cmp(a, b) < 1; });
-var _Utils_gt = F2(function(a, b) { return _Utils_cmp(a, b) > 0; });
-var _Utils_ge = F2(function(a, b) { return _Utils_cmp(a, b) >= 0; });
-
-var _Utils_compare = F2(function(x, y)
-{
- var n = _Utils_cmp(x, y);
- return n < 0 ? elm$core$Basics$LT : n ? elm$core$Basics$GT : elm$core$Basics$EQ;
-});
-
-
-// COMMON VALUES
-
-var _Utils_Tuple0 = 0;
-var _Utils_Tuple0_UNUSED = { $: '#0' };
-
-function _Utils_Tuple2(a, b) { return { a: a, b: b }; }
-function _Utils_Tuple2_UNUSED(a, b) { return { $: '#2', a: a, b: b }; }
-
-function _Utils_Tuple3(a, b, c) { return { a: a, b: b, c: c }; }
-function _Utils_Tuple3_UNUSED(a, b, c) { return { $: '#3', a: a, b: b, c: c }; }
-
-function _Utils_chr(c) { return c; }
-function _Utils_chr_UNUSED(c) { return new String(c); }
-
-
-// RECORDS
-
-function _Utils_update(oldRecord, updatedFields)
-{
- var newRecord = {};
-
- for (var key in oldRecord)
- {
- newRecord[key] = oldRecord[key];
- }
-
- for (var key in updatedFields)
- {
- newRecord[key] = updatedFields[key];
- }
-
- return newRecord;
-}
-
-
-// APPEND
-
-var _Utils_append = F2(_Utils_ap);
-
-function _Utils_ap(xs, ys)
-{
- // append Strings
- if (typeof xs === 'string')
- {
- return xs + ys;
- }
-
- // append Lists
- if (!xs.b)
- {
- return ys;
- }
- var root = _List_Cons(xs.a, ys);
- xs = xs.b
- for (var curr = root; xs.b; xs = xs.b) // WHILE_CONS
- {
- curr = curr.b = _List_Cons(xs.a, ys);
- }
- return root;
-}
-
-
-
-var _JsArray_empty = [];
-
-function _JsArray_singleton(value)
-{
- return [value];
-}
-
-function _JsArray_length(array)
-{
- return array.length;
-}
-
-var _JsArray_initialize = F3(function(size, offset, func)
-{
- var result = new Array(size);
-
- for (var i = 0; i < size; i++)
- {
- result[i] = func(offset + i);
- }
-
- return result;
-});
-
-var _JsArray_initializeFromList = F2(function (max, ls)
-{
- var result = new Array(max);
-
- for (var i = 0; i < max && ls.b; i++)
- {
- result[i] = ls.a;
- ls = ls.b;
- }
-
- result.length = i;
- return _Utils_Tuple2(result, ls);
-});
-
-var _JsArray_unsafeGet = F2(function(index, array)
-{
- return array[index];
-});
-
-var _JsArray_unsafeSet = F3(function(index, value, array)
-{
- var length = array.length;
- var result = new Array(length);
-
- for (var i = 0; i < length; i++)
- {
- result[i] = array[i];
- }
-
- result[index] = value;
- return result;
-});
-
-var _JsArray_push = F2(function(value, array)
-{
- var length = array.length;
- var result = new Array(length + 1);
-
- for (var i = 0; i < length; i++)
- {
- result[i] = array[i];
- }
-
- result[length] = value;
- return result;
-});
-
-var _JsArray_foldl = F3(function(func, acc, array)
-{
- var length = array.length;
-
- for (var i = 0; i < length; i++)
- {
- acc = A2(func, array[i], acc);
- }
-
- return acc;
-});
-
-var _JsArray_foldr = F3(function(func, acc, array)
-{
- for (var i = array.length - 1; i >= 0; i--)
- {
- acc = A2(func, array[i], acc);
- }
-
- return acc;
-});
-
-var _JsArray_map = F2(function(func, array)
-{
- var length = array.length;
- var result = new Array(length);
-
- for (var i = 0; i < length; i++)
- {
- result[i] = func(array[i]);
- }
-
- return result;
-});
-
-var _JsArray_indexedMap = F3(function(func, offset, array)
-{
- var length = array.length;
- var result = new Array(length);
-
- for (var i = 0; i < length; i++)
- {
- result[i] = A2(func, offset + i, array[i]);
- }
-
- return result;
-});
-
-var _JsArray_slice = F3(function(from, to, array)
-{
- return array.slice(from, to);
-});
-
-var _JsArray_appendN = F3(function(n, dest, source)
-{
- var destLen = dest.length;
- var itemsToCopy = n - destLen;
-
- if (itemsToCopy > source.length)
- {
- itemsToCopy = source.length;
- }
-
- var size = destLen + itemsToCopy;
- var result = new Array(size);
-
- for (var i = 0; i < destLen; i++)
- {
- result[i] = dest[i];
- }
-
- for (var i = 0; i < itemsToCopy; i++)
- {
- result[i + destLen] = source[i];
- }
-
- return result;
-});
-
-
-
-// LOG
-
-var _Debug_log = F2(function(tag, value)
-{
- return value;
-});
-
-var _Debug_log_UNUSED = F2(function(tag, value)
-{
- console.log(tag + ': ' + _Debug_toString(value));
- return value;
-});
-
-
-// TODOS
-
-function _Debug_todo(moduleName, region)
-{
- return function(message) {
- _Debug_crash(8, moduleName, region, message);
- };
-}
-
-function _Debug_todoCase(moduleName, region, value)
-{
- return function(message) {
- _Debug_crash(9, moduleName, region, value, message);
- };
-}
-
-
-// TO STRING
-
-function _Debug_toString(value)
-{
- return '<internals>';
-}
-
-function _Debug_toString_UNUSED(value)
-{
- return _Debug_toAnsiString(false, value);
-}
-
-function _Debug_toAnsiString(ansi, value)
-{
- if (typeof value === 'function')
- {
- return _Debug_internalColor(ansi, '<function>');
- }
-
- if (typeof value === 'boolean')
- {
- return _Debug_ctorColor(ansi, value ? 'True' : 'False');
- }
-
- if (typeof value === 'number')
- {
- return _Debug_numberColor(ansi, value + '');
- }
-
- if (value instanceof String)
- {
- return _Debug_charColor(ansi, "'" + _Debug_addSlashes(value, true) + "'");
- }
-
- if (typeof value === 'string')
- {
- return _Debug_stringColor(ansi, '"' + _Debug_addSlashes(value, false) + '"');
- }
-
- if (typeof value === 'object' && '$' in value)
- {
- var tag = value.$;
-
- if (typeof tag === 'number')
- {
- return _Debug_internalColor(ansi, '<internals>');
- }
-
- if (tag[0] === '#')
- {
- var output = [];
- for (var k in value)
- {
- if (k === '$') continue;
- output.push(_Debug_toAnsiString(ansi, value[k]));
- }
- return '(' + output.join(',') + ')';
- }
-
- if (tag === 'Set_elm_builtin')
- {
- return _Debug_ctorColor(ansi, 'Set')
- + _Debug_fadeColor(ansi, '.fromList') + ' '
- + _Debug_toAnsiString(ansi, elm$core$Set$toList(value));
- }
-
- if (tag === 'RBNode_elm_builtin' || tag === 'RBEmpty_elm_builtin')
- {
- return _Debug_ctorColor(ansi, 'Dict')
- + _Debug_fadeColor(ansi, '.fromList') + ' '
- + _Debug_toAnsiString(ansi, elm$core$Dict$toList(value));
- }
-
- if (tag === 'Array_elm_builtin')
- {
- return _Debug_ctorColor(ansi, 'Array')
- + _Debug_fadeColor(ansi, '.fromList') + ' '
- + _Debug_toAnsiString(ansi, elm$core$Array$toList(value));
- }
-
- if (tag === '::' || tag === '[]')
- {
- var output = '[';
-
- value.b && (output += _Debug_toAnsiString(ansi, value.a), value = value.b)
-
- for (; value.b; value = value.b) // WHILE_CONS
- {
- output += ',' + _Debug_toAnsiString(ansi, value.a);
- }
- return output + ']';
- }
-
- var output = '';
- for (var i in value)
- {
- if (i === '$') continue;
- var str = _Debug_toAnsiString(ansi, value[i]);
- var c0 = str[0];
- var parenless = c0 === '{' || c0 === '(' || c0 === '[' || c0 === '<' || c0 === '"' || str.indexOf(' ') < 0;
- output += ' ' + (parenless ? str : '(' + str + ')');
- }
- return _Debug_ctorColor(ansi, tag) + output;
- }
-
- if (typeof value === 'object')
- {
- var output = [];
- for (var key in value)
- {
- var field = key[0] === '_' ? key.slice(1) : key;
- output.push(_Debug_fadeColor(ansi, field) + ' = ' + _Debug_toAnsiString(ansi, value[key]));
- }
- if (output.length === 0)
- {
- return '{}';
- }
- return '{ ' + output.join(', ') + ' }';
- }
-
- return _Debug_internalColor(ansi, '<internals>');
-}
-
-function _Debug_addSlashes(str, isChar)
-{
- var s = str
- .replace(/\\/g, '\\\\')
- .replace(/\n/g, '\\n')
- .replace(/\t/g, '\\t')
- .replace(/\r/g, '\\r')
- .replace(/\v/g, '\\v')
- .replace(/\0/g, '\\0');
-
- if (isChar)
- {
- return s.replace(/\'/g, '\\\'');
- }
- else
- {
- return s.replace(/\"/g, '\\"');
- }
-}
-
-function _Debug_ctorColor(ansi, string)
-{
- return ansi ? '\x1b[96m' + string + '\x1b[0m' : string;
-}
-
-function _Debug_numberColor(ansi, string)
-{
- return ansi ? '\x1b[95m' + string + '\x1b[0m' : string;
-}
-
-function _Debug_stringColor(ansi, string)
-{
- return ansi ? '\x1b[93m' + string + '\x1b[0m' : string;
-}
-
-function _Debug_charColor(ansi, string)
-{
- return ansi ? '\x1b[92m' + string + '\x1b[0m' : string;
-}
-
-function _Debug_fadeColor(ansi, string)
-{
- return ansi ? '\x1b[37m' + string + '\x1b[0m' : string;
-}
-
-function _Debug_internalColor(ansi, string)
-{
- return ansi ? '\x1b[94m' + string + '\x1b[0m' : string;
-}
-
-
-
-// CRASH
-
-
-function _Debug_crash(identifier)
-{
- throw new Error('https://github.com/elm/core/blob/1.0.0/hints/' + identifier + '.md');
-}
-
-
-function _Debug_crash_UNUSED(identifier, fact1, fact2, fact3, fact4)
-{
- switch(identifier)
- {
- case 0:
- throw new Error('What node should I take over? In JavaScript I need something like:\n\n Elm.Main.init({\n node: document.getElementById("elm-node")\n })\n\nYou need to do this with any Browser.sandbox or Browser.element program.');
-
- case 1:
- throw new Error('Browser.application programs cannot handle URLs like this:\n\n ' + document.location.href + '\n\nWhat is the root? The root of your file system? Try looking at this program with `elm reactor` or some other server.');
-
- case 2:
- var message = fact1;
- throw new Error('Problem with the flags given to your Elm program on initialization.\n\n' + message);
-
- case 3:
- var portName = fact1;
- throw new Error('There can only be one port named `' + portName + '`, but your program has multiple.');
-
- case 4:
- var portName = fact1;
- var problem = fact2;
- throw new Error('Trying to send an unexpected type of value through port `' + portName + '`:\n' + problem);
-
- case 5:
- throw new Error('Trying to use `(==)` on functions.\nThere is no way to know if functions are "the same" in the Elm sense.\nRead more about this at https://package.elm-lang.org/packages/elm/core/latest/Basics#== which describes why it is this way and what the better version will look like.');
-
- case 6:
- var moduleName = fact1;
- throw new Error('Your page is loading multiple Elm scripts with a module named ' + moduleName + '. Maybe a duplicate script is getting loaded accidentally? If not, rename one of them so I know which is which!');
-
- case 8:
- var moduleName = fact1;
- var region = fact2;
- var message = fact3;
- throw new Error('TODO in module `' + moduleName + '` ' + _Debug_regionToString(region) + '\n\n' + message);
-
- case 9:
- var moduleName = fact1;
- var region = fact2;
- var value = fact3;
- var message = fact4;
- throw new Error(
- 'TODO in module `' + moduleName + '` from the `case` expression '
- + _Debug_regionToString(region) + '\n\nIt received the following value:\n\n '
- + _Debug_toString(value).replace('\n', '\n ')
- + '\n\nBut the branch that handles it says:\n\n ' + message.replace('\n', '\n ')
- );
-
- case 10:
- throw new Error('Bug in https://github.com/elm/virtual-dom/issues');
-
- case 11:
- throw new Error('Cannot perform mod 0. Division by zero error.');
- }
-}
-
-function _Debug_regionToString(region)
-{
- if (region.bY.N === region.bA.N)
- {
- return 'on line ' + region.bY.N;
- }
- return 'on lines ' + region.bY.N + ' through ' + region.bA.N;
-}
-
-
-
-// MATH
-
-var _Basics_add = F2(function(a, b) { return a + b; });
-var _Basics_sub = F2(function(a, b) { return a - b; });
-var _Basics_mul = F2(function(a, b) { return a * b; });
-var _Basics_fdiv = F2(function(a, b) { return a / b; });
-var _Basics_idiv = F2(function(a, b) { return (a / b) | 0; });
-var _Basics_pow = F2(Math.pow);
-
-var _Basics_remainderBy = F2(function(b, a) { return a % b; });
-
-// https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf
-var _Basics_modBy = F2(function(modulus, x)
-{
- var answer = x % modulus;
- return modulus === 0
- ? _Debug_crash(11)
- :
- ((answer > 0 && modulus < 0) || (answer < 0 && modulus > 0))
- ? answer + modulus
- : answer;
-});
-
-
-// TRIGONOMETRY
-
-var _Basics_pi = Math.PI;
-var _Basics_e = Math.E;
-var _Basics_cos = Math.cos;
-var _Basics_sin = Math.sin;
-var _Basics_tan = Math.tan;
-var _Basics_acos = Math.acos;
-var _Basics_asin = Math.asin;
-var _Basics_atan = Math.atan;
-var _Basics_atan2 = F2(Math.atan2);
-
-
-// MORE MATH
-
-function _Basics_toFloat(x) { return x; }
-function _Basics_truncate(n) { return n | 0; }
-function _Basics_isInfinite(n) { return n === Infinity || n === -Infinity; }
-
-var _Basics_ceiling = Math.ceil;
-var _Basics_floor = Math.floor;
-var _Basics_round = Math.round;
-var _Basics_sqrt = Math.sqrt;
-var _Basics_log = Math.log;
-var _Basics_isNaN = isNaN;
-
-
-// BOOLEANS
-
-function _Basics_not(bool) { return !bool; }
-var _Basics_and = F2(function(a, b) { return a && b; });
-var _Basics_or = F2(function(a, b) { return a || b; });
-var _Basics_xor = F2(function(a, b) { return a !== b; });
-
-
-
-// CORE DECODERS
-
-function _Json_succeed(msg)
-{
- return {
- $: 0,
- a: msg
- };
-}
-
-function _Json_fail(msg)
-{
- return {
- $: 1,
- a: msg
- };
-}
-
-var _Json_decodeInt = { $: 2 };
-var _Json_decodeBool = { $: 3 };
-var _Json_decodeFloat = { $: 4 };
-var _Json_decodeValue = { $: 5 };
-var _Json_decodeString = { $: 6 };
-
-function _Json_decodeList(decoder) { return { $: 7, b: decoder }; }
-function _Json_decodeArray(decoder) { return { $: 8, b: decoder }; }
-
-function _Json_decodeNull(value) { return { $: 9, c: value }; }
-
-var _Json_decodeField = F2(function(field, decoder)
-{
- return {
- $: 10,
- d: field,
- b: decoder
- };
-});
-
-var _Json_decodeIndex = F2(function(index, decoder)
-{
- return {
- $: 11,
- e: index,
- b: decoder
- };
-});
-
-function _Json_decodeKeyValuePairs(decoder)
-{
- return {
- $: 12,
- b: decoder
- };
-}
-
-function _Json_mapMany(f, decoders)
-{