@bigbinary/neetoui 5.2.31 → 5.2.33
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.
- package/formik.cjs.js +650 -1656
- package/formik.cjs.js.map +1 -1
- package/formik.js +636 -1642
- package/formik.js.map +1 -1
- package/index.cjs.js +27249 -29236
- package/index.cjs.js.map +1 -1
- package/index.js +23784 -25771
- package/index.js.map +1 -1
- package/layouts.cjs.js +577 -225
- package/layouts.cjs.js.map +1 -1
- package/layouts.js +575 -223
- package/layouts.js.map +1 -1
- package/package.json +25 -16
package/formik.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createContext, useLayoutEffect, useEffect, useContext, useRef, useInsertionEffect as useInsertionEffect$1, useCallback, useMemo, forwardRef as forwardRef$1, createElement, useId as useId$1, useState, cloneElement, Children, isValidElement, useSyncExternalStore, Fragment, Component, startTransition } from 'react';
|
|
3
3
|
import { useFormikContext, Field, Form as Form$1, Formik, useField } from 'formik';
|
|
4
|
+
import { isEmpty, equals, is, replace as replace$1, assoc, pluck, mergeLeft, prop, flatten, either, isNil } from 'ramda';
|
|
4
5
|
import { Link, useHistory } from 'react-router-dom';
|
|
5
6
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
6
7
|
import { Close, Info, Down, Check } from '@bigbinary/neeto-icons';
|
|
8
|
+
import { existsBy } from '@bigbinary/neeto-cist';
|
|
7
9
|
import _ConfigProvider from 'antd/lib/config-provider';
|
|
8
10
|
import _Slider from 'antd/lib/slider';
|
|
9
11
|
import _TreeSelect from 'antd/lib/tree-select';
|
|
@@ -79,1558 +81,6 @@ var classnames$2 = {exports: {}};
|
|
|
79
81
|
|
|
80
82
|
var classnames$1 = classnames$2.exports;
|
|
81
83
|
|
|
82
|
-
function _isPlaceholder(a) {
|
|
83
|
-
return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Optimized internal one-arity curry function.
|
|
88
|
-
*
|
|
89
|
-
* @private
|
|
90
|
-
* @category Function
|
|
91
|
-
* @param {Function} fn The function to curry.
|
|
92
|
-
* @return {Function} The curried function.
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
function _curry1(fn) {
|
|
96
|
-
return function f1(a) {
|
|
97
|
-
if (arguments.length === 0 || _isPlaceholder(a)) {
|
|
98
|
-
return f1;
|
|
99
|
-
} else {
|
|
100
|
-
return fn.apply(this, arguments);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Optimized internal two-arity curry function.
|
|
107
|
-
*
|
|
108
|
-
* @private
|
|
109
|
-
* @category Function
|
|
110
|
-
* @param {Function} fn The function to curry.
|
|
111
|
-
* @return {Function} The curried function.
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
function _curry2(fn) {
|
|
115
|
-
return function f2(a, b) {
|
|
116
|
-
switch (arguments.length) {
|
|
117
|
-
case 0:
|
|
118
|
-
return f2;
|
|
119
|
-
|
|
120
|
-
case 1:
|
|
121
|
-
return _isPlaceholder(a) ? f2 : _curry1(function (_b) {
|
|
122
|
-
return fn(a, _b);
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
default:
|
|
126
|
-
return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {
|
|
127
|
-
return fn(_a, b);
|
|
128
|
-
}) : _isPlaceholder(b) ? _curry1(function (_b) {
|
|
129
|
-
return fn(a, _b);
|
|
130
|
-
}) : fn(a, b);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Private `concat` function to merge two array-like objects.
|
|
137
|
-
*
|
|
138
|
-
* @private
|
|
139
|
-
* @param {Array|Arguments} [set1=[]] An array-like object.
|
|
140
|
-
* @param {Array|Arguments} [set2=[]] An array-like object.
|
|
141
|
-
* @return {Array} A new, merged array.
|
|
142
|
-
* @example
|
|
143
|
-
*
|
|
144
|
-
* _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]
|
|
145
|
-
*/
|
|
146
|
-
function _concat(set1, set2) {
|
|
147
|
-
set1 = set1 || [];
|
|
148
|
-
set2 = set2 || [];
|
|
149
|
-
var idx;
|
|
150
|
-
var len1 = set1.length;
|
|
151
|
-
var len2 = set2.length;
|
|
152
|
-
var result = [];
|
|
153
|
-
idx = 0;
|
|
154
|
-
|
|
155
|
-
while (idx < len1) {
|
|
156
|
-
result[result.length] = set1[idx];
|
|
157
|
-
idx += 1;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
idx = 0;
|
|
161
|
-
|
|
162
|
-
while (idx < len2) {
|
|
163
|
-
result[result.length] = set2[idx];
|
|
164
|
-
idx += 1;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return result;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function _arity(n, fn) {
|
|
171
|
-
/* eslint-disable no-unused-vars */
|
|
172
|
-
switch (n) {
|
|
173
|
-
case 0:
|
|
174
|
-
return function () {
|
|
175
|
-
return fn.apply(this, arguments);
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
case 1:
|
|
179
|
-
return function (a0) {
|
|
180
|
-
return fn.apply(this, arguments);
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
case 2:
|
|
184
|
-
return function (a0, a1) {
|
|
185
|
-
return fn.apply(this, arguments);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
case 3:
|
|
189
|
-
return function (a0, a1, a2) {
|
|
190
|
-
return fn.apply(this, arguments);
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
case 4:
|
|
194
|
-
return function (a0, a1, a2, a3) {
|
|
195
|
-
return fn.apply(this, arguments);
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
case 5:
|
|
199
|
-
return function (a0, a1, a2, a3, a4) {
|
|
200
|
-
return fn.apply(this, arguments);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
case 6:
|
|
204
|
-
return function (a0, a1, a2, a3, a4, a5) {
|
|
205
|
-
return fn.apply(this, arguments);
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
case 7:
|
|
209
|
-
return function (a0, a1, a2, a3, a4, a5, a6) {
|
|
210
|
-
return fn.apply(this, arguments);
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
case 8:
|
|
214
|
-
return function (a0, a1, a2, a3, a4, a5, a6, a7) {
|
|
215
|
-
return fn.apply(this, arguments);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
case 9:
|
|
219
|
-
return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {
|
|
220
|
-
return fn.apply(this, arguments);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
case 10:
|
|
224
|
-
return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
|
|
225
|
-
return fn.apply(this, arguments);
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
default:
|
|
229
|
-
throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Internal curryN function.
|
|
235
|
-
*
|
|
236
|
-
* @private
|
|
237
|
-
* @category Function
|
|
238
|
-
* @param {Number} length The arity of the curried function.
|
|
239
|
-
* @param {Array} received An array of arguments received thus far.
|
|
240
|
-
* @param {Function} fn The function to curry.
|
|
241
|
-
* @return {Function} The curried function.
|
|
242
|
-
*/
|
|
243
|
-
|
|
244
|
-
function _curryN(length, received, fn) {
|
|
245
|
-
return function () {
|
|
246
|
-
var combined = [];
|
|
247
|
-
var argsIdx = 0;
|
|
248
|
-
var left = length;
|
|
249
|
-
var combinedIdx = 0;
|
|
250
|
-
|
|
251
|
-
while (combinedIdx < received.length || argsIdx < arguments.length) {
|
|
252
|
-
var result;
|
|
253
|
-
|
|
254
|
-
if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {
|
|
255
|
-
result = received[combinedIdx];
|
|
256
|
-
} else {
|
|
257
|
-
result = arguments[argsIdx];
|
|
258
|
-
argsIdx += 1;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
combined[combinedIdx] = result;
|
|
262
|
-
|
|
263
|
-
if (!_isPlaceholder(result)) {
|
|
264
|
-
left -= 1;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
combinedIdx += 1;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Returns a curried equivalent of the provided function, with the specified
|
|
276
|
-
* arity. The curried function has two unusual capabilities. First, its
|
|
277
|
-
* arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the
|
|
278
|
-
* following are equivalent:
|
|
279
|
-
*
|
|
280
|
-
* - `g(1)(2)(3)`
|
|
281
|
-
* - `g(1)(2, 3)`
|
|
282
|
-
* - `g(1, 2)(3)`
|
|
283
|
-
* - `g(1, 2, 3)`
|
|
284
|
-
*
|
|
285
|
-
* Secondly, the special placeholder value [`R.__`](#__) may be used to specify
|
|
286
|
-
* "gaps", allowing partial application of any combination of arguments,
|
|
287
|
-
* regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
|
|
288
|
-
* the following are equivalent:
|
|
289
|
-
*
|
|
290
|
-
* - `g(1, 2, 3)`
|
|
291
|
-
* - `g(_, 2, 3)(1)`
|
|
292
|
-
* - `g(_, _, 3)(1)(2)`
|
|
293
|
-
* - `g(_, _, 3)(1, 2)`
|
|
294
|
-
* - `g(_, 2)(1)(3)`
|
|
295
|
-
* - `g(_, 2)(1, 3)`
|
|
296
|
-
* - `g(_, 2)(_, 3)(1)`
|
|
297
|
-
*
|
|
298
|
-
* @func
|
|
299
|
-
* @memberOf R
|
|
300
|
-
* @since v0.5.0
|
|
301
|
-
* @category Function
|
|
302
|
-
* @sig Number -> (* -> a) -> (* -> a)
|
|
303
|
-
* @param {Number} length The arity for the returned function.
|
|
304
|
-
* @param {Function} fn The function to curry.
|
|
305
|
-
* @return {Function} A new, curried function.
|
|
306
|
-
* @see R.curry
|
|
307
|
-
* @example
|
|
308
|
-
*
|
|
309
|
-
* const sumArgs = (...args) => R.sum(args);
|
|
310
|
-
*
|
|
311
|
-
* const curriedAddFourNumbers = R.curryN(4, sumArgs);
|
|
312
|
-
* const f = curriedAddFourNumbers(1, 2);
|
|
313
|
-
* const g = f(3);
|
|
314
|
-
* g(4); //=> 10
|
|
315
|
-
*/
|
|
316
|
-
|
|
317
|
-
var curryN =
|
|
318
|
-
/*#__PURE__*/
|
|
319
|
-
_curry2(function curryN(length, fn) {
|
|
320
|
-
if (length === 1) {
|
|
321
|
-
return _curry1(fn);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
return _arity(length, _curryN(length, [], fn));
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Optimized internal three-arity curry function.
|
|
329
|
-
*
|
|
330
|
-
* @private
|
|
331
|
-
* @category Function
|
|
332
|
-
* @param {Function} fn The function to curry.
|
|
333
|
-
* @return {Function} The curried function.
|
|
334
|
-
*/
|
|
335
|
-
|
|
336
|
-
function _curry3(fn) {
|
|
337
|
-
return function f3(a, b, c) {
|
|
338
|
-
switch (arguments.length) {
|
|
339
|
-
case 0:
|
|
340
|
-
return f3;
|
|
341
|
-
|
|
342
|
-
case 1:
|
|
343
|
-
return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {
|
|
344
|
-
return fn(a, _b, _c);
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
case 2:
|
|
348
|
-
return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {
|
|
349
|
-
return fn(_a, b, _c);
|
|
350
|
-
}) : _isPlaceholder(b) ? _curry2(function (_b, _c) {
|
|
351
|
-
return fn(a, _b, _c);
|
|
352
|
-
}) : _curry1(function (_c) {
|
|
353
|
-
return fn(a, b, _c);
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
default:
|
|
357
|
-
return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {
|
|
358
|
-
return fn(_a, _b, c);
|
|
359
|
-
}) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {
|
|
360
|
-
return fn(_a, b, _c);
|
|
361
|
-
}) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {
|
|
362
|
-
return fn(a, _b, _c);
|
|
363
|
-
}) : _isPlaceholder(a) ? _curry1(function (_a) {
|
|
364
|
-
return fn(_a, b, c);
|
|
365
|
-
}) : _isPlaceholder(b) ? _curry1(function (_b) {
|
|
366
|
-
return fn(a, _b, c);
|
|
367
|
-
}) : _isPlaceholder(c) ? _curry1(function (_c) {
|
|
368
|
-
return fn(a, b, _c);
|
|
369
|
-
}) : fn(a, b, c);
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Tests whether or not an object is an array.
|
|
376
|
-
*
|
|
377
|
-
* @private
|
|
378
|
-
* @param {*} val The object to test.
|
|
379
|
-
* @return {Boolean} `true` if `val` is an array, `false` otherwise.
|
|
380
|
-
* @example
|
|
381
|
-
*
|
|
382
|
-
* _isArray([]); //=> true
|
|
383
|
-
* _isArray(null); //=> false
|
|
384
|
-
* _isArray({}); //=> false
|
|
385
|
-
*/
|
|
386
|
-
var _isArray = Array.isArray || function _isArray(val) {
|
|
387
|
-
return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
function _isTransformer(obj) {
|
|
391
|
-
return obj != null && typeof obj['@@transducer/step'] === 'function';
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Returns a function that dispatches with different strategies based on the
|
|
396
|
-
* object in list position (last argument). If it is an array, executes [fn].
|
|
397
|
-
* Otherwise, if it has a function with one of the given method names, it will
|
|
398
|
-
* execute that function (functor case). Otherwise, if it is a transformer,
|
|
399
|
-
* uses transducer created by [transducerCreator] to return a new transformer
|
|
400
|
-
* (transducer case).
|
|
401
|
-
* Otherwise, it will default to executing [fn].
|
|
402
|
-
*
|
|
403
|
-
* @private
|
|
404
|
-
* @param {Array} methodNames properties to check for a custom implementation
|
|
405
|
-
* @param {Function} transducerCreator transducer factory if object is transformer
|
|
406
|
-
* @param {Function} fn default ramda implementation
|
|
407
|
-
* @return {Function} A function that dispatches on object in list position
|
|
408
|
-
*/
|
|
409
|
-
|
|
410
|
-
function _dispatchable(methodNames, transducerCreator, fn) {
|
|
411
|
-
return function () {
|
|
412
|
-
if (arguments.length === 0) {
|
|
413
|
-
return fn();
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
var obj = arguments[arguments.length - 1];
|
|
417
|
-
|
|
418
|
-
if (!_isArray(obj)) {
|
|
419
|
-
var idx = 0;
|
|
420
|
-
|
|
421
|
-
while (idx < methodNames.length) {
|
|
422
|
-
if (typeof obj[methodNames[idx]] === 'function') {
|
|
423
|
-
return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1));
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
idx += 1;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
if (_isTransformer(obj)) {
|
|
430
|
-
var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1));
|
|
431
|
-
return transducer(obj);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return fn.apply(this, arguments);
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
var _xfBase = {
|
|
440
|
-
init: function () {
|
|
441
|
-
return this.xf['@@transducer/init']();
|
|
442
|
-
},
|
|
443
|
-
result: function (result) {
|
|
444
|
-
return this.xf['@@transducer/result'](result);
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
function _arrayFromIterator(iter) {
|
|
449
|
-
var list = [];
|
|
450
|
-
var next;
|
|
451
|
-
|
|
452
|
-
while (!(next = iter.next()).done) {
|
|
453
|
-
list.push(next.value);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
return list;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
function _includesWith(pred, x, list) {
|
|
460
|
-
var idx = 0;
|
|
461
|
-
var len = list.length;
|
|
462
|
-
|
|
463
|
-
while (idx < len) {
|
|
464
|
-
if (pred(x, list[idx])) {
|
|
465
|
-
return true;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
idx += 1;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return false;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
function _functionName(f) {
|
|
475
|
-
// String(x => x) evaluates to "x => x", so the pattern may not match.
|
|
476
|
-
var match = String(f).match(/^function (\w*)/);
|
|
477
|
-
return match == null ? '' : match[1];
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
function _has(prop, obj) {
|
|
481
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
485
|
-
function _objectIs(a, b) {
|
|
486
|
-
// SameValue algorithm
|
|
487
|
-
if (a === b) {
|
|
488
|
-
// Steps 1-5, 7-10
|
|
489
|
-
// Steps 6.b-6.e: +0 != -0
|
|
490
|
-
return a !== 0 || 1 / a === 1 / b;
|
|
491
|
-
} else {
|
|
492
|
-
// Step 6.a: NaN == NaN
|
|
493
|
-
return a !== a && b !== b;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
|
|
498
|
-
|
|
499
|
-
var toString = Object.prototype.toString;
|
|
500
|
-
|
|
501
|
-
var _isArguments =
|
|
502
|
-
/*#__PURE__*/
|
|
503
|
-
function () {
|
|
504
|
-
return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
|
|
505
|
-
return toString.call(x) === '[object Arguments]';
|
|
506
|
-
} : function _isArguments(x) {
|
|
507
|
-
return _has('callee', x);
|
|
508
|
-
};
|
|
509
|
-
}();
|
|
510
|
-
|
|
511
|
-
var hasEnumBug = !
|
|
512
|
-
/*#__PURE__*/
|
|
513
|
-
{
|
|
514
|
-
toString: null
|
|
515
|
-
}.propertyIsEnumerable('toString');
|
|
516
|
-
var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug
|
|
517
|
-
|
|
518
|
-
var hasArgsEnumBug =
|
|
519
|
-
/*#__PURE__*/
|
|
520
|
-
function () {
|
|
521
|
-
|
|
522
|
-
return arguments.propertyIsEnumerable('length');
|
|
523
|
-
}();
|
|
524
|
-
|
|
525
|
-
var contains$1 = function contains(list, item) {
|
|
526
|
-
var idx = 0;
|
|
527
|
-
|
|
528
|
-
while (idx < list.length) {
|
|
529
|
-
if (list[idx] === item) {
|
|
530
|
-
return true;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
idx += 1;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
return false;
|
|
537
|
-
};
|
|
538
|
-
/**
|
|
539
|
-
* Returns a list containing the names of all the enumerable own properties of
|
|
540
|
-
* the supplied object.
|
|
541
|
-
* Note that the order of the output array is not guaranteed to be consistent
|
|
542
|
-
* across different JS platforms.
|
|
543
|
-
*
|
|
544
|
-
* @func
|
|
545
|
-
* @memberOf R
|
|
546
|
-
* @since v0.1.0
|
|
547
|
-
* @category Object
|
|
548
|
-
* @sig {k: v} -> [k]
|
|
549
|
-
* @param {Object} obj The object to extract properties from
|
|
550
|
-
* @return {Array} An array of the object's own properties.
|
|
551
|
-
* @see R.keysIn, R.values, R.toPairs
|
|
552
|
-
* @example
|
|
553
|
-
*
|
|
554
|
-
* R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
|
|
555
|
-
*/
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?
|
|
559
|
-
/*#__PURE__*/
|
|
560
|
-
_curry1(function keys(obj) {
|
|
561
|
-
return Object(obj) !== obj ? [] : Object.keys(obj);
|
|
562
|
-
}) :
|
|
563
|
-
/*#__PURE__*/
|
|
564
|
-
_curry1(function keys(obj) {
|
|
565
|
-
if (Object(obj) !== obj) {
|
|
566
|
-
return [];
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
var prop, nIdx;
|
|
570
|
-
var ks = [];
|
|
571
|
-
|
|
572
|
-
var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
|
|
573
|
-
|
|
574
|
-
for (prop in obj) {
|
|
575
|
-
if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
|
|
576
|
-
ks[ks.length] = prop;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (hasEnumBug) {
|
|
581
|
-
nIdx = nonEnumerableProps.length - 1;
|
|
582
|
-
|
|
583
|
-
while (nIdx >= 0) {
|
|
584
|
-
prop = nonEnumerableProps[nIdx];
|
|
585
|
-
|
|
586
|
-
if (_has(prop, obj) && !contains$1(ks, prop)) {
|
|
587
|
-
ks[ks.length] = prop;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
nIdx -= 1;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
return ks;
|
|
595
|
-
});
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Gives a single-word string description of the (native) type of a value,
|
|
599
|
-
* returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
|
|
600
|
-
* attempt to distinguish user Object types any further, reporting them all as
|
|
601
|
-
* 'Object'.
|
|
602
|
-
*
|
|
603
|
-
* @func
|
|
604
|
-
* @memberOf R
|
|
605
|
-
* @since v0.8.0
|
|
606
|
-
* @category Type
|
|
607
|
-
* @sig * -> String
|
|
608
|
-
* @param {*} val The value to test
|
|
609
|
-
* @return {String}
|
|
610
|
-
* @example
|
|
611
|
-
*
|
|
612
|
-
* R.type({}); //=> "Object"
|
|
613
|
-
* R.type(1); //=> "Number"
|
|
614
|
-
* R.type(false); //=> "Boolean"
|
|
615
|
-
* R.type('s'); //=> "String"
|
|
616
|
-
* R.type(null); //=> "Null"
|
|
617
|
-
* R.type([]); //=> "Array"
|
|
618
|
-
* R.type(/[A-z]/); //=> "RegExp"
|
|
619
|
-
* R.type(() => {}); //=> "Function"
|
|
620
|
-
* R.type(undefined); //=> "Undefined"
|
|
621
|
-
*/
|
|
622
|
-
|
|
623
|
-
var type =
|
|
624
|
-
/*#__PURE__*/
|
|
625
|
-
_curry1(function type(val) {
|
|
626
|
-
return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
|
|
627
|
-
});
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* private _uniqContentEquals function.
|
|
631
|
-
* That function is checking equality of 2 iterator contents with 2 assumptions
|
|
632
|
-
* - iterators lengths are the same
|
|
633
|
-
* - iterators values are unique
|
|
634
|
-
*
|
|
635
|
-
* false-positive result will be returned for comparison of, e.g.
|
|
636
|
-
* - [1,2,3] and [1,2,3,4]
|
|
637
|
-
* - [1,1,1] and [1,2,3]
|
|
638
|
-
* */
|
|
639
|
-
|
|
640
|
-
function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
|
|
641
|
-
var a = _arrayFromIterator(aIterator);
|
|
642
|
-
|
|
643
|
-
var b = _arrayFromIterator(bIterator);
|
|
644
|
-
|
|
645
|
-
function eq(_a, _b) {
|
|
646
|
-
return _equals(_a, _b, stackA.slice(), stackB.slice());
|
|
647
|
-
} // if *a* array contains any element that is not included in *b*
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
return !_includesWith(function (b, aItem) {
|
|
651
|
-
return !_includesWith(eq, aItem, b);
|
|
652
|
-
}, b, a);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
function _equals(a, b, stackA, stackB) {
|
|
656
|
-
if (_objectIs$1(a, b)) {
|
|
657
|
-
return true;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
var typeA = type(a);
|
|
661
|
-
|
|
662
|
-
if (typeA !== type(b)) {
|
|
663
|
-
return false;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
|
|
667
|
-
return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
if (typeof a.equals === 'function' || typeof b.equals === 'function') {
|
|
671
|
-
return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
switch (typeA) {
|
|
675
|
-
case 'Arguments':
|
|
676
|
-
case 'Array':
|
|
677
|
-
case 'Object':
|
|
678
|
-
if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {
|
|
679
|
-
return a === b;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
break;
|
|
683
|
-
|
|
684
|
-
case 'Boolean':
|
|
685
|
-
case 'Number':
|
|
686
|
-
case 'String':
|
|
687
|
-
if (!(typeof a === typeof b && _objectIs$1(a.valueOf(), b.valueOf()))) {
|
|
688
|
-
return false;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
break;
|
|
692
|
-
|
|
693
|
-
case 'Date':
|
|
694
|
-
if (!_objectIs$1(a.valueOf(), b.valueOf())) {
|
|
695
|
-
return false;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
break;
|
|
699
|
-
|
|
700
|
-
case 'Error':
|
|
701
|
-
return a.name === b.name && a.message === b.message;
|
|
702
|
-
|
|
703
|
-
case 'RegExp':
|
|
704
|
-
if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {
|
|
705
|
-
return false;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
break;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
var idx = stackA.length - 1;
|
|
712
|
-
|
|
713
|
-
while (idx >= 0) {
|
|
714
|
-
if (stackA[idx] === a) {
|
|
715
|
-
return stackB[idx] === b;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
idx -= 1;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
switch (typeA) {
|
|
722
|
-
case 'Map':
|
|
723
|
-
if (a.size !== b.size) {
|
|
724
|
-
return false;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));
|
|
728
|
-
|
|
729
|
-
case 'Set':
|
|
730
|
-
if (a.size !== b.size) {
|
|
731
|
-
return false;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));
|
|
735
|
-
|
|
736
|
-
case 'Arguments':
|
|
737
|
-
case 'Array':
|
|
738
|
-
case 'Object':
|
|
739
|
-
case 'Boolean':
|
|
740
|
-
case 'Number':
|
|
741
|
-
case 'String':
|
|
742
|
-
case 'Date':
|
|
743
|
-
case 'Error':
|
|
744
|
-
case 'RegExp':
|
|
745
|
-
case 'Int8Array':
|
|
746
|
-
case 'Uint8Array':
|
|
747
|
-
case 'Uint8ClampedArray':
|
|
748
|
-
case 'Int16Array':
|
|
749
|
-
case 'Uint16Array':
|
|
750
|
-
case 'Int32Array':
|
|
751
|
-
case 'Uint32Array':
|
|
752
|
-
case 'Float32Array':
|
|
753
|
-
case 'Float64Array':
|
|
754
|
-
case 'ArrayBuffer':
|
|
755
|
-
break;
|
|
756
|
-
|
|
757
|
-
default:
|
|
758
|
-
// Values of other types are only equal if identical.
|
|
759
|
-
return false;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
var keysA = keys(a);
|
|
763
|
-
|
|
764
|
-
if (keysA.length !== keys(b).length) {
|
|
765
|
-
return false;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
var extendedStackA = stackA.concat([a]);
|
|
769
|
-
var extendedStackB = stackB.concat([b]);
|
|
770
|
-
idx = keysA.length - 1;
|
|
771
|
-
|
|
772
|
-
while (idx >= 0) {
|
|
773
|
-
var key = keysA[idx];
|
|
774
|
-
|
|
775
|
-
if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {
|
|
776
|
-
return false;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
idx -= 1;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
return true;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* Returns `true` if its arguments are equivalent, `false` otherwise. Handles
|
|
787
|
-
* cyclical data structures.
|
|
788
|
-
*
|
|
789
|
-
* Dispatches symmetrically to the `equals` methods of both arguments, if
|
|
790
|
-
* present.
|
|
791
|
-
*
|
|
792
|
-
* @func
|
|
793
|
-
* @memberOf R
|
|
794
|
-
* @since v0.15.0
|
|
795
|
-
* @category Relation
|
|
796
|
-
* @sig a -> b -> Boolean
|
|
797
|
-
* @param {*} a
|
|
798
|
-
* @param {*} b
|
|
799
|
-
* @return {Boolean}
|
|
800
|
-
* @example
|
|
801
|
-
*
|
|
802
|
-
* R.equals(1, 1); //=> true
|
|
803
|
-
* R.equals(1, '1'); //=> false
|
|
804
|
-
* R.equals([1, 2, 3], [1, 2, 3]); //=> true
|
|
805
|
-
*
|
|
806
|
-
* const a = {}; a.v = a;
|
|
807
|
-
* const b = {}; b.v = b;
|
|
808
|
-
* R.equals(a, b); //=> true
|
|
809
|
-
*/
|
|
810
|
-
|
|
811
|
-
var equals =
|
|
812
|
-
/*#__PURE__*/
|
|
813
|
-
_curry2(function equals(a, b) {
|
|
814
|
-
return _equals(a, b, [], []);
|
|
815
|
-
});
|
|
816
|
-
|
|
817
|
-
function _map(fn, functor) {
|
|
818
|
-
var idx = 0;
|
|
819
|
-
var len = functor.length;
|
|
820
|
-
var result = Array(len);
|
|
821
|
-
|
|
822
|
-
while (idx < len) {
|
|
823
|
-
result[idx] = fn(functor[idx]);
|
|
824
|
-
idx += 1;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
return result;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
function _arrayReduce(reducer, acc, list) {
|
|
831
|
-
var index = 0;
|
|
832
|
-
var length = list.length;
|
|
833
|
-
|
|
834
|
-
while (index < length) {
|
|
835
|
-
acc = reducer(acc, list[index]);
|
|
836
|
-
index += 1;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return acc;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
function _isObject(x) {
|
|
843
|
-
return Object.prototype.toString.call(x) === '[object Object]';
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
var XMap =
|
|
847
|
-
/*#__PURE__*/
|
|
848
|
-
function () {
|
|
849
|
-
function XMap(f, xf) {
|
|
850
|
-
this.xf = xf;
|
|
851
|
-
this.f = f;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
XMap.prototype['@@transducer/init'] = _xfBase.init;
|
|
855
|
-
XMap.prototype['@@transducer/result'] = _xfBase.result;
|
|
856
|
-
|
|
857
|
-
XMap.prototype['@@transducer/step'] = function (result, input) {
|
|
858
|
-
return this.xf['@@transducer/step'](result, this.f(input));
|
|
859
|
-
};
|
|
860
|
-
|
|
861
|
-
return XMap;
|
|
862
|
-
}();
|
|
863
|
-
|
|
864
|
-
var _xmap = function _xmap(f) {
|
|
865
|
-
return function (xf) {
|
|
866
|
-
return new XMap(f, xf);
|
|
867
|
-
};
|
|
868
|
-
};
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* Takes a function and
|
|
872
|
-
* a [functor](https://github.com/fantasyland/fantasy-land#functor),
|
|
873
|
-
* applies the function to each of the functor's values, and returns
|
|
874
|
-
* a functor of the same shape.
|
|
875
|
-
*
|
|
876
|
-
* Ramda provides suitable `map` implementations for `Array` and `Object`,
|
|
877
|
-
* so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.
|
|
878
|
-
*
|
|
879
|
-
* Dispatches to the `map` method of the second argument, if present.
|
|
880
|
-
*
|
|
881
|
-
* Acts as a transducer if a transformer is given in list position.
|
|
882
|
-
*
|
|
883
|
-
* Also treats functions as functors and will compose them together.
|
|
884
|
-
*
|
|
885
|
-
* @func
|
|
886
|
-
* @memberOf R
|
|
887
|
-
* @since v0.1.0
|
|
888
|
-
* @category List
|
|
889
|
-
* @sig Functor f => (a -> b) -> f a -> f b
|
|
890
|
-
* @param {Function} fn The function to be called on every element of the input `list`.
|
|
891
|
-
* @param {Array} list The list to be iterated over.
|
|
892
|
-
* @return {Array} The new list.
|
|
893
|
-
* @see R.transduce, R.addIndex, R.pluck, R.project
|
|
894
|
-
* @example
|
|
895
|
-
*
|
|
896
|
-
* const double = x => x * 2;
|
|
897
|
-
*
|
|
898
|
-
* R.map(double, [1, 2, 3]); //=> [2, 4, 6]
|
|
899
|
-
*
|
|
900
|
-
* R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}
|
|
901
|
-
* @symb R.map(f, [a, b]) = [f(a), f(b)]
|
|
902
|
-
* @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }
|
|
903
|
-
* @symb R.map(f, functor_o) = functor_o.map(f)
|
|
904
|
-
*/
|
|
905
|
-
|
|
906
|
-
var map =
|
|
907
|
-
/*#__PURE__*/
|
|
908
|
-
_curry2(
|
|
909
|
-
/*#__PURE__*/
|
|
910
|
-
_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
|
|
911
|
-
switch (Object.prototype.toString.call(functor)) {
|
|
912
|
-
case '[object Function]':
|
|
913
|
-
return curryN(functor.length, function () {
|
|
914
|
-
return fn.call(this, functor.apply(this, arguments));
|
|
915
|
-
});
|
|
916
|
-
|
|
917
|
-
case '[object Object]':
|
|
918
|
-
return _arrayReduce(function (acc, key) {
|
|
919
|
-
acc[key] = fn(functor[key]);
|
|
920
|
-
return acc;
|
|
921
|
-
}, {}, keys(functor));
|
|
922
|
-
|
|
923
|
-
default:
|
|
924
|
-
return _map(fn, functor);
|
|
925
|
-
}
|
|
926
|
-
}));
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* Determine if the passed argument is an integer.
|
|
930
|
-
*
|
|
931
|
-
* @private
|
|
932
|
-
* @param {*} n
|
|
933
|
-
* @category Type
|
|
934
|
-
* @return {Boolean}
|
|
935
|
-
*/
|
|
936
|
-
var _isInteger = Number.isInteger || function _isInteger(n) {
|
|
937
|
-
return n << 0 === n;
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
function _isString(x) {
|
|
941
|
-
return Object.prototype.toString.call(x) === '[object String]';
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* Returns the nth element of the given list or string. If n is negative the
|
|
946
|
-
* element at index length + n is returned.
|
|
947
|
-
*
|
|
948
|
-
* @func
|
|
949
|
-
* @memberOf R
|
|
950
|
-
* @since v0.1.0
|
|
951
|
-
* @category List
|
|
952
|
-
* @sig Number -> [a] -> a | Undefined
|
|
953
|
-
* @sig Number -> String -> String
|
|
954
|
-
* @param {Number} offset
|
|
955
|
-
* @param {*} list
|
|
956
|
-
* @return {*}
|
|
957
|
-
* @example
|
|
958
|
-
*
|
|
959
|
-
* const list = ['foo', 'bar', 'baz', 'quux'];
|
|
960
|
-
* R.nth(1, list); //=> 'bar'
|
|
961
|
-
* R.nth(-1, list); //=> 'quux'
|
|
962
|
-
* R.nth(-99, list); //=> undefined
|
|
963
|
-
*
|
|
964
|
-
* R.nth(2, 'abc'); //=> 'c'
|
|
965
|
-
* R.nth(3, 'abc'); //=> ''
|
|
966
|
-
* @symb R.nth(-1, [a, b, c]) = c
|
|
967
|
-
* @symb R.nth(0, [a, b, c]) = a
|
|
968
|
-
* @symb R.nth(1, [a, b, c]) = b
|
|
969
|
-
*/
|
|
970
|
-
|
|
971
|
-
var nth =
|
|
972
|
-
/*#__PURE__*/
|
|
973
|
-
_curry2(function nth(offset, list) {
|
|
974
|
-
var idx = offset < 0 ? list.length + offset : offset;
|
|
975
|
-
return _isString(list) ? list.charAt(idx) : list[idx];
|
|
976
|
-
});
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Returns a function that when supplied an object returns the indicated
|
|
980
|
-
* property of that object, if it exists.
|
|
981
|
-
*
|
|
982
|
-
* @func
|
|
983
|
-
* @memberOf R
|
|
984
|
-
* @since v0.1.0
|
|
985
|
-
* @category Object
|
|
986
|
-
* @typedefn Idx = String | Int | Symbol
|
|
987
|
-
* @sig Idx -> {s: a} -> a | Undefined
|
|
988
|
-
* @param {String|Number} p The property name or array index
|
|
989
|
-
* @param {Object} obj The object to query
|
|
990
|
-
* @return {*} The value at `obj.p`.
|
|
991
|
-
* @see R.path, R.props, R.pluck, R.project, R.nth
|
|
992
|
-
* @example
|
|
993
|
-
*
|
|
994
|
-
* R.prop('x', {x: 100}); //=> 100
|
|
995
|
-
* R.prop('x', {}); //=> undefined
|
|
996
|
-
* R.prop(0, [100]); //=> 100
|
|
997
|
-
* R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4
|
|
998
|
-
*/
|
|
999
|
-
|
|
1000
|
-
var prop =
|
|
1001
|
-
/*#__PURE__*/
|
|
1002
|
-
_curry2(function prop(p, obj) {
|
|
1003
|
-
if (obj == null) {
|
|
1004
|
-
return;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
return _isInteger(p) ? nth(p, obj) : obj[p];
|
|
1008
|
-
});
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* Returns a new list by plucking the same named property off all objects in
|
|
1012
|
-
* the list supplied.
|
|
1013
|
-
*
|
|
1014
|
-
* `pluck` will work on
|
|
1015
|
-
* any [functor](https://github.com/fantasyland/fantasy-land#functor) in
|
|
1016
|
-
* addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.
|
|
1017
|
-
*
|
|
1018
|
-
* @func
|
|
1019
|
-
* @memberOf R
|
|
1020
|
-
* @since v0.1.0
|
|
1021
|
-
* @category List
|
|
1022
|
-
* @sig Functor f => k -> f {k: v} -> f v
|
|
1023
|
-
* @param {Number|String} key The key name to pluck off of each object.
|
|
1024
|
-
* @param {Array} f The array or functor to consider.
|
|
1025
|
-
* @return {Array} The list of values for the given key.
|
|
1026
|
-
* @see R.project, R.prop, R.props
|
|
1027
|
-
* @example
|
|
1028
|
-
*
|
|
1029
|
-
* var getAges = R.pluck('age');
|
|
1030
|
-
* getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]
|
|
1031
|
-
*
|
|
1032
|
-
* R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]
|
|
1033
|
-
* R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}
|
|
1034
|
-
* @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]
|
|
1035
|
-
* @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]
|
|
1036
|
-
*/
|
|
1037
|
-
|
|
1038
|
-
var pluck =
|
|
1039
|
-
/*#__PURE__*/
|
|
1040
|
-
_curry2(function pluck(p, list) {
|
|
1041
|
-
return map(prop(p), list);
|
|
1042
|
-
});
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* Tests whether or not an object is similar to an array.
|
|
1046
|
-
*
|
|
1047
|
-
* @private
|
|
1048
|
-
* @category Type
|
|
1049
|
-
* @category List
|
|
1050
|
-
* @sig * -> Boolean
|
|
1051
|
-
* @param {*} x The object to test.
|
|
1052
|
-
* @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.
|
|
1053
|
-
* @example
|
|
1054
|
-
*
|
|
1055
|
-
* _isArrayLike([]); //=> true
|
|
1056
|
-
* _isArrayLike(true); //=> false
|
|
1057
|
-
* _isArrayLike({}); //=> false
|
|
1058
|
-
* _isArrayLike({length: 10}); //=> false
|
|
1059
|
-
* _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
|
|
1060
|
-
* _isArrayLike({nodeType: 1, length: 1}) // => false
|
|
1061
|
-
*/
|
|
1062
|
-
|
|
1063
|
-
var _isArrayLike =
|
|
1064
|
-
/*#__PURE__*/
|
|
1065
|
-
_curry1(function isArrayLike(x) {
|
|
1066
|
-
if (_isArray(x)) {
|
|
1067
|
-
return true;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
if (!x) {
|
|
1071
|
-
return false;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
if (typeof x !== 'object') {
|
|
1075
|
-
return false;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
if (_isString(x)) {
|
|
1079
|
-
return false;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
if (x.length === 0) {
|
|
1083
|
-
return true;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
if (x.length > 0) {
|
|
1087
|
-
return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
return false;
|
|
1091
|
-
});
|
|
1092
|
-
|
|
1093
|
-
var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';
|
|
1094
|
-
function _createReduce(arrayReduce, methodReduce, iterableReduce) {
|
|
1095
|
-
return function _reduce(xf, acc, list) {
|
|
1096
|
-
if (_isArrayLike(list)) {
|
|
1097
|
-
return arrayReduce(xf, acc, list);
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
if (list == null) {
|
|
1101
|
-
return acc;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
if (typeof list['fantasy-land/reduce'] === 'function') {
|
|
1105
|
-
return methodReduce(xf, acc, list, 'fantasy-land/reduce');
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
if (list[symIterator] != null) {
|
|
1109
|
-
return iterableReduce(xf, acc, list[symIterator]());
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
if (typeof list.next === 'function') {
|
|
1113
|
-
return iterableReduce(xf, acc, list);
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
if (typeof list.reduce === 'function') {
|
|
1117
|
-
return methodReduce(xf, acc, list, 'reduce');
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
throw new TypeError('reduce: list must be array or iterable');
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
function _iterableReduce(reducer, acc, iter) {
|
|
1125
|
-
var step = iter.next();
|
|
1126
|
-
|
|
1127
|
-
while (!step.done) {
|
|
1128
|
-
acc = reducer(acc, step.value);
|
|
1129
|
-
step = iter.next();
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
return acc;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
function _methodReduce(reducer, acc, obj, methodName) {
|
|
1136
|
-
return obj[methodName](reducer, acc);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
var _reduce =
|
|
1140
|
-
/*#__PURE__*/
|
|
1141
|
-
_createReduce(_arrayReduce, _methodReduce, _iterableReduce);
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
* ap applies a list of functions to a list of values.
|
|
1145
|
-
*
|
|
1146
|
-
* Dispatches to the `ap` method of the first argument, if present. Also
|
|
1147
|
-
* treats curried functions as applicatives.
|
|
1148
|
-
*
|
|
1149
|
-
* @func
|
|
1150
|
-
* @memberOf R
|
|
1151
|
-
* @since v0.3.0
|
|
1152
|
-
* @category Function
|
|
1153
|
-
* @sig [a -> b] -> [a] -> [b]
|
|
1154
|
-
* @sig Apply f => f (a -> b) -> f a -> f b
|
|
1155
|
-
* @sig (r -> a -> b) -> (r -> a) -> (r -> b)
|
|
1156
|
-
* @param {*} applyF
|
|
1157
|
-
* @param {*} applyX
|
|
1158
|
-
* @return {*}
|
|
1159
|
-
* @example
|
|
1160
|
-
*
|
|
1161
|
-
* R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6]
|
|
1162
|
-
* R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"]
|
|
1163
|
-
*
|
|
1164
|
-
* // R.ap can also be used as S combinator
|
|
1165
|
-
* // when only two functions are passed
|
|
1166
|
-
* R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA'
|
|
1167
|
-
* @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)]
|
|
1168
|
-
*/
|
|
1169
|
-
|
|
1170
|
-
var ap =
|
|
1171
|
-
/*#__PURE__*/
|
|
1172
|
-
_curry2(function ap(applyF, applyX) {
|
|
1173
|
-
return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) {
|
|
1174
|
-
return applyF(x)(applyX(x));
|
|
1175
|
-
} : _reduce(function (acc, f) {
|
|
1176
|
-
return _concat(acc, map(f, applyX));
|
|
1177
|
-
}, [], applyF);
|
|
1178
|
-
});
|
|
1179
|
-
|
|
1180
|
-
/**
|
|
1181
|
-
* Makes a shallow clone of an object, setting or overriding the specified
|
|
1182
|
-
* property with the given value. Note that this copies and flattens prototype
|
|
1183
|
-
* properties onto the new object as well. All non-primitive properties are
|
|
1184
|
-
* copied by reference.
|
|
1185
|
-
*
|
|
1186
|
-
* @private
|
|
1187
|
-
* @param {String|Number} prop The property name to set
|
|
1188
|
-
* @param {*} val The new value
|
|
1189
|
-
* @param {Object|Array} obj The object to clone
|
|
1190
|
-
* @return {Object|Array} A new object equivalent to the original except for the changed property.
|
|
1191
|
-
*/
|
|
1192
|
-
|
|
1193
|
-
function _assoc(prop, val, obj) {
|
|
1194
|
-
if (_isInteger(prop) && _isArray(obj)) {
|
|
1195
|
-
var arr = [].concat(obj);
|
|
1196
|
-
arr[prop] = val;
|
|
1197
|
-
return arr;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
var result = {};
|
|
1201
|
-
|
|
1202
|
-
for (var p in obj) {
|
|
1203
|
-
result[p] = obj[p];
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
result[prop] = val;
|
|
1207
|
-
return result;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
/**
|
|
1211
|
-
* Checks if the input value is `null` or `undefined`.
|
|
1212
|
-
*
|
|
1213
|
-
* @func
|
|
1214
|
-
* @memberOf R
|
|
1215
|
-
* @since v0.9.0
|
|
1216
|
-
* @category Type
|
|
1217
|
-
* @sig * -> Boolean
|
|
1218
|
-
* @param {*} x The value to test.
|
|
1219
|
-
* @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.
|
|
1220
|
-
* @example
|
|
1221
|
-
*
|
|
1222
|
-
* R.isNil(null); //=> true
|
|
1223
|
-
* R.isNil(undefined); //=> true
|
|
1224
|
-
* R.isNil(0); //=> false
|
|
1225
|
-
* R.isNil([]); //=> false
|
|
1226
|
-
*/
|
|
1227
|
-
|
|
1228
|
-
var isNil =
|
|
1229
|
-
/*#__PURE__*/
|
|
1230
|
-
_curry1(function isNil(x) {
|
|
1231
|
-
return x == null;
|
|
1232
|
-
});
|
|
1233
|
-
|
|
1234
|
-
/**
|
|
1235
|
-
* Makes a shallow clone of an object, setting or overriding the nodes required
|
|
1236
|
-
* to create the given path, and placing the specific value at the tail end of
|
|
1237
|
-
* that path. Note that this copies and flattens prototype properties onto the
|
|
1238
|
-
* new object as well. All non-primitive properties are copied by reference.
|
|
1239
|
-
*
|
|
1240
|
-
* @func
|
|
1241
|
-
* @memberOf R
|
|
1242
|
-
* @since v0.8.0
|
|
1243
|
-
* @category Object
|
|
1244
|
-
* @typedefn Idx = String | Int | Symbol
|
|
1245
|
-
* @sig [Idx] -> a -> {a} -> {a}
|
|
1246
|
-
* @param {Array} path the path to set
|
|
1247
|
-
* @param {*} val The new value
|
|
1248
|
-
* @param {Object} obj The object to clone
|
|
1249
|
-
* @return {Object} A new object equivalent to the original except along the specified path.
|
|
1250
|
-
* @see R.dissocPath
|
|
1251
|
-
* @example
|
|
1252
|
-
*
|
|
1253
|
-
* R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}
|
|
1254
|
-
*
|
|
1255
|
-
* // Any missing or non-object keys in path will be overridden
|
|
1256
|
-
* R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}
|
|
1257
|
-
*/
|
|
1258
|
-
|
|
1259
|
-
var assocPath =
|
|
1260
|
-
/*#__PURE__*/
|
|
1261
|
-
_curry3(function assocPath(path, val, obj) {
|
|
1262
|
-
if (path.length === 0) {
|
|
1263
|
-
return val;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
var idx = path[0];
|
|
1267
|
-
|
|
1268
|
-
if (path.length > 1) {
|
|
1269
|
-
var nextObj = !isNil(obj) && _has(idx, obj) && typeof obj[idx] === 'object' ? obj[idx] : _isInteger(path[1]) ? [] : {};
|
|
1270
|
-
val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
return _assoc(idx, val, obj);
|
|
1274
|
-
});
|
|
1275
|
-
|
|
1276
|
-
/**
|
|
1277
|
-
* Makes a shallow clone of an object, setting or overriding the specified
|
|
1278
|
-
* property with the given value. Note that this copies and flattens prototype
|
|
1279
|
-
* properties onto the new object as well. All non-primitive properties are
|
|
1280
|
-
* copied by reference.
|
|
1281
|
-
*
|
|
1282
|
-
* @func
|
|
1283
|
-
* @memberOf R
|
|
1284
|
-
* @since v0.8.0
|
|
1285
|
-
* @category Object
|
|
1286
|
-
* @typedefn Idx = String | Int
|
|
1287
|
-
* @sig Idx -> a -> {k: v} -> {k: v}
|
|
1288
|
-
* @param {String|Number} prop The property name to set
|
|
1289
|
-
* @param {*} val The new value
|
|
1290
|
-
* @param {Object} obj The object to clone
|
|
1291
|
-
* @return {Object} A new object equivalent to the original except for the changed property.
|
|
1292
|
-
* @see R.dissoc, R.pick
|
|
1293
|
-
* @example
|
|
1294
|
-
*
|
|
1295
|
-
* R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
|
|
1296
|
-
*/
|
|
1297
|
-
|
|
1298
|
-
var assoc =
|
|
1299
|
-
/*#__PURE__*/
|
|
1300
|
-
_curry3(function assoc(prop, val, obj) {
|
|
1301
|
-
return assocPath([prop], val, obj);
|
|
1302
|
-
});
|
|
1303
|
-
|
|
1304
|
-
function _isFunction(x) {
|
|
1305
|
-
var type = Object.prototype.toString.call(x);
|
|
1306
|
-
return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
/**
|
|
1310
|
-
* "lifts" a function to be the specified arity, so that it may "map over" that
|
|
1311
|
-
* many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).
|
|
1312
|
-
*
|
|
1313
|
-
* @func
|
|
1314
|
-
* @memberOf R
|
|
1315
|
-
* @since v0.7.0
|
|
1316
|
-
* @category Function
|
|
1317
|
-
* @sig Number -> (*... -> *) -> ([*]... -> [*])
|
|
1318
|
-
* @param {Function} fn The function to lift into higher context
|
|
1319
|
-
* @return {Function} The lifted function.
|
|
1320
|
-
* @see R.lift, R.ap
|
|
1321
|
-
* @example
|
|
1322
|
-
*
|
|
1323
|
-
* const madd3 = R.liftN(3, (...args) => R.sum(args));
|
|
1324
|
-
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
|
|
1325
|
-
*/
|
|
1326
|
-
|
|
1327
|
-
var liftN =
|
|
1328
|
-
/*#__PURE__*/
|
|
1329
|
-
_curry2(function liftN(arity, fn) {
|
|
1330
|
-
var lifted = curryN(arity, fn);
|
|
1331
|
-
return curryN(arity, function () {
|
|
1332
|
-
return _arrayReduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));
|
|
1333
|
-
});
|
|
1334
|
-
});
|
|
1335
|
-
|
|
1336
|
-
/**
|
|
1337
|
-
* "lifts" a function of arity >= 1 so that it may "map over" a list, Function or other
|
|
1338
|
-
* object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).
|
|
1339
|
-
*
|
|
1340
|
-
* @func
|
|
1341
|
-
* @memberOf R
|
|
1342
|
-
* @since v0.7.0
|
|
1343
|
-
* @category Function
|
|
1344
|
-
* @sig (*... -> *) -> ([*]... -> [*])
|
|
1345
|
-
* @param {Function} fn The function to lift into higher context
|
|
1346
|
-
* @return {Function} The lifted function.
|
|
1347
|
-
* @see R.liftN
|
|
1348
|
-
* @example
|
|
1349
|
-
*
|
|
1350
|
-
* const madd3 = R.lift((a, b, c) => a + b + c);
|
|
1351
|
-
*
|
|
1352
|
-
* madd3([100, 200], [30, 40], [5, 6, 7]); //=> [135, 136, 137, 145, 146, 147, 235, 236, 237, 245, 246, 247]
|
|
1353
|
-
*
|
|
1354
|
-
* const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);
|
|
1355
|
-
*
|
|
1356
|
-
* madd5([10, 20], [1], [2, 3], [4], [100, 200]); //=> [117, 217, 118, 218, 127, 227, 128, 228]
|
|
1357
|
-
*/
|
|
1358
|
-
|
|
1359
|
-
var lift =
|
|
1360
|
-
/*#__PURE__*/
|
|
1361
|
-
_curry1(function lift(fn) {
|
|
1362
|
-
return liftN(fn.length, fn);
|
|
1363
|
-
});
|
|
1364
|
-
|
|
1365
|
-
/**
|
|
1366
|
-
* Returns the first argument if it is truthy, otherwise the second argument.
|
|
1367
|
-
* Acts as the boolean `or` statement if both inputs are `Boolean`s.
|
|
1368
|
-
*
|
|
1369
|
-
* @func
|
|
1370
|
-
* @memberOf R
|
|
1371
|
-
* @since v0.1.0
|
|
1372
|
-
* @category Logic
|
|
1373
|
-
* @sig a -> b -> a | b
|
|
1374
|
-
* @param {Any} a
|
|
1375
|
-
* @param {Any} b
|
|
1376
|
-
* @return {Any}
|
|
1377
|
-
* @see R.either, R.and
|
|
1378
|
-
* @example
|
|
1379
|
-
*
|
|
1380
|
-
* R.or(true, true); //=> true
|
|
1381
|
-
* R.or(true, false); //=> true
|
|
1382
|
-
* R.or(false, true); //=> true
|
|
1383
|
-
* R.or(false, false); //=> false
|
|
1384
|
-
*/
|
|
1385
|
-
|
|
1386
|
-
var or =
|
|
1387
|
-
/*#__PURE__*/
|
|
1388
|
-
_curry2(function or(a, b) {
|
|
1389
|
-
return a || b;
|
|
1390
|
-
});
|
|
1391
|
-
|
|
1392
|
-
/**
|
|
1393
|
-
* A function wrapping calls to the two functions in an `||` operation,
|
|
1394
|
-
* returning the result of the first function if it is truth-y and the result
|
|
1395
|
-
* of the second function otherwise. Note that this is short-circuited,
|
|
1396
|
-
* meaning that the second function will not be invoked if the first returns a
|
|
1397
|
-
* truth-y value.
|
|
1398
|
-
*
|
|
1399
|
-
* In addition to functions, `R.either` also accepts any fantasy-land compatible
|
|
1400
|
-
* applicative functor.
|
|
1401
|
-
*
|
|
1402
|
-
* @func
|
|
1403
|
-
* @memberOf R
|
|
1404
|
-
* @since v0.12.0
|
|
1405
|
-
* @category Logic
|
|
1406
|
-
* @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)
|
|
1407
|
-
* @param {Function} f a predicate
|
|
1408
|
-
* @param {Function} g another predicate
|
|
1409
|
-
* @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together.
|
|
1410
|
-
* @see R.both, R.anyPass, R.or
|
|
1411
|
-
* @example
|
|
1412
|
-
*
|
|
1413
|
-
* const gt10 = x => x > 10;
|
|
1414
|
-
* const even = x => x % 2 === 0;
|
|
1415
|
-
* const f = R.either(gt10, even);
|
|
1416
|
-
* f(101); //=> true
|
|
1417
|
-
* f(8); //=> true
|
|
1418
|
-
*
|
|
1419
|
-
* R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55)
|
|
1420
|
-
* R.either([false, false, 'a'], [11]) // => [11, 11, "a"]
|
|
1421
|
-
*/
|
|
1422
|
-
|
|
1423
|
-
var either =
|
|
1424
|
-
/*#__PURE__*/
|
|
1425
|
-
_curry2(function either(f, g) {
|
|
1426
|
-
return _isFunction(f) ? function _either() {
|
|
1427
|
-
return f.apply(this, arguments) || g.apply(this, arguments);
|
|
1428
|
-
} : lift(or)(f, g);
|
|
1429
|
-
});
|
|
1430
|
-
|
|
1431
|
-
/**
|
|
1432
|
-
* Tests whether or not an object is a typed array.
|
|
1433
|
-
*
|
|
1434
|
-
* @private
|
|
1435
|
-
* @param {*} val The object to test.
|
|
1436
|
-
* @return {Boolean} `true` if `val` is a typed array, `false` otherwise.
|
|
1437
|
-
* @example
|
|
1438
|
-
*
|
|
1439
|
-
* _isTypedArray(new Uint8Array([])); //=> true
|
|
1440
|
-
* _isTypedArray(new Float32Array([])); //=> true
|
|
1441
|
-
* _isTypedArray([]); //=> false
|
|
1442
|
-
* _isTypedArray(null); //=> false
|
|
1443
|
-
* _isTypedArray({}); //=> false
|
|
1444
|
-
*/
|
|
1445
|
-
function _isTypedArray(val) {
|
|
1446
|
-
var type = Object.prototype.toString.call(val);
|
|
1447
|
-
return type === '[object Uint8ClampedArray]' || type === '[object Int8Array]' || type === '[object Uint8Array]' || type === '[object Int16Array]' || type === '[object Uint16Array]' || type === '[object Int32Array]' || type === '[object Uint32Array]' || type === '[object Float32Array]' || type === '[object Float64Array]' || type === '[object BigInt64Array]' || type === '[object BigUint64Array]';
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
/**
|
|
1451
|
-
* Returns the empty value of its argument's type. Ramda defines the empty
|
|
1452
|
-
* value of Array (`[]`), Object (`{}`), String (`''`),
|
|
1453
|
-
* TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other
|
|
1454
|
-
* types are supported if they define `<Type>.empty`,
|
|
1455
|
-
* `<Type>.prototype.empty` or implement the
|
|
1456
|
-
* [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).
|
|
1457
|
-
*
|
|
1458
|
-
* Dispatches to the `empty` method of the first argument, if present.
|
|
1459
|
-
*
|
|
1460
|
-
* @func
|
|
1461
|
-
* @memberOf R
|
|
1462
|
-
* @since v0.3.0
|
|
1463
|
-
* @category Function
|
|
1464
|
-
* @sig a -> a
|
|
1465
|
-
* @param {*} x
|
|
1466
|
-
* @return {*}
|
|
1467
|
-
* @example
|
|
1468
|
-
*
|
|
1469
|
-
* R.empty(Just(42)); //=> Nothing()
|
|
1470
|
-
* R.empty([1, 2, 3]); //=> []
|
|
1471
|
-
* R.empty('unicorns'); //=> ''
|
|
1472
|
-
* R.empty({x: 1, y: 2}); //=> {}
|
|
1473
|
-
* R.empty(Uint8Array.from('123')); //=> Uint8Array []
|
|
1474
|
-
*/
|
|
1475
|
-
|
|
1476
|
-
var empty =
|
|
1477
|
-
/*#__PURE__*/
|
|
1478
|
-
_curry1(function empty(x) {
|
|
1479
|
-
return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () {
|
|
1480
|
-
return arguments;
|
|
1481
|
-
}() : _isTypedArray(x) ? x.constructor.from('') : void 0 // else
|
|
1482
|
-
;
|
|
1483
|
-
});
|
|
1484
|
-
|
|
1485
|
-
function _objectAssign(target) {
|
|
1486
|
-
if (target == null) {
|
|
1487
|
-
throw new TypeError('Cannot convert undefined or null to object');
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
var output = Object(target);
|
|
1491
|
-
var idx = 1;
|
|
1492
|
-
var length = arguments.length;
|
|
1493
|
-
|
|
1494
|
-
while (idx < length) {
|
|
1495
|
-
var source = arguments[idx];
|
|
1496
|
-
|
|
1497
|
-
if (source != null) {
|
|
1498
|
-
for (var nextKey in source) {
|
|
1499
|
-
if (_has(nextKey, source)) {
|
|
1500
|
-
output[nextKey] = source[nextKey];
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
idx += 1;
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
return output;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
var _objectAssign$1 = typeof Object.assign === 'function' ? Object.assign : _objectAssign;
|
|
1512
|
-
|
|
1513
|
-
/**
|
|
1514
|
-
* See if an object (i.e. `val`) is an instance of the supplied constructor. This
|
|
1515
|
-
* function will check up the inheritance chain, if any.
|
|
1516
|
-
* If `val` was created using `Object.create`, `R.is(Object, val) === true`.
|
|
1517
|
-
*
|
|
1518
|
-
* @func
|
|
1519
|
-
* @memberOf R
|
|
1520
|
-
* @since v0.3.0
|
|
1521
|
-
* @category Type
|
|
1522
|
-
* @sig (* -> {*}) -> a -> Boolean
|
|
1523
|
-
* @param {Object} ctor A constructor
|
|
1524
|
-
* @param {*} val The value to test
|
|
1525
|
-
* @return {Boolean}
|
|
1526
|
-
* @example
|
|
1527
|
-
*
|
|
1528
|
-
* R.is(Object, {}); //=> true
|
|
1529
|
-
* R.is(Number, 1); //=> true
|
|
1530
|
-
* R.is(Object, 1); //=> false
|
|
1531
|
-
* R.is(String, 's'); //=> true
|
|
1532
|
-
* R.is(String, new String('')); //=> true
|
|
1533
|
-
* R.is(Object, new String('')); //=> true
|
|
1534
|
-
* R.is(Object, 's'); //=> false
|
|
1535
|
-
* R.is(Number, {}); //=> false
|
|
1536
|
-
*/
|
|
1537
|
-
|
|
1538
|
-
var is =
|
|
1539
|
-
/*#__PURE__*/
|
|
1540
|
-
_curry2(function is(Ctor, val) {
|
|
1541
|
-
return val instanceof Ctor || val != null && (val.constructor === Ctor || Ctor.name === 'Object' && typeof val === 'object');
|
|
1542
|
-
});
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* Returns `true` if the given value is its type's empty value; `false`
|
|
1546
|
-
* otherwise.
|
|
1547
|
-
*
|
|
1548
|
-
* @func
|
|
1549
|
-
* @memberOf R
|
|
1550
|
-
* @since v0.1.0
|
|
1551
|
-
* @category Logic
|
|
1552
|
-
* @sig a -> Boolean
|
|
1553
|
-
* @param {*} x
|
|
1554
|
-
* @return {Boolean}
|
|
1555
|
-
* @see R.empty
|
|
1556
|
-
* @example
|
|
1557
|
-
*
|
|
1558
|
-
* R.isEmpty([1, 2, 3]); //=> false
|
|
1559
|
-
* R.isEmpty([]); //=> true
|
|
1560
|
-
* R.isEmpty(''); //=> true
|
|
1561
|
-
* R.isEmpty(null); //=> false
|
|
1562
|
-
* R.isEmpty({}); //=> true
|
|
1563
|
-
* R.isEmpty({length: 0}); //=> false
|
|
1564
|
-
* R.isEmpty(Uint8Array.from('')); //=> true
|
|
1565
|
-
*/
|
|
1566
|
-
|
|
1567
|
-
var isEmpty =
|
|
1568
|
-
/*#__PURE__*/
|
|
1569
|
-
_curry1(function isEmpty(x) {
|
|
1570
|
-
return x != null && equals(x, empty(x));
|
|
1571
|
-
});
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* Create a new object with the own properties of the first object merged with
|
|
1575
|
-
* the own properties of the second object. If a key exists in both objects,
|
|
1576
|
-
* the value from the first object will be used.
|
|
1577
|
-
*
|
|
1578
|
-
* @func
|
|
1579
|
-
* @memberOf R
|
|
1580
|
-
* @since v0.26.0
|
|
1581
|
-
* @category Object
|
|
1582
|
-
* @sig {k: v} -> {k: v} -> {k: v}
|
|
1583
|
-
* @param {Object} l
|
|
1584
|
-
* @param {Object} r
|
|
1585
|
-
* @return {Object}
|
|
1586
|
-
* @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey
|
|
1587
|
-
* @example
|
|
1588
|
-
*
|
|
1589
|
-
* R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 });
|
|
1590
|
-
* //=> { 'name': 'fred', 'age': 40 }
|
|
1591
|
-
*
|
|
1592
|
-
* const resetToDefault = R.mergeLeft({x: 0});
|
|
1593
|
-
* resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}
|
|
1594
|
-
* @symb R.mergeLeft(a, b) = {...b, ...a}
|
|
1595
|
-
*/
|
|
1596
|
-
|
|
1597
|
-
var mergeLeft =
|
|
1598
|
-
/*#__PURE__*/
|
|
1599
|
-
_curry2(function mergeLeft(l, r) {
|
|
1600
|
-
return _objectAssign$1({}, r, l);
|
|
1601
|
-
});
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Replace a substring or regex match in a string with a replacement.
|
|
1605
|
-
*
|
|
1606
|
-
* The first two parameters correspond to the parameters of the
|
|
1607
|
-
* `String.prototype.replace()` function, so the second parameter can also be a
|
|
1608
|
-
* function.
|
|
1609
|
-
*
|
|
1610
|
-
* @func
|
|
1611
|
-
* @memberOf R
|
|
1612
|
-
* @since v0.7.0
|
|
1613
|
-
* @category String
|
|
1614
|
-
* @sig RegExp|String -> String -> String -> String
|
|
1615
|
-
* @param {RegExp|String} pattern A regular expression or a substring to match.
|
|
1616
|
-
* @param {String} replacement The string to replace the matches with.
|
|
1617
|
-
* @param {String} str The String to do the search and replacement in.
|
|
1618
|
-
* @return {String} The result.
|
|
1619
|
-
* @example
|
|
1620
|
-
*
|
|
1621
|
-
* R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo'
|
|
1622
|
-
* R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo'
|
|
1623
|
-
*
|
|
1624
|
-
* // Use the "g" (global) flag to replace all occurrences:
|
|
1625
|
-
* R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar'
|
|
1626
|
-
*/
|
|
1627
|
-
|
|
1628
|
-
var replace$1 =
|
|
1629
|
-
/*#__PURE__*/
|
|
1630
|
-
_curry3(function replace(regex, replacement, str) {
|
|
1631
|
-
return str.replace(regex, replacement);
|
|
1632
|
-
});
|
|
1633
|
-
|
|
1634
84
|
function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
1635
85
|
if (source == null) return {};
|
|
1636
86
|
var target = {};
|
|
@@ -14876,7 +13326,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
14876
13326
|
onCreate: function onCreate(instance) {
|
|
14877
13327
|
var _instance$popper$firs;
|
|
14878
13328
|
setInstance(instance);
|
|
14879
|
-
(_instance$popper$firs = instance.popper.firstElementChild) === null || _instance$popper$firs === void 0
|
|
13329
|
+
(_instance$popper$firs = instance.popper.firstElementChild) === null || _instance$popper$firs === void 0 || _instance$popper$firs.setAttribute("data-cy", "tooltip-box");
|
|
14880
13330
|
}
|
|
14881
13331
|
}, localProps, otherProps), /*#__PURE__*/React__default.isValidElement(children) ? children : /*#__PURE__*/React__default.createElement("span", null, children));
|
|
14882
13332
|
};
|
|
@@ -16650,7 +15100,7 @@ var useNavPrompt = function useNavPrompt(_ref) {
|
|
|
16650
15100
|
var continueNavigation = function continueNavigation() {
|
|
16651
15101
|
if (isBlocked && unblockRef.current) {
|
|
16652
15102
|
var _unblockRef$current;
|
|
16653
|
-
(_unblockRef$current = unblockRef.current) === null || _unblockRef$current === void 0
|
|
15103
|
+
(_unblockRef$current = unblockRef.current) === null || _unblockRef$current === void 0 || _unblockRef$current.call(unblockRef);
|
|
16654
15104
|
setIsBlocked(false);
|
|
16655
15105
|
if (navRef.current) {
|
|
16656
15106
|
var _navRef$current = navRef.current,
|
|
@@ -17507,6 +15957,539 @@ var weekOfYear$1 = {exports: {}};
|
|
|
17507
15957
|
|
|
17508
15958
|
var weekOfYear = weekOfYear$1.exports;
|
|
17509
15959
|
|
|
15960
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
15961
|
+
var shams = function hasSymbols() {
|
|
15962
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
15963
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
15964
|
+
|
|
15965
|
+
var obj = {};
|
|
15966
|
+
var sym = Symbol('test');
|
|
15967
|
+
var symObj = Object(sym);
|
|
15968
|
+
if (typeof sym === 'string') { return false; }
|
|
15969
|
+
|
|
15970
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
15971
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
15972
|
+
|
|
15973
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
15974
|
+
// if (sym instanceof Symbol) { return false; }
|
|
15975
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
15976
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
15977
|
+
|
|
15978
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
15979
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
15980
|
+
|
|
15981
|
+
var symVal = 42;
|
|
15982
|
+
obj[sym] = symVal;
|
|
15983
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
15984
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
15985
|
+
|
|
15986
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
15987
|
+
|
|
15988
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
15989
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
15990
|
+
|
|
15991
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
15992
|
+
|
|
15993
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
15994
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
15995
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
15996
|
+
}
|
|
15997
|
+
|
|
15998
|
+
return true;
|
|
15999
|
+
};
|
|
16000
|
+
|
|
16001
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
16002
|
+
var hasSymbolSham = shams;
|
|
16003
|
+
|
|
16004
|
+
var hasSymbols$1 = function hasNativeSymbols() {
|
|
16005
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
16006
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
16007
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
16008
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
16009
|
+
|
|
16010
|
+
return hasSymbolSham();
|
|
16011
|
+
};
|
|
16012
|
+
|
|
16013
|
+
/* eslint no-invalid-this: 1 */
|
|
16014
|
+
|
|
16015
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
16016
|
+
var slice$1 = Array.prototype.slice;
|
|
16017
|
+
var toStr = Object.prototype.toString;
|
|
16018
|
+
var funcType = '[object Function]';
|
|
16019
|
+
|
|
16020
|
+
var implementation$1 = function bind(that) {
|
|
16021
|
+
var target = this;
|
|
16022
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
|
16023
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
16024
|
+
}
|
|
16025
|
+
var args = slice$1.call(arguments, 1);
|
|
16026
|
+
|
|
16027
|
+
var bound;
|
|
16028
|
+
var binder = function () {
|
|
16029
|
+
if (this instanceof bound) {
|
|
16030
|
+
var result = target.apply(
|
|
16031
|
+
this,
|
|
16032
|
+
args.concat(slice$1.call(arguments))
|
|
16033
|
+
);
|
|
16034
|
+
if (Object(result) === result) {
|
|
16035
|
+
return result;
|
|
16036
|
+
}
|
|
16037
|
+
return this;
|
|
16038
|
+
} else {
|
|
16039
|
+
return target.apply(
|
|
16040
|
+
that,
|
|
16041
|
+
args.concat(slice$1.call(arguments))
|
|
16042
|
+
);
|
|
16043
|
+
}
|
|
16044
|
+
};
|
|
16045
|
+
|
|
16046
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
16047
|
+
var boundArgs = [];
|
|
16048
|
+
for (var i = 0; i < boundLength; i++) {
|
|
16049
|
+
boundArgs.push('$' + i);
|
|
16050
|
+
}
|
|
16051
|
+
|
|
16052
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
16053
|
+
|
|
16054
|
+
if (target.prototype) {
|
|
16055
|
+
var Empty = function Empty() {};
|
|
16056
|
+
Empty.prototype = target.prototype;
|
|
16057
|
+
bound.prototype = new Empty();
|
|
16058
|
+
Empty.prototype = null;
|
|
16059
|
+
}
|
|
16060
|
+
|
|
16061
|
+
return bound;
|
|
16062
|
+
};
|
|
16063
|
+
|
|
16064
|
+
var implementation = implementation$1;
|
|
16065
|
+
|
|
16066
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
16067
|
+
|
|
16068
|
+
var bind$1 = functionBind;
|
|
16069
|
+
|
|
16070
|
+
var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
|
|
16071
|
+
|
|
16072
|
+
var undefined$1;
|
|
16073
|
+
|
|
16074
|
+
var $SyntaxError = SyntaxError;
|
|
16075
|
+
var $Function = Function;
|
|
16076
|
+
var $TypeError = TypeError;
|
|
16077
|
+
|
|
16078
|
+
// eslint-disable-next-line consistent-return
|
|
16079
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
16080
|
+
try {
|
|
16081
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
16082
|
+
} catch (e) {}
|
|
16083
|
+
};
|
|
16084
|
+
|
|
16085
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
16086
|
+
if ($gOPD) {
|
|
16087
|
+
try {
|
|
16088
|
+
$gOPD({}, '');
|
|
16089
|
+
} catch (e) {
|
|
16090
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
16091
|
+
}
|
|
16092
|
+
}
|
|
16093
|
+
|
|
16094
|
+
var throwTypeError = function () {
|
|
16095
|
+
throw new $TypeError();
|
|
16096
|
+
};
|
|
16097
|
+
var ThrowTypeError = $gOPD
|
|
16098
|
+
? (function () {
|
|
16099
|
+
try {
|
|
16100
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
16101
|
+
arguments.callee; // IE 8 does not throw here
|
|
16102
|
+
return throwTypeError;
|
|
16103
|
+
} catch (calleeThrows) {
|
|
16104
|
+
try {
|
|
16105
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
16106
|
+
return $gOPD(arguments, 'callee').get;
|
|
16107
|
+
} catch (gOPDthrows) {
|
|
16108
|
+
return throwTypeError;
|
|
16109
|
+
}
|
|
16110
|
+
}
|
|
16111
|
+
}())
|
|
16112
|
+
: throwTypeError;
|
|
16113
|
+
|
|
16114
|
+
var hasSymbols = hasSymbols$1();
|
|
16115
|
+
|
|
16116
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
16117
|
+
|
|
16118
|
+
var needsEval = {};
|
|
16119
|
+
|
|
16120
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
|
|
16121
|
+
|
|
16122
|
+
var INTRINSICS = {
|
|
16123
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
16124
|
+
'%Array%': Array,
|
|
16125
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
16126
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
16127
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
16128
|
+
'%AsyncFunction%': needsEval,
|
|
16129
|
+
'%AsyncGenerator%': needsEval,
|
|
16130
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
16131
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
16132
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
16133
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
16134
|
+
'%Boolean%': Boolean,
|
|
16135
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
16136
|
+
'%Date%': Date,
|
|
16137
|
+
'%decodeURI%': decodeURI,
|
|
16138
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
16139
|
+
'%encodeURI%': encodeURI,
|
|
16140
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
16141
|
+
'%Error%': Error,
|
|
16142
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
16143
|
+
'%EvalError%': EvalError,
|
|
16144
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
16145
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
16146
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
16147
|
+
'%Function%': $Function,
|
|
16148
|
+
'%GeneratorFunction%': needsEval,
|
|
16149
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
16150
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
16151
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
16152
|
+
'%isFinite%': isFinite,
|
|
16153
|
+
'%isNaN%': isNaN,
|
|
16154
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
16155
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
16156
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
16157
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
16158
|
+
'%Math%': Math,
|
|
16159
|
+
'%Number%': Number,
|
|
16160
|
+
'%Object%': Object,
|
|
16161
|
+
'%parseFloat%': parseFloat,
|
|
16162
|
+
'%parseInt%': parseInt,
|
|
16163
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
16164
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
16165
|
+
'%RangeError%': RangeError,
|
|
16166
|
+
'%ReferenceError%': ReferenceError,
|
|
16167
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
16168
|
+
'%RegExp%': RegExp,
|
|
16169
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
16170
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
16171
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
16172
|
+
'%String%': String,
|
|
16173
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
16174
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
16175
|
+
'%SyntaxError%': $SyntaxError,
|
|
16176
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
16177
|
+
'%TypedArray%': TypedArray,
|
|
16178
|
+
'%TypeError%': $TypeError,
|
|
16179
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
16180
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
16181
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
16182
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
16183
|
+
'%URIError%': URIError,
|
|
16184
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
16185
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
16186
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
16187
|
+
};
|
|
16188
|
+
|
|
16189
|
+
var doEval = function doEval(name) {
|
|
16190
|
+
var value;
|
|
16191
|
+
if (name === '%AsyncFunction%') {
|
|
16192
|
+
value = getEvalledConstructor('async function () {}');
|
|
16193
|
+
} else if (name === '%GeneratorFunction%') {
|
|
16194
|
+
value = getEvalledConstructor('function* () {}');
|
|
16195
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
16196
|
+
value = getEvalledConstructor('async function* () {}');
|
|
16197
|
+
} else if (name === '%AsyncGenerator%') {
|
|
16198
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
16199
|
+
if (fn) {
|
|
16200
|
+
value = fn.prototype;
|
|
16201
|
+
}
|
|
16202
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
16203
|
+
var gen = doEval('%AsyncGenerator%');
|
|
16204
|
+
if (gen) {
|
|
16205
|
+
value = getProto(gen.prototype);
|
|
16206
|
+
}
|
|
16207
|
+
}
|
|
16208
|
+
|
|
16209
|
+
INTRINSICS[name] = value;
|
|
16210
|
+
|
|
16211
|
+
return value;
|
|
16212
|
+
};
|
|
16213
|
+
|
|
16214
|
+
var LEGACY_ALIASES = {
|
|
16215
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
16216
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
16217
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
16218
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
16219
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
16220
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
16221
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
16222
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
16223
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
16224
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
16225
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
16226
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
16227
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
16228
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
16229
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
16230
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
16231
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
16232
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
16233
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
16234
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
16235
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
16236
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
16237
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
16238
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
16239
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
16240
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
16241
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
16242
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
16243
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
16244
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
16245
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
16246
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
16247
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
16248
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
16249
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
16250
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
16251
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
16252
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
16253
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
16254
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
16255
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
16256
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
16257
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
16258
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
16259
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
16260
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
16261
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
16262
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
16263
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
16264
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
16265
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
16266
|
+
};
|
|
16267
|
+
|
|
16268
|
+
var bind = functionBind;
|
|
16269
|
+
var hasOwn = src;
|
|
16270
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
16271
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
16272
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
16273
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
16274
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
16275
|
+
|
|
16276
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
16277
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
16278
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
16279
|
+
var stringToPath = function stringToPath(string) {
|
|
16280
|
+
var first = $strSlice(string, 0, 1);
|
|
16281
|
+
var last = $strSlice(string, -1);
|
|
16282
|
+
if (first === '%' && last !== '%') {
|
|
16283
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
16284
|
+
} else if (last === '%' && first !== '%') {
|
|
16285
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
16286
|
+
}
|
|
16287
|
+
var result = [];
|
|
16288
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
16289
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
16290
|
+
});
|
|
16291
|
+
return result;
|
|
16292
|
+
};
|
|
16293
|
+
/* end adaptation */
|
|
16294
|
+
|
|
16295
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
16296
|
+
var intrinsicName = name;
|
|
16297
|
+
var alias;
|
|
16298
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
16299
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
16300
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
16301
|
+
}
|
|
16302
|
+
|
|
16303
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
16304
|
+
var value = INTRINSICS[intrinsicName];
|
|
16305
|
+
if (value === needsEval) {
|
|
16306
|
+
value = doEval(intrinsicName);
|
|
16307
|
+
}
|
|
16308
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
16309
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
16310
|
+
}
|
|
16311
|
+
|
|
16312
|
+
return {
|
|
16313
|
+
alias: alias,
|
|
16314
|
+
name: intrinsicName,
|
|
16315
|
+
value: value
|
|
16316
|
+
};
|
|
16317
|
+
}
|
|
16318
|
+
|
|
16319
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
16320
|
+
};
|
|
16321
|
+
|
|
16322
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
16323
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
16324
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
16325
|
+
}
|
|
16326
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
16327
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
16328
|
+
}
|
|
16329
|
+
|
|
16330
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
16331
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
16332
|
+
}
|
|
16333
|
+
var parts = stringToPath(name);
|
|
16334
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
16335
|
+
|
|
16336
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
16337
|
+
var intrinsicRealName = intrinsic.name;
|
|
16338
|
+
var value = intrinsic.value;
|
|
16339
|
+
var skipFurtherCaching = false;
|
|
16340
|
+
|
|
16341
|
+
var alias = intrinsic.alias;
|
|
16342
|
+
if (alias) {
|
|
16343
|
+
intrinsicBaseName = alias[0];
|
|
16344
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
16345
|
+
}
|
|
16346
|
+
|
|
16347
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
16348
|
+
var part = parts[i];
|
|
16349
|
+
var first = $strSlice(part, 0, 1);
|
|
16350
|
+
var last = $strSlice(part, -1);
|
|
16351
|
+
if (
|
|
16352
|
+
(
|
|
16353
|
+
(first === '"' || first === "'" || first === '`')
|
|
16354
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
16355
|
+
)
|
|
16356
|
+
&& first !== last
|
|
16357
|
+
) {
|
|
16358
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
16359
|
+
}
|
|
16360
|
+
if (part === 'constructor' || !isOwn) {
|
|
16361
|
+
skipFurtherCaching = true;
|
|
16362
|
+
}
|
|
16363
|
+
|
|
16364
|
+
intrinsicBaseName += '.' + part;
|
|
16365
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
16366
|
+
|
|
16367
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
16368
|
+
value = INTRINSICS[intrinsicRealName];
|
|
16369
|
+
} else if (value != null) {
|
|
16370
|
+
if (!(part in value)) {
|
|
16371
|
+
if (!allowMissing) {
|
|
16372
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
16373
|
+
}
|
|
16374
|
+
return void undefined$1;
|
|
16375
|
+
}
|
|
16376
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
16377
|
+
var desc = $gOPD(value, part);
|
|
16378
|
+
isOwn = !!desc;
|
|
16379
|
+
|
|
16380
|
+
// By convention, when a data property is converted to an accessor
|
|
16381
|
+
// property to emulate a data property that does not suffer from
|
|
16382
|
+
// the override mistake, that accessor's getter is marked with
|
|
16383
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
16384
|
+
// uphold the illusion by pretending to see that original data
|
|
16385
|
+
// property, i.e., returning the value rather than the getter
|
|
16386
|
+
// itself.
|
|
16387
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
16388
|
+
value = desc.get;
|
|
16389
|
+
} else {
|
|
16390
|
+
value = value[part];
|
|
16391
|
+
}
|
|
16392
|
+
} else {
|
|
16393
|
+
isOwn = hasOwn(value, part);
|
|
16394
|
+
value = value[part];
|
|
16395
|
+
}
|
|
16396
|
+
|
|
16397
|
+
if (isOwn && !skipFurtherCaching) {
|
|
16398
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
16399
|
+
}
|
|
16400
|
+
}
|
|
16401
|
+
}
|
|
16402
|
+
return value;
|
|
16403
|
+
};
|
|
16404
|
+
|
|
16405
|
+
var callBind$1 = {exports: {}};
|
|
16406
|
+
|
|
16407
|
+
(function (module) {
|
|
16408
|
+
|
|
16409
|
+
var bind = functionBind;
|
|
16410
|
+
var GetIntrinsic = getIntrinsic;
|
|
16411
|
+
|
|
16412
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
16413
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
16414
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
16415
|
+
|
|
16416
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
16417
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
16418
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
16419
|
+
|
|
16420
|
+
if ($defineProperty) {
|
|
16421
|
+
try {
|
|
16422
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
16423
|
+
} catch (e) {
|
|
16424
|
+
// IE 8 has a broken defineProperty
|
|
16425
|
+
$defineProperty = null;
|
|
16426
|
+
}
|
|
16427
|
+
}
|
|
16428
|
+
|
|
16429
|
+
module.exports = function callBind(originalFunction) {
|
|
16430
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
16431
|
+
if ($gOPD && $defineProperty) {
|
|
16432
|
+
var desc = $gOPD(func, 'length');
|
|
16433
|
+
if (desc.configurable) {
|
|
16434
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
16435
|
+
$defineProperty(
|
|
16436
|
+
func,
|
|
16437
|
+
'length',
|
|
16438
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
16439
|
+
);
|
|
16440
|
+
}
|
|
16441
|
+
}
|
|
16442
|
+
return func;
|
|
16443
|
+
};
|
|
16444
|
+
|
|
16445
|
+
var applyBind = function applyBind() {
|
|
16446
|
+
return $reflectApply(bind, $apply, arguments);
|
|
16447
|
+
};
|
|
16448
|
+
|
|
16449
|
+
if ($defineProperty) {
|
|
16450
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
16451
|
+
} else {
|
|
16452
|
+
module.exports.apply = applyBind;
|
|
16453
|
+
}
|
|
16454
|
+
} (callBind$1));
|
|
16455
|
+
|
|
16456
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
16457
|
+
|
|
16458
|
+
var callBind = callBind$1.exports;
|
|
16459
|
+
|
|
16460
|
+
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
16461
|
+
|
|
16462
|
+
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
16463
|
+
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
16464
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
16465
|
+
return callBind(intrinsic);
|
|
16466
|
+
}
|
|
16467
|
+
return intrinsic;
|
|
16468
|
+
};
|
|
16469
|
+
|
|
16470
|
+
var GetIntrinsic = getIntrinsic;
|
|
16471
|
+
var callBound = callBound$1;
|
|
16472
|
+
|
|
16473
|
+
GetIntrinsic('%TypeError%');
|
|
16474
|
+
GetIntrinsic('%WeakMap%', true);
|
|
16475
|
+
GetIntrinsic('%Map%', true);
|
|
16476
|
+
|
|
16477
|
+
callBound('WeakMap.prototype.get', true);
|
|
16478
|
+
callBound('WeakMap.prototype.set', true);
|
|
16479
|
+
callBound('WeakMap.prototype.has', true);
|
|
16480
|
+
callBound('Map.prototype.get', true);
|
|
16481
|
+
callBound('Map.prototype.set', true);
|
|
16482
|
+
callBound('Map.prototype.has', true);
|
|
16483
|
+
|
|
16484
|
+
((function () {
|
|
16485
|
+
var array = [];
|
|
16486
|
+
for (var i = 0; i < 256; ++i) {
|
|
16487
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
16488
|
+
}
|
|
16489
|
+
|
|
16490
|
+
return array;
|
|
16491
|
+
})());
|
|
16492
|
+
|
|
17510
16493
|
dayjs.extend(weekOfYear);
|
|
17511
16494
|
dayjs.extend(weekday);
|
|
17512
16495
|
dayjs.extend(localeData);
|
|
@@ -17520,7 +16503,7 @@ var getScrollbarWidth = function getScrollbarWidth() {
|
|
|
17520
16503
|
var childDiv = document.createElement("div");
|
|
17521
16504
|
parentDiv.appendChild(childDiv);
|
|
17522
16505
|
var scrollbarWidth = parentDiv.offsetWidth - childDiv.offsetWidth;
|
|
17523
|
-
parentDiv === null || parentDiv === void 0
|
|
16506
|
+
parentDiv === null || parentDiv === void 0 || (_parentDiv$parentNode = parentDiv.parentNode) === null || _parentDiv$parentNode === void 0 || _parentDiv$parentNode.removeChild(parentDiv);
|
|
17524
16507
|
return scrollbarWidth;
|
|
17525
16508
|
};
|
|
17526
16509
|
var noop$1 = function noop() {};
|
|
@@ -17535,8 +16518,8 @@ var hyphenize = function hyphenize(input) {
|
|
|
17535
16518
|
var trapFocusOnFocusableElements = function trapFocusOnFocusableElements(ref) {
|
|
17536
16519
|
var _ref$current, _ref$current2;
|
|
17537
16520
|
var focusableElements = 'button,[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
17538
|
-
var firstFocusableElement = ref === null || ref === void 0
|
|
17539
|
-
var focusableContent = ref === null || ref === void 0
|
|
16521
|
+
var firstFocusableElement = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelectorAll(focusableElements)[0];
|
|
16522
|
+
var focusableContent = ref === null || ref === void 0 || (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.querySelectorAll(focusableElements);
|
|
17540
16523
|
var lastFocusableElement = focusableContent[(focusableContent === null || focusableContent === void 0 ? void 0 : focusableContent.length) - 1];
|
|
17541
16524
|
var onKeyDown = function onKeyDown(e) {
|
|
17542
16525
|
var isTabPressed = e.key === "Tab" || e.keyCode === 9;
|
|
@@ -17563,8 +16546,8 @@ var trapFocusOnFocusableElements = function trapFocusOnFocusableElements(ref) {
|
|
|
17563
16546
|
var focusFirstFocusableElement = function focusFirstFocusableElement(ref) {
|
|
17564
16547
|
var _ref$current3;
|
|
17565
16548
|
var focusableElements = 'button,[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
17566
|
-
var firstFocusableElement = ref === null || ref === void 0
|
|
17567
|
-
firstFocusableElement === null || firstFocusableElement === void 0
|
|
16549
|
+
var firstFocusableElement = ref === null || ref === void 0 || (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.querySelectorAll(focusableElements)[0];
|
|
16550
|
+
firstFocusableElement === null || firstFocusableElement === void 0 || firstFocusableElement.focus();
|
|
17568
16551
|
};
|
|
17569
16552
|
var hideScrollAndAddMargin = function hideScrollAndAddMargin() {
|
|
17570
16553
|
var scrollbarWidth = getScrollbarWidth();
|
|
@@ -17619,7 +16602,7 @@ var useOverlay = function useOverlay(_ref) {
|
|
|
17619
16602
|
elementToFocusRef.current = manager.getFinalFocusInOverlay();
|
|
17620
16603
|
if (!(finalFocusRef !== null && finalFocusRef !== void 0 && finalFocusRef.current)) {
|
|
17621
16604
|
var _elementToFocusRef$cu;
|
|
17622
|
-
elementToFocusRef === null || elementToFocusRef === void 0
|
|
16605
|
+
elementToFocusRef === null || elementToFocusRef === void 0 || (_elementToFocusRef$cu = elementToFocusRef.current) === null || _elementToFocusRef$cu === void 0 || _elementToFocusRef$cu.focus();
|
|
17623
16606
|
} else {
|
|
17624
16607
|
finalFocusRef.current.focus();
|
|
17625
16608
|
}
|
|
@@ -17628,8 +16611,8 @@ var useOverlay = function useOverlay(_ref) {
|
|
|
17628
16611
|
if (hasTransitionCompleted) {
|
|
17629
16612
|
var _initialFocusRef;
|
|
17630
16613
|
if ((_initialFocusRef = initialFocusRef) !== null && _initialFocusRef !== void 0 && _initialFocusRef.current) {
|
|
17631
|
-
var _initialFocusRef2
|
|
17632
|
-
(_initialFocusRef2 = initialFocusRef) === null || _initialFocusRef2 === void 0
|
|
16614
|
+
var _initialFocusRef2;
|
|
16615
|
+
(_initialFocusRef2 = initialFocusRef) === null || _initialFocusRef2 === void 0 || (_initialFocusRef2 = _initialFocusRef2.current) === null || _initialFocusRef2 === void 0 || _initialFocusRef2.focus();
|
|
17633
16616
|
} else {
|
|
17634
16617
|
focusFirstFocusableElement(overlayWrapper);
|
|
17635
16618
|
}
|
|
@@ -17638,7 +16621,7 @@ var useOverlay = function useOverlay(_ref) {
|
|
|
17638
16621
|
var handleOverlayClose = useCallback(function () {
|
|
17639
16622
|
if (!manager.isTopOverlay(overlayWrapper)) return;
|
|
17640
16623
|
returnFocusToPreviousActiveElement();
|
|
17641
|
-
onClose === null || onClose === void 0
|
|
16624
|
+
onClose === null || onClose === void 0 || onClose();
|
|
17642
16625
|
}, [onClose]);
|
|
17643
16626
|
useOnClickOutside(overlayWrapper, backdropRef, closeOnOutsideClick ? handleOverlayClose : noop$1);
|
|
17644
16627
|
var isTopOverlay = useSyncExternalStore(manager.subscribe, function () {
|
|
@@ -18133,18 +17116,18 @@ var Checkbox$1 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
18133
17116
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
18134
17117
|
className: "neeto-ui-checkbox__container"
|
|
18135
17118
|
}, /*#__PURE__*/React__default.createElement("input", _extends$2({
|
|
17119
|
+
id: id,
|
|
17120
|
+
ref: ref,
|
|
17121
|
+
required: required,
|
|
18136
17122
|
"aria-invalid": !!error,
|
|
18137
17123
|
className: "neeto-ui-checkbox",
|
|
18138
17124
|
"data-cy": "".concat(hyphenize(renderLabel), "-checkbox-input"),
|
|
18139
|
-
id: id,
|
|
18140
17125
|
name: id,
|
|
18141
|
-
ref: ref,
|
|
18142
|
-
required: required,
|
|
18143
17126
|
type: "checkbox"
|
|
18144
17127
|
}, otherProps)), renderLabel && /*#__PURE__*/React__default.createElement(Label, _extends$2({
|
|
17128
|
+
required: required,
|
|
18145
17129
|
"data-cy": "".concat(hyphenize(renderLabel), "-checkbox-label"),
|
|
18146
|
-
htmlFor: id
|
|
18147
|
-
required: required
|
|
17130
|
+
htmlFor: id
|
|
18148
17131
|
}, labelProps), renderLabel)), !!error && /*#__PURE__*/React__default.createElement("p", {
|
|
18149
17132
|
className: "neeto-ui-input__error",
|
|
18150
17133
|
"data-cy": "".concat(hyphenize(renderLabel), "-checkbox-error"),
|
|
@@ -18590,7 +17573,7 @@ var scrollToError = function scrollToError(formRef, errors) {
|
|
|
18590
17573
|
var fieldErrorName = getErrorFieldName(errors);
|
|
18591
17574
|
if (!fieldErrorName) return;
|
|
18592
17575
|
var errorFormElement = formRef.current.querySelector("[name=\"".concat(fieldErrorName, "\"]"));
|
|
18593
|
-
errorFormElement === null || errorFormElement === void 0
|
|
17576
|
+
errorFormElement === null || errorFormElement === void 0 || errorFormElement.scrollIntoView({
|
|
18594
17577
|
behavior: "smooth",
|
|
18595
17578
|
block: "center"
|
|
18596
17579
|
});
|
|
@@ -18745,15 +17728,15 @@ Form.propTypes = {
|
|
|
18745
17728
|
};
|
|
18746
17729
|
|
|
18747
17730
|
var _excluded$n = ["size", "type", "label", "error", "suffix", "prefix", "disabled", "helpText", "className", "nakedInput", "contentSize", "required", "maxLength", "unlimitedChars", "labelProps", "rejectCharsRegex", "onBlur", "disableTrimOnBlur"];
|
|
18748
|
-
function ownKeys$
|
|
18749
|
-
function _objectSpread$
|
|
17731
|
+
function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17732
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18750
17733
|
var SIZES$3 = {
|
|
18751
17734
|
small: "small",
|
|
18752
17735
|
medium: "medium",
|
|
18753
17736
|
large: "large"
|
|
18754
17737
|
};
|
|
18755
17738
|
var Input$2 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
18756
|
-
var _ref2, _otherProps$value
|
|
17739
|
+
var _ref2, _otherProps$value;
|
|
18757
17740
|
var _ref$size = _ref.size,
|
|
18758
17741
|
size = _ref$size === void 0 ? SIZES$3.medium : _ref$size,
|
|
18759
17742
|
_ref$type = _ref.type,
|
|
@@ -18803,7 +17786,7 @@ var Input$2 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
18803
17786
|
if (!otherProps.onChange || !otherProps.value) {
|
|
18804
17787
|
setValueInternal(e.target.value);
|
|
18805
17788
|
}
|
|
18806
|
-
(_otherProps$onChange = otherProps.onChange) === null || _otherProps$onChange === void 0
|
|
17789
|
+
(_otherProps$onChange = otherProps.onChange) === null || _otherProps$onChange === void 0 || _otherProps$onChange.call(otherProps, e);
|
|
18807
17790
|
};
|
|
18808
17791
|
var isMaxLengthPresent = !!maxLength || maxLength === 0;
|
|
18809
17792
|
var handleRegexChange = function handleRegexChange(e) {
|
|
@@ -18817,7 +17800,7 @@ var Input$2 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
18817
17800
|
e.target.value = value.trim();
|
|
18818
17801
|
handleChange(e);
|
|
18819
17802
|
}
|
|
18820
|
-
onBlur === null || onBlur === void 0
|
|
17803
|
+
onBlur === null || onBlur === void 0 || onBlur(e);
|
|
18821
17804
|
};
|
|
18822
17805
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18823
17806
|
className: classnames$1(["neeto-ui-input__wrapper", className])
|
|
@@ -18847,8 +17830,8 @@ var Input$2 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
18847
17830
|
"aria-invalid": !!error,
|
|
18848
17831
|
"data-cy": "".concat(hyphenize(label), "-input-field"),
|
|
18849
17832
|
size: contentSize,
|
|
18850
|
-
"aria-describedby": classnames$1((
|
|
18851
|
-
}, _objectSpread$
|
|
17833
|
+
"aria-describedby": classnames$1(_defineProperty$1(_defineProperty$1({}, errorId, !!error), helpTextId, helpText))
|
|
17834
|
+
}, _objectSpread$7(_objectSpread$7(_objectSpread$7({
|
|
18852
17835
|
disabled: disabled,
|
|
18853
17836
|
id: id,
|
|
18854
17837
|
ref: ref,
|
|
@@ -18930,7 +17913,7 @@ function _defineProperty(obj, key, value) {
|
|
|
18930
17913
|
return obj;
|
|
18931
17914
|
}
|
|
18932
17915
|
|
|
18933
|
-
function ownKeys$
|
|
17916
|
+
function ownKeys$7(object, enumerableOnly) {
|
|
18934
17917
|
var keys = Object.keys(object);
|
|
18935
17918
|
if (Object.getOwnPropertySymbols) {
|
|
18936
17919
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -18943,9 +17926,9 @@ function ownKeys$6(object, enumerableOnly) {
|
|
|
18943
17926
|
function _objectSpread2(target) {
|
|
18944
17927
|
for (var i = 1; i < arguments.length; i++) {
|
|
18945
17928
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
18946
|
-
i % 2 ? ownKeys$
|
|
17929
|
+
i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) {
|
|
18947
17930
|
_defineProperty(target, key, source[key]);
|
|
18948
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
17931
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) {
|
|
18949
17932
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
18950
17933
|
});
|
|
18951
17934
|
}
|
|
@@ -25632,8 +24615,8 @@ Tag.displayName = "Tag";
|
|
|
25632
24615
|
|
|
25633
24616
|
var _excluded$g = ["children"],
|
|
25634
24617
|
_excluded2$1 = ["children"];
|
|
25635
|
-
function ownKeys$
|
|
25636
|
-
function _objectSpread$
|
|
24618
|
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24619
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25637
24620
|
var STYLES = {
|
|
25638
24621
|
border: {
|
|
25639
24622
|
"default": "1px solid rgb(var(--neeto-ui-gray-400))",
|
|
@@ -25660,7 +24643,7 @@ var CustomDropdownIndicator = function CustomDropdownIndicator(props) {
|
|
|
25660
24643
|
};
|
|
25661
24644
|
var MultiValueRemove$1 = function MultiValueRemove(props) {
|
|
25662
24645
|
return /*#__PURE__*/React__default.createElement(components.MultiValueRemove, _extends$2({}, props, {
|
|
25663
|
-
innerProps: _objectSpread$
|
|
24646
|
+
innerProps: _objectSpread$6(_objectSpread$6({}, props.innerProps), {}, _defineProperty$1({}, "data-cy", "".concat(hyphenize(props.data.label), "-remove-icon")))
|
|
25664
24647
|
}), /*#__PURE__*/React__default.createElement(Close, {
|
|
25665
24648
|
size: 16
|
|
25666
24649
|
}));
|
|
@@ -25678,7 +24661,7 @@ var CustomValueContainer = function CustomValueContainer(_ref2) {
|
|
|
25678
24661
|
rest = _children.slice(1);
|
|
25679
24662
|
var shouldCollapse = !isFocused && value.length > visibleEmailsCount;
|
|
25680
24663
|
return /*#__PURE__*/React__default.createElement(components.ValueContainer, _extends$2({}, props, {
|
|
25681
|
-
innerProps: _objectSpread$
|
|
24664
|
+
innerProps: _objectSpread$6(_objectSpread$6({}, props.innerProps), {}, _defineProperty$1({}, "data-cy", "multi-email-input-container"))
|
|
25682
24665
|
}), shouldCollapse ? firstChild.slice(0, visibleEmailsCount) : firstChild, shouldCollapse && /*#__PURE__*/React__default.createElement(Tag, {
|
|
25683
24666
|
label: "".concat(value.length - visibleEmailsCount, " more"),
|
|
25684
24667
|
style: "secondary"
|
|
@@ -25686,7 +24669,7 @@ var CustomValueContainer = function CustomValueContainer(_ref2) {
|
|
|
25686
24669
|
};
|
|
25687
24670
|
var CustomClearIndicator = function CustomClearIndicator(props) {
|
|
25688
24671
|
return /*#__PURE__*/React__default.createElement(components.ClearIndicator, _extends$2({}, props, {
|
|
25689
|
-
innerProps: _objectSpread$
|
|
24672
|
+
innerProps: _objectSpread$6(_objectSpread$6({}, props.innerProps), {}, _defineProperty$1({}, "data-cy", "clear-all-button"))
|
|
25690
24673
|
}), /*#__PURE__*/React__default.createElement(Close, {
|
|
25691
24674
|
className: "cursor-pointer",
|
|
25692
24675
|
size: 16
|
|
@@ -25694,7 +24677,7 @@ var CustomClearIndicator = function CustomClearIndicator(props) {
|
|
|
25694
24677
|
};
|
|
25695
24678
|
var SelectContainer = function SelectContainer(props) {
|
|
25696
24679
|
return /*#__PURE__*/React__default.createElement(components.SelectContainer, _extends$2({}, props, {
|
|
25697
|
-
innerProps: _objectSpread$
|
|
24680
|
+
innerProps: _objectSpread$6(_objectSpread$6({}, props.innerProps), {}, _defineProperty$1({}, "data-cy", "multi-email-select-container"))
|
|
25698
24681
|
}));
|
|
25699
24682
|
};
|
|
25700
24683
|
var Input = function Input(props) {
|
|
@@ -25709,7 +24692,7 @@ var CUSTOM_STYLES = {
|
|
|
25709
24692
|
input: assoc("overflow", "hidden"),
|
|
25710
24693
|
multiValue: function multiValue(styles, _ref3) {
|
|
25711
24694
|
var valid = _ref3.data.valid;
|
|
25712
|
-
return _objectSpread$
|
|
24695
|
+
return _objectSpread$6(_objectSpread$6({}, styles), {}, {
|
|
25713
24696
|
border: valid ? STYLES.border["default"] : STYLES.border.error,
|
|
25714
24697
|
color: valid ? STYLES.color["default"] : STYLES.color.error
|
|
25715
24698
|
});
|
|
@@ -25752,8 +24735,8 @@ var renderDefaultText = function renderDefaultText(count) {
|
|
|
25752
24735
|
};
|
|
25753
24736
|
|
|
25754
24737
|
var _excluded$f = ["label", "placeholder", "helpText", "value", "onChange", "error", "onBlur", "filterInvalidEmails", "counter", "disabled", "maxHeight", "required", "labelProps", "visibleEmailsCount"];
|
|
25755
|
-
function ownKeys$
|
|
25756
|
-
function _objectSpread$
|
|
24738
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24739
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25757
24740
|
var MultiEmailInput = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
25758
24741
|
var _ref$label = _ref.label,
|
|
25759
24742
|
label = _ref$label === void 0 ? "Email(s)" : _ref$label,
|
|
@@ -25827,7 +24810,7 @@ var MultiEmailInput = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
25827
24810
|
var _otherProps$onCreateO;
|
|
25828
24811
|
var email = formatEmailInputOptions(input);
|
|
25829
24812
|
onChange(pruneDuplicates([].concat(_toConsumableArray$1(value), [email])));
|
|
25830
|
-
otherProps === null || otherProps === void 0
|
|
24813
|
+
otherProps === null || otherProps === void 0 || (_otherProps$onCreateO = otherProps.onCreateOption) === null || _otherProps$onCreateO === void 0 || _otherProps$onCreateO.call(otherProps, input);
|
|
25831
24814
|
};
|
|
25832
24815
|
var handleBlur = function handleBlur(event) {
|
|
25833
24816
|
inputValue ? handleEmailChange() : onBlur(event);
|
|
@@ -25876,7 +24859,7 @@ var MultiEmailInput = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
25876
24859
|
className: classnames$1("neeto-ui-react-select__container neeto-ui-email-input__select", {
|
|
25877
24860
|
"neeto-ui-react-select__container--error": !!error
|
|
25878
24861
|
}),
|
|
25879
|
-
styles: _objectSpread$
|
|
24862
|
+
styles: _objectSpread$5(_objectSpread$5({}, CUSTOM_STYLES), {}, {
|
|
25880
24863
|
control: mergeLeft({
|
|
25881
24864
|
maxHeight: "".concat(maxHeight, "px"),
|
|
25882
24865
|
overflowY: "auto"
|
|
@@ -25950,9 +24933,9 @@ var Item = function Item(_ref) {
|
|
|
25950
24933
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
25951
24934
|
className: classnames$1(["neeto-ui-radio__item", className])
|
|
25952
24935
|
}, /*#__PURE__*/React__default.createElement("input", _extends$2({
|
|
25953
|
-
className: "neeto-ui-radio",
|
|
25954
24936
|
id: id,
|
|
25955
24937
|
name: name,
|
|
24938
|
+
className: "neeto-ui-radio",
|
|
25956
24939
|
type: "radio"
|
|
25957
24940
|
}, otherProps)), label && /*#__PURE__*/React__default.createElement(Label, _extends$2({
|
|
25958
24941
|
"data-cy": "".concat(hyphenize(label), "-radio-label"),
|
|
@@ -25962,8 +24945,8 @@ var Item = function Item(_ref) {
|
|
|
25962
24945
|
Item.displayName = "Radio.Item";
|
|
25963
24946
|
|
|
25964
24947
|
var _excluded$c = ["label", "children", "stacked", "className", "containerClassName", "error", "onChange", "labelProps"];
|
|
25965
|
-
function ownKeys$
|
|
25966
|
-
function _objectSpread$
|
|
24948
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24949
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25967
24950
|
var Radio = function Radio(_ref) {
|
|
25968
24951
|
var _ref$label = _ref.label,
|
|
25969
24952
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
@@ -25999,7 +24982,7 @@ var Radio = function Radio(_ref) {
|
|
|
25999
24982
|
}, containerClassName, containerClassName))
|
|
26000
24983
|
}, Children.map(children, function (child) {
|
|
26001
24984
|
var _child$props$checked, _ref2, _child$props$onChange;
|
|
26002
|
-
return /*#__PURE__*/cloneElement(child, _objectSpread$
|
|
24985
|
+
return /*#__PURE__*/cloneElement(child, _objectSpread$4(_objectSpread$4(_objectSpread$4({}, child.props), props), {}, {
|
|
26003
24986
|
value: child.props.value,
|
|
26004
24987
|
checked: (_child$props$checked = child.props.checked) !== null && _child$props$checked !== void 0 ? _child$props$checked : [internalValue, props.value].includes(child.props.value),
|
|
26005
24988
|
onChange: (_ref2 = (_child$props$onChange = child.props.onChange) !== null && _child$props$onChange !== void 0 ? _child$props$onChange : onChange) !== null && _ref2 !== void 0 ? _ref2 : internalOnChange
|
|
@@ -26212,8 +25195,8 @@ var Spinner = function Spinner(_ref) {
|
|
|
26212
25195
|
|
|
26213
25196
|
var _excluded$9 = ["children"],
|
|
26214
25197
|
_excluded2 = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components", "optionRemapping"];
|
|
26215
|
-
function ownKeys$
|
|
26216
|
-
function _objectSpread$
|
|
25198
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25199
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26217
25200
|
var SIZES$1 = {
|
|
26218
25201
|
small: "small",
|
|
26219
25202
|
medium: "medium",
|
|
@@ -26233,7 +25216,7 @@ var Control = function Control(_ref) {
|
|
|
26233
25216
|
};
|
|
26234
25217
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
26235
25218
|
return /*#__PURE__*/React__default.createElement(components.DropdownIndicator, _extends$2({}, props, {
|
|
26236
|
-
innerProps: _objectSpread$
|
|
25219
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, _defineProperty$1({}, "data-cy", "action-select-indicator"))
|
|
26237
25220
|
}), /*#__PURE__*/React__default.createElement(Down, {
|
|
26238
25221
|
size: 16
|
|
26239
25222
|
}));
|
|
@@ -26258,7 +25241,7 @@ var CustomInput = function CustomInput(props) {
|
|
|
26258
25241
|
};
|
|
26259
25242
|
var CustomOption = function CustomOption(props) {
|
|
26260
25243
|
return /*#__PURE__*/React__default.createElement(components.Option, _extends$2({}, props, {
|
|
26261
|
-
innerProps: _objectSpread$
|
|
25244
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, {
|
|
26262
25245
|
"data-cy": "".concat(hyphenize(props.label), "-select-option")
|
|
26263
25246
|
})
|
|
26264
25247
|
}));
|
|
@@ -26266,7 +25249,7 @@ var CustomOption = function CustomOption(props) {
|
|
|
26266
25249
|
var Placeholder = function Placeholder(props) {
|
|
26267
25250
|
var selectProps = props.selectProps;
|
|
26268
25251
|
return /*#__PURE__*/React__default.createElement(components.Placeholder, _extends$2({}, props, {
|
|
26269
|
-
innerProps: _objectSpread$
|
|
25252
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, {
|
|
26270
25253
|
"data-cy": selectProps ? "".concat(hyphenize(selectProps.label), "-select-placeholder") : "select-placeholder"
|
|
26271
25254
|
})
|
|
26272
25255
|
}));
|
|
@@ -26274,14 +25257,14 @@ var Placeholder = function Placeholder(props) {
|
|
|
26274
25257
|
var Menu = function Menu(props) {
|
|
26275
25258
|
var selectProps = props.selectProps;
|
|
26276
25259
|
return /*#__PURE__*/React__default.createElement(components.Menu, _extends$2({}, props, {
|
|
26277
|
-
innerProps: _objectSpread$
|
|
25260
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, {
|
|
26278
25261
|
"data-cy": selectProps ? "".concat(hyphenize(selectProps.label), "-select-menu") : "select-menu"
|
|
26279
25262
|
})
|
|
26280
25263
|
}));
|
|
26281
25264
|
};
|
|
26282
25265
|
var SingleValue = function SingleValue(props) {
|
|
26283
25266
|
return /*#__PURE__*/React__default.createElement(components.SingleValue, _extends$2({}, props, {
|
|
26284
|
-
innerProps: _objectSpread$
|
|
25267
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, {
|
|
26285
25268
|
"data-cy": "select-single-value"
|
|
26286
25269
|
})
|
|
26287
25270
|
}));
|
|
@@ -26289,7 +25272,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
26289
25272
|
var ValueContainer = function ValueContainer(props) {
|
|
26290
25273
|
var selectProps = props.selectProps;
|
|
26291
25274
|
return /*#__PURE__*/React__default.createElement(components.ValueContainer, _extends$2({}, props, {
|
|
26292
|
-
innerProps: _objectSpread$
|
|
25275
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, {
|
|
26293
25276
|
name: selectProps.name,
|
|
26294
25277
|
"data-cy": selectProps ? "".concat(hyphenize(selectProps.label), "-select-value-container") : "select-value-container"
|
|
26295
25278
|
})
|
|
@@ -26316,14 +25299,13 @@ var MenuList = function MenuList(props) {
|
|
|
26316
25299
|
observer.observe(loaderRef.current);
|
|
26317
25300
|
}
|
|
26318
25301
|
return function () {
|
|
26319
|
-
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
}
|
|
25302
|
+
var _observer;
|
|
25303
|
+
if (!(loaderRef.current && isAsyncLoadOptionEnabled)) return;
|
|
25304
|
+
(_observer = observer) === null || _observer === void 0 || _observer.unobserve(loaderRef.current);
|
|
26323
25305
|
};
|
|
26324
25306
|
}, [hasMore]);
|
|
26325
25307
|
return /*#__PURE__*/React__default.createElement(components.MenuList, _extends$2({}, props, {
|
|
26326
|
-
innerProps: _objectSpread$
|
|
25308
|
+
innerProps: _objectSpread$3(_objectSpread$3({}, props.innerProps), {}, _defineProperty$1({}, "data-testid", "menu-list"))
|
|
26327
25309
|
}), props.children, hasMore && /*#__PURE__*/React__default.createElement("div", {
|
|
26328
25310
|
className: "flex w-full items-center justify-center py-3",
|
|
26329
25311
|
"data-testid": "loader",
|
|
@@ -26387,12 +25369,19 @@ var Select = function Select(_ref2) {
|
|
|
26387
25369
|
return getOptionValue(option);
|
|
26388
25370
|
};
|
|
26389
25371
|
var findInOptions = function findInOptions(value) {
|
|
25372
|
+
var _currentOptions;
|
|
26390
25373
|
if (!value || otherProps.isMulti) {
|
|
26391
25374
|
return value;
|
|
26392
25375
|
}
|
|
26393
25376
|
var currentOptions = options || defaultOptions;
|
|
26394
25377
|
if (Array.isArray(value)) value = value[0];
|
|
26395
|
-
|
|
25378
|
+
var isGrouped = existsBy({
|
|
25379
|
+
options: Array.isArray
|
|
25380
|
+
}, currentOptions);
|
|
25381
|
+
if (isGrouped) {
|
|
25382
|
+
currentOptions = flatten(pluck("options", currentOptions));
|
|
25383
|
+
}
|
|
25384
|
+
return (_currentOptions = currentOptions) === null || _currentOptions === void 0 ? void 0 : _currentOptions.filter(function (opt) {
|
|
26396
25385
|
return getRealOptionValue(opt) === getRealOptionValue(value);
|
|
26397
25386
|
});
|
|
26398
25387
|
};
|
|
@@ -26401,18 +25390,16 @@ var Select = function Select(_ref2) {
|
|
|
26401
25390
|
"data-cy": "".concat(hyphenize(label), "-select-container-wrapper"),
|
|
26402
25391
|
"data-testid": "select"
|
|
26403
25392
|
}, label && /*#__PURE__*/React__default.createElement(Label, _extends$2({
|
|
25393
|
+
required: required,
|
|
26404
25394
|
"data-cy": "".concat(hyphenize(label), "-input-label"),
|
|
26405
25395
|
"data-testid": "select-label",
|
|
26406
|
-
htmlFor: inputId
|
|
26407
|
-
required: required
|
|
25396
|
+
htmlFor: inputId
|
|
26408
25397
|
}, labelProps), label), /*#__PURE__*/React__default.createElement(Parent, _extends$2({
|
|
26409
25398
|
blurInputOnSelect: false,
|
|
26410
25399
|
classNamePrefix: "neeto-ui-react-select",
|
|
26411
25400
|
closeMenuOnSelect: !otherProps.isMulti,
|
|
26412
25401
|
"data-cy": "".concat(hyphenize(label), "-select-container"),
|
|
26413
25402
|
defaultValue: findInOptions(defaultValue),
|
|
26414
|
-
inputId: inputId,
|
|
26415
|
-
label: label,
|
|
26416
25403
|
ref: innerRef,
|
|
26417
25404
|
value: findInOptions(value),
|
|
26418
25405
|
className: classnames$1(["neeto-ui-react-select__container"], {
|
|
@@ -26421,7 +25408,7 @@ var Select = function Select(_ref2) {
|
|
|
26421
25408
|
"neeto-ui-react-select__container--medium": size === SIZES$1.medium,
|
|
26422
25409
|
"neeto-ui-react-select__container--large": size === SIZES$1.large
|
|
26423
25410
|
}),
|
|
26424
|
-
components: _objectSpread$
|
|
25411
|
+
components: _objectSpread$3({
|
|
26425
25412
|
Input: CustomInput,
|
|
26426
25413
|
Option: CustomOption,
|
|
26427
25414
|
DropdownIndicator: DropdownIndicator,
|
|
@@ -26434,7 +25421,10 @@ var Select = function Select(_ref2) {
|
|
|
26434
25421
|
SingleValue: SingleValue,
|
|
26435
25422
|
Control: Control
|
|
26436
25423
|
}, componentOverrides)
|
|
26437
|
-
},
|
|
25424
|
+
}, _objectSpread$3(_objectSpread$3({
|
|
25425
|
+
inputId: inputId,
|
|
25426
|
+
label: label
|
|
25427
|
+
}, portalProps), otherProps))), !!error && /*#__PURE__*/React__default.createElement("p", {
|
|
26438
25428
|
className: "neeto-ui-input__error",
|
|
26439
25429
|
"data-cy": "".concat(hyphenize(label), "-select-error"),
|
|
26440
25430
|
"data-testid": "select-error"
|
|
@@ -26498,17 +25488,17 @@ var SelectField = /*#__PURE__*/forwardRef$1(function (props, ref) {
|
|
|
26498
25488
|
if (event.key === "Enter" && isMenuOpen.current) {
|
|
26499
25489
|
event.stopPropagation();
|
|
26500
25490
|
}
|
|
26501
|
-
(_otherProps$onKeyDown = otherProps.onKeyDown) === null || _otherProps$onKeyDown === void 0
|
|
25491
|
+
(_otherProps$onKeyDown = otherProps.onKeyDown) === null || _otherProps$onKeyDown === void 0 || _otherProps$onKeyDown.call(otherProps, event);
|
|
26502
25492
|
},
|
|
26503
25493
|
onMenuClose: function onMenuClose() {
|
|
26504
25494
|
var _otherProps$onMenuClo;
|
|
26505
25495
|
isMenuOpen.current = false;
|
|
26506
|
-
(_otherProps$onMenuClo = otherProps.onMenuClose) === null || _otherProps$onMenuClo === void 0
|
|
25496
|
+
(_otherProps$onMenuClo = otherProps.onMenuClose) === null || _otherProps$onMenuClo === void 0 || _otherProps$onMenuClo.call(otherProps);
|
|
26507
25497
|
},
|
|
26508
25498
|
onMenuOpen: function onMenuOpen() {
|
|
26509
25499
|
var _otherProps$onMenuOpe;
|
|
26510
25500
|
isMenuOpen.current = true;
|
|
26511
|
-
(_otherProps$onMenuOpe = otherProps.onMenuOpen) === null || _otherProps$onMenuOpe === void 0
|
|
25501
|
+
(_otherProps$onMenuOpe = otherProps.onMenuOpen) === null || _otherProps$onMenuOpe === void 0 || _otherProps$onMenuOpe.call(otherProps);
|
|
26512
25502
|
}
|
|
26513
25503
|
}));
|
|
26514
25504
|
});
|
|
@@ -26517,8 +25507,8 @@ SelectField.displayName = "SelectField";
|
|
|
26517
25507
|
var NEETO_UI_PRIMARY_500 = "#4558f9";
|
|
26518
25508
|
|
|
26519
25509
|
var _excluded$7 = ["min", "max", "defaultValue", "onChange", "value", "label", "required", "labelProps", "error", "helpText"];
|
|
26520
|
-
function ownKeys$
|
|
26521
|
-
function _objectSpread$
|
|
25510
|
+
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25511
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26522
25512
|
var Slider = function Slider(_ref) {
|
|
26523
25513
|
var _ref$min = _ref.min,
|
|
26524
25514
|
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
@@ -26543,7 +25533,7 @@ var Slider = function Slider(_ref) {
|
|
|
26543
25533
|
var helpTextId = "helpText_".concat(id);
|
|
26544
25534
|
return /*#__PURE__*/React__default.createElement(_ConfigProvider, {
|
|
26545
25535
|
theme: {
|
|
26546
|
-
token: _objectSpread$
|
|
25536
|
+
token: _objectSpread$2({}, ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES),
|
|
26547
25537
|
components: {
|
|
26548
25538
|
Slider: {
|
|
26549
25539
|
dotActiveBorderColor: "rgb(var(--neeto-ui-primary-500))",
|
|
@@ -26565,15 +25555,10 @@ var Slider = function Slider(_ref) {
|
|
|
26565
25555
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26566
25556
|
className: "neeto-ui-input__label-wrapper"
|
|
26567
25557
|
}, label && /*#__PURE__*/React__default.createElement(Label, _extends$2({
|
|
25558
|
+
required: required,
|
|
26568
25559
|
"data-cy": "".concat(hyphenize(label), "-slider-label"),
|
|
26569
|
-
htmlFor: id
|
|
26570
|
-
required: required
|
|
25560
|
+
htmlFor: id
|
|
26571
25561
|
}, labelProps), label)), /*#__PURE__*/React__default.createElement(_Slider, _extends$2({
|
|
26572
|
-
max: max,
|
|
26573
|
-
min: min,
|
|
26574
|
-
value: value,
|
|
26575
|
-
defaultValue: defaultValue,
|
|
26576
|
-
onChange: onChange,
|
|
26577
25562
|
className: "neeto-ui-w-full",
|
|
26578
25563
|
handleStyle: {
|
|
26579
25564
|
backgroundColor: NEETO_UI_PRIMARY_500
|
|
@@ -26584,9 +25569,15 @@ var Slider = function Slider(_ref) {
|
|
|
26584
25569
|
trackStyle: {
|
|
26585
25570
|
backgroundColor: NEETO_UI_PRIMARY_500
|
|
26586
25571
|
}
|
|
26587
|
-
},
|
|
25572
|
+
}, _objectSpread$2(_objectSpread$2({
|
|
25573
|
+
defaultValue: defaultValue,
|
|
25574
|
+
max: max,
|
|
25575
|
+
min: min,
|
|
25576
|
+
onChange: onChange,
|
|
25577
|
+
value: value
|
|
25578
|
+
}, otherProps), {}, {
|
|
26588
25579
|
id: id
|
|
26589
|
-
})), !!error && /*#__PURE__*/React__default.createElement(Typography, {
|
|
25580
|
+
}))), !!error && /*#__PURE__*/React__default.createElement(Typography, {
|
|
26590
25581
|
className: "neeto-ui-input__error",
|
|
26591
25582
|
"data-cy": "".concat(hyphenize(label), "-input-error"),
|
|
26592
25583
|
id: errorId,
|
|
@@ -26646,8 +25637,8 @@ var Switch = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
26646
25637
|
disabled = otherProps.disabled;
|
|
26647
25638
|
var renderLabel = label || children;
|
|
26648
25639
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26649
|
-
|
|
26650
|
-
|
|
25640
|
+
ref: ref,
|
|
25641
|
+
className: classnames$1(["neeto-ui-switch__wrapper", className])
|
|
26651
25642
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26652
25643
|
className: "neeto-ui-switch__container"
|
|
26653
25644
|
}, /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -26657,8 +25648,8 @@ var Switch = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
26657
25648
|
"neeto-ui-switch__item--disabled": disabled
|
|
26658
25649
|
})
|
|
26659
25650
|
}, /*#__PURE__*/React__default.createElement("input", _extends$2({
|
|
26660
|
-
|
|
26661
|
-
|
|
25651
|
+
onChange: onChange,
|
|
25652
|
+
type: "checkbox"
|
|
26662
25653
|
}, otherProps)), /*#__PURE__*/React__default.createElement("span", {
|
|
26663
25654
|
"aria-hidden": "true",
|
|
26664
25655
|
"data-cy": "".concat(hyphenize(renderLabel), "-switch"),
|
|
@@ -26674,9 +25665,9 @@ var Switch = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
26674
25665
|
size: "12",
|
|
26675
25666
|
strokeWidth: 3
|
|
26676
25667
|
}))), renderLabel && /*#__PURE__*/React__default.createElement(Label, _extends$2({
|
|
25668
|
+
required: required,
|
|
26677
25669
|
"data-cy": "".concat(hyphenize(renderLabel), "-switch-label"),
|
|
26678
|
-
htmlFor: id
|
|
26679
|
-
required: required
|
|
25670
|
+
htmlFor: id
|
|
26680
25671
|
}, labelProps), renderLabel)), !!error && /*#__PURE__*/React__default.createElement("p", {
|
|
26681
25672
|
className: "neeto-ui-input__error",
|
|
26682
25673
|
"data-cy": "".concat(hyphenize(renderLabel), "-switch-error"),
|
|
@@ -26703,6 +25694,8 @@ var FormikSwitch = function FormikSwitch(_ref) {
|
|
|
26703
25694
|
};
|
|
26704
25695
|
|
|
26705
25696
|
var _excluded$3 = ["size", "rows", "disabled", "required", "nakedTextarea", "helpText", "error", "label", "className", "maxLength", "unlimitedChars", "labelProps"];
|
|
25697
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25698
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26706
25699
|
var SIZES = {
|
|
26707
25700
|
small: "small",
|
|
26708
25701
|
medium: "medium",
|
|
@@ -26761,9 +25754,9 @@ var Textarea = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
26761
25754
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
26762
25755
|
className: "neeto-ui-input__label-wrapper"
|
|
26763
25756
|
}, label && /*#__PURE__*/React__default.createElement(Label, _extends$2({
|
|
25757
|
+
required: required,
|
|
26764
25758
|
"data-cy": "".concat(hyphenize(label), "-label"),
|
|
26765
|
-
htmlFor: id
|
|
26766
|
-
required: required
|
|
25759
|
+
htmlFor: id
|
|
26767
25760
|
}, labelProps), label), isCharacterLimitVisible && /*#__PURE__*/React__default.createElement(Typography, {
|
|
26768
25761
|
style: "body2",
|
|
26769
25762
|
className: classnames$1("neeto-ui-input__max-length", {
|
|
@@ -26780,15 +25773,16 @@ var Textarea = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
26780
25773
|
"neeto-ui-input--large": size === "large"
|
|
26781
25774
|
})
|
|
26782
25775
|
}, /*#__PURE__*/React__default.createElement("textarea", _extends$2({
|
|
25776
|
+
ref: textareaRef
|
|
25777
|
+
}, _objectSpread$1(_objectSpread$1(_objectSpread$1({
|
|
26783
25778
|
disabled: disabled,
|
|
26784
|
-
ref: textareaRef,
|
|
26785
25779
|
rows: rows
|
|
26786
25780
|
}, isMaxLengthPresent && !unlimitedChars && {
|
|
26787
25781
|
maxLength: maxLength
|
|
26788
|
-
}, otherProps, {
|
|
26789
|
-
|
|
26790
|
-
|
|
26791
|
-
}))), !!error && /*#__PURE__*/React__default.createElement(Typography, {
|
|
25782
|
+
}), otherProps), {}, {
|
|
25783
|
+
onChange: onChange,
|
|
25784
|
+
value: value
|
|
25785
|
+
})))), !!error && /*#__PURE__*/React__default.createElement(Typography, {
|
|
26792
25786
|
className: "neeto-ui-input__error",
|
|
26793
25787
|
"data-cy": "".concat(hyphenize(label), "-input-error"),
|
|
26794
25788
|
id: errorId,
|