@hyperjump/json-schema 0.23.1 → 0.23.2

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.
@@ -5,7 +5,7 @@ System.register('JsonSchema', [], (function (exports) {
5
5
 
6
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
7
 
8
- var justCurryIt$2 = curry$j;
8
+ var justCurryIt$1 = curry$b;
9
9
 
10
10
  /*
11
11
  function add(a, b, c) {
@@ -30,7 +30,7 @@ System.register('JsonSchema', [], (function (exports) {
30
30
  milesToKm(10); // 16.2
31
31
  */
32
32
 
33
- function curry$j(fn, arity) {
33
+ function curry$b(fn, arity) {
34
34
  return function curried() {
35
35
  if (arity == null) {
36
36
  arity = fn.length;
@@ -1901,84 +1901,91 @@ System.register('JsonSchema', [], (function (exports) {
1901
1901
 
1902
1902
  var common$1 = { jsonTypeOf: jsonTypeOf$2, resolveUrl: resolveUrl$3, urlFragment: urlFragment$1, pathRelative: pathRelative$1 };
1903
1903
 
1904
- const curry$i = justCurryIt$2;
1904
+ const curry$a = justCurryIt$1;
1905
1905
 
1906
1906
 
1907
- const nil$3 = "";
1907
+ const nil$2 = "";
1908
1908
 
1909
- const compile$Q = (pointer) => {
1909
+ const compile$N = (pointer) => {
1910
1910
  if (pointer.length > 0 && pointer[0] !== "/") {
1911
1911
  throw Error("Invalid JSON Pointer");
1912
1912
  }
1913
1913
 
1914
- return pointer.split("/").slice(1).map(unescape$1);
1914
+ return pointer.split("/").slice(1).map(unescape);
1915
1915
  };
1916
1916
 
1917
- const get$3 = (pointer, value = undefined) => {
1918
- const ptr = compile$Q(pointer);
1917
+ const get$2 = (pointer, value = undefined) => {
1918
+ const ptr = compile$N(pointer);
1919
1919
 
1920
1920
  const fn = (value) => ptr.reduce(([value, pointer], segment) => {
1921
- return [applySegment$1(value, segment, pointer), append$1(segment, pointer)];
1921
+ return [applySegment(value, segment, pointer), append(segment, pointer)];
1922
1922
  }, [value, ""])[0];
1923
1923
 
1924
1924
  return value === undefined ? fn : fn(value);
1925
1925
  };
1926
1926
 
1927
- const set$1 = (pointer, subject = undefined, value = undefined) => {
1928
- const ptr = compile$Q(pointer);
1929
- const fn = curry$i((subject, value) => _set$1(ptr, subject, value, nil$3));
1927
+ const set = (pointer, subject = undefined, value = undefined) => {
1928
+ const ptr = compile$N(pointer);
1929
+ const fn = curry$a((subject, value) => _set(ptr, subject, value, nil$2));
1930
1930
  return subject === undefined ? fn : fn(subject, value);
1931
1931
  };
1932
1932
 
1933
- const _set$1 = (pointer, subject, value, cursor) => {
1933
+ const _set = (pointer, subject, value, cursor) => {
1934
1934
  if (pointer.length === 0) {
1935
1935
  return value;
1936
1936
  } else if (pointer.length > 1) {
1937
- const segment = pointer.shift();
1938
- return { ...subject, [segment]: _set$1(pointer, applySegment$1(subject, segment, cursor), value, append$1(segment, cursor)) };
1937
+ if (Array.isArray(subject)) {
1938
+ const index = pointer.shift();
1939
+ const clonedSubject = [...subject];
1940
+ clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
1941
+ return clonedSubject;
1942
+ } else {
1943
+ const segment = pointer.shift();
1944
+ return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
1945
+ }
1939
1946
  } else if (Array.isArray(subject)) {
1940
1947
  const clonedSubject = [...subject];
1941
- const segment = computeSegment$1(subject, pointer[0]);
1948
+ const segment = computeSegment(subject, pointer[0]);
1942
1949
  clonedSubject[segment] = value;
1943
1950
  return clonedSubject;
1944
1951
  } else if (typeof subject === "object" && subject !== null) {
1945
1952
  return { ...subject, [pointer[0]]: value };
1946
1953
  } else {
1947
- return applySegment$1(subject, pointer[0], cursor);
1954
+ return applySegment(subject, pointer[0], cursor);
1948
1955
  }
1949
1956
  };
1950
1957
 
1951
- const assign$1 = (pointer, subject = undefined, value = undefined) => {
1952
- const ptr = compile$Q(pointer);
1953
- const fn = curry$i((subject, value) => _assign$1(ptr, subject, value, nil$3));
1958
+ const assign = (pointer, subject = undefined, value = undefined) => {
1959
+ const ptr = compile$N(pointer);
1960
+ const fn = curry$a((subject, value) => _assign(ptr, subject, value, nil$2));
1954
1961
  return subject === undefined ? fn : fn(subject, value);
1955
1962
  };
1956
1963
 
1957
- const _assign$1 = (pointer, subject, value, cursor) => {
1964
+ const _assign = (pointer, subject, value, cursor) => {
1958
1965
  if (pointer.length === 0) {
1959
1966
  return;
1960
- } else if (pointer.length === 1 && !isScalar$1(subject)) {
1961
- const segment = computeSegment$1(subject, pointer[0]);
1967
+ } else if (pointer.length === 1 && !isScalar(subject)) {
1968
+ const segment = computeSegment(subject, pointer[0]);
1962
1969
  subject[segment] = value;
1963
1970
  } else {
1964
1971
  const segment = pointer.shift();
1965
- _assign$1(pointer, applySegment$1(subject, segment, cursor), value, append$1(segment, cursor));
1972
+ _assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
1966
1973
  }
1967
1974
  };
1968
1975
 
1969
- const unset$1 = (pointer, subject = undefined) => {
1970
- const ptr = compile$Q(pointer);
1971
- const fn = (subject) => _unset$1(ptr, subject, nil$3);
1976
+ const unset = (pointer, subject = undefined) => {
1977
+ const ptr = compile$N(pointer);
1978
+ const fn = (subject) => _unset(ptr, subject, nil$2);
1972
1979
  return subject === undefined ? fn : fn(subject);
1973
1980
  };
1974
1981
 
1975
- const _unset$1 = (pointer, subject, cursor) => {
1982
+ const _unset = (pointer, subject, cursor) => {
1976
1983
  if (pointer.length == 0) {
1977
1984
  return undefined;
1978
1985
  } else if (pointer.length > 1) {
1979
1986
  const segment = pointer.shift();
1980
- const value = applySegment$1(subject, segment, cursor);
1981
- return { ...subject, [segment]: _unset$1(pointer, value, append$1(segment, cursor)) };
1987
+ const value = applySegment(subject, segment, cursor);
1988
+ return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
1982
1989
  } else if (Array.isArray(subject)) {
1983
1990
  return subject.filter((_, ndx) => ndx != pointer[0]);
1984
1991
  } else if (typeof subject === "object" && subject !== null) {
@@ -1986,54 +1993,54 @@ System.register('JsonSchema', [], (function (exports) {
1986
1993
  const { [pointer[0]]: _, ...result } = subject;
1987
1994
  return result;
1988
1995
  } else {
1989
- return applySegment$1(subject, pointer[0], cursor);
1996
+ return applySegment(subject, pointer[0], cursor);
1990
1997
  }
1991
1998
  };
1992
1999
 
1993
- const remove$1 = (pointer, subject = undefined) => {
1994
- const ptr = compile$Q(pointer);
1995
- const fn = (subject) => _remove$1(ptr, subject, nil$3);
2000
+ const remove = (pointer, subject = undefined) => {
2001
+ const ptr = compile$N(pointer);
2002
+ const fn = (subject) => _remove(ptr, subject, nil$2);
1996
2003
  return subject === undefined ? fn : fn(subject);
1997
2004
  };
1998
2005
 
1999
- const _remove$1 = (pointer, subject, cursor) => {
2006
+ const _remove = (pointer, subject, cursor) => {
2000
2007
  if (pointer.length === 0) {
2001
2008
  return;
2002
2009
  } else if (pointer.length > 1) {
2003
2010
  const segment = pointer.shift();
2004
- const value = applySegment$1(subject, segment, cursor);
2005
- _remove$1(pointer, value, append$1(segment, cursor));
2011
+ const value = applySegment(subject, segment, cursor);
2012
+ _remove(pointer, value, append(segment, cursor));
2006
2013
  } else if (Array.isArray(subject)) {
2007
2014
  subject.splice(pointer[0], 1);
2008
2015
  } else if (typeof subject === "object" && subject !== null) {
2009
2016
  delete subject[pointer[0]];
2010
2017
  } else {
2011
- applySegment$1(subject, pointer[0], cursor);
2018
+ applySegment(subject, pointer[0], cursor);
2012
2019
  }
2013
2020
  };
2014
2021
 
2015
- const append$1 = curry$i((segment, pointer) => pointer + "/" + escape$2(segment));
2022
+ const append = curry$a((segment, pointer) => pointer + "/" + escape(segment));
2016
2023
 
2017
- const escape$2 = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
2018
- const unescape$1 = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
2019
- const computeSegment$1 = (value, segment) => Array.isArray(value) && segment === "-" ? value.length : segment;
2024
+ const escape = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
2025
+ const unescape = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
2026
+ const computeSegment = (value, segment) => Array.isArray(value) && segment === "-" ? value.length : segment;
2020
2027
 
2021
- const applySegment$1 = (value, segment, cursor = "") => {
2028
+ const applySegment = (value, segment, cursor = "") => {
2022
2029
  if (value === undefined) {
2023
2030
  throw TypeError(`Value at '${cursor}' is undefined and does not have property '${segment}'`);
2024
2031
  } else if (value === null) {
2025
2032
  throw TypeError(`Value at '${cursor}' is null and does not have property '${segment}'`);
2026
- } else if (isScalar$1(value)) {
2033
+ } else if (isScalar(value)) {
2027
2034
  throw TypeError(`Value at '${cursor}' is a ${typeof value} and does not have property '${segment}'`);
2028
2035
  } else {
2029
- const computedSegment = computeSegment$1(value, segment);
2036
+ const computedSegment = computeSegment(value, segment);
2030
2037
  return value[computedSegment];
2031
2038
  }
2032
2039
  };
2033
2040
 
2034
- const isScalar$1 = (value) => value === null || typeof value !== "object";
2041
+ const isScalar = (value) => value === null || typeof value !== "object";
2035
2042
 
2036
- var lib$6 = { nil: nil$3, append: append$1, get: get$3, set: set$1, assign: assign$1, unset: unset$1, remove: remove$1 };
2043
+ var lib$3 = { nil: nil$2, append, get: get$2, set, assign, unset, remove };
2037
2044
 
2038
2045
  const $__value = Symbol("$__value");
2039
2046
  const $__href = Symbol("$__href");
@@ -2049,16 +2056,16 @@ System.register('JsonSchema', [], (function (exports) {
2049
2056
 
2050
2057
  var reference = { cons: cons$1, isReference, href, value: value$2 };
2051
2058
 
2052
- const JsonPointer$3 = lib$6;
2053
- const curry$h = justCurryIt$2;
2059
+ const JsonPointer$1 = lib$3;
2060
+ const curry$9 = justCurryIt$1;
2054
2061
  const { resolveUrl: resolveUrl$2, jsonTypeOf: jsonTypeOf$1 } = common$1;
2055
2062
  const Reference$2 = reference;
2056
2063
 
2057
2064
 
2058
- const nil$2 = Object.freeze({ id: "", pointer: "", instance: undefined, value: undefined });
2059
- const cons = (instance, id = "") => Object.freeze({ ...nil$2, id: resolveUrl$2(id, ""), instance, value: instance });
2065
+ const nil$1 = Object.freeze({ id: "", pointer: "", instance: undefined, value: undefined });
2066
+ const cons = (instance, id = "") => Object.freeze({ ...nil$1, id: resolveUrl$2(id, ""), instance, value: instance });
2060
2067
 
2061
- const get$2 = (url, instance = nil$2) => {
2068
+ const get$1 = (url, instance = nil$1) => {
2062
2069
  if (!url.startsWith("#")) {
2063
2070
  throw Error(`No JSON document found at '${url.split("#")[0]}'`);
2064
2071
  }
@@ -2069,126 +2076,48 @@ System.register('JsonSchema', [], (function (exports) {
2069
2076
  const uri$1 = (doc) => `${doc.id}#${encodeURI(doc.pointer)}`;
2070
2077
  const value$1 = (doc) => Reference$2.isReference(doc.value) ? Reference$2.value(doc.value) : doc.value;
2071
2078
  const has$1 = (key, doc) => key in value$1(doc);
2072
- const typeOf$1 = curry$h((doc, type) => jsonTypeOf$1(value$1(doc), type));
2079
+ const typeOf$1 = curry$9((doc, type) => jsonTypeOf$1(value$1(doc), type));
2073
2080
 
2074
2081
  const step$1 = (key, doc) => Object.freeze({
2075
2082
  ...doc,
2076
- pointer: JsonPointer$3.append(key, doc.pointer),
2083
+ pointer: JsonPointer$1.append(key, doc.pointer),
2077
2084
  value: value$1(doc)[key]
2078
2085
  });
2079
2086
 
2080
- const entries$5 = (doc) => Object.keys(value$1(doc))
2087
+ const entries$3 = (doc) => Object.keys(value$1(doc))
2081
2088
  .map((key) => [key, step$1(key, doc)]);
2082
2089
 
2083
2090
  const keys$1 = (doc) => Object.keys(value$1(doc));
2084
2091
 
2085
- const map$7 = curry$h((fn, doc) => value$1(doc)
2092
+ const map$4 = curry$9((fn, doc) => value$1(doc)
2086
2093
  .map((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2087
2094
 
2088
- const forEach = curry$h((fn, doc) => value$1(doc)
2095
+ const forEach = curry$9((fn, doc) => value$1(doc)
2089
2096
  .forEach((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2090
2097
 
2091
- const filter$2 = curry$h((fn, doc) => value$1(doc)
2098
+ const filter$1 = curry$9((fn, doc) => value$1(doc)
2092
2099
  .map((item, ndx, array, thisArg) => step$1(ndx, doc))
2093
2100
  .filter((item, ndx, array, thisArg) => fn(item, ndx, array, thisArg)));
2094
2101
 
2095
- const reduce$6 = curry$h((fn, acc, doc) => value$1(doc)
2102
+ const reduce$3 = curry$9((fn, acc, doc) => value$1(doc)
2096
2103
  .reduce((acc, item, ndx) => fn(acc, step$1(ndx, doc), ndx), acc));
2097
2104
 
2098
- const every$2 = curry$h((fn, doc) => value$1(doc)
2105
+ const every$1 = curry$9((fn, doc) => value$1(doc)
2099
2106
  .every((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2100
2107
 
2101
- const some$2 = curry$h((fn, doc) => value$1(doc)
2108
+ const some$1 = curry$9((fn, doc) => value$1(doc)
2102
2109
  .some((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
2103
2110
 
2104
2111
  const length$1 = (doc) => value$1(doc).length;
2105
2112
 
2106
2113
  var instance = {
2107
- nil: nil$2, cons, get: get$2, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, length: length$1,
2108
- step: step$1, entries: entries$5, keys: keys$1, map: map$7, forEach, filter: filter$2, reduce: reduce$6, every: every$2, some: some$2
2114
+ nil: nil$1, cons, get: get$1, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, length: length$1,
2115
+ step: step$1, entries: entries$3, keys: keys$1, map: map$4, forEach, filter: filter$1, reduce: reduce$3, every: every$1, some: some$1
2109
2116
  };
2110
2117
 
2111
- var entries$4 = async (doc) => Object.entries(await doc);
2112
-
2113
- const curry$g = justCurryIt$2;
2114
-
2115
-
2116
- var map$6 = curry$g(async (fn, doc) => (await doc).map(fn));
2117
-
2118
- const curry$f = justCurryIt$2;
2119
-
2118
+ var entries$2 = async (doc) => Object.entries(await doc);
2120
2119
 
2121
- var reduce$5 = curry$f(async (fn, acc, doc) => {
2122
- return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
2123
- });
2124
-
2125
- const curry$e = justCurryIt$2;
2126
- const reduce$4 = reduce$5;
2127
-
2128
-
2129
- var filter$1 = curry$e(async (fn, doc, options = {}) => {
2130
- return reduce$4(async (acc, item) => {
2131
- return (await fn(item)) ? acc.concat([item]) : acc;
2132
- }, [], doc, options);
2133
- });
2134
-
2135
- const curry$d = justCurryIt$2;
2136
- const map$5 = map$6;
2137
-
2138
-
2139
- var some$1 = curry$d(async (fn, doc) => {
2140
- const results = await map$5(fn, doc);
2141
- return (await Promise.all(results))
2142
- .some((a) => a);
2143
- });
2144
-
2145
- const curry$c = justCurryIt$2;
2146
- const map$4 = map$6;
2147
-
2148
-
2149
- var every$1 = curry$c(async (fn, doc) => {
2150
- const results = await map$4(fn, doc);
2151
- return (await Promise.all(results))
2152
- .every((a) => a);
2153
- });
2154
-
2155
- const curry$b = justCurryIt$2;
2156
-
2157
-
2158
- var pipeline$3 = curry$b((fns, doc) => {
2159
- return fns.reduce(async (acc, fn) => fn(await acc), doc);
2160
- });
2161
-
2162
- var all$1 = (doc) => Promise.all(doc);
2163
-
2164
- const pipeline$2 = pipeline$3;
2165
- const entries$3 = entries$4;
2166
- const reduce$3 = reduce$5;
2167
-
2168
-
2169
- var allValues$1 = (doc) => {
2170
- return pipeline$2([
2171
- entries$3,
2172
- reduce$3(async (acc, [propertyName, propertyValue]) => {
2173
- acc[propertyName] = await propertyValue;
2174
- return acc;
2175
- }, {})
2176
- ], doc);
2177
- };
2178
-
2179
- var lib$5 = {
2180
- entries: entries$4,
2181
- map: map$6,
2182
- filter: filter$1,
2183
- reduce: reduce$5,
2184
- some: some$1,
2185
- every: every$1,
2186
- pipeline: pipeline$3,
2187
- all: all$1,
2188
- allValues: allValues$1
2189
- };
2190
-
2191
- var justCurryIt$1 = curry$a;
2120
+ var justCurryIt = curry$8;
2192
2121
 
2193
2122
  /*
2194
2123
  function add(a, b, c) {
@@ -2213,7 +2142,7 @@ System.register('JsonSchema', [], (function (exports) {
2213
2142
  milesToKm(10); // 16.2
2214
2143
  */
2215
2144
 
2216
- function curry$a(fn, arity) {
2145
+ function curry$8(fn, arity) {
2217
2146
  return function curried() {
2218
2147
  if (arity == null) {
2219
2148
  arity = fn.length;
@@ -2229,987 +2158,83 @@ System.register('JsonSchema', [], (function (exports) {
2229
2158
  };
2230
2159
  }
2231
2160
 
2232
- const curry$9 = justCurryIt$1;
2233
-
2234
-
2235
- const nil$1 = "";
2236
-
2237
- const compile$P = (pointer) => {
2238
- if (pointer.length > 0 && pointer[0] !== "/") {
2239
- throw Error("Invalid JSON Pointer");
2240
- }
2241
-
2242
- return pointer.split("/").slice(1).map(unescape);
2243
- };
2244
-
2245
- const get$1 = (pointer, value = undefined) => {
2246
- const ptr = compile$P(pointer);
2247
-
2248
- const fn = (value) => ptr.reduce(([value, pointer], segment) => {
2249
- return [applySegment(value, segment, pointer), append(segment, pointer)];
2250
- }, [value, ""])[0];
2251
-
2252
- return value === undefined ? fn : fn(value);
2253
- };
2254
-
2255
- const set = (pointer, subject = undefined, value = undefined) => {
2256
- const ptr = compile$P(pointer);
2257
- const fn = curry$9((subject, value) => _set(ptr, subject, value, nil$1));
2258
- return subject === undefined ? fn : fn(subject, value);
2259
- };
2260
-
2261
- const _set = (pointer, subject, value, cursor) => {
2262
- if (pointer.length === 0) {
2263
- return value;
2264
- } else if (pointer.length > 1) {
2265
- if (Array.isArray(subject)) {
2266
- const index = pointer.shift();
2267
- const clonedSubject = [...subject];
2268
- clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
2269
- return clonedSubject;
2270
- } else {
2271
- const segment = pointer.shift();
2272
- return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
2273
- }
2274
- } else if (Array.isArray(subject)) {
2275
- const clonedSubject = [...subject];
2276
- const segment = computeSegment(subject, pointer[0]);
2277
- clonedSubject[segment] = value;
2278
- return clonedSubject;
2279
- } else if (typeof subject === "object" && subject !== null) {
2280
- return { ...subject, [pointer[0]]: value };
2281
- } else {
2282
- return applySegment(subject, pointer[0], cursor);
2283
- }
2284
- };
2285
-
2286
- const assign = (pointer, subject = undefined, value = undefined) => {
2287
- const ptr = compile$P(pointer);
2288
- const fn = curry$9((subject, value) => _assign(ptr, subject, value, nil$1));
2289
- return subject === undefined ? fn : fn(subject, value);
2290
- };
2291
-
2292
- const _assign = (pointer, subject, value, cursor) => {
2293
- if (pointer.length === 0) {
2294
- return;
2295
- } else if (pointer.length === 1 && !isScalar(subject)) {
2296
- const segment = computeSegment(subject, pointer[0]);
2297
- subject[segment] = value;
2298
- } else {
2299
- const segment = pointer.shift();
2300
- _assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
2301
- }
2302
- };
2303
-
2304
- const unset = (pointer, subject = undefined) => {
2305
- const ptr = compile$P(pointer);
2306
- const fn = (subject) => _unset(ptr, subject, nil$1);
2307
- return subject === undefined ? fn : fn(subject);
2308
- };
2309
-
2310
- const _unset = (pointer, subject, cursor) => {
2311
- if (pointer.length == 0) {
2312
- return undefined;
2313
- } else if (pointer.length > 1) {
2314
- const segment = pointer.shift();
2315
- const value = applySegment(subject, segment, cursor);
2316
- return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
2317
- } else if (Array.isArray(subject)) {
2318
- return subject.filter((_, ndx) => ndx != pointer[0]);
2319
- } else if (typeof subject === "object" && subject !== null) {
2320
- // eslint-disable-next-line no-unused-vars
2321
- const { [pointer[0]]: _, ...result } = subject;
2322
- return result;
2323
- } else {
2324
- return applySegment(subject, pointer[0], cursor);
2325
- }
2326
- };
2327
-
2328
- const remove = (pointer, subject = undefined) => {
2329
- const ptr = compile$P(pointer);
2330
- const fn = (subject) => _remove(ptr, subject, nil$1);
2331
- return subject === undefined ? fn : fn(subject);
2332
- };
2333
-
2334
- const _remove = (pointer, subject, cursor) => {
2335
- if (pointer.length === 0) {
2336
- return;
2337
- } else if (pointer.length > 1) {
2338
- const segment = pointer.shift();
2339
- const value = applySegment(subject, segment, cursor);
2340
- _remove(pointer, value, append(segment, cursor));
2341
- } else if (Array.isArray(subject)) {
2342
- subject.splice(pointer[0], 1);
2343
- } else if (typeof subject === "object" && subject !== null) {
2344
- delete subject[pointer[0]];
2345
- } else {
2346
- applySegment(subject, pointer[0], cursor);
2347
- }
2348
- };
2349
-
2350
- const append = curry$9((segment, pointer) => pointer + "/" + escape$1(segment));
2351
-
2352
- const escape$1 = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
2353
- const unescape = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
2354
- const computeSegment = (value, segment) => Array.isArray(value) && segment === "-" ? value.length : segment;
2355
-
2356
- const applySegment = (value, segment, cursor = "") => {
2357
- if (value === undefined) {
2358
- throw TypeError(`Value at '${cursor}' is undefined and does not have property '${segment}'`);
2359
- } else if (value === null) {
2360
- throw TypeError(`Value at '${cursor}' is null and does not have property '${segment}'`);
2361
- } else if (isScalar(value)) {
2362
- throw TypeError(`Value at '${cursor}' is a ${typeof value} and does not have property '${segment}'`);
2363
- } else {
2364
- const computedSegment = computeSegment(value, segment);
2365
- return value[computedSegment];
2366
- }
2367
- };
2368
-
2369
- const isScalar = (value) => value === null || typeof value !== "object";
2370
-
2371
- var lib$4 = { nil: nil$1, append, get: get$1, set, assign, unset, remove };
2372
-
2373
- var moo$1 = {exports: {}};
2374
-
2375
- (function (module) {
2376
- (function(root, factory) {
2377
- if (module.exports) {
2378
- module.exports = factory();
2379
- } else {
2380
- root.moo = factory();
2381
- }
2382
- }(commonjsGlobal, function() {
2383
-
2384
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2385
- var toString = Object.prototype.toString;
2386
- var hasSticky = typeof new RegExp().sticky === 'boolean';
2387
-
2388
- /***************************************************************************/
2389
-
2390
- function isRegExp(o) { return o && toString.call(o) === '[object RegExp]' }
2391
- function isObject(o) { return o && typeof o === 'object' && !isRegExp(o) && !Array.isArray(o) }
2392
-
2393
- function reEscape(s) {
2394
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
2395
- }
2396
- function reGroups(s) {
2397
- var re = new RegExp('|' + s);
2398
- return re.exec('').length - 1
2399
- }
2400
- function reCapture(s) {
2401
- return '(' + s + ')'
2402
- }
2403
- function reUnion(regexps) {
2404
- if (!regexps.length) return '(?!)'
2405
- var source = regexps.map(function(s) {
2406
- return "(?:" + s + ")"
2407
- }).join('|');
2408
- return "(?:" + source + ")"
2409
- }
2410
-
2411
- function regexpOrLiteral(obj) {
2412
- if (typeof obj === 'string') {
2413
- return '(?:' + reEscape(obj) + ')'
2414
-
2415
- } else if (isRegExp(obj)) {
2416
- // TODO: consider /u support
2417
- if (obj.ignoreCase) throw new Error('RegExp /i flag not allowed')
2418
- if (obj.global) throw new Error('RegExp /g flag is implied')
2419
- if (obj.sticky) throw new Error('RegExp /y flag is implied')
2420
- if (obj.multiline) throw new Error('RegExp /m flag is implied')
2421
- return obj.source
2422
-
2423
- } else {
2424
- throw new Error('Not a pattern: ' + obj)
2425
- }
2426
- }
2427
-
2428
- function objectToRules(object) {
2429
- var keys = Object.getOwnPropertyNames(object);
2430
- var result = [];
2431
- for (var i = 0; i < keys.length; i++) {
2432
- var key = keys[i];
2433
- var thing = object[key];
2434
- var rules = [].concat(thing);
2435
- if (key === 'include') {
2436
- for (var j = 0; j < rules.length; j++) {
2437
- result.push({include: rules[j]});
2438
- }
2439
- continue
2440
- }
2441
- var match = [];
2442
- rules.forEach(function(rule) {
2443
- if (isObject(rule)) {
2444
- if (match.length) result.push(ruleOptions(key, match));
2445
- result.push(ruleOptions(key, rule));
2446
- match = [];
2447
- } else {
2448
- match.push(rule);
2449
- }
2450
- });
2451
- if (match.length) result.push(ruleOptions(key, match));
2452
- }
2453
- return result
2454
- }
2455
-
2456
- function arrayToRules(array) {
2457
- var result = [];
2458
- for (var i = 0; i < array.length; i++) {
2459
- var obj = array[i];
2460
- if (obj.include) {
2461
- var include = [].concat(obj.include);
2462
- for (var j = 0; j < include.length; j++) {
2463
- result.push({include: include[j]});
2464
- }
2465
- continue
2466
- }
2467
- if (!obj.type) {
2468
- throw new Error('Rule has no type: ' + JSON.stringify(obj))
2469
- }
2470
- result.push(ruleOptions(obj.type, obj));
2471
- }
2472
- return result
2473
- }
2474
-
2475
- function ruleOptions(type, obj) {
2476
- if (!isObject(obj)) {
2477
- obj = { match: obj };
2478
- }
2479
- if (obj.include) {
2480
- throw new Error('Matching rules cannot also include states')
2481
- }
2482
-
2483
- // nb. error and fallback imply lineBreaks
2484
- var options = {
2485
- defaultType: type,
2486
- lineBreaks: !!obj.error || !!obj.fallback,
2487
- pop: false,
2488
- next: null,
2489
- push: null,
2490
- error: false,
2491
- fallback: false,
2492
- value: null,
2493
- type: null,
2494
- shouldThrow: false,
2495
- };
2496
-
2497
- // Avoid Object.assign(), so we support IE9+
2498
- for (var key in obj) {
2499
- if (hasOwnProperty.call(obj, key)) {
2500
- options[key] = obj[key];
2501
- }
2502
- }
2503
-
2504
- // type transform cannot be a string
2505
- if (typeof options.type === 'string' && type !== options.type) {
2506
- throw new Error("Type transform cannot be a string (type '" + options.type + "' for token '" + type + "')")
2507
- }
2508
-
2509
- // convert to array
2510
- var match = options.match;
2511
- options.match = Array.isArray(match) ? match : match ? [match] : [];
2512
- options.match.sort(function(a, b) {
2513
- return isRegExp(a) && isRegExp(b) ? 0
2514
- : isRegExp(b) ? -1 : isRegExp(a) ? +1 : b.length - a.length
2515
- });
2516
- return options
2517
- }
2518
-
2519
- function toRules(spec) {
2520
- return Array.isArray(spec) ? arrayToRules(spec) : objectToRules(spec)
2521
- }
2522
-
2523
- var defaultErrorRule = ruleOptions('error', {lineBreaks: true, shouldThrow: true});
2524
- function compileRules(rules, hasStates) {
2525
- var errorRule = null;
2526
- var fast = Object.create(null);
2527
- var fastAllowed = true;
2528
- var unicodeFlag = null;
2529
- var groups = [];
2530
- var parts = [];
2531
-
2532
- // If there is a fallback rule, then disable fast matching
2533
- for (var i = 0; i < rules.length; i++) {
2534
- if (rules[i].fallback) {
2535
- fastAllowed = false;
2536
- }
2537
- }
2538
-
2539
- for (var i = 0; i < rules.length; i++) {
2540
- var options = rules[i];
2541
-
2542
- if (options.include) {
2543
- // all valid inclusions are removed by states() preprocessor
2544
- throw new Error('Inheritance is not allowed in stateless lexers')
2545
- }
2546
-
2547
- if (options.error || options.fallback) {
2548
- // errorRule can only be set once
2549
- if (errorRule) {
2550
- if (!options.fallback === !errorRule.fallback) {
2551
- throw new Error("Multiple " + (options.fallback ? "fallback" : "error") + " rules not allowed (for token '" + options.defaultType + "')")
2552
- } else {
2553
- throw new Error("fallback and error are mutually exclusive (for token '" + options.defaultType + "')")
2554
- }
2555
- }
2556
- errorRule = options;
2557
- }
2558
-
2559
- var match = options.match.slice();
2560
- if (fastAllowed) {
2561
- while (match.length && typeof match[0] === 'string' && match[0].length === 1) {
2562
- var word = match.shift();
2563
- fast[word.charCodeAt(0)] = options;
2564
- }
2565
- }
2566
-
2567
- // Warn about inappropriate state-switching options
2568
- if (options.pop || options.push || options.next) {
2569
- if (!hasStates) {
2570
- throw new Error("State-switching options are not allowed in stateless lexers (for token '" + options.defaultType + "')")
2571
- }
2572
- if (options.fallback) {
2573
- throw new Error("State-switching options are not allowed on fallback tokens (for token '" + options.defaultType + "')")
2574
- }
2575
- }
2576
-
2577
- // Only rules with a .match are included in the RegExp
2578
- if (match.length === 0) {
2579
- continue
2580
- }
2581
- fastAllowed = false;
2582
-
2583
- groups.push(options);
2584
-
2585
- // Check unicode flag is used everywhere or nowhere
2586
- for (var j = 0; j < match.length; j++) {
2587
- var obj = match[j];
2588
- if (!isRegExp(obj)) {
2589
- continue
2590
- }
2591
-
2592
- if (unicodeFlag === null) {
2593
- unicodeFlag = obj.unicode;
2594
- } else if (unicodeFlag !== obj.unicode && options.fallback === false) {
2595
- throw new Error('If one rule is /u then all must be')
2596
- }
2597
- }
2598
-
2599
- // convert to RegExp
2600
- var pat = reUnion(match.map(regexpOrLiteral));
2601
-
2602
- // validate
2603
- var regexp = new RegExp(pat);
2604
- if (regexp.test("")) {
2605
- throw new Error("RegExp matches empty string: " + regexp)
2606
- }
2607
- var groupCount = reGroups(pat);
2608
- if (groupCount > 0) {
2609
- throw new Error("RegExp has capture groups: " + regexp + "\nUse (?: … ) instead")
2610
- }
2611
-
2612
- // try and detect rules matching newlines
2613
- if (!options.lineBreaks && regexp.test('\n')) {
2614
- throw new Error('Rule should declare lineBreaks: ' + regexp)
2615
- }
2616
-
2617
- // store regex
2618
- parts.push(reCapture(pat));
2619
- }
2620
-
2621
-
2622
- // If there's no fallback rule, use the sticky flag so we only look for
2623
- // matches at the current index.
2624
- //
2625
- // If we don't support the sticky flag, then fake it using an irrefutable
2626
- // match (i.e. an empty pattern).
2627
- var fallbackRule = errorRule && errorRule.fallback;
2628
- var flags = hasSticky && !fallbackRule ? 'ym' : 'gm';
2629
- var suffix = hasSticky || fallbackRule ? '' : '|';
2630
-
2631
- if (unicodeFlag === true) flags += "u";
2632
- var combined = new RegExp(reUnion(parts) + suffix, flags);
2633
- return {regexp: combined, groups: groups, fast: fast, error: errorRule || defaultErrorRule}
2634
- }
2635
-
2636
- function compile(rules) {
2637
- var result = compileRules(toRules(rules));
2638
- return new Lexer({start: result}, 'start')
2639
- }
2640
-
2641
- function checkStateGroup(g, name, map) {
2642
- var state = g && (g.push || g.next);
2643
- if (state && !map[state]) {
2644
- throw new Error("Missing state '" + state + "' (in token '" + g.defaultType + "' of state '" + name + "')")
2645
- }
2646
- if (g && g.pop && +g.pop !== 1) {
2647
- throw new Error("pop must be 1 (in token '" + g.defaultType + "' of state '" + name + "')")
2648
- }
2649
- }
2650
- function compileStates(states, start) {
2651
- var all = states.$all ? toRules(states.$all) : [];
2652
- delete states.$all;
2653
-
2654
- var keys = Object.getOwnPropertyNames(states);
2655
- if (!start) start = keys[0];
2656
-
2657
- var ruleMap = Object.create(null);
2658
- for (var i = 0; i < keys.length; i++) {
2659
- var key = keys[i];
2660
- ruleMap[key] = toRules(states[key]).concat(all);
2661
- }
2662
- for (var i = 0; i < keys.length; i++) {
2663
- var key = keys[i];
2664
- var rules = ruleMap[key];
2665
- var included = Object.create(null);
2666
- for (var j = 0; j < rules.length; j++) {
2667
- var rule = rules[j];
2668
- if (!rule.include) continue
2669
- var splice = [j, 1];
2670
- if (rule.include !== key && !included[rule.include]) {
2671
- included[rule.include] = true;
2672
- var newRules = ruleMap[rule.include];
2673
- if (!newRules) {
2674
- throw new Error("Cannot include nonexistent state '" + rule.include + "' (in state '" + key + "')")
2675
- }
2676
- for (var k = 0; k < newRules.length; k++) {
2677
- var newRule = newRules[k];
2678
- if (rules.indexOf(newRule) !== -1) continue
2679
- splice.push(newRule);
2680
- }
2681
- }
2682
- rules.splice.apply(rules, splice);
2683
- j--;
2684
- }
2685
- }
2686
-
2687
- var map = Object.create(null);
2688
- for (var i = 0; i < keys.length; i++) {
2689
- var key = keys[i];
2690
- map[key] = compileRules(ruleMap[key], true);
2691
- }
2692
-
2693
- for (var i = 0; i < keys.length; i++) {
2694
- var name = keys[i];
2695
- var state = map[name];
2696
- var groups = state.groups;
2697
- for (var j = 0; j < groups.length; j++) {
2698
- checkStateGroup(groups[j], name, map);
2699
- }
2700
- var fastKeys = Object.getOwnPropertyNames(state.fast);
2701
- for (var j = 0; j < fastKeys.length; j++) {
2702
- checkStateGroup(state.fast[fastKeys[j]], name, map);
2703
- }
2704
- }
2705
-
2706
- return new Lexer(map, start)
2707
- }
2708
-
2709
- function keywordTransform(map) {
2710
- var reverseMap = Object.create(null);
2711
- var byLength = Object.create(null);
2712
- var types = Object.getOwnPropertyNames(map);
2713
- for (var i = 0; i < types.length; i++) {
2714
- var tokenType = types[i];
2715
- var item = map[tokenType];
2716
- var keywordList = Array.isArray(item) ? item : [item];
2717
- keywordList.forEach(function(keyword) {
2718
- (byLength[keyword.length] = byLength[keyword.length] || []).push(keyword);
2719
- if (typeof keyword !== 'string') {
2720
- throw new Error("keyword must be string (in keyword '" + tokenType + "')")
2721
- }
2722
- reverseMap[keyword] = tokenType;
2723
- });
2724
- }
2725
-
2726
- // fast string lookup
2727
- // https://jsperf.com/string-lookups
2728
- function str(x) { return JSON.stringify(x) }
2729
- var source = '';
2730
- source += 'switch (value.length) {\n';
2731
- for (var length in byLength) {
2732
- var keywords = byLength[length];
2733
- source += 'case ' + length + ':\n';
2734
- source += 'switch (value) {\n';
2735
- keywords.forEach(function(keyword) {
2736
- var tokenType = reverseMap[keyword];
2737
- source += 'case ' + str(keyword) + ': return ' + str(tokenType) + '\n';
2738
- });
2739
- source += '}\n';
2740
- }
2741
- source += '}\n';
2742
- return Function('value', source) // type
2743
- }
2744
-
2745
- /***************************************************************************/
2746
-
2747
- var Lexer = function(states, state) {
2748
- this.startState = state;
2749
- this.states = states;
2750
- this.buffer = '';
2751
- this.stack = [];
2752
- this.reset();
2753
- };
2754
-
2755
- Lexer.prototype.reset = function(data, info) {
2756
- this.buffer = data || '';
2757
- this.index = 0;
2758
- this.line = info ? info.line : 1;
2759
- this.col = info ? info.col : 1;
2760
- this.queuedToken = info ? info.queuedToken : null;
2761
- this.queuedThrow = info ? info.queuedThrow : null;
2762
- this.setState(info ? info.state : this.startState);
2763
- this.stack = info && info.stack ? info.stack.slice() : [];
2764
- return this
2765
- };
2766
-
2767
- Lexer.prototype.save = function() {
2768
- return {
2769
- line: this.line,
2770
- col: this.col,
2771
- state: this.state,
2772
- stack: this.stack.slice(),
2773
- queuedToken: this.queuedToken,
2774
- queuedThrow: this.queuedThrow,
2775
- }
2776
- };
2777
-
2778
- Lexer.prototype.setState = function(state) {
2779
- if (!state || this.state === state) return
2780
- this.state = state;
2781
- var info = this.states[state];
2782
- this.groups = info.groups;
2783
- this.error = info.error;
2784
- this.re = info.regexp;
2785
- this.fast = info.fast;
2786
- };
2787
-
2788
- Lexer.prototype.popState = function() {
2789
- this.setState(this.stack.pop());
2790
- };
2791
-
2792
- Lexer.prototype.pushState = function(state) {
2793
- this.stack.push(this.state);
2794
- this.setState(state);
2795
- };
2796
-
2797
- var eat = hasSticky ? function(re, buffer) { // assume re is /y
2798
- return re.exec(buffer)
2799
- } : function(re, buffer) { // assume re is /g
2800
- var match = re.exec(buffer);
2801
- // will always match, since we used the |(?:) trick
2802
- if (match[0].length === 0) {
2803
- return null
2804
- }
2805
- return match
2806
- };
2807
-
2808
- Lexer.prototype._getGroup = function(match) {
2809
- var groupCount = this.groups.length;
2810
- for (var i = 0; i < groupCount; i++) {
2811
- if (match[i + 1] !== undefined) {
2812
- return this.groups[i]
2813
- }
2814
- }
2815
- throw new Error('Cannot find token type for matched text')
2816
- };
2817
-
2818
- function tokenToString() {
2819
- return this.value
2820
- }
2821
-
2822
- Lexer.prototype.next = function() {
2823
- var index = this.index;
2824
-
2825
- // If a fallback token matched, we don't need to re-run the RegExp
2826
- if (this.queuedGroup) {
2827
- var token = this._token(this.queuedGroup, this.queuedText, index);
2828
- this.queuedGroup = null;
2829
- this.queuedText = "";
2830
- return token
2831
- }
2832
-
2833
- var buffer = this.buffer;
2834
- if (index === buffer.length) {
2835
- return // EOF
2836
- }
2837
-
2838
- // Fast matching for single characters
2839
- var group = this.fast[buffer.charCodeAt(index)];
2840
- if (group) {
2841
- return this._token(group, buffer.charAt(index), index)
2842
- }
2843
-
2844
- // Execute RegExp
2845
- var re = this.re;
2846
- re.lastIndex = index;
2847
- var match = eat(re, buffer);
2161
+ const curry$7 = justCurryIt;
2848
2162
 
2849
- // Error tokens match the remaining buffer
2850
- var error = this.error;
2851
- if (match == null) {
2852
- return this._token(error, buffer.slice(index, buffer.length), index)
2853
- }
2854
2163
 
2855
- var group = this._getGroup(match);
2856
- var text = match[0];
2164
+ var map$3 = curry$7(async (fn, doc) => (await doc).map(fn));
2857
2165
 
2858
- if (error.fallback && match.index !== index) {
2859
- this.queuedGroup = group;
2860
- this.queuedText = text;
2166
+ const curry$6 = justCurryIt;
2861
2167
 
2862
- // Fallback tokens contain the unmatched portion of the buffer
2863
- return this._token(error, buffer.slice(index, match.index), index)
2864
- }
2865
2168
 
2866
- return this._token(group, text, index)
2867
- };
2868
-
2869
- Lexer.prototype._token = function(group, text, offset) {
2870
- // count line breaks
2871
- var lineBreaks = 0;
2872
- if (group.lineBreaks) {
2873
- var matchNL = /\n/g;
2874
- var nl = 1;
2875
- if (text === '\n') {
2876
- lineBreaks = 1;
2877
- } else {
2878
- while (matchNL.exec(text)) { lineBreaks++; nl = matchNL.lastIndex; }
2879
- }
2880
- }
2881
-
2882
- var token = {
2883
- type: (typeof group.type === 'function' && group.type(text)) || group.defaultType,
2884
- value: typeof group.value === 'function' ? group.value(text) : text,
2885
- text: text,
2886
- toString: tokenToString,
2887
- offset: offset,
2888
- lineBreaks: lineBreaks,
2889
- line: this.line,
2890
- col: this.col,
2891
- };
2892
- // nb. adding more props to token object will make V8 sad!
2893
-
2894
- var size = text.length;
2895
- this.index += size;
2896
- this.line += lineBreaks;
2897
- if (lineBreaks !== 0) {
2898
- this.col = size - nl + 1;
2899
- } else {
2900
- this.col += size;
2901
- }
2902
-
2903
- // throw, if no rule with {error: true}
2904
- if (group.shouldThrow) {
2905
- throw new Error(this.formatError(token, "invalid syntax"))
2906
- }
2907
-
2908
- if (group.pop) this.popState();
2909
- else if (group.push) this.pushState(group.push);
2910
- else if (group.next) this.setState(group.next);
2911
-
2912
- return token
2913
- };
2914
-
2915
- if (typeof Symbol !== 'undefined' && Symbol.iterator) {
2916
- var LexerIterator = function(lexer) {
2917
- this.lexer = lexer;
2918
- };
2919
-
2920
- LexerIterator.prototype.next = function() {
2921
- var token = this.lexer.next();
2922
- return {value: token, done: !token}
2923
- };
2924
-
2925
- LexerIterator.prototype[Symbol.iterator] = function() {
2926
- return this
2927
- };
2928
-
2929
- Lexer.prototype[Symbol.iterator] = function() {
2930
- return new LexerIterator(this)
2931
- };
2932
- }
2933
-
2934
- Lexer.prototype.formatError = function(token, message) {
2935
- if (token == null) {
2936
- // An undefined token indicates EOF
2937
- var text = this.buffer.slice(this.index);
2938
- var token = {
2939
- text: text,
2940
- offset: this.index,
2941
- lineBreaks: text.indexOf('\n') === -1 ? 0 : 1,
2942
- line: this.line,
2943
- col: this.col,
2944
- };
2945
- }
2946
- var start = Math.max(0, token.offset - token.col + 1);
2947
- var eol = token.lineBreaks ? token.text.indexOf('\n') : token.text.length;
2948
- var firstLine = this.buffer.substring(start, token.offset + eol);
2949
- message += " at line " + token.line + " col " + token.col + ":\n\n";
2950
- message += " " + firstLine + "\n";
2951
- message += " " + Array(token.col).join(" ") + "^";
2952
- return message
2953
- };
2954
-
2955
- Lexer.prototype.clone = function() {
2956
- return new Lexer(this.states, this.state)
2957
- };
2958
-
2959
- Lexer.prototype.has = function(tokenType) {
2960
- return true
2961
- };
2962
-
2963
-
2964
- return {
2965
- compile: compile,
2966
- states: compileStates,
2967
- error: Object.freeze({error: true}),
2968
- fallback: Object.freeze({fallback: true}),
2969
- keywords: keywordTransform,
2970
- }
2971
-
2972
- }));
2973
- } (moo$1));
2974
-
2975
- const moo = moo$1.exports;
2976
-
2977
-
2978
- const digit = `[0-9]`;
2979
- const digit19 = `[1-9]`;
2980
- const hexdig = `[0-9a-fA-F]`;
2981
-
2982
- // String
2983
- const unescaped = `[\\x20-\\x21\\x23-\\x5b\\x5d-\\u{10ffff}]`;
2984
- const escape = `\\\\`;
2985
- const escaped = `${escape}(?:["\\/\\\\brfnt]|u${hexdig}{4})`;
2986
- const char = `(?:${unescaped}|${escaped})`;
2987
- const string = `"${char}*"`;
2988
-
2989
- // Number
2990
- const int = `(?:0|${digit19}${digit}*)`;
2991
- const frac = `\\.${digit}+`;
2992
- const e = `[eE]`;
2993
- const exp = `${e}[-+]?${digit}+`;
2994
- const number = `-?${int}(?:${frac})?(?:${exp})?`;
2995
-
2996
- // Whitespace
2997
- const whitespace = `(?:(?:\\r?\\n)|[ \\t])+`;
2998
-
2999
- var lexer = (json) => {
3000
- const lexer = moo.states({
3001
- main: {
3002
- WS: { match: new RegExp(whitespace, "u"), lineBreaks: true },
3003
- true: { match: "true", value: () => true },
3004
- false: { match: "false", value: () => false },
3005
- null: { match: "null", value: () => null },
3006
- number: { match: new RegExp(number, "u"), value: parseFloat },
3007
- string: { match: new RegExp(string, "u"), value: JSON.parse },
3008
- "{": "{",
3009
- "}": "}",
3010
- "[": "[",
3011
- "]": "]",
3012
- ":": ":",
3013
- ",": ",",
3014
- error: moo.error
3015
- }
3016
- });
3017
- lexer.reset(json);
3018
-
3019
- const _next = () => {
3020
- let token;
3021
- do {
3022
- token = lexer.next();
3023
- if (token?.type === "error") {
3024
- throw SyntaxError(lexer.formatError(token, "Unrecognized token"));
3025
- }
3026
- } while (token?.type === "WS");
3027
-
3028
- return token;
3029
- };
3030
-
3031
- let previous;
3032
- let nextToken = _next();
3033
-
3034
- const next = (expectedType = undefined) => {
3035
- previous = nextToken;
3036
- nextToken = _next();
3037
- if (expectedType && previous?.type !== expectedType) {
3038
- throw SyntaxError(lexer.formatError(previous, `Expected a '${expectedType}'`));
3039
- }
3040
- return previous;
3041
- };
3042
-
3043
- const peek = () => nextToken;
3044
-
3045
- const defaultErrorToken = { offset: 0, line: 1, col: 0, text: "" };
3046
- const syntaxError = (message) => {
3047
- const referenceToken = previous || defaultErrorToken;
3048
- const errorToken = {
3049
- ...referenceToken,
3050
- offset: referenceToken.offset + referenceToken.text.length,
3051
- col: referenceToken.col + referenceToken.text.length
3052
- };
3053
- throw new SyntaxError(lexer.formatError(errorToken, message));
3054
- };
3055
-
3056
- return { next, peek, syntaxError };
3057
- };
3058
-
3059
- const JsonPointer$2 = lib$4;
3060
- const jsonLexer = lexer;
3061
-
3062
-
3063
- const defaultReviver = (key, value) => value;
3064
- const parse$3 = (json, reviver = defaultReviver) => {
3065
- const lexer = jsonLexer(json);
3066
- const value = parseValue(lexer, "", JsonPointer$2.nil, reviver);
3067
-
3068
- const token = lexer.peek();
3069
- if (token) {
3070
- lexer.syntaxError("A value has been parsed, but more tokens were found");
3071
- }
3072
- return value;
3073
- };
3074
-
3075
- const parseValue = (lexer, key, pointer, reviver) => {
3076
- let value;
3077
- const token = lexer.next();
3078
- switch (token?.type) {
3079
- case "true":
3080
- case "false":
3081
- case "null":
3082
- case "number":
3083
- case "string":
3084
- value = token.value;
3085
- break;
3086
- case "{":
3087
- value = parseObject(lexer, key, pointer, reviver);
3088
- break;
3089
- case "[":
3090
- value = parseArray(lexer, key, pointer, reviver);
3091
- break;
3092
- default:
3093
- lexer.syntaxError("Expected a JSON value");
3094
- }
3095
-
3096
- return reviver(key, value, pointer);
3097
- };
3098
-
3099
- const parseObject = (lexer, key, pointer, reviver) => {
3100
- const value = {};
3101
-
3102
- if (lexer.peek()?.type !== "}") {
3103
- parseProperties(lexer, key, pointer, reviver, value);
3104
- }
3105
-
3106
- lexer.next("}");
3107
-
3108
- return value;
3109
- };
3110
-
3111
- const parseProperties = (lexer, key, pointer, reviver, value) => {
3112
- const propertyName = lexer.next("string").value;
3113
- lexer.next(":");
3114
- if (!isValueToken(lexer.peek())) {
3115
- lexer.syntaxError("Expected a JSON value");
3116
- }
3117
- value[propertyName] = parseValue(lexer, propertyName, JsonPointer$2.append(propertyName, pointer), reviver);
3118
-
3119
- if (lexer.peek()?.type === ",") {
3120
- lexer.next(); // burn comma
3121
- parseProperties(lexer, propertyName, pointer, reviver, value);
3122
- } else if (isValueToken(lexer.peek())) {
3123
- lexer.next(",");
3124
- }
3125
- };
3126
-
3127
- const parseArray = (lexer, key, pointer, reviver) => {
3128
- const value = [];
2169
+ var reduce$2 = curry$6(async (fn, acc, doc) => {
2170
+ return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
2171
+ });
3129
2172
 
3130
- if (lexer.peek()?.type !== "]") {
3131
- parseItems(lexer, 0, pointer, reviver, value);
3132
- }
2173
+ const curry$5 = justCurryIt;
2174
+ const reduce$1 = reduce$2;
3133
2175
 
3134
- lexer.next("]");
3135
2176
 
3136
- return value;
3137
- };
2177
+ var filter = curry$5(async (fn, doc, options = {}) => {
2178
+ return reduce$1(async (acc, item) => {
2179
+ return (await fn(item)) ? acc.concat([item]) : acc;
2180
+ }, [], doc, options);
2181
+ });
3138
2182
 
3139
- const parseItems = (lexer, key, pointer, reviver, value) => {
3140
- if (!isValueToken(lexer.peek())) {
3141
- lexer.syntaxError("Expected a JSON value");
3142
- }
3143
- value[key] = parseValue(lexer, key, JsonPointer$2.append(key, pointer), reviver);
3144
- if (lexer.peek()?.type === ",") {
3145
- lexer.next(); // burn comma
3146
- parseItems(lexer, key + 1, pointer, reviver, value);
3147
- } else if (isValueToken(lexer.peek())) {
3148
- lexer.next(",");
3149
- }
3150
- };
2183
+ const curry$4 = justCurryIt;
2184
+ const map$2 = map$3;
3151
2185
 
3152
- const valueType = new Set(["string", "number", "true", "false", "null", "[", "{"]);
3153
- const isValueToken = (token) => valueType.has(token?.type);
3154
2186
 
3155
- var parse_1 = parse$3;
2187
+ var some = curry$4(async (fn, doc) => {
2188
+ const results = await map$2(fn, doc);
2189
+ return (await Promise.all(results))
2190
+ .some((a) => a);
2191
+ });
3156
2192
 
3157
- const JsonPointer$1 = lib$4;
2193
+ const curry$3 = justCurryIt;
2194
+ const map$1 = map$3;
3158
2195
 
3159
2196
 
3160
- const defaultReplacer = (key, value) => value;
3161
- const stringify$2 = (value, replacer = defaultReplacer, space = "") => {
3162
- return stringifyValue(value, replacer, space, "", JsonPointer$1.nil, 1);
3163
- };
2197
+ var every = curry$3(async (fn, doc) => {
2198
+ const results = await map$1(fn, doc);
2199
+ return (await Promise.all(results))
2200
+ .every((a) => a);
2201
+ });
3164
2202
 
3165
- const stringifyValue = (value, replacer, space, key, pointer, depth) => {
3166
- value = replacer(key, value, pointer);
3167
- let result;
3168
- if (Array.isArray(value)) {
3169
- result = stringifyArray(value, replacer, space, pointer, depth);
3170
- } else if (typeof value === "object" && value !== null) {
3171
- result = stringifyObject(value, replacer, space, pointer, depth);
3172
- } else {
3173
- result = JSON.stringify(value);
3174
- }
2203
+ const curry$2 = justCurryIt;
3175
2204
 
3176
- return result;
3177
- };
3178
2205
 
3179
- const stringifyArray = (value, replacer, space, pointer, depth) => {
3180
- if (value.length === 0) {
3181
- space = "";
3182
- }
3183
- const padding = space ? `\n${space.repeat(depth - 1)}` : "";
3184
- return "[" + padding + space + value
3185
- .map((item, index) => {
3186
- const indexPointer = JsonPointer$1.append(index, pointer);
3187
- return stringifyValue(item, replacer, space, index, indexPointer, depth + 1);
3188
- })
3189
- .join(`,${padding}${space}`) + padding + "]";
3190
- };
2206
+ var pipeline$1 = curry$2((fns, doc) => {
2207
+ return fns.reduce(async (acc, fn) => fn(await acc), doc);
2208
+ });
3191
2209
 
3192
- const stringifyObject = (value, replacer, space, pointer, depth) => {
3193
- if (Object.keys(value).length === 0) {
3194
- space = "";
3195
- }
3196
- const padding = space ? `\n${space.repeat(depth - 1)}` : "";
3197
- const spacing = space ? " " : "";
3198
- return "{" + padding + space + Object.entries(value)
3199
- .map(([key, value]) => {
3200
- const keyPointer = JsonPointer$1.append(key, pointer);
3201
- return JSON.stringify(key) + ":" + spacing + stringifyValue(value, replacer, space, key, keyPointer, depth + 1);
3202
- })
3203
- .join(`,${padding}${space}`) + padding + "}";
3204
- };
2210
+ var all = (doc) => Promise.all(doc);
3205
2211
 
3206
- var stringify_1 = stringify$2;
2212
+ const pipeline = pipeline$1;
2213
+ const entries$1 = entries$2;
2214
+ const reduce = reduce$2;
3207
2215
 
3208
- const parse$2 = parse_1;
3209
- const stringify$1 = stringify_1;
3210
2216
 
2217
+ var allValues = (doc) => {
2218
+ return pipeline([
2219
+ entries$1,
2220
+ reduce(async (acc, [propertyName, propertyValue]) => {
2221
+ acc[propertyName] = await propertyValue;
2222
+ return acc;
2223
+ }, {})
2224
+ ], doc);
2225
+ };
3211
2226
 
3212
- var lib$3 = { parse: parse$2, stringify: stringify$1 };
2227
+ var lib$2 = {
2228
+ entries: entries$2,
2229
+ map: map$3,
2230
+ filter: filter,
2231
+ reduce: reduce$2,
2232
+ some: some,
2233
+ every: every,
2234
+ pipeline: pipeline$1,
2235
+ all: all,
2236
+ allValues: allValues
2237
+ };
3213
2238
 
3214
2239
  var fetch_browser = fetch;
3215
2240
 
@@ -3465,10 +2490,9 @@ System.register('JsonSchema', [], (function (exports) {
3465
2490
 
3466
2491
  var mediaTypes = { addPlugin, parse, getContentType };
3467
2492
 
3468
- const curry$8 = justCurryIt$2;
3469
- const Pact$a = lib$5;
3470
- const Json = lib$3;
3471
- const JsonPointer = lib$6;
2493
+ const curry$1 = justCurryIt$1;
2494
+ const Pact$a = lib$2;
2495
+ const JsonPointer = lib$3;
3472
2496
  const { jsonTypeOf, resolveUrl: resolveUrl$1, urlFragment, pathRelative } = common$1;
3473
2497
  const fetch$1 = fetch_browser;
3474
2498
  const Reference$1 = reference;
@@ -3499,61 +2523,64 @@ System.register('JsonSchema', [], (function (exports) {
3499
2523
  // Schema Management
3500
2524
  const schemaStore = {};
3501
2525
  const schemaStoreAlias = {};
3502
- const add$1 = (schema, retrievalUri = "", defaultDialectId = "") => {
3503
- const dialectId = getDialectId(schema, retrievalUri, defaultDialectId);
3504
-
3505
- const id = getBaseUri(schema, retrievalUri, dialectJsonSchemaVersion[dialectId]);
3506
-
3507
- // Extract embedded schemas and collect anchors
3508
- const embeddedToken = getConfig(dialectId, "embeddedToken");
3509
- const baseToken = getConfig(dialectId, "baseToken");
3510
- const anchorToken = getConfig(dialectId, "anchorToken");
3511
- const dynamicAnchorToken = getConfig(dialectId, "dynamicAnchorToken");
3512
- const jrefToken = getConfig(dialectId, "jrefToken");
3513
-
3514
- const dynamicAnchors = {};
3515
- const anchors = { "": "" };
3516
-
3517
- schema = Json.parse(JSON.stringify(schema), (key, value, pointer) => {
3518
- if (jsonTypeOf(value, "object")) {
3519
- // Embedded Schema
3520
- const embeddedSchemaDialectId = typeof value.$schema === "string" ? resolveUrl$1(value.$schema, "") : dialectId;
3521
- const embeddedEmbeddedToken = getConfig(embeddedSchemaDialectId, "embeddedToken");
3522
- const embeddedAnchorToken = getConfig(embeddedSchemaDialectId, "anchorToken");
3523
- if (typeof value[embeddedEmbeddedToken] === "string" && (embeddedEmbeddedToken !== embeddedAnchorToken || value[embeddedEmbeddedToken][0] !== "#") && pointer !== "") {
3524
- const embeddedRetrievalUri = resolveUrl$1(id, value[embeddedEmbeddedToken]);
3525
- add$1(value, embeddedRetrievalUri, dialectId);
3526
- return Reference$1.cons(value[embeddedEmbeddedToken], value);
3527
- }
3528
2526
 
3529
- if (typeof value[jrefToken] === "string") {
3530
- return Reference$1.cons(value[jrefToken], value);
3531
- }
2527
+ const add$1 = (schema, url = "", defaultSchemaVersion = "") => {
2528
+ schema = JSON.parse(JSON.stringify(schema));
2529
+ const externalId = resolveUrl$1(url, "");
3532
2530
 
3533
- if (typeof value[anchorToken] === "string" && pointer !== JsonPointer.nil) {
3534
- const anchor = anchorToken !== embeddedToken ? value[anchorToken] : value[anchorToken].slice(1);
3535
- anchors[anchor] = pointer;
3536
- delete value[anchorToken];
3537
- }
2531
+ // Dialect / JSON Schema Version
2532
+ const dialectId = resolveUrl$1(schema["$schema"] || defaultSchemaVersion, "");
2533
+ if (!dialectId) {
2534
+ throw Error("Couldn't determine schema dialect");
2535
+ }
2536
+ delete schema["$schema"];
3538
2537
 
3539
- if (typeof value[dynamicAnchorToken] === "string") {
3540
- dynamicAnchors[value[dynamicAnchorToken]] = `${id}#${pointer}`;
3541
- anchors[value[dynamicAnchorToken]] = pointer;
3542
- delete value[dynamicAnchorToken];
2538
+ // Determine JSON Schema version
2539
+ if (!(dialectId in dialectJsonSchemaVersion)) {
2540
+ if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core201909Id)[0]) {
2541
+ // Self describing 2019-09 meta-schema
2542
+ dialectJsonSchemaVersion[dialectId] = core201909Id;
2543
+ } else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core202012Id)[0]) {
2544
+ // Self describing 2020-12 meta-schema
2545
+ dialectJsonSchemaVersion[dialectId] = core202012Id;
2546
+ } else {
2547
+ // Need to look at meta-schema to determine version
2548
+ const metaSchema = schemaStore[dialectId];
2549
+ if (!metaSchema) {
2550
+ throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
2551
+ } else if (metaSchema.vocabulary[core201909Id] === true) {
2552
+ dialectJsonSchemaVersion[dialectId] = core201909Id;
2553
+ } else if (metaSchema.vocabulary[core202012Id] === true) {
2554
+ dialectJsonSchemaVersion[dialectId] = core202012Id;
2555
+ } else {
2556
+ // Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
2557
+ dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
3543
2558
  }
3544
2559
  }
2560
+ }
3545
2561
 
3546
- return value;
3547
- });
3548
- console.log(embeddedIds);
3549
-
3550
- delete schema.$schema;
2562
+ // Internal Identifier
2563
+ const [id, fragment] = getSchemaIdentifier(schema, externalId, dialectJsonSchemaVersion[dialectId]);
2564
+ if (!id) {
2565
+ throw Error("Couldn't determine an identifier for the schema");
2566
+ }
2567
+ const baseToken = getConfig(dialectId, "baseToken");
3551
2568
  delete schema[baseToken];
2569
+ if (externalId) {
2570
+ schemaStoreAlias[externalId] = id;
2571
+ }
2572
+
2573
+ const anchorToken = getConfig(dialectId, "anchorToken");
2574
+ if (fragment && baseToken === anchorToken) {
2575
+ schema[anchorToken] = anchorToken !== baseToken ? encodeURI(fragment) : `#${encodeURI(fragment)}`;
2576
+ }
3552
2577
 
3553
2578
  // recursiveAnchor
2579
+ const dynamicAnchors = {};
3554
2580
  const recursiveAnchorToken = getConfig(dialectId, "recursiveAnchorToken");
3555
2581
  if (schema[recursiveAnchorToken] === true) {
3556
2582
  dynamicAnchors[""] = `${id}#`;
2583
+ schema[anchorToken] = "";
3557
2584
  delete schema[recursiveAnchorToken];
3558
2585
  }
3559
2586
 
@@ -3568,66 +2595,69 @@ System.register('JsonSchema', [], (function (exports) {
3568
2595
  }
3569
2596
 
3570
2597
  // Store Schema
2598
+ const anchors = { "": "" };
3571
2599
  schemaStore[id] = {
3572
- id,
3573
- dialectId,
3574
- schema,
3575
- anchors,
3576
- dynamicAnchors,
3577
- vocabulary,
2600
+ id: id,
2601
+ dialectId: dialectId,
2602
+ schema: processSchema(schema, id, dialectId, JsonPointer.nil, anchors, dynamicAnchors),
2603
+ anchors: anchors,
2604
+ dynamicAnchors: dynamicAnchors,
2605
+ vocabulary: vocabulary,
3578
2606
  validated: false
3579
2607
  };
3580
- if (id === "https://example.com/schema/root") {
3581
- console.log(Object.keys(schemaStore).filter((id) => !/json-schema\.org/.test(id)));
3582
- }
3583
2608
 
3584
- if (retrievalUri) {
3585
- schemaStoreAlias[resolveUrl$1(retrievalUri, "")] = id;
3586
- }
2609
+ return id;
3587
2610
  };
3588
2611
 
3589
- const getDialectId = (schema, retrievalUri, defaultDialectId) => {
3590
- const dialectId = resolveUrl$1(schema.$schema || defaultDialectId, "");
3591
- if (!dialectId) {
3592
- throw Error("Couldn't determine schema dialect");
3593
- }
2612
+ const getSchemaIdentifier = (schema, externalId, jsonSchemaVersion) => {
2613
+ const baseToken = config[jsonSchemaVersion]?.["baseToken"];
2614
+ const internalUrl = resolveUrl$1(externalId, schema[baseToken] || "");
2615
+ return [resolveUrl$1(internalUrl, ""), urlFragment(internalUrl)];
2616
+ };
2617
+
2618
+ const processSchema = (subject, id, dialectId, pointer, anchors, dynamicAnchors) => {
2619
+ if (jsonTypeOf(subject, "object")) {
2620
+ const embeddedSchemaDialectId = typeof subject.$schema === "string" ? resolveUrl$1(subject.$schema, "") : dialectId;
2621
+ const embeddedEmbeddedToken = getConfig(embeddedSchemaDialectId, "embeddedToken");
2622
+ const embeddedAnchorToken = getConfig(embeddedSchemaDialectId, "anchorToken");
2623
+ if (typeof subject[embeddedEmbeddedToken] === "string" && (embeddedEmbeddedToken !== embeddedAnchorToken || subject[embeddedEmbeddedToken][0] !== "#")) {
2624
+ const ref = resolveUrl$1(id, subject[embeddedEmbeddedToken]);
2625
+ const embeddedBaseToken = getConfig(embeddedSchemaDialectId, "baseToken");
2626
+ subject[embeddedBaseToken] = ref;
2627
+ add$1(subject, ref, dialectId);
2628
+ return Reference$1.cons(subject[embeddedEmbeddedToken], subject);
2629
+ }
3594
2630
 
3595
- // Determine JSON Schema version
3596
- if (!(dialectId in dialectJsonSchemaVersion)) {
3597
- if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getBaseUri(schema, retrievalUri, core201909Id)) {
3598
- // Self describing 2019-09 meta-schema
3599
- dialectJsonSchemaVersion[dialectId] = core201909Id;
3600
- } else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getBaseUri(schema, retrievalUri, core202012Id)) {
3601
- // Self describing 2020-12 meta-schema
3602
- dialectJsonSchemaVersion[dialectId] = core202012Id;
3603
- } else {
3604
- // Need to look at meta-schema to determine version
3605
- const metaSchema = schemaStore[dialectId];
3606
- if (!metaSchema) {
3607
- throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
3608
- } else if (metaSchema.vocabulary[core201909Id] === true) {
3609
- dialectJsonSchemaVersion[dialectId] = core201909Id;
3610
- } else if (metaSchema.vocabulary[core202012Id] === true) {
3611
- dialectJsonSchemaVersion[dialectId] = core202012Id;
3612
- } else {
3613
- // Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
3614
- dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
3615
- }
2631
+ const anchorToken = getConfig(dialectId, "anchorToken");
2632
+ const dynamicAnchorToken = getConfig(dialectId, "dynamicAnchorToken");
2633
+ if (typeof subject[dynamicAnchorToken] === "string") {
2634
+ dynamicAnchors[subject[dynamicAnchorToken]] = `${id}#${encodeURI(pointer)}`;
2635
+ anchors[subject[dynamicAnchorToken]] = pointer;
2636
+ delete subject[dynamicAnchorToken];
3616
2637
  }
3617
- }
3618
2638
 
3619
- return dialectId;
3620
- };
2639
+ const embeddedToken = getConfig(dialectId, "embeddedToken");
2640
+ if (typeof subject[anchorToken] === "string") {
2641
+ const anchor = anchorToken !== embeddedToken ? subject[anchorToken] : subject[anchorToken].slice(1);
2642
+ anchors[anchor] = pointer;
2643
+ delete subject[anchorToken];
2644
+ }
3621
2645
 
3622
- const getBaseUri = (schema, retrievalUri, jsonSchemaVersion) => {
3623
- const baseToken = config[jsonSchemaVersion]?.["baseToken"];
3624
- const relativeBaseUri = typeof schema[baseToken] === "string" ? schema[baseToken] : "";
3625
- const baseUri = resolveUrl$1(resolveUrl$1(retrievalUri, relativeBaseUri), "");
3626
- if (!baseUri) {
3627
- throw Error("Couldn't determine an identifier for the schema");
3628
- }
2646
+ const jrefToken = getConfig(dialectId, "jrefToken");
2647
+ if (typeof subject[jrefToken] === "string") {
2648
+ return Reference$1.cons(subject[jrefToken], subject);
2649
+ }
3629
2650
 
3630
- return baseUri;
2651
+ for (const key in subject) {
2652
+ subject[key] = processSchema(subject[key], id, dialectId, JsonPointer.append(key, pointer), anchors, dynamicAnchors);
2653
+ }
2654
+
2655
+ return subject;
2656
+ } else if (Array.isArray(subject)) {
2657
+ return subject.map((item, ndx) => processSchema(item, id, dialectId, JsonPointer.append(ndx, pointer), anchors, dynamicAnchors));
2658
+ } else {
2659
+ return subject;
2660
+ }
3631
2661
  };
3632
2662
 
3633
2663
  const hasStoredSchema = (id) => id in schemaStore || id in schemaStoreAlias;
@@ -3721,14 +2751,14 @@ System.register('JsonSchema', [], (function (exports) {
3721
2751
 
3722
2752
  const keys = (doc) => Object.keys(value(doc));
3723
2753
 
3724
- const entries$2 = (doc) => Pact$a.pipeline([
2754
+ const entries = (doc) => Pact$a.pipeline([
3725
2755
  value,
3726
2756
  Object.keys,
3727
2757
  Pact$a.map(async (key) => [key, await step(key, doc)]),
3728
2758
  Pact$a.all
3729
2759
  ], doc);
3730
2760
 
3731
- const map$3 = curry$8((fn, doc) => Pact$a.pipeline([
2761
+ const map = curry$1((fn, doc) => Pact$a.pipeline([
3732
2762
  value,
3733
2763
  Pact$a.map(async (item, ndx) => fn(await step(ndx, doc), ndx)),
3734
2764
  Pact$a.all
@@ -3744,43 +2774,36 @@ System.register('JsonSchema', [], (function (exports) {
3744
2774
  const toSchema = (schemaDoc, options = {}) => {
3745
2775
  const fullOptions = { ...toSchemaDefaultOptions, ...options };
3746
2776
 
3747
- const anchorToken = getConfig(schemaDoc.dialectId, "anchorToken");
3748
- const dynamicAnchorToken = getConfig(schemaDoc.dialectId, "dynamicAnchorToken");
3749
-
3750
- const anchors = {};
3751
- for (const anchor in schemaDoc.anchors) {
3752
- if (anchor !== "" && !schemaDoc.dynamicAnchors[anchor]) {
3753
- anchors[schemaDoc.anchors[anchor]] = anchor;
2777
+ const schema = JSON.parse(JSON.stringify(schemaDoc.schema, (key, value) => {
2778
+ if (!Reference$1.isReference(value)) {
2779
+ return value;
3754
2780
  }
3755
- }
3756
-
3757
- const dynamicAnchors = {};
3758
- for (const anchor in schemaDoc.dynamicAnchors) {
3759
- const pointer = urlFragment(schemaDoc.dynamicAnchors[anchor]);
3760
- dynamicAnchors[pointer] = anchor;
3761
- }
3762
2781
 
3763
- const schema = JSON.parse(Json.stringify(schemaDoc.schema, (key, value, pointer) => {
3764
- if (Reference$1.isReference(value)) {
3765
- const refValue = Reference$1.value(value);
3766
- const embeddedDialect = typeof refValue.$schema === "string" ? resolveUrl$1(refValue.$schema, "") : schemaDoc.dialectId;
3767
- const embeddedToken = getConfig(embeddedDialect, "embeddedToken");
3768
- if (!fullOptions.includeEmbedded && embeddedToken in refValue) {
3769
- return;
3770
- } else {
3771
- return Reference$1.value(value);
3772
- }
2782
+ const refValue = Reference$1.value(value);
2783
+ const embeddedDialect = typeof refValue.$schema === "string" ? resolveUrl$1(refValue.$schema, "") : schemaDoc.dialectId;
2784
+ const embeddedToken = getConfig(embeddedDialect, "embeddedToken");
2785
+ if (!fullOptions.includeEmbedded && embeddedToken in refValue) {
2786
+ return;
3773
2787
  } else {
3774
- if (pointer in anchors) {
3775
- value = { [anchorToken]: anchors[pointer], ...value };
3776
- }
3777
- if (pointer in dynamicAnchors) {
3778
- value = { [dynamicAnchorToken]: dynamicAnchors[pointer], ...value };
3779
- }
3780
- return value;
2788
+ return Reference$1.value(value);
3781
2789
  }
3782
2790
  }));
3783
2791
 
2792
+ const dynamicAnchorToken = getConfig(schemaDoc.dialectId, "dynamicAnchorToken");
2793
+ Object.entries(schemaDoc.dynamicAnchors)
2794
+ .forEach(([anchor, uri]) => {
2795
+ const pointer = JsonPointer.append(dynamicAnchorToken, urlFragment(uri));
2796
+ JsonPointer.assign(pointer, schema, anchor);
2797
+ });
2798
+
2799
+ const anchorToken = getConfig(schemaDoc.dialectId, "anchorToken");
2800
+ Object.entries(schemaDoc.anchors)
2801
+ .filter(([anchor]) => anchor !== "" && !(anchor in schemaDoc.dynamicAnchors))
2802
+ .forEach(([anchor, pointer]) => {
2803
+ const anchorPointer = JsonPointer.append(anchorToken, pointer);
2804
+ JsonPointer.assign(anchorPointer, schema, anchor);
2805
+ });
2806
+
3784
2807
  const baseToken = getConfig(schemaDoc.dialectId, "baseToken");
3785
2808
  const id = relativeUri(fullOptions.parentId, schemaDoc.id);
3786
2809
  const dialect = fullOptions.parentDialect === schemaDoc.dialectId ? "" : schemaDoc.dialectId;
@@ -3803,7 +2826,7 @@ System.register('JsonSchema', [], (function (exports) {
3803
2826
  var schema$5 = {
3804
2827
  setConfig, getConfig,
3805
2828
  add: add$1, get, markValidated,
3806
- uri, value, getAnchorPointer, typeOf, has, step, keys, entries: entries$2, map: map$3, length,
2829
+ uri, value, getAnchorPointer, typeOf, has, step, keys, entries, map, length,
3807
2830
  toSchema
3808
2831
  };
3809
2832
 
@@ -3817,19 +2840,19 @@ System.register('JsonSchema', [], (function (exports) {
3817
2840
 
3818
2841
  var invalidSchemaError = InvalidSchemaError$3;
3819
2842
 
3820
- const Schema$R = schema$5;
2843
+ const Schema$P = schema$5;
3821
2844
 
3822
2845
 
3823
- const compile$O = (schema) => Schema$R.value(schema);
3824
- const interpret$O = () => true;
2846
+ const compile$M = (schema) => Schema$P.value(schema);
2847
+ const interpret$M = () => true;
3825
2848
 
3826
- var metaData$4 = { compile: compile$O, interpret: interpret$O };
2849
+ var metaData$4 = { compile: compile$M, interpret: interpret$M };
3827
2850
 
3828
- const curry$7 = justCurryIt$2;
2851
+ const curry = justCurryIt$1;
3829
2852
  const PubSub$1 = pubsub.exports;
3830
2853
  const { resolveUrl } = common$1;
3831
- const Instance$E = instance;
3832
- const Schema$Q = schema$5;
2854
+ const Instance$C = instance;
2855
+ const Schema$O = schema$5;
3833
2856
  const InvalidSchemaError$2 = invalidSchemaError;
3834
2857
  const MediaTypes = mediaTypes;
3835
2858
  const metaData$3 = metaData$4;
@@ -3849,19 +2872,19 @@ System.register('JsonSchema', [], (function (exports) {
3849
2872
  });
3850
2873
 
3851
2874
  const validate$2 = async (schema, value = undefined, outputFormat = undefined) => {
3852
- const compiled = await compile$N(schema);
3853
- const interpretAst = (value, outputFormat) => interpret$N(compiled, Instance$E.cons(value), outputFormat);
2875
+ const compiled = await compile$L(schema);
2876
+ const interpretAst = (value, outputFormat) => interpret$L(compiled, Instance$C.cons(value), outputFormat);
3854
2877
 
3855
2878
  return value === undefined ? interpretAst : interpretAst(value, outputFormat);
3856
2879
  };
3857
2880
 
3858
- const compile$N = async (schema) => {
2881
+ const compile$L = async (schema) => {
3859
2882
  const ast = { metaData: {} };
3860
2883
  const schemaUri = await compileSchema(schema, ast);
3861
2884
  return { ast, schemaUri };
3862
2885
  };
3863
2886
 
3864
- const interpret$N = curry$7(({ ast, schemaUri }, value, outputFormat = FLAG) => {
2887
+ const interpret$L = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
3865
2888
  if (![FLAG, BASIC, DETAILED, VERBOSE].includes(outputFormat)) {
3866
2889
  throw Error(`The '${outputFormat}' error format is not supported`);
3867
2890
  }
@@ -3936,10 +2959,10 @@ System.register('JsonSchema', [], (function (exports) {
3936
2959
 
3937
2960
  // Vocabularies
3938
2961
  if (!hasKeyword(`${schema.dialectId}#validate`)) {
3939
- const metaSchema = await Schema$Q.get(schema.dialectId);
2962
+ const metaSchema = await Schema$O.get(schema.dialectId);
3940
2963
 
3941
2964
  // Check for mandatory vocabularies
3942
- const mandatoryVocabularies = Schema$Q.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
2965
+ const mandatoryVocabularies = Schema$O.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
3943
2966
  mandatoryVocabularies.forEach((vocabularyId) => {
3944
2967
  if (!metaSchema.vocabulary[vocabularyId]) {
3945
2968
  throw Error(`Vocabulary '${vocabularyId}' must be explicitly declared and required`);
@@ -3962,17 +2985,17 @@ System.register('JsonSchema', [], (function (exports) {
3962
2985
 
3963
2986
  // Meta validation
3964
2987
  if (shouldMetaValidate && !schema.validated) {
3965
- Schema$Q.markValidated(schema.id);
2988
+ Schema$O.markValidated(schema.id);
3966
2989
 
3967
2990
  // Compile
3968
2991
  if (!(schema.dialectId in metaValidators)) {
3969
- const metaSchema = await Schema$Q.get(schema.dialectId);
3970
- const compiledSchema = await compile$N(metaSchema);
3971
- metaValidators[metaSchema.id] = interpret$N(compiledSchema);
2992
+ const metaSchema = await Schema$O.get(schema.dialectId);
2993
+ const compiledSchema = await compile$L(metaSchema);
2994
+ metaValidators[metaSchema.id] = interpret$L(compiledSchema);
3972
2995
  }
3973
2996
 
3974
2997
  // Interpret
3975
- const schemaInstance = Instance$E.cons(schema.schema, schema.id);
2998
+ const schemaInstance = Instance$C.cons(schema.schema, schema.id);
3976
2999
  const metaResults = metaValidators[schema.dialectId](schemaInstance, metaOutputFormat);
3977
3000
  if (!metaResults.valid) {
3978
3001
  throw new InvalidSchemaError$2(metaResults);
@@ -3991,7 +3014,7 @@ System.register('JsonSchema', [], (function (exports) {
3991
3014
  };
3992
3015
 
3993
3016
  const followReferences = async (doc) => {
3994
- return Schema$Q.typeOf(doc, "string") ? followReferences(await Schema$Q.get(Schema$Q.value(doc), doc)) : doc;
3017
+ return Schema$O.typeOf(doc, "string") ? followReferences(await Schema$O.get(Schema$O.value(doc), doc)) : doc;
3995
3018
  };
3996
3019
 
3997
3020
  const interpretSchema = (schemaUri, instance, ast, dynamicAnchors) => {
@@ -4019,45 +3042,45 @@ System.register('JsonSchema', [], (function (exports) {
4019
3042
  };
4020
3043
 
4021
3044
  const add = (schema, url = "", defaultSchemaVersion = "") => {
4022
- const id = Schema$Q.add(schema, url, defaultSchemaVersion);
3045
+ const id = Schema$O.add(schema, url, defaultSchemaVersion);
4023
3046
  delete metaValidators[id];
4024
3047
  };
4025
3048
 
4026
3049
  var core$2 = {
4027
- validate: validate$2, compile: compile$N, interpret: interpret$N,
3050
+ validate: validate$2, compile: compile$L, interpret: interpret$L,
4028
3051
  setMetaOutputFormat, setShouldMetaValidate, FLAG, BASIC, DETAILED, VERBOSE,
4029
3052
  add, getKeyword, hasKeyword, defineVocabulary,
4030
3053
  compileSchema, interpretSchema, collectEvaluatedProperties: collectEvaluatedProperties$e, collectEvaluatedItems: collectEvaluatedItems$f,
4031
3054
  addMediaTypePlugin: MediaTypes.addPlugin
4032
3055
  };
4033
3056
 
4034
- const Pact$9 = lib$5;
3057
+ const Pact$9 = lib$2;
4035
3058
  const PubSub = pubsub.exports;
4036
3059
  const Core$x = core$2;
4037
- const Instance$D = instance;
4038
- const Schema$P = schema$5;
3060
+ const Instance$B = instance;
3061
+ const Schema$N = schema$5;
4039
3062
 
4040
3063
 
4041
- const compile$M = async (schema, ast) => {
4042
- const url = Schema$P.uri(schema);
3064
+ const compile$K = async (schema, ast) => {
3065
+ const url = Schema$N.uri(schema);
4043
3066
  if (!(url in ast)) {
4044
3067
  ast[url] = false; // Place dummy entry in ast to avoid recursive loops
4045
3068
 
4046
- const schemaValue = Schema$P.value(schema);
3069
+ const schemaValue = Schema$N.value(schema);
4047
3070
  if (!["object", "boolean"].includes(typeof schemaValue)) {
4048
- throw Error(`No schema found at '${Schema$P.uri(schema)}'`);
3071
+ throw Error(`No schema found at '${Schema$N.uri(schema)}'`);
4049
3072
  }
4050
3073
 
4051
3074
  ast[url] = [
4052
3075
  `${schema.dialectId}#validate`,
4053
- Schema$P.uri(schema),
3076
+ Schema$N.uri(schema),
4054
3077
  typeof schemaValue === "boolean" ? schemaValue : await Pact$9.pipeline([
4055
- Schema$P.entries,
3078
+ Schema$N.entries,
4056
3079
  Pact$9.map(([keyword, keywordSchema]) => [`${schema.dialectId}#${keyword}`, keywordSchema]),
4057
3080
  Pact$9.filter(([keywordId]) => keywordId !== `${schema.dialectId}#validate`),
4058
3081
  Pact$9.map(async ([keywordId, keywordSchema]) => {
4059
3082
  const keywordAst = await Core$x.getKeyword(keywordId).compile(keywordSchema, ast, schema);
4060
- return [keywordId, Schema$P.uri(keywordSchema), keywordAst];
3083
+ return [keywordId, Schema$N.uri(keywordSchema), keywordAst];
4061
3084
  }),
4062
3085
  Pact$9.all
4063
3086
  ], schema)
@@ -4067,7 +3090,7 @@ System.register('JsonSchema', [], (function (exports) {
4067
3090
  return url;
4068
3091
  };
4069
3092
 
4070
- const interpret$M = (uri, instance, ast, dynamicAnchors) => {
3093
+ const interpret$K = (uri, instance, ast, dynamicAnchors) => {
4071
3094
  const [keywordId, schemaUrl, nodes] = ast[uri];
4072
3095
 
4073
3096
  PubSub.publishSync("result.start");
@@ -4079,7 +3102,7 @@ System.register('JsonSchema', [], (function (exports) {
4079
3102
  PubSub.publishSync("result", {
4080
3103
  keyword: keywordId,
4081
3104
  absoluteKeywordLocation: schemaUrl,
4082
- instanceLocation: Instance$D.uri(instance),
3105
+ instanceLocation: Instance$B.uri(instance),
4083
3106
  valid: isValid,
4084
3107
  ast: keywordValue
4085
3108
  });
@@ -4090,7 +3113,7 @@ System.register('JsonSchema', [], (function (exports) {
4090
3113
  PubSub.publishSync("result", {
4091
3114
  keyword: keywordId,
4092
3115
  absoluteKeywordLocation: schemaUrl,
4093
- instanceLocation: Instance$D.uri(instance),
3116
+ instanceLocation: Instance$B.uri(instance),
4094
3117
  valid: isValid,
4095
3118
  ast: uri
4096
3119
  });
@@ -4128,7 +3151,7 @@ System.register('JsonSchema', [], (function (exports) {
4128
3151
  }, new Set());
4129
3152
  };
4130
3153
 
4131
- var validate$1 = { compile: compile$M, interpret: interpret$M, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
3154
+ var validate$1 = { compile: compile$K, interpret: interpret$K, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
4132
3155
 
4133
3156
  const metaData$2 = metaData$4;
4134
3157
  const validate = validate$1;
@@ -4137,90 +3160,90 @@ System.register('JsonSchema', [], (function (exports) {
4137
3160
  var keywords$6 = { metaData: metaData$2, validate };
4138
3161
 
4139
3162
  const Core$w = core$2;
4140
- const Schema$O = schema$5;
4141
- const Instance$C = instance;
3163
+ const Schema$M = schema$5;
3164
+ const Instance$A = instance;
4142
3165
  const Reference = reference;
4143
3166
  const Keywords$2 = keywords$6;
4144
3167
  const InvalidSchemaError$1 = invalidSchemaError;
4145
3168
 
4146
3169
 
4147
- var lib$2 = { Core: Core$w, Schema: Schema$O, Instance: Instance$C, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
3170
+ var lib$1 = { Core: Core$w, Schema: Schema$M, Instance: Instance$A, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
4148
3171
 
4149
- const { Core: Core$v, Schema: Schema$N, Instance: Instance$B } = lib$2;
3172
+ const { Core: Core$v, Schema: Schema$L, Instance: Instance$z } = lib$1;
4150
3173
 
4151
3174
 
4152
- const compile$L = async (schema, ast, parentSchema) => {
4153
- const items = await Schema$N.step("items", parentSchema);
4154
- const numberOfItems = Schema$N.typeOf(items, "array") ? Schema$N.length(items) : Number.MAX_SAFE_INTEGER;
3175
+ const compile$J = async (schema, ast, parentSchema) => {
3176
+ const items = await Schema$L.step("items", parentSchema);
3177
+ const numberOfItems = Schema$L.typeOf(items, "array") ? Schema$L.length(items) : Number.MAX_SAFE_INTEGER;
4155
3178
 
4156
- if (Schema$N.typeOf(schema, "boolean")) {
4157
- return [numberOfItems, Schema$N.value(schema)];
3179
+ if (Schema$L.typeOf(schema, "boolean")) {
3180
+ return [numberOfItems, Schema$L.value(schema)];
4158
3181
  } else {
4159
3182
  return [numberOfItems, await Core$v.compileSchema(schema, ast)];
4160
3183
  }
4161
3184
  };
4162
3185
 
4163
- const interpret$L = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
4164
- if (!Instance$B.typeOf(instance, "array")) {
3186
+ const interpret$J = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3187
+ if (!Instance$z.typeOf(instance, "array")) {
4165
3188
  return true;
4166
3189
  }
4167
3190
 
4168
3191
  if (typeof additionalItems === "string") {
4169
- return Instance$B.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3192
+ return Instance$z.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
4170
3193
  } else {
4171
- return Instance$B.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
3194
+ return Instance$z.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
4172
3195
  }
4173
3196
  };
4174
3197
 
4175
- var additionalItems = { compile: compile$L, interpret: interpret$L };
3198
+ var additionalItems = { compile: compile$J, interpret: interpret$J };
4176
3199
 
4177
- const { Core: Core$u, Schema: Schema$M, Instance: Instance$A } = lib$2;
3200
+ const { Core: Core$u, Schema: Schema$K, Instance: Instance$y } = lib$1;
4178
3201
 
4179
3202
 
4180
- const compile$K = async (schema, ast, parentSchema) => {
4181
- const items = await Schema$M.step("items", parentSchema);
4182
- const numberOfItems = Schema$M.typeOf(items, "array") ? Schema$M.length(items) : Number.MAX_SAFE_INTEGER;
3203
+ const compile$I = async (schema, ast, parentSchema) => {
3204
+ const items = await Schema$K.step("items", parentSchema);
3205
+ const numberOfItems = Schema$K.typeOf(items, "array") ? Schema$K.length(items) : Number.MAX_SAFE_INTEGER;
4183
3206
 
4184
3207
  return [numberOfItems, await Core$u.compileSchema(schema, ast)];
4185
3208
  };
4186
3209
 
4187
- const interpret$K = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
4188
- if (!Instance$A.typeOf(instance, "array")) {
3210
+ const interpret$I = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
3211
+ if (!Instance$y.typeOf(instance, "array")) {
4189
3212
  return true;
4190
3213
  }
4191
3214
 
4192
- return Instance$A.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
3215
+ return Instance$y.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
4193
3216
  };
4194
3217
 
4195
3218
  const collectEvaluatedItems$d = (keywordValue, instance, ast, dynamicAnchors) => {
4196
- return interpret$K(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$A.map((item, ndx) => ndx, instance));
3219
+ return interpret$I(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$y.map((item, ndx) => ndx, instance));
4197
3220
  };
4198
3221
 
4199
- var additionalItems6 = { compile: compile$K, interpret: interpret$K, collectEvaluatedItems: collectEvaluatedItems$d };
3222
+ var additionalItems6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedItems: collectEvaluatedItems$d };
4200
3223
 
4201
- const { Core: Core$t, Schema: Schema$L, Instance: Instance$z } = lib$2;
3224
+ const { Core: Core$t, Schema: Schema$J, Instance: Instance$x } = lib$1;
4202
3225
 
4203
3226
 
4204
- const compile$J = async (schema, ast, parentSchema) => {
4205
- const properties = await Schema$L.step("properties", parentSchema);
4206
- const propertyNames = Schema$L.typeOf(properties, "object") ? Schema$L.keys(properties) : [];
3227
+ const compile$H = async (schema, ast, parentSchema) => {
3228
+ const properties = await Schema$J.step("properties", parentSchema);
3229
+ const propertyNames = Schema$J.typeOf(properties, "object") ? Schema$J.keys(properties) : [];
4207
3230
 
4208
- const patternProperties = await Schema$L.step("patternProperties", parentSchema);
4209
- const propertyNamePatterns = Schema$L.typeOf(patternProperties, "object") ? Schema$L.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3231
+ const patternProperties = await Schema$J.step("patternProperties", parentSchema);
3232
+ const propertyNamePatterns = Schema$J.typeOf(patternProperties, "object") ? Schema$J.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
4210
3233
 
4211
- if (Schema$L.typeOf(schema, "boolean")) {
4212
- return [propertyNames, propertyNamePatterns, Schema$L.value(schema)];
3234
+ if (Schema$J.typeOf(schema, "boolean")) {
3235
+ return [propertyNames, propertyNamePatterns, Schema$J.value(schema)];
4213
3236
  } else {
4214
3237
  return [propertyNames, propertyNamePatterns, await Core$t.compileSchema(schema, ast)];
4215
3238
  }
4216
3239
  };
4217
3240
 
4218
- const interpret$J = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
4219
- if (!Instance$z.typeOf(instance, "object")) {
3241
+ const interpret$H = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3242
+ if (!Instance$x.typeOf(instance, "object")) {
4220
3243
  return true;
4221
3244
  }
4222
3245
 
4223
- const properties = Instance$z.entries(instance)
3246
+ const properties = Instance$x.entries(instance)
4224
3247
  .filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)));
4225
3248
 
4226
3249
  if (typeof additionalProperties === "string") {
@@ -4230,168 +3253,47 @@ System.register('JsonSchema', [], (function (exports) {
4230
3253
  }
4231
3254
  };
4232
3255
 
4233
- var additionalProperties = { compile: compile$J, interpret: interpret$J };
3256
+ var additionalProperties = { compile: compile$H, interpret: interpret$H };
4234
3257
 
4235
- const { Core: Core$s, Schema: Schema$K, Instance: Instance$y } = lib$2;
3258
+ const { Core: Core$s, Schema: Schema$I, Instance: Instance$w } = lib$1;
4236
3259
 
4237
3260
 
4238
- const compile$I = async (schema, ast, parentSchema) => {
4239
- const propertiesSchema = await Schema$K.step("properties", parentSchema);
4240
- const propertyNames = Schema$K.typeOf(propertiesSchema, "object") ? Schema$K.keys(propertiesSchema) : [];
3261
+ const compile$G = async (schema, ast, parentSchema) => {
3262
+ const propertiesSchema = await Schema$I.step("properties", parentSchema);
3263
+ const propertyNames = Schema$I.typeOf(propertiesSchema, "object") ? Schema$I.keys(propertiesSchema) : [];
4241
3264
 
4242
- const patternProperties = await Schema$K.step("patternProperties", parentSchema);
4243
- const propertyNamePatterns = Schema$K.typeOf(patternProperties, "object") ? Schema$K.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
3265
+ const patternProperties = await Schema$I.step("patternProperties", parentSchema);
3266
+ const propertyNamePatterns = Schema$I.typeOf(patternProperties, "object") ? Schema$I.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
4244
3267
 
4245
3268
  return [propertyNames, propertyNamePatterns, await Core$s.compileSchema(schema, ast)];
4246
3269
  };
4247
3270
 
4248
- const interpret$I = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
4249
- if (!Instance$y.typeOf(instance, "object")) {
3271
+ const interpret$G = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
3272
+ if (!Instance$w.typeOf(instance, "object")) {
4250
3273
  return true;
4251
3274
  }
4252
3275
 
4253
- return Instance$y.entries(instance)
3276
+ return Instance$w.entries(instance)
4254
3277
  .filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)))
4255
3278
  .every(([, property]) => Core$s.interpretSchema(additionalProperties, property, ast, dynamicAnchors));
4256
3279
  };
4257
3280
 
4258
3281
  const collectEvaluatedProperties$c = (keywordValue, instance, ast, dynamicAnchors) => {
4259
- return interpret$I(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
4260
- };
4261
-
4262
- var additionalProperties6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedProperties: collectEvaluatedProperties$c };
4263
-
4264
- var entries$1 = async (doc) => Object.entries(await doc);
4265
-
4266
- var justCurryIt = curry$6;
4267
-
4268
- /*
4269
- function add(a, b, c) {
4270
- return a + b + c;
4271
- }
4272
- curry(add)(1)(2)(3); // 6
4273
- curry(add)(1)(2)(2); // 5
4274
- curry(add)(2)(4, 3); // 9
4275
-
4276
- function add(...args) {
4277
- return args.reduce((sum, n) => sum + n, 0)
4278
- }
4279
- var curryAdd4 = curry(add, 4)
4280
- curryAdd4(1)(2, 3)(4); // 10
4281
-
4282
- function converter(ratio, input) {
4283
- return (input*ratio).toFixed(1);
4284
- }
4285
- const curriedConverter = curry(converter)
4286
- const milesToKm = curriedConverter(1.62);
4287
- milesToKm(35); // 56.7
4288
- milesToKm(10); // 16.2
4289
- */
4290
-
4291
- function curry$6(fn, arity) {
4292
- return function curried() {
4293
- if (arity == null) {
4294
- arity = fn.length;
4295
- }
4296
- var args = [].slice.call(arguments);
4297
- if (args.length >= arity) {
4298
- return fn.apply(this, args);
4299
- } else {
4300
- return function() {
4301
- return curried.apply(this, args.concat([].slice.call(arguments)));
4302
- };
4303
- }
4304
- };
4305
- }
4306
-
4307
- const curry$5 = justCurryIt;
4308
-
4309
-
4310
- var map$2 = curry$5(async (fn, doc) => (await doc).map(fn));
4311
-
4312
- const curry$4 = justCurryIt;
4313
-
4314
-
4315
- var reduce$2 = curry$4(async (fn, acc, doc) => {
4316
- return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
4317
- });
4318
-
4319
- const curry$3 = justCurryIt;
4320
- const reduce$1 = reduce$2;
4321
-
4322
-
4323
- var filter = curry$3(async (fn, doc, options = {}) => {
4324
- return reduce$1(async (acc, item) => {
4325
- return (await fn(item)) ? acc.concat([item]) : acc;
4326
- }, [], doc, options);
4327
- });
4328
-
4329
- const curry$2 = justCurryIt;
4330
- const map$1 = map$2;
4331
-
4332
-
4333
- var some = curry$2(async (fn, doc) => {
4334
- const results = await map$1(fn, doc);
4335
- return (await Promise.all(results))
4336
- .some((a) => a);
4337
- });
4338
-
4339
- const curry$1 = justCurryIt;
4340
- const map = map$2;
4341
-
4342
-
4343
- var every = curry$1(async (fn, doc) => {
4344
- const results = await map(fn, doc);
4345
- return (await Promise.all(results))
4346
- .every((a) => a);
4347
- });
4348
-
4349
- const curry = justCurryIt;
4350
-
4351
-
4352
- var pipeline$1 = curry((fns, doc) => {
4353
- return fns.reduce(async (acc, fn) => fn(await acc), doc);
4354
- });
4355
-
4356
- var all = (doc) => Promise.all(doc);
4357
-
4358
- const pipeline = pipeline$1;
4359
- const entries = entries$1;
4360
- const reduce = reduce$2;
4361
-
4362
-
4363
- var allValues = (doc) => {
4364
- return pipeline([
4365
- entries,
4366
- reduce(async (acc, [propertyName, propertyValue]) => {
4367
- acc[propertyName] = await propertyValue;
4368
- return acc;
4369
- }, {})
4370
- ], doc);
3282
+ return interpret$G(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
4371
3283
  };
4372
3284
 
4373
- var lib$1 = {
4374
- entries: entries$1,
4375
- map: map$2,
4376
- filter: filter,
4377
- reduce: reduce$2,
4378
- some: some,
4379
- every: every,
4380
- pipeline: pipeline$1,
4381
- all: all,
4382
- allValues: allValues
4383
- };
3285
+ var additionalProperties6 = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$c };
4384
3286
 
4385
- const { Core: Core$r, Schema: Schema$J } = lib$2;
4386
- const Pact$8 = lib$1;
3287
+ const { Core: Core$r, Schema: Schema$H } = lib$1;
3288
+ const Pact$8 = lib$2;
4387
3289
 
4388
3290
 
4389
- const compile$H = (schema, ast) => Pact$8.pipeline([
4390
- Schema$J.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
3291
+ const compile$F = (schema, ast) => Pact$8.pipeline([
3292
+ Schema$H.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
4391
3293
  Pact$8.all
4392
3294
  ], schema);
4393
3295
 
4394
- const interpret$H = (allOf, instance, ast, dynamicAnchors) => {
3296
+ const interpret$F = (allOf, instance, ast, dynamicAnchors) => {
4395
3297
  return allOf.every((schemaUrl) => Core$r.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
4396
3298
  };
4397
3299
 
@@ -4409,18 +3311,18 @@ System.register('JsonSchema', [], (function (exports) {
4409
3311
  }, new Set());
4410
3312
  };
4411
3313
 
4412
- var allOf = { compile: compile$H, interpret: interpret$H, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
3314
+ var allOf = { compile: compile$F, interpret: interpret$F, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
4413
3315
 
4414
- const { Core: Core$q, Schema: Schema$I } = lib$2;
4415
- const Pact$7 = lib$1;
3316
+ const { Core: Core$q, Schema: Schema$G } = lib$1;
3317
+ const Pact$7 = lib$2;
4416
3318
 
4417
3319
 
4418
- const compile$G = (schema, ast) => Pact$7.pipeline([
4419
- Schema$I.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
3320
+ const compile$E = (schema, ast) => Pact$7.pipeline([
3321
+ Schema$G.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
4420
3322
  Pact$7.all
4421
3323
  ], schema);
4422
3324
 
4423
- const interpret$G = (anyOf, instance, ast, dynamicAnchors) => {
3325
+ const interpret$E = (anyOf, instance, ast, dynamicAnchors) => {
4424
3326
  const matches = anyOf.filter((schemaUrl) => Core$q.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
4425
3327
  return matches.length > 0;
4426
3328
  };
@@ -4439,7 +3341,7 @@ System.register('JsonSchema', [], (function (exports) {
4439
3341
  }, false);
4440
3342
  };
4441
3343
 
4442
- var anyOf = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
3344
+ var anyOf = { compile: compile$E, interpret: interpret$E, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
4443
3345
 
4444
3346
  var keyList = Object.keys;
4445
3347
  var native_stringify = JSON.stringify;
@@ -4500,92 +3402,92 @@ System.register('JsonSchema', [], (function (exports) {
4500
3402
 
4501
3403
  var fastestStableStringify = function(obj) { return '' + stringify(obj, false); };
4502
3404
 
4503
- const { Schema: Schema$H, Instance: Instance$x } = lib$2;
3405
+ const { Schema: Schema$F, Instance: Instance$v } = lib$1;
4504
3406
  const jsonStringify$2 = fastestStableStringify;
4505
3407
 
4506
3408
 
4507
- const compile$F = (schema) => jsonStringify$2(Schema$H.value(schema));
4508
- const interpret$F = (const_, instance) => jsonStringify$2(Instance$x.value(instance)) === const_;
3409
+ const compile$D = (schema) => jsonStringify$2(Schema$F.value(schema));
3410
+ const interpret$D = (const_, instance) => jsonStringify$2(Instance$v.value(instance)) === const_;
4509
3411
 
4510
- var _const = { compile: compile$F, interpret: interpret$F };
3412
+ var _const = { compile: compile$D, interpret: interpret$D };
4511
3413
 
4512
- const { Core: Core$p, Instance: Instance$w } = lib$2;
3414
+ const { Core: Core$p, Instance: Instance$u } = lib$1;
4513
3415
 
4514
3416
 
4515
- const compile$E = (schema, ast) => Core$p.compileSchema(schema, ast);
3417
+ const compile$C = (schema, ast) => Core$p.compileSchema(schema, ast);
4516
3418
 
4517
- const interpret$E = (contains, instance, ast, dynamicAnchors) => {
4518
- return !Instance$w.typeOf(instance, "array") || Instance$w.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
3419
+ const interpret$C = (contains, instance, ast, dynamicAnchors) => {
3420
+ return !Instance$u.typeOf(instance, "array") || Instance$u.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
4519
3421
  };
4520
3422
 
4521
- var contains = { compile: compile$E, interpret: interpret$E };
3423
+ var contains = { compile: compile$C, interpret: interpret$C };
4522
3424
 
4523
- const { Core: Core$o, Schema: Schema$G, Instance: Instance$v } = lib$2;
3425
+ const { Core: Core$o, Schema: Schema$E, Instance: Instance$t } = lib$1;
4524
3426
 
4525
3427
 
4526
- const compile$D = async (schema, ast, parentSchema) => {
3428
+ const compile$B = async (schema, ast, parentSchema) => {
4527
3429
  const contains = await Core$o.compileSchema(schema, ast);
4528
3430
 
4529
- const minContainsSchema = await Schema$G.step("minContains", parentSchema);
4530
- const minContains = Schema$G.typeOf(minContainsSchema, "number") ? Schema$G.value(minContainsSchema) : 1;
3431
+ const minContainsSchema = await Schema$E.step("minContains", parentSchema);
3432
+ const minContains = Schema$E.typeOf(minContainsSchema, "number") ? Schema$E.value(minContainsSchema) : 1;
4531
3433
 
4532
- const maxContainsSchema = await Schema$G.step("maxContains", parentSchema);
4533
- const maxContains = Schema$G.typeOf(maxContainsSchema, "number") ? Schema$G.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
3434
+ const maxContainsSchema = await Schema$E.step("maxContains", parentSchema);
3435
+ const maxContains = Schema$E.typeOf(maxContainsSchema, "number") ? Schema$E.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
4534
3436
 
4535
3437
  return { contains, minContains, maxContains };
4536
3438
  };
4537
3439
 
4538
- const interpret$D = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
4539
- if (!Instance$v.typeOf(instance, "array")) {
3440
+ const interpret$B = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
3441
+ if (!Instance$t.typeOf(instance, "array")) {
4540
3442
  return true;
4541
3443
  }
4542
3444
 
4543
- const matches = Instance$v.reduce((matches, item) => {
3445
+ const matches = Instance$t.reduce((matches, item) => {
4544
3446
  return Core$o.interpretSchema(contains, item, ast, dynamicAnchors) ? matches + 1 : matches;
4545
3447
  }, 0, instance);
4546
3448
  return matches >= minContains && matches <= maxContains;
4547
3449
  };
4548
3450
 
4549
3451
  const collectEvaluatedItems$a = (keywordValue, instance, ast, dynamicAnchors) => {
4550
- return interpret$D(keywordValue, instance, ast, dynamicAnchors) && Instance$v.reduce((matchedIndexes, item, itemIndex) => {
3452
+ return interpret$B(keywordValue, instance, ast, dynamicAnchors) && Instance$t.reduce((matchedIndexes, item, itemIndex) => {
4551
3453
  return Core$o.interpretSchema(keywordValue.contains, item, ast, dynamicAnchors) ? matchedIndexes.add(itemIndex) : matchedIndexes;
4552
3454
  }, new Set(), instance);
4553
3455
  };
4554
3456
 
4555
- var containsMinContainsMaxContains = { compile: compile$D, interpret: interpret$D, collectEvaluatedItems: collectEvaluatedItems$a };
3457
+ var containsMinContainsMaxContains = { compile: compile$B, interpret: interpret$B, collectEvaluatedItems: collectEvaluatedItems$a };
4556
3458
 
4557
- const { Core: Core$n, Schema: Schema$F } = lib$2;
4558
- const Pact$6 = lib$1;
3459
+ const { Core: Core$n, Schema: Schema$D } = lib$1;
3460
+ const Pact$6 = lib$2;
4559
3461
 
4560
3462
 
4561
- const compile$C = async (schema, ast) => {
3463
+ const compile$A = async (schema, ast) => {
4562
3464
  await Pact$6.pipeline([
4563
- Schema$F.entries,
3465
+ Schema$D.entries,
4564
3466
  Pact$6.map(([, definitionSchema]) => Core$n.compileSchema(definitionSchema, ast)),
4565
3467
  Pact$6.all
4566
3468
  ], schema);
4567
3469
  };
4568
3470
 
4569
- const interpret$C = () => true;
3471
+ const interpret$A = () => true;
4570
3472
 
4571
- var definitions = { compile: compile$C, interpret: interpret$C };
3473
+ var definitions = { compile: compile$A, interpret: interpret$A };
4572
3474
 
4573
- const { Core: Core$m, Schema: Schema$E, Instance: Instance$u } = lib$2;
4574
- const Pact$5 = lib$1;
3475
+ const { Core: Core$m, Schema: Schema$C, Instance: Instance$s } = lib$1;
3476
+ const Pact$5 = lib$2;
4575
3477
 
4576
3478
 
4577
- const compile$B = (schema, ast) => Pact$5.pipeline([
4578
- Schema$E.entries,
3479
+ const compile$z = (schema, ast) => Pact$5.pipeline([
3480
+ Schema$C.entries,
4579
3481
  Pact$5.map(async ([key, dependency]) => {
4580
- return [key, Schema$E.typeOf(dependency, "array") ? Schema$E.value(dependency) : await Core$m.compileSchema(dependency, ast)];
3482
+ return [key, Schema$C.typeOf(dependency, "array") ? Schema$C.value(dependency) : await Core$m.compileSchema(dependency, ast)];
4581
3483
  }),
4582
3484
  Pact$5.all
4583
3485
  ], schema);
4584
3486
 
4585
- const interpret$B = (dependencies, instance, ast, dynamicAnchors) => {
4586
- const value = Instance$u.value(instance);
3487
+ const interpret$z = (dependencies, instance, ast, dynamicAnchors) => {
3488
+ const value = Instance$s.value(instance);
4587
3489
 
4588
- return !Instance$u.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
3490
+ return !Instance$s.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
4589
3491
  if (!(propertyName in value)) {
4590
3492
  return true;
4591
3493
  }
@@ -4598,49 +3500,49 @@ System.register('JsonSchema', [], (function (exports) {
4598
3500
  });
4599
3501
  };
4600
3502
 
4601
- var dependencies = { compile: compile$B, interpret: interpret$B };
3503
+ var dependencies = { compile: compile$z, interpret: interpret$z };
4602
3504
 
4603
- const { Schema: Schema$D, Instance: Instance$t } = lib$2;
4604
- const Pact$4 = lib$1;
3505
+ const { Schema: Schema$B, Instance: Instance$r } = lib$1;
3506
+ const Pact$4 = lib$2;
4605
3507
 
4606
3508
 
4607
- const compile$A = (schema) => Pact$4.pipeline([
4608
- Schema$D.entries,
4609
- Pact$4.map(([key, dependentRequired]) => [key, Schema$D.value(dependentRequired)]),
3509
+ const compile$y = (schema) => Pact$4.pipeline([
3510
+ Schema$B.entries,
3511
+ Pact$4.map(([key, dependentRequired]) => [key, Schema$B.value(dependentRequired)]),
4610
3512
  Pact$4.all
4611
3513
  ], schema);
4612
3514
 
4613
- const interpret$A = (dependentRequired, instance) => {
4614
- const value = Instance$t.value(instance);
3515
+ const interpret$y = (dependentRequired, instance) => {
3516
+ const value = Instance$r.value(instance);
4615
3517
 
4616
- return !Instance$t.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
3518
+ return !Instance$r.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
4617
3519
  return !(propertyName in value) || required.every((key) => key in value);
4618
3520
  });
4619
3521
  };
4620
3522
 
4621
- var dependentRequired = { compile: compile$A, interpret: interpret$A };
3523
+ var dependentRequired = { compile: compile$y, interpret: interpret$y };
4622
3524
 
4623
- const { Core: Core$l, Schema: Schema$C, Instance: Instance$s } = lib$2;
4624
- const Pact$3 = lib$1;
3525
+ const { Core: Core$l, Schema: Schema$A, Instance: Instance$q } = lib$1;
3526
+ const Pact$3 = lib$2;
4625
3527
 
4626
3528
 
4627
- const compile$z = (schema, ast) => Pact$3.pipeline([
4628
- Schema$C.entries,
3529
+ const compile$x = (schema, ast) => Pact$3.pipeline([
3530
+ Schema$A.entries,
4629
3531
  Pact$3.map(async ([key, dependentSchema]) => [key, await Core$l.compileSchema(dependentSchema, ast)]),
4630
3532
  Pact$3.all
4631
3533
  ], schema);
4632
3534
 
4633
- const interpret$z = (dependentSchemas, instance, ast, dynamicAnchors) => {
4634
- const value = Instance$s.value(instance);
3535
+ const interpret$x = (dependentSchemas, instance, ast, dynamicAnchors) => {
3536
+ const value = Instance$q.value(instance);
4635
3537
 
4636
- return !Instance$s.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
3538
+ return !Instance$q.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
4637
3539
  return !(propertyName in value) || Core$l.interpretSchema(dependentSchema, instance, ast, dynamicAnchors);
4638
3540
  });
4639
3541
  };
4640
3542
 
4641
3543
  const collectEvaluatedProperties$9 = (dependentSchemas, instance, ast, dynamicAnchors) => {
4642
3544
  return dependentSchemas.reduce((acc, [propertyName, dependentSchema]) => {
4643
- if (!acc || !Instance$s.has(propertyName, instance)) {
3545
+ if (!acc || !Instance$q.has(propertyName, instance)) {
4644
3546
  return acc;
4645
3547
  }
4646
3548
 
@@ -4649,39 +3551,39 @@ System.register('JsonSchema', [], (function (exports) {
4649
3551
  }, []);
4650
3552
  };
4651
3553
 
4652
- var dependentSchemas = { compile: compile$z, interpret: interpret$z, collectEvaluatedProperties: collectEvaluatedProperties$9 };
3554
+ var dependentSchemas = { compile: compile$x, interpret: interpret$x, collectEvaluatedProperties: collectEvaluatedProperties$9 };
4653
3555
 
4654
- const { Schema: Schema$B, Instance: Instance$r } = lib$2;
3556
+ const { Schema: Schema$z, Instance: Instance$p } = lib$1;
4655
3557
  const jsonStringify$1 = fastestStableStringify;
4656
3558
 
4657
3559
 
4658
- const compile$y = (schema) => Schema$B.value(schema).map(jsonStringify$1);
4659
- const interpret$y = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$r.value(instance)) === enumValue);
3560
+ const compile$w = (schema) => Schema$z.value(schema).map(jsonStringify$1);
3561
+ const interpret$w = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$p.value(instance)) === enumValue);
4660
3562
 
4661
- var _enum = { compile: compile$y, interpret: interpret$y };
3563
+ var _enum = { compile: compile$w, interpret: interpret$w };
4662
3564
 
4663
- const { Schema: Schema$A, Instance: Instance$q } = lib$2;
3565
+ const { Schema: Schema$y, Instance: Instance$o } = lib$1;
4664
3566
 
4665
3567
 
4666
- const compile$x = async (schema) => Schema$A.value(schema);
4667
- const interpret$x = (exclusiveMaximum, instance) => !Instance$q.typeOf(instance, "number") || Instance$q.value(instance) < exclusiveMaximum;
3568
+ const compile$v = async (schema) => Schema$y.value(schema);
3569
+ const interpret$v = (exclusiveMaximum, instance) => !Instance$o.typeOf(instance, "number") || Instance$o.value(instance) < exclusiveMaximum;
4668
3570
 
4669
- var exclusiveMaximum = { compile: compile$x, interpret: interpret$x };
3571
+ var exclusiveMaximum = { compile: compile$v, interpret: interpret$v };
4670
3572
 
4671
- const { Schema: Schema$z, Instance: Instance$p } = lib$2;
3573
+ const { Schema: Schema$x, Instance: Instance$n } = lib$1;
4672
3574
 
4673
3575
 
4674
- const compile$w = async (schema) => Schema$z.value(schema);
4675
- const interpret$w = (exclusiveMinimum, instance) => !Instance$p.typeOf(instance, "number") || Instance$p.value(instance) > exclusiveMinimum;
3576
+ const compile$u = async (schema) => Schema$x.value(schema);
3577
+ const interpret$u = (exclusiveMinimum, instance) => !Instance$n.typeOf(instance, "number") || Instance$n.value(instance) > exclusiveMinimum;
4676
3578
 
4677
- var exclusiveMinimum = { compile: compile$w, interpret: interpret$w };
3579
+ var exclusiveMinimum = { compile: compile$u, interpret: interpret$u };
4678
3580
 
4679
- const { Core: Core$k } = lib$2;
3581
+ const { Core: Core$k } = lib$1;
4680
3582
 
4681
3583
 
4682
- const compile$v = (schema, ast) => Core$k.compileSchema(schema, ast);
3584
+ const compile$t = (schema, ast) => Core$k.compileSchema(schema, ast);
4683
3585
 
4684
- const interpret$v = (ifSchema, instance, ast, dynamicAnchors) => {
3586
+ const interpret$t = (ifSchema, instance, ast, dynamicAnchors) => {
4685
3587
  Core$k.interpretSchema(ifSchema, instance, ast, dynamicAnchors);
4686
3588
  return true;
4687
3589
  };
@@ -4694,21 +3596,21 @@ System.register('JsonSchema', [], (function (exports) {
4694
3596
  return Core$k.collectEvaluatedItems(ifSchema, instance, ast, dynamicAnchors) || new Set();
4695
3597
  };
4696
3598
 
4697
- var _if = { compile: compile$v, interpret: interpret$v, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
3599
+ var _if = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
4698
3600
 
4699
- const { Core: Core$j, Schema: Schema$y } = lib$2;
3601
+ const { Core: Core$j, Schema: Schema$w } = lib$1;
4700
3602
 
4701
3603
 
4702
- const compile$u = async (schema, ast, parentSchema) => {
4703
- if (Schema$y.has("if", parentSchema)) {
4704
- const ifSchema = await Schema$y.step("if", parentSchema);
3604
+ const compile$s = async (schema, ast, parentSchema) => {
3605
+ if (Schema$w.has("if", parentSchema)) {
3606
+ const ifSchema = await Schema$w.step("if", parentSchema);
4705
3607
  return [await Core$j.compileSchema(ifSchema, ast), await Core$j.compileSchema(schema, ast)];
4706
3608
  } else {
4707
3609
  return [];
4708
3610
  }
4709
3611
  };
4710
3612
 
4711
- const interpret$u = ([guard, block], instance, ast, dynamicAnchors) => {
3613
+ const interpret$s = ([guard, block], instance, ast, dynamicAnchors) => {
4712
3614
  return guard === undefined || !quietInterpretSchema$1(guard, instance, ast, dynamicAnchors) || Core$j.interpretSchema(block, instance, ast, dynamicAnchors);
4713
3615
  };
4714
3616
 
@@ -4738,21 +3640,21 @@ System.register('JsonSchema', [], (function (exports) {
4738
3640
  return Core$j.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
4739
3641
  };
4740
3642
 
4741
- var then = { compile: compile$u, interpret: interpret$u, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
3643
+ var then = { compile: compile$s, interpret: interpret$s, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
4742
3644
 
4743
- const { Core: Core$i, Schema: Schema$x } = lib$2;
3645
+ const { Core: Core$i, Schema: Schema$v } = lib$1;
4744
3646
 
4745
3647
 
4746
- const compile$t = async (schema, ast, parentSchema) => {
4747
- if (Schema$x.has("if", parentSchema)) {
4748
- const ifSchema = await Schema$x.step("if", parentSchema);
3648
+ const compile$r = async (schema, ast, parentSchema) => {
3649
+ if (Schema$v.has("if", parentSchema)) {
3650
+ const ifSchema = await Schema$v.step("if", parentSchema);
4749
3651
  return [await Core$i.compileSchema(ifSchema, ast), await Core$i.compileSchema(schema, ast)];
4750
3652
  } else {
4751
3653
  return [];
4752
3654
  }
4753
3655
  };
4754
3656
 
4755
- const interpret$t = ([guard, block], instance, ast, dynamicAnchors) => {
3657
+ const interpret$r = ([guard, block], instance, ast, dynamicAnchors) => {
4756
3658
  return guard === undefined || quietInterpretSchema(guard, instance, ast, dynamicAnchors) || Core$i.interpretSchema(block, instance, ast, dynamicAnchors);
4757
3659
  };
4758
3660
 
@@ -4782,150 +3684,134 @@ System.register('JsonSchema', [], (function (exports) {
4782
3684
  return Core$i.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
4783
3685
  };
4784
3686
 
4785
- var _else = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
3687
+ var _else = { compile: compile$r, interpret: interpret$r, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
4786
3688
 
4787
- const { Core: Core$h, Schema: Schema$w, Instance: Instance$o } = lib$2;
3689
+ const { Core: Core$h, Schema: Schema$u, Instance: Instance$m } = lib$1;
4788
3690
 
4789
3691
 
4790
- const compile$s = async (schema, ast) => {
4791
- if (Schema$w.typeOf(schema, "array")) {
4792
- const tupleItems = await Schema$w.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
3692
+ const compile$q = async (schema, ast) => {
3693
+ if (Schema$u.typeOf(schema, "array")) {
3694
+ const tupleItems = await Schema$u.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
4793
3695
  return Promise.all(tupleItems);
4794
3696
  } else {
4795
3697
  return Core$h.compileSchema(schema, ast);
4796
3698
  }
4797
3699
  };
4798
3700
 
4799
- const interpret$s = (items, instance, ast, dynamicAnchors) => {
4800
- if (!Instance$o.typeOf(instance, "array")) {
3701
+ const interpret$q = (items, instance, ast, dynamicAnchors) => {
3702
+ if (!Instance$m.typeOf(instance, "array")) {
4801
3703
  return true;
4802
3704
  }
4803
3705
 
4804
3706
  if (typeof items === "string") {
4805
- return Instance$o.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
3707
+ return Instance$m.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
4806
3708
  } else {
4807
- return Instance$o.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
3709
+ return Instance$m.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
4808
3710
  }
4809
3711
  };
4810
3712
 
4811
3713
  const collectEvaluatedItems$6 = (items, instance, ast, dynamicAnchors) => {
4812
- return interpret$s(items, instance, ast, dynamicAnchors) && (typeof items === "string"
4813
- ? new Set(Instance$o.map((item, itemIndex) => itemIndex, instance))
3714
+ return interpret$q(items, instance, ast, dynamicAnchors) && (typeof items === "string"
3715
+ ? new Set(Instance$m.map((item, itemIndex) => itemIndex, instance))
4814
3716
  : new Set(items.map((item, itemIndex) => itemIndex)));
4815
3717
  };
4816
3718
 
4817
- var items = { compile: compile$s, interpret: interpret$s, collectEvaluatedItems: collectEvaluatedItems$6 };
3719
+ var items = { compile: compile$q, interpret: interpret$q, collectEvaluatedItems: collectEvaluatedItems$6 };
4818
3720
 
4819
- const { Core: Core$g, Schema: Schema$v, Instance: Instance$n } = lib$2;
3721
+ const { Core: Core$g, Schema: Schema$t, Instance: Instance$l } = lib$1;
4820
3722
 
4821
3723
 
4822
- const compile$r = async (schema, ast, parentSchema) => {
4823
- const items = await Schema$v.step("prefixItems", parentSchema);
4824
- const numberOfPrefixItems = Schema$v.typeOf(items, "array") ? Schema$v.length(items) : 0;
3724
+ const compile$p = async (schema, ast, parentSchema) => {
3725
+ const items = await Schema$t.step("prefixItems", parentSchema);
3726
+ const numberOfPrefixItems = Schema$t.typeOf(items, "array") ? Schema$t.length(items) : 0;
4825
3727
 
4826
3728
  return [numberOfPrefixItems, await Core$g.compileSchema(schema, ast)];
4827
3729
  };
4828
3730
 
4829
- const interpret$r = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
4830
- if (!Instance$n.typeOf(instance, "array")) {
3731
+ const interpret$p = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
3732
+ if (!Instance$l.typeOf(instance, "array")) {
4831
3733
  return true;
4832
3734
  }
4833
3735
 
4834
- return Instance$n.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
3736
+ return Instance$l.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
4835
3737
  };
4836
3738
 
4837
3739
  const collectEvaluatedItems$5 = (keywordValue, instance, ast, dynamicAnchors) => {
4838
- return interpret$r(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$n.map((item, ndx) => ndx, instance));
3740
+ return interpret$p(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$l.map((item, ndx) => ndx, instance));
4839
3741
  };
4840
3742
 
4841
- var items202012 = { compile: compile$r, interpret: interpret$r, collectEvaluatedItems: collectEvaluatedItems$5 };
4842
-
4843
- const { Schema: Schema$u, Instance: Instance$m } = lib$2;
4844
-
4845
-
4846
- const compile$q = (schema) => Schema$u.value(schema);
4847
- const interpret$q = (maxItems, instance) => !Instance$m.typeOf(instance, "array") || Instance$m.length(instance) <= maxItems;
4848
-
4849
- var maxItems = { compile: compile$q, interpret: interpret$q };
3743
+ var items202012 = { compile: compile$p, interpret: interpret$p, collectEvaluatedItems: collectEvaluatedItems$5 };
4850
3744
 
4851
- const { Schema: Schema$t, Instance: Instance$l } = lib$2;
3745
+ const { Schema: Schema$s, Instance: Instance$k } = lib$1;
4852
3746
 
4853
3747
 
4854
- const compile$p = (schema) => Schema$t.value(schema);
4855
- const interpret$p = (maxLength, instance) => !Instance$l.typeOf(instance, "string") || Instance$l.length(instance) <= maxLength;
3748
+ const compile$o = (schema) => Schema$s.value(schema);
3749
+ const interpret$o = (maxItems, instance) => !Instance$k.typeOf(instance, "array") || Instance$k.length(instance) <= maxItems;
4856
3750
 
4857
- var maxLength = { compile: compile$p, interpret: interpret$p };
3751
+ var maxItems = { compile: compile$o, interpret: interpret$o };
4858
3752
 
4859
- const { Schema: Schema$s, Instance: Instance$k } = lib$2;
3753
+ const { Schema: Schema$r, Instance: Instance$j } = lib$1;
4860
3754
 
4861
3755
 
4862
- const compile$o = (schema) => Schema$s.value(schema);
4863
- const interpret$o = (maxLength, instance) => !Instance$k.typeOf(instance, "string") || [...Instance$k.value(instance)].length <= maxLength;
3756
+ const compile$n = (schema) => Schema$r.value(schema);
3757
+ const interpret$n = (maxLength, instance) => !Instance$j.typeOf(instance, "string") || [...Instance$j.value(instance)].length <= maxLength;
4864
3758
 
4865
- var maxLength6 = { compile: compile$o, interpret: interpret$o };
3759
+ var maxLength = { compile: compile$n, interpret: interpret$n };
4866
3760
 
4867
- const { Schema: Schema$r, Instance: Instance$j } = lib$2;
3761
+ const { Schema: Schema$q, Instance: Instance$i } = lib$1;
4868
3762
 
4869
3763
 
4870
- const compile$n = (schema) => Schema$r.value(schema);
4871
- const interpret$n = (maxProperties, instance) => !Instance$j.typeOf(instance, "object") || Instance$j.keys(instance).length <= maxProperties;
3764
+ const compile$m = (schema) => Schema$q.value(schema);
3765
+ const interpret$m = (maxProperties, instance) => !Instance$i.typeOf(instance, "object") || Instance$i.keys(instance).length <= maxProperties;
4872
3766
 
4873
- var maxProperties = { compile: compile$n, interpret: interpret$n };
3767
+ var maxProperties = { compile: compile$m, interpret: interpret$m };
4874
3768
 
4875
- const { Schema: Schema$q, Instance: Instance$i } = lib$2;
3769
+ const { Schema: Schema$p, Instance: Instance$h } = lib$1;
4876
3770
 
4877
3771
 
4878
- const compile$m = async (schema, ast, parentSchema) => {
4879
- const exclusiveMaximum = await Schema$q.step("exclusiveMaximum", parentSchema);
4880
- const isExclusive = Schema$q.value(exclusiveMaximum);
3772
+ const compile$l = async (schema, ast, parentSchema) => {
3773
+ const exclusiveMaximum = await Schema$p.step("exclusiveMaximum", parentSchema);
3774
+ const isExclusive = Schema$p.value(exclusiveMaximum);
4881
3775
 
4882
- return [Schema$q.value(schema), isExclusive];
3776
+ return [Schema$p.value(schema), isExclusive];
4883
3777
  };
4884
3778
 
4885
- const interpret$m = ([maximum, isExclusive], instance) => {
4886
- if (!Instance$i.typeOf(instance, "number")) {
3779
+ const interpret$l = ([maximum, isExclusive], instance) => {
3780
+ if (!Instance$h.typeOf(instance, "number")) {
4887
3781
  return true;
4888
3782
  }
4889
3783
 
4890
- const value = Instance$i.value(instance);
3784
+ const value = Instance$h.value(instance);
4891
3785
  return isExclusive ? value < maximum : value <= maximum;
4892
3786
  };
4893
3787
 
4894
- var maximumExclusiveMaximum = { compile: compile$m, interpret: interpret$m };
4895
-
4896
- const { Schema: Schema$p, Instance: Instance$h } = lib$2;
4897
-
4898
-
4899
- const compile$l = async (schema) => Schema$p.value(schema);
4900
- const interpret$l = (maximum, instance) => !Instance$h.typeOf(instance, "number") || Instance$h.value(instance) <= maximum;
4901
-
4902
- var maximum = { compile: compile$l, interpret: interpret$l };
3788
+ var maximumExclusiveMaximum = { compile: compile$l, interpret: interpret$l };
4903
3789
 
4904
- const { Schema: Schema$o, Instance: Instance$g } = lib$2;
3790
+ const { Schema: Schema$o, Instance: Instance$g } = lib$1;
4905
3791
 
4906
3792
 
4907
- const compile$k = (schema) => Schema$o.value(schema);
4908
- const interpret$k = (minItems, instance) => !Instance$g.typeOf(instance, "array") || Instance$g.length(instance) >= minItems;
3793
+ const compile$k = async (schema) => Schema$o.value(schema);
3794
+ const interpret$k = (maximum, instance) => !Instance$g.typeOf(instance, "number") || Instance$g.value(instance) <= maximum;
4909
3795
 
4910
- var minItems = { compile: compile$k, interpret: interpret$k };
3796
+ var maximum = { compile: compile$k, interpret: interpret$k };
4911
3797
 
4912
- const { Schema: Schema$n, Instance: Instance$f } = lib$2;
3798
+ const { Schema: Schema$n, Instance: Instance$f } = lib$1;
4913
3799
 
4914
3800
 
4915
3801
  const compile$j = (schema) => Schema$n.value(schema);
4916
- const interpret$j = (minLength, instance) => !Instance$f.typeOf(instance, "string") || Instance$f.length(instance) >= minLength;
3802
+ const interpret$j = (minItems, instance) => !Instance$f.typeOf(instance, "array") || Instance$f.length(instance) >= minItems;
4917
3803
 
4918
- var minLength = { compile: compile$j, interpret: interpret$j };
3804
+ var minItems = { compile: compile$j, interpret: interpret$j };
4919
3805
 
4920
- const { Schema: Schema$m, Instance: Instance$e } = lib$2;
3806
+ const { Schema: Schema$m, Instance: Instance$e } = lib$1;
4921
3807
 
4922
3808
 
4923
3809
  const compile$i = (schema) => Schema$m.value(schema);
4924
3810
  const interpret$i = (minLength, instance) => !Instance$e.typeOf(instance, "string") || [...Instance$e.value(instance)].length >= minLength;
4925
3811
 
4926
- var minLength6 = { compile: compile$i, interpret: interpret$i };
3812
+ var minLength = { compile: compile$i, interpret: interpret$i };
4927
3813
 
4928
- const { Schema: Schema$l, Instance: Instance$d } = lib$2;
3814
+ const { Schema: Schema$l, Instance: Instance$d } = lib$1;
4929
3815
 
4930
3816
 
4931
3817
  const compile$h = (schema) => Schema$l.value(schema);
@@ -4933,7 +3819,7 @@ System.register('JsonSchema', [], (function (exports) {
4933
3819
 
4934
3820
  var minProperties = { compile: compile$h, interpret: interpret$h };
4935
3821
 
4936
- const { Schema: Schema$k, Instance: Instance$c } = lib$2;
3822
+ const { Schema: Schema$k, Instance: Instance$c } = lib$1;
4937
3823
 
4938
3824
 
4939
3825
  const compile$g = async (schema, ast, parentSchema) => {
@@ -4954,7 +3840,7 @@ System.register('JsonSchema', [], (function (exports) {
4954
3840
 
4955
3841
  var minimumExclusiveMinimum = { compile: compile$g, interpret: interpret$g };
4956
3842
 
4957
- const { Schema: Schema$j, Instance: Instance$b } = lib$2;
3843
+ const { Schema: Schema$j, Instance: Instance$b } = lib$1;
4958
3844
 
4959
3845
 
4960
3846
  const compile$f = async (schema) => Schema$j.value(schema);
@@ -4962,7 +3848,7 @@ System.register('JsonSchema', [], (function (exports) {
4962
3848
 
4963
3849
  var minimum = { compile: compile$f, interpret: interpret$f };
4964
3850
 
4965
- const { Schema: Schema$i, Instance: Instance$a } = lib$2;
3851
+ const { Schema: Schema$i, Instance: Instance$a } = lib$1;
4966
3852
 
4967
3853
 
4968
3854
  const compile$e = (schema) => Schema$i.value(schema);
@@ -4980,7 +3866,7 @@ System.register('JsonSchema', [], (function (exports) {
4980
3866
 
4981
3867
  var multipleOf = { compile: compile$e, interpret: interpret$e };
4982
3868
 
4983
- const { Core: Core$f } = lib$2;
3869
+ const { Core: Core$f } = lib$1;
4984
3870
 
4985
3871
 
4986
3872
  const compile$d = Core$f.compileSchema;
@@ -4988,7 +3874,7 @@ System.register('JsonSchema', [], (function (exports) {
4988
3874
 
4989
3875
  var not = { compile: compile$d, interpret: interpret$d };
4990
3876
 
4991
- const { Core: Core$e, Schema: Schema$h } = lib$2;
3877
+ const { Core: Core$e, Schema: Schema$h } = lib$1;
4992
3878
 
4993
3879
 
4994
3880
  const compile$c = async (schema, ast) => {
@@ -5037,7 +3923,7 @@ System.register('JsonSchema', [], (function (exports) {
5037
3923
 
5038
3924
  var oneOf = { compile: compile$c, interpret: interpret$c, collectEvaluatedProperties: collectEvaluatedProperties$5, collectEvaluatedItems: collectEvaluatedItems$4 };
5039
3925
 
5040
- const { Schema: Schema$g, Instance: Instance$9 } = lib$2;
3926
+ const { Schema: Schema$g, Instance: Instance$9 } = lib$1;
5041
3927
 
5042
3928
 
5043
3929
  const compile$b = (schema) => new RegExp(Schema$g.value(schema), "u");
@@ -5045,8 +3931,8 @@ System.register('JsonSchema', [], (function (exports) {
5045
3931
 
5046
3932
  var pattern = { compile: compile$b, interpret: interpret$b };
5047
3933
 
5048
- const { Core: Core$d, Schema: Schema$f, Instance: Instance$8 } = lib$2;
5049
- const Pact$2 = lib$1;
3934
+ const { Core: Core$d, Schema: Schema$f, Instance: Instance$8 } = lib$1;
3935
+ const Pact$2 = lib$2;
5050
3936
 
5051
3937
 
5052
3938
  const compile$a = (schema, ast) => Pact$2.pipeline([
@@ -5083,8 +3969,8 @@ System.register('JsonSchema', [], (function (exports) {
5083
3969
 
5084
3970
  var common = { isObject, escapeRegExp: escapeRegExp$1, splitUrl: splitUrl$1 };
5085
3971
 
5086
- const { Core: Core$c, Schema: Schema$e, Instance: Instance$7 } = lib$2;
5087
- const Pact$1 = lib$1;
3972
+ const { Core: Core$c, Schema: Schema$e, Instance: Instance$7 } = lib$1;
3973
+ const Pact$1 = lib$2;
5088
3974
  const { escapeRegExp } = common;
5089
3975
 
5090
3976
 
@@ -5109,7 +3995,7 @@ System.register('JsonSchema', [], (function (exports) {
5109
3995
 
5110
3996
  var properties = { compile: compile$9, interpret: interpret$9, collectEvaluatedProperties: collectEvaluatedProperties$3 };
5111
3997
 
5112
- const { Core: Core$b, Instance: Instance$6 } = lib$2;
3998
+ const { Core: Core$b, Instance: Instance$6 } = lib$1;
5113
3999
 
5114
4000
 
5115
4001
  const compile$8 = (schema, ast) => Core$b.compileSchema(schema, ast);
@@ -5121,7 +4007,7 @@ System.register('JsonSchema', [], (function (exports) {
5121
4007
 
5122
4008
  var propertyNames = { compile: compile$8, interpret: interpret$8 };
5123
4009
 
5124
- const { Core: Core$a, Schema: Schema$d } = lib$2;
4010
+ const { Core: Core$a, Schema: Schema$d } = lib$1;
5125
4011
  const { splitUrl } = common;
5126
4012
 
5127
4013
 
@@ -5146,7 +4032,7 @@ System.register('JsonSchema', [], (function (exports) {
5146
4032
 
5147
4033
  var dynamicRef = { compile: compile$7, interpret: interpret$7, collectEvaluatedProperties: collectEvaluatedProperties$2, collectEvaluatedItems: collectEvaluatedItems$3 };
5148
4034
 
5149
- const { Core: Core$9, Schema: Schema$c } = lib$2;
4035
+ const { Core: Core$9, Schema: Schema$c } = lib$1;
5150
4036
 
5151
4037
 
5152
4038
  const compile$6 = async (ref, ast) => {
@@ -5160,7 +4046,7 @@ System.register('JsonSchema', [], (function (exports) {
5160
4046
 
5161
4047
  var ref = { compile: compile$6, interpret: interpret$6, collectEvaluatedProperties: collectEvaluatedProperties$1, collectEvaluatedItems: collectEvaluatedItems$2 };
5162
4048
 
5163
- const { Schema: Schema$b, Instance: Instance$5 } = lib$2;
4049
+ const { Schema: Schema$b, Instance: Instance$5 } = lib$1;
5164
4050
 
5165
4051
 
5166
4052
  const compile$5 = (schema) => Schema$b.value(schema);
@@ -5171,8 +4057,8 @@ System.register('JsonSchema', [], (function (exports) {
5171
4057
 
5172
4058
  var required = { compile: compile$5, interpret: interpret$5 };
5173
4059
 
5174
- const { Core: Core$8, Schema: Schema$a, Instance: Instance$4 } = lib$2;
5175
- const Pact = lib$1;
4060
+ const { Core: Core$8, Schema: Schema$a, Instance: Instance$4 } = lib$1;
4061
+ const Pact = lib$2;
5176
4062
 
5177
4063
 
5178
4064
  const compile$4 = (schema, ast) => {
@@ -5196,7 +4082,7 @@ System.register('JsonSchema', [], (function (exports) {
5196
4082
 
5197
4083
  var tupleItems = { compile: compile$4, interpret: interpret$4, collectEvaluatedItems: collectEvaluatedItems$1 };
5198
4084
 
5199
- const { Schema: Schema$9, Instance: Instance$3 } = lib$2;
4085
+ const { Schema: Schema$9, Instance: Instance$3 } = lib$1;
5200
4086
 
5201
4087
 
5202
4088
  const compile$3 = (schema) => Schema$9.value(schema);
@@ -5204,7 +4090,7 @@ System.register('JsonSchema', [], (function (exports) {
5204
4090
 
5205
4091
  var type = { compile: compile$3, interpret: interpret$3 };
5206
4092
 
5207
- const { Core: Core$7, Schema: Schema$8, Instance: Instance$2 } = lib$2;
4093
+ const { Core: Core$7, Schema: Schema$8, Instance: Instance$2 } = lib$1;
5208
4094
 
5209
4095
 
5210
4096
  const compile$2 = async (schema, ast, parentSchema) => {
@@ -5228,7 +4114,7 @@ System.register('JsonSchema', [], (function (exports) {
5228
4114
 
5229
4115
  var unevaluatedItems = { compile: compile$2, interpret: interpret$2, collectEvaluatedItems };
5230
4116
 
5231
- const { Core: Core$6, Schema: Schema$7, Instance: Instance$1 } = lib$2;
4117
+ const { Core: Core$6, Schema: Schema$7, Instance: Instance$1 } = lib$1;
5232
4118
 
5233
4119
 
5234
4120
  const compile$1 = async (schema, ast, parentSchema) => {
@@ -5253,7 +4139,7 @@ System.register('JsonSchema', [], (function (exports) {
5253
4139
 
5254
4140
  var unevaluatedProperties = { compile: compile$1, interpret: interpret$1, collectEvaluatedProperties };
5255
4141
 
5256
- const { Schema: Schema$6, Instance } = lib$2;
4142
+ const { Schema: Schema$6, Instance } = lib$1;
5257
4143
  const jsonStringify = fastestStableStringify;
5258
4144
 
5259
4145
 
@@ -5270,7 +4156,7 @@ System.register('JsonSchema', [], (function (exports) {
5270
4156
 
5271
4157
  var uniqueItems = { compile, interpret };
5272
4158
 
5273
- const { Keywords: Keywords$1 } = lib$2;
4159
+ const { Keywords: Keywords$1 } = lib$1;
5274
4160
 
5275
4161
 
5276
4162
  var keywords$5 = {
@@ -5297,14 +4183,12 @@ System.register('JsonSchema', [], (function (exports) {
5297
4183
  items202012: items202012,
5298
4184
  maxItems: maxItems,
5299
4185
  maxLength: maxLength,
5300
- maxLength6: maxLength6,
5301
4186
  maxProperties: maxProperties,
5302
4187
  maximumExclusiveMaximum: maximumExclusiveMaximum,
5303
4188
  maximum: maximum,
5304
4189
  metaData: Keywords$1.metaData,
5305
4190
  minItems: minItems,
5306
4191
  minLength: minLength,
5307
- minLength6: minLength6,
5308
4192
  minProperties: minProperties,
5309
4193
  minimumExclusiveMinimum: minimumExclusiveMinimum,
5310
4194
  minimum: minimum,
@@ -5476,7 +4360,7 @@ System.register('JsonSchema', [], (function (exports) {
5476
4360
  "default": {}
5477
4361
  }`;
5478
4362
 
5479
- const { Core: Core$5, Schema: Schema$5 } = lib$2;
4363
+ const { Core: Core$5, Schema: Schema$5 } = lib$1;
5480
4364
  const keywords$4 = keywords$5;
5481
4365
  const metaSchema$4 = schema$4;
5482
4366
 
@@ -5678,7 +4562,7 @@ System.register('JsonSchema', [], (function (exports) {
5678
4562
  "default": {}
5679
4563
  }`;
5680
4564
 
5681
- const { Core: Core$4, Schema: Schema$4 } = lib$2;
4565
+ const { Core: Core$4, Schema: Schema$4 } = lib$1;
5682
4566
  const keywords$3 = keywords$5;
5683
4567
  const metaSchema$3 = schema$3;
5684
4568
 
@@ -5710,11 +4594,11 @@ System.register('JsonSchema', [], (function (exports) {
5710
4594
  "format": keywords$3.metaData,
5711
4595
  "items": keywords$3.items,
5712
4596
  "maxItems": keywords$3.maxItems,
5713
- "maxLength": keywords$3.maxLength6,
4597
+ "maxLength": keywords$3.maxLength,
5714
4598
  "maxProperties": keywords$3.maxProperties,
5715
4599
  "maximum": keywords$3.maximum,
5716
4600
  "minItems": keywords$3.minItems,
5717
- "minLength": keywords$3.minLength6,
4601
+ "minLength": keywords$3.minLength,
5718
4602
  "minProperties": keywords$3.minProperties,
5719
4603
  "minimum": keywords$3.minimum,
5720
4604
  "multipleOf": keywords$3.multipleOf,
@@ -5903,7 +4787,7 @@ System.register('JsonSchema', [], (function (exports) {
5903
4787
  "default": true
5904
4788
  }`;
5905
4789
 
5906
- const { Core: Core$3, Schema: Schema$3 } = lib$2;
4790
+ const { Core: Core$3, Schema: Schema$3 } = lib$1;
5907
4791
  const keywords$2 = keywords$5;
5908
4792
  const metaSchema$2 = schema$2;
5909
4793
 
@@ -5937,11 +4821,11 @@ System.register('JsonSchema', [], (function (exports) {
5937
4821
  "else": keywords$2.else,
5938
4822
  "items": keywords$2.items,
5939
4823
  "maxItems": keywords$2.maxItems,
5940
- "maxLength": keywords$2.maxLength6,
4824
+ "maxLength": keywords$2.maxLength,
5941
4825
  "maxProperties": keywords$2.maxProperties,
5942
4826
  "maximum": keywords$2.maximum,
5943
4827
  "minItems": keywords$2.minItems,
5944
- "minLength": keywords$2.minLength6,
4828
+ "minLength": keywords$2.minLength,
5945
4829
  "minProperties": keywords$2.minProperties,
5946
4830
  "minimum": keywords$2.minimum,
5947
4831
  "multipleOf": keywords$2.multipleOf,
@@ -6286,7 +5170,7 @@ System.register('JsonSchema', [], (function (exports) {
6286
5170
  }
6287
5171
  }`;
6288
5172
 
6289
- const { Core: Core$2, Schema: Schema$2 } = lib$2;
5173
+ const { Core: Core$2, Schema: Schema$2 } = lib$1;
6290
5174
  const keywords$1 = keywords$5;
6291
5175
  const metaSchema$1 = schema$1;
6292
5176
  const coreMetaSchema$1 = core$1;
@@ -6345,11 +5229,11 @@ System.register('JsonSchema', [], (function (exports) {
6345
5229
  "exclusiveMaximum": keywords$1.exclusiveMaximum,
6346
5230
  "exclusiveMinimum": keywords$1.exclusiveMinimum,
6347
5231
  "maxItems": keywords$1.maxItems,
6348
- "maxLength": keywords$1.maxLength6,
5232
+ "maxLength": keywords$1.maxLength,
6349
5233
  "maxProperties": keywords$1.maxProperties,
6350
5234
  "maximum": keywords$1.maximum,
6351
5235
  "minItems": keywords$1.minItems,
6352
- "minLength": keywords$1.minLength6,
5236
+ "minLength": keywords$1.minLength,
6353
5237
  "minProperties": keywords$1.minProperties,
6354
5238
  "minimum": keywords$1.minimum,
6355
5239
  "multipleOf": keywords$1.multipleOf,
@@ -6733,7 +5617,7 @@ System.register('JsonSchema', [], (function (exports) {
6733
5617
  }
6734
5618
  }`;
6735
5619
 
6736
- const { Core: Core$1, Schema: Schema$1 } = lib$2;
5620
+ const { Core: Core$1, Schema: Schema$1 } = lib$1;
6737
5621
  const keywords = keywords$5;
6738
5622
  const metaSchema = schema;
6739
5623
  const coreMetaSchema = core;
@@ -6792,11 +5676,11 @@ System.register('JsonSchema', [], (function (exports) {
6792
5676
  "exclusiveMaximum": keywords.exclusiveMaximum,
6793
5677
  "exclusiveMinimum": keywords.exclusiveMinimum,
6794
5678
  "maxItems": keywords.maxItems,
6795
- "maxLength": keywords.maxLength6,
5679
+ "maxLength": keywords.maxLength,
6796
5680
  "maxProperties": keywords.maxProperties,
6797
5681
  "maximum": keywords.maximum,
6798
5682
  "minItems": keywords.minItems,
6799
- "minLength": keywords.minLength6,
5683
+ "minLength": keywords.minLength,
6800
5684
  "minProperties": keywords.minProperties,
6801
5685
  "minimum": keywords.minimum,
6802
5686
  "multipleOf": keywords.multipleOf,
@@ -6837,7 +5721,7 @@ System.register('JsonSchema', [], (function (exports) {
6837
5721
  "unevaluatedProperties": keywords.unevaluatedProperties
6838
5722
  });
6839
5723
 
6840
- const { Core, Schema, InvalidSchemaError } = lib$2;
5724
+ const { Core, Schema, InvalidSchemaError } = lib$1;
6841
5725
  const Keywords = keywords$5;
6842
5726
 
6843
5727