@mattisvensson/strapi-plugin-webatlas 0.3.0 → 0.4.0

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.
Files changed (82) hide show
  1. package/dist/_chunks/{EmptyBox-7D4LrvdH.mjs → EmptyBox-BM4IscSk.mjs} +2 -6
  2. package/dist/_chunks/{EmptyBox-DT6D5gcf.js → EmptyBox-T8t29l25.js} +1 -5
  3. package/dist/_chunks/FullLoader-Cmsf8xS6.js +11 -0
  4. package/dist/_chunks/FullLoader-CrPED_dY.mjs +12 -0
  5. package/dist/_chunks/{de-C8PE3n3B.mjs → de-Dn24NwJf.mjs} +11 -1
  6. package/dist/_chunks/{de-4tL_cJTC.js → de-RiCps8UH.js} +11 -1
  7. package/dist/_chunks/{en-CR1YZvJo.mjs → en-D9Lxaugc.mjs} +11 -1
  8. package/dist/_chunks/{en-Bg4z3fR7.js → en-JLW5S3ZC.js} +11 -1
  9. package/dist/_chunks/index-B3JakJZB.mjs +126 -0
  10. package/dist/_chunks/index-BpvDMe8t.js +126 -0
  11. package/dist/_chunks/index-C1rj8TbT.js +281 -0
  12. package/dist/_chunks/{index-B0XE_zRP.js → index-CKHmlZdc.js} +1381 -363
  13. package/dist/_chunks/index-Cce7AGi-.mjs +281 -0
  14. package/dist/_chunks/{index-B85fJxGa.js → index-ChDbwEb-.js} +43 -61
  15. package/dist/_chunks/{index-C7B8QHDT.mjs → index-DJ-Du5aY.mjs} +1375 -357
  16. package/dist/_chunks/{index-CCiDvLAC.mjs → index-DUxYbDKG.mjs} +43 -61
  17. package/dist/admin/index.js +1 -1
  18. package/dist/admin/index.mjs +1 -1
  19. package/dist/admin/src/components/UI/FullLoader.d.ts +3 -0
  20. package/dist/admin/src/components/UI/index.d.ts +2 -1
  21. package/dist/admin/src/components/modals/Delete.d.ts +3 -3
  22. package/dist/admin/src/components/modals/NavEdit.d.ts +2 -2
  23. package/dist/admin/src/components/modals/externalItem/index.d.ts +10 -4
  24. package/dist/admin/src/components/modals/internalItem/internalItemCreate.d.ts +1 -1
  25. package/dist/admin/src/components/modals/wrapperItem/index.d.ts +11 -5
  26. package/dist/admin/src/hooks/useApi.d.ts +6 -5
  27. package/dist/admin/src/hooks/useNavigations.d.ts +2 -0
  28. package/dist/admin/src/hooks/usePluginConfig.d.ts +3 -3
  29. package/dist/admin/src/pages/Navigation/PageWrapper.d.ts +7 -0
  30. package/dist/admin/src/pages/Navigation/index.d.ts +1 -1
  31. package/dist/admin/src/pages/Routes/PageWrapper.d.ts +4 -0
  32. package/dist/admin/src/pages/Routes/TableHeader.d.ts +1 -0
  33. package/dist/admin/src/pages/Routes/TableRow.d.ts +4 -0
  34. package/dist/admin/src/pages/Settings/ContentTypeAccordion.d.ts +7 -0
  35. package/dist/admin/src/pages/Settings/PageWrapper.d.ts +8 -0
  36. package/dist/admin/src/utils/createTempNavItemObject.d.ts +25 -0
  37. package/dist/admin/src/utils/index.d.ts +2 -1
  38. package/dist/server/index.js +228 -177
  39. package/dist/server/index.mjs +228 -177
  40. package/dist/server/src/controllers/admin.d.ts +1 -4
  41. package/dist/server/src/controllers/index.d.ts +1 -4
  42. package/dist/server/src/index.d.ts +2 -8
  43. package/dist/server/src/services/admin.d.ts +2 -5
  44. package/dist/server/src/services/index.d.ts +1 -4
  45. package/dist/server/src/utils/navItemHandler.d.ts +5 -0
  46. package/dist/server/src/utils/routeHandler.d.ts +3 -0
  47. package/package.json +1 -1
  48. package/dist/_chunks/EmptyBox-7D4LrvdH.mjs.map +0 -1
  49. package/dist/_chunks/EmptyBox-DT6D5gcf.js.map +0 -1
  50. package/dist/_chunks/_baseConvert-B84_vf8X.js +0 -864
  51. package/dist/_chunks/_baseConvert-B84_vf8X.js.map +0 -1
  52. package/dist/_chunks/_baseConvert-C2SW1VHq.mjs +0 -865
  53. package/dist/_chunks/_baseConvert-C2SW1VHq.mjs.map +0 -1
  54. package/dist/_chunks/de-4tL_cJTC.js.map +0 -1
  55. package/dist/_chunks/de-C8PE3n3B.mjs.map +0 -1
  56. package/dist/_chunks/en-Bg4z3fR7.js.map +0 -1
  57. package/dist/_chunks/en-CR1YZvJo.mjs.map +0 -1
  58. package/dist/_chunks/index-B2Tiv3EK.mjs +0 -92
  59. package/dist/_chunks/index-B48CGofU.mjs +0 -17170
  60. package/dist/_chunks/index-B48CGofU.mjs.map +0 -1
  61. package/dist/_chunks/index-BbM9Sn1t.js +0 -17195
  62. package/dist/_chunks/index-BocSkZOu.mjs +0 -17176
  63. package/dist/_chunks/index-CXzNr2cH.mjs +0 -93
  64. package/dist/_chunks/index-CXzNr2cH.mjs.map +0 -1
  65. package/dist/_chunks/index-Cd6y6nuf.js +0 -93
  66. package/dist/_chunks/index-Cd6y6nuf.js.map +0 -1
  67. package/dist/_chunks/index-Cf9ZIBLd.js +0 -4195
  68. package/dist/_chunks/index-Cf9ZIBLd.js.map +0 -1
  69. package/dist/_chunks/index-D981K4TK.mjs +0 -4179
  70. package/dist/_chunks/index-D981K4TK.mjs.map +0 -1
  71. package/dist/_chunks/index-DGb8ESH-.js +0 -92
  72. package/dist/_chunks/index-DYiJBXKE.js +0 -10131
  73. package/dist/_chunks/index-DYiJBXKE.js.map +0 -1
  74. package/dist/_chunks/index-DjZ3ZaVB.js +0 -17189
  75. package/dist/_chunks/index-DjZ3ZaVB.js.map +0 -1
  76. package/dist/_chunks/index-DkhJl5mF.mjs +0 -10131
  77. package/dist/_chunks/index-DkhJl5mF.mjs.map +0 -1
  78. package/dist/admin/index.js.map +0 -1
  79. package/dist/admin/index.mjs.map +0 -1
  80. package/dist/admin/src/pages/Navigation/Header.d.ts +0 -6
  81. package/dist/server/index.js.map +0 -1
  82. package/dist/server/index.mjs.map +0 -1
@@ -1,864 +0,0 @@
1
- "use strict";
2
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3
- function getDefaultExportFromCjs(x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
- }
6
- function getAugmentedNamespace(n) {
7
- if (n.__esModule) return n;
8
- var f = n.default;
9
- if (typeof f == "function") {
10
- var a = function a2() {
11
- if (this instanceof a2) {
12
- return Reflect.construct(f, arguments, this.constructor);
13
- }
14
- return f.apply(this, arguments);
15
- };
16
- a.prototype = f.prototype;
17
- } else a = {};
18
- Object.defineProperty(a, "__esModule", { value: true });
19
- Object.keys(n).forEach(function(k) {
20
- var d = Object.getOwnPropertyDescriptor(n, k);
21
- Object.defineProperty(a, k, d.get ? d : {
22
- enumerable: true,
23
- get: function() {
24
- return n[k];
25
- }
26
- });
27
- });
28
- return a;
29
- }
30
- var _mapping = {};
31
- (function(exports2) {
32
- exports2.aliasToReal = {
33
- // Lodash aliases.
34
- "each": "forEach",
35
- "eachRight": "forEachRight",
36
- "entries": "toPairs",
37
- "entriesIn": "toPairsIn",
38
- "extend": "assignIn",
39
- "extendAll": "assignInAll",
40
- "extendAllWith": "assignInAllWith",
41
- "extendWith": "assignInWith",
42
- "first": "head",
43
- // Methods that are curried variants of others.
44
- "conforms": "conformsTo",
45
- "matches": "isMatch",
46
- "property": "get",
47
- // Ramda aliases.
48
- "__": "placeholder",
49
- "F": "stubFalse",
50
- "T": "stubTrue",
51
- "all": "every",
52
- "allPass": "overEvery",
53
- "always": "constant",
54
- "any": "some",
55
- "anyPass": "overSome",
56
- "apply": "spread",
57
- "assoc": "set",
58
- "assocPath": "set",
59
- "complement": "negate",
60
- "compose": "flowRight",
61
- "contains": "includes",
62
- "dissoc": "unset",
63
- "dissocPath": "unset",
64
- "dropLast": "dropRight",
65
- "dropLastWhile": "dropRightWhile",
66
- "equals": "isEqual",
67
- "identical": "eq",
68
- "indexBy": "keyBy",
69
- "init": "initial",
70
- "invertObj": "invert",
71
- "juxt": "over",
72
- "omitAll": "omit",
73
- "nAry": "ary",
74
- "path": "get",
75
- "pathEq": "matchesProperty",
76
- "pathOr": "getOr",
77
- "paths": "at",
78
- "pickAll": "pick",
79
- "pipe": "flow",
80
- "pluck": "map",
81
- "prop": "get",
82
- "propEq": "matchesProperty",
83
- "propOr": "getOr",
84
- "props": "at",
85
- "symmetricDifference": "xor",
86
- "symmetricDifferenceBy": "xorBy",
87
- "symmetricDifferenceWith": "xorWith",
88
- "takeLast": "takeRight",
89
- "takeLastWhile": "takeRightWhile",
90
- "unapply": "rest",
91
- "unnest": "flatten",
92
- "useWith": "overArgs",
93
- "where": "conformsTo",
94
- "whereEq": "isMatch",
95
- "zipObj": "zipObject"
96
- };
97
- exports2.aryMethod = {
98
- "1": [
99
- "assignAll",
100
- "assignInAll",
101
- "attempt",
102
- "castArray",
103
- "ceil",
104
- "create",
105
- "curry",
106
- "curryRight",
107
- "defaultsAll",
108
- "defaultsDeepAll",
109
- "floor",
110
- "flow",
111
- "flowRight",
112
- "fromPairs",
113
- "invert",
114
- "iteratee",
115
- "memoize",
116
- "method",
117
- "mergeAll",
118
- "methodOf",
119
- "mixin",
120
- "nthArg",
121
- "over",
122
- "overEvery",
123
- "overSome",
124
- "rest",
125
- "reverse",
126
- "round",
127
- "runInContext",
128
- "spread",
129
- "template",
130
- "trim",
131
- "trimEnd",
132
- "trimStart",
133
- "uniqueId",
134
- "words",
135
- "zipAll"
136
- ],
137
- "2": [
138
- "add",
139
- "after",
140
- "ary",
141
- "assign",
142
- "assignAllWith",
143
- "assignIn",
144
- "assignInAllWith",
145
- "at",
146
- "before",
147
- "bind",
148
- "bindAll",
149
- "bindKey",
150
- "chunk",
151
- "cloneDeepWith",
152
- "cloneWith",
153
- "concat",
154
- "conformsTo",
155
- "countBy",
156
- "curryN",
157
- "curryRightN",
158
- "debounce",
159
- "defaults",
160
- "defaultsDeep",
161
- "defaultTo",
162
- "delay",
163
- "difference",
164
- "divide",
165
- "drop",
166
- "dropRight",
167
- "dropRightWhile",
168
- "dropWhile",
169
- "endsWith",
170
- "eq",
171
- "every",
172
- "filter",
173
- "find",
174
- "findIndex",
175
- "findKey",
176
- "findLast",
177
- "findLastIndex",
178
- "findLastKey",
179
- "flatMap",
180
- "flatMapDeep",
181
- "flattenDepth",
182
- "forEach",
183
- "forEachRight",
184
- "forIn",
185
- "forInRight",
186
- "forOwn",
187
- "forOwnRight",
188
- "get",
189
- "groupBy",
190
- "gt",
191
- "gte",
192
- "has",
193
- "hasIn",
194
- "includes",
195
- "indexOf",
196
- "intersection",
197
- "invertBy",
198
- "invoke",
199
- "invokeMap",
200
- "isEqual",
201
- "isMatch",
202
- "join",
203
- "keyBy",
204
- "lastIndexOf",
205
- "lt",
206
- "lte",
207
- "map",
208
- "mapKeys",
209
- "mapValues",
210
- "matchesProperty",
211
- "maxBy",
212
- "meanBy",
213
- "merge",
214
- "mergeAllWith",
215
- "minBy",
216
- "multiply",
217
- "nth",
218
- "omit",
219
- "omitBy",
220
- "overArgs",
221
- "pad",
222
- "padEnd",
223
- "padStart",
224
- "parseInt",
225
- "partial",
226
- "partialRight",
227
- "partition",
228
- "pick",
229
- "pickBy",
230
- "propertyOf",
231
- "pull",
232
- "pullAll",
233
- "pullAt",
234
- "random",
235
- "range",
236
- "rangeRight",
237
- "rearg",
238
- "reject",
239
- "remove",
240
- "repeat",
241
- "restFrom",
242
- "result",
243
- "sampleSize",
244
- "some",
245
- "sortBy",
246
- "sortedIndex",
247
- "sortedIndexOf",
248
- "sortedLastIndex",
249
- "sortedLastIndexOf",
250
- "sortedUniqBy",
251
- "split",
252
- "spreadFrom",
253
- "startsWith",
254
- "subtract",
255
- "sumBy",
256
- "take",
257
- "takeRight",
258
- "takeRightWhile",
259
- "takeWhile",
260
- "tap",
261
- "throttle",
262
- "thru",
263
- "times",
264
- "trimChars",
265
- "trimCharsEnd",
266
- "trimCharsStart",
267
- "truncate",
268
- "union",
269
- "uniqBy",
270
- "uniqWith",
271
- "unset",
272
- "unzipWith",
273
- "without",
274
- "wrap",
275
- "xor",
276
- "zip",
277
- "zipObject",
278
- "zipObjectDeep"
279
- ],
280
- "3": [
281
- "assignInWith",
282
- "assignWith",
283
- "clamp",
284
- "differenceBy",
285
- "differenceWith",
286
- "findFrom",
287
- "findIndexFrom",
288
- "findLastFrom",
289
- "findLastIndexFrom",
290
- "getOr",
291
- "includesFrom",
292
- "indexOfFrom",
293
- "inRange",
294
- "intersectionBy",
295
- "intersectionWith",
296
- "invokeArgs",
297
- "invokeArgsMap",
298
- "isEqualWith",
299
- "isMatchWith",
300
- "flatMapDepth",
301
- "lastIndexOfFrom",
302
- "mergeWith",
303
- "orderBy",
304
- "padChars",
305
- "padCharsEnd",
306
- "padCharsStart",
307
- "pullAllBy",
308
- "pullAllWith",
309
- "rangeStep",
310
- "rangeStepRight",
311
- "reduce",
312
- "reduceRight",
313
- "replace",
314
- "set",
315
- "slice",
316
- "sortedIndexBy",
317
- "sortedLastIndexBy",
318
- "transform",
319
- "unionBy",
320
- "unionWith",
321
- "update",
322
- "xorBy",
323
- "xorWith",
324
- "zipWith"
325
- ],
326
- "4": [
327
- "fill",
328
- "setWith",
329
- "updateWith"
330
- ]
331
- };
332
- exports2.aryRearg = {
333
- "2": [1, 0],
334
- "3": [2, 0, 1],
335
- "4": [3, 2, 0, 1]
336
- };
337
- exports2.iterateeAry = {
338
- "dropRightWhile": 1,
339
- "dropWhile": 1,
340
- "every": 1,
341
- "filter": 1,
342
- "find": 1,
343
- "findFrom": 1,
344
- "findIndex": 1,
345
- "findIndexFrom": 1,
346
- "findKey": 1,
347
- "findLast": 1,
348
- "findLastFrom": 1,
349
- "findLastIndex": 1,
350
- "findLastIndexFrom": 1,
351
- "findLastKey": 1,
352
- "flatMap": 1,
353
- "flatMapDeep": 1,
354
- "flatMapDepth": 1,
355
- "forEach": 1,
356
- "forEachRight": 1,
357
- "forIn": 1,
358
- "forInRight": 1,
359
- "forOwn": 1,
360
- "forOwnRight": 1,
361
- "map": 1,
362
- "mapKeys": 1,
363
- "mapValues": 1,
364
- "partition": 1,
365
- "reduce": 2,
366
- "reduceRight": 2,
367
- "reject": 1,
368
- "remove": 1,
369
- "some": 1,
370
- "takeRightWhile": 1,
371
- "takeWhile": 1,
372
- "times": 1,
373
- "transform": 2
374
- };
375
- exports2.iterateeRearg = {
376
- "mapKeys": [1],
377
- "reduceRight": [1, 0]
378
- };
379
- exports2.methodRearg = {
380
- "assignInAllWith": [1, 0],
381
- "assignInWith": [1, 2, 0],
382
- "assignAllWith": [1, 0],
383
- "assignWith": [1, 2, 0],
384
- "differenceBy": [1, 2, 0],
385
- "differenceWith": [1, 2, 0],
386
- "getOr": [2, 1, 0],
387
- "intersectionBy": [1, 2, 0],
388
- "intersectionWith": [1, 2, 0],
389
- "isEqualWith": [1, 2, 0],
390
- "isMatchWith": [2, 1, 0],
391
- "mergeAllWith": [1, 0],
392
- "mergeWith": [1, 2, 0],
393
- "padChars": [2, 1, 0],
394
- "padCharsEnd": [2, 1, 0],
395
- "padCharsStart": [2, 1, 0],
396
- "pullAllBy": [2, 1, 0],
397
- "pullAllWith": [2, 1, 0],
398
- "rangeStep": [1, 2, 0],
399
- "rangeStepRight": [1, 2, 0],
400
- "setWith": [3, 1, 2, 0],
401
- "sortedIndexBy": [2, 1, 0],
402
- "sortedLastIndexBy": [2, 1, 0],
403
- "unionBy": [1, 2, 0],
404
- "unionWith": [1, 2, 0],
405
- "updateWith": [3, 1, 2, 0],
406
- "xorBy": [1, 2, 0],
407
- "xorWith": [1, 2, 0],
408
- "zipWith": [1, 2, 0]
409
- };
410
- exports2.methodSpread = {
411
- "assignAll": { "start": 0 },
412
- "assignAllWith": { "start": 0 },
413
- "assignInAll": { "start": 0 },
414
- "assignInAllWith": { "start": 0 },
415
- "defaultsAll": { "start": 0 },
416
- "defaultsDeepAll": { "start": 0 },
417
- "invokeArgs": { "start": 2 },
418
- "invokeArgsMap": { "start": 2 },
419
- "mergeAll": { "start": 0 },
420
- "mergeAllWith": { "start": 0 },
421
- "partial": { "start": 1 },
422
- "partialRight": { "start": 1 },
423
- "without": { "start": 1 },
424
- "zipAll": { "start": 0 }
425
- };
426
- exports2.mutate = {
427
- "array": {
428
- "fill": true,
429
- "pull": true,
430
- "pullAll": true,
431
- "pullAllBy": true,
432
- "pullAllWith": true,
433
- "pullAt": true,
434
- "remove": true,
435
- "reverse": true
436
- },
437
- "object": {
438
- "assign": true,
439
- "assignAll": true,
440
- "assignAllWith": true,
441
- "assignIn": true,
442
- "assignInAll": true,
443
- "assignInAllWith": true,
444
- "assignInWith": true,
445
- "assignWith": true,
446
- "defaults": true,
447
- "defaultsAll": true,
448
- "defaultsDeep": true,
449
- "defaultsDeepAll": true,
450
- "merge": true,
451
- "mergeAll": true,
452
- "mergeAllWith": true,
453
- "mergeWith": true
454
- },
455
- "set": {
456
- "set": true,
457
- "setWith": true,
458
- "unset": true,
459
- "update": true,
460
- "updateWith": true
461
- }
462
- };
463
- exports2.realToAlias = function() {
464
- var hasOwnProperty = Object.prototype.hasOwnProperty, object = exports2.aliasToReal, result = {};
465
- for (var key in object) {
466
- var value = object[key];
467
- if (hasOwnProperty.call(result, value)) {
468
- result[value].push(key);
469
- } else {
470
- result[value] = [key];
471
- }
472
- }
473
- return result;
474
- }();
475
- exports2.remap = {
476
- "assignAll": "assign",
477
- "assignAllWith": "assignWith",
478
- "assignInAll": "assignIn",
479
- "assignInAllWith": "assignInWith",
480
- "curryN": "curry",
481
- "curryRightN": "curryRight",
482
- "defaultsAll": "defaults",
483
- "defaultsDeepAll": "defaultsDeep",
484
- "findFrom": "find",
485
- "findIndexFrom": "findIndex",
486
- "findLastFrom": "findLast",
487
- "findLastIndexFrom": "findLastIndex",
488
- "getOr": "get",
489
- "includesFrom": "includes",
490
- "indexOfFrom": "indexOf",
491
- "invokeArgs": "invoke",
492
- "invokeArgsMap": "invokeMap",
493
- "lastIndexOfFrom": "lastIndexOf",
494
- "mergeAll": "merge",
495
- "mergeAllWith": "mergeWith",
496
- "padChars": "pad",
497
- "padCharsEnd": "padEnd",
498
- "padCharsStart": "padStart",
499
- "propertyOf": "get",
500
- "rangeStep": "range",
501
- "rangeStepRight": "rangeRight",
502
- "restFrom": "rest",
503
- "spreadFrom": "spread",
504
- "trimChars": "trim",
505
- "trimCharsEnd": "trimEnd",
506
- "trimCharsStart": "trimStart",
507
- "zipAll": "zip"
508
- };
509
- exports2.skipFixed = {
510
- "castArray": true,
511
- "flow": true,
512
- "flowRight": true,
513
- "iteratee": true,
514
- "mixin": true,
515
- "rearg": true,
516
- "runInContext": true
517
- };
518
- exports2.skipRearg = {
519
- "add": true,
520
- "assign": true,
521
- "assignIn": true,
522
- "bind": true,
523
- "bindKey": true,
524
- "concat": true,
525
- "difference": true,
526
- "divide": true,
527
- "eq": true,
528
- "gt": true,
529
- "gte": true,
530
- "isEqual": true,
531
- "lt": true,
532
- "lte": true,
533
- "matchesProperty": true,
534
- "merge": true,
535
- "multiply": true,
536
- "overArgs": true,
537
- "partial": true,
538
- "partialRight": true,
539
- "propertyOf": true,
540
- "random": true,
541
- "range": true,
542
- "rangeRight": true,
543
- "subtract": true,
544
- "zip": true,
545
- "zipObject": true,
546
- "zipObjectDeep": true
547
- };
548
- })(_mapping);
549
- var placeholder;
550
- var hasRequiredPlaceholder;
551
- function requirePlaceholder() {
552
- if (hasRequiredPlaceholder) return placeholder;
553
- hasRequiredPlaceholder = 1;
554
- placeholder = {};
555
- return placeholder;
556
- }
557
- var mapping = _mapping, fallbackHolder = requirePlaceholder();
558
- var push = Array.prototype.push;
559
- function baseArity(func, n) {
560
- return n == 2 ? function(a, b) {
561
- return func.apply(void 0, arguments);
562
- } : function(a) {
563
- return func.apply(void 0, arguments);
564
- };
565
- }
566
- function baseAry(func, n) {
567
- return n == 2 ? function(a, b) {
568
- return func(a, b);
569
- } : function(a) {
570
- return func(a);
571
- };
572
- }
573
- function cloneArray(array) {
574
- var length = array ? array.length : 0, result = Array(length);
575
- while (length--) {
576
- result[length] = array[length];
577
- }
578
- return result;
579
- }
580
- function createCloner(func) {
581
- return function(object) {
582
- return func({}, object);
583
- };
584
- }
585
- function flatSpread(func, start) {
586
- return function() {
587
- var length = arguments.length, lastIndex = length - 1, args = Array(length);
588
- while (length--) {
589
- args[length] = arguments[length];
590
- }
591
- var array = args[start], otherArgs = args.slice(0, start);
592
- if (array) {
593
- push.apply(otherArgs, array);
594
- }
595
- if (start != lastIndex) {
596
- push.apply(otherArgs, args.slice(start + 1));
597
- }
598
- return func.apply(this, otherArgs);
599
- };
600
- }
601
- function wrapImmutable(func, cloner) {
602
- return function() {
603
- var length = arguments.length;
604
- if (!length) {
605
- return;
606
- }
607
- var args = Array(length);
608
- while (length--) {
609
- args[length] = arguments[length];
610
- }
611
- var result = args[0] = cloner.apply(void 0, args);
612
- func.apply(void 0, args);
613
- return result;
614
- };
615
- }
616
- function baseConvert(util, name, func, options) {
617
- var isLib = typeof name == "function", isObj = name === Object(name);
618
- if (isObj) {
619
- options = func;
620
- func = name;
621
- name = void 0;
622
- }
623
- if (func == null) {
624
- throw new TypeError();
625
- }
626
- options || (options = {});
627
- var config = {
628
- "cap": "cap" in options ? options.cap : true,
629
- "curry": "curry" in options ? options.curry : true,
630
- "fixed": "fixed" in options ? options.fixed : true,
631
- "immutable": "immutable" in options ? options.immutable : true,
632
- "rearg": "rearg" in options ? options.rearg : true
633
- };
634
- var defaultHolder = isLib ? func : fallbackHolder, forceCurry = "curry" in options && options.curry, forceFixed = "fixed" in options && options.fixed, forceRearg = "rearg" in options && options.rearg, pristine = isLib ? func.runInContext() : void 0;
635
- var helpers = isLib ? func : {
636
- "ary": util.ary,
637
- "assign": util.assign,
638
- "clone": util.clone,
639
- "curry": util.curry,
640
- "forEach": util.forEach,
641
- "isArray": util.isArray,
642
- "isError": util.isError,
643
- "isFunction": util.isFunction,
644
- "isWeakMap": util.isWeakMap,
645
- "iteratee": util.iteratee,
646
- "keys": util.keys,
647
- "rearg": util.rearg,
648
- "toInteger": util.toInteger,
649
- "toPath": util.toPath
650
- };
651
- var ary = helpers.ary, assign = helpers.assign, clone = helpers.clone, curry = helpers.curry, each = helpers.forEach, isArray = helpers.isArray, isError = helpers.isError, isFunction = helpers.isFunction, isWeakMap = helpers.isWeakMap, keys = helpers.keys, rearg = helpers.rearg, toInteger = helpers.toInteger, toPath = helpers.toPath;
652
- var aryMethodKeys = keys(mapping.aryMethod);
653
- var wrappers = {
654
- "castArray": function(castArray) {
655
- return function() {
656
- var value = arguments[0];
657
- return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(void 0, arguments);
658
- };
659
- },
660
- "iteratee": function(iteratee) {
661
- return function() {
662
- var func2 = arguments[0], arity = arguments[1], result = iteratee(func2, arity), length = result.length;
663
- if (config.cap && typeof arity == "number") {
664
- arity = arity > 2 ? arity - 2 : 1;
665
- return length && length <= arity ? result : baseAry(result, arity);
666
- }
667
- return result;
668
- };
669
- },
670
- "mixin": function(mixin) {
671
- return function(source) {
672
- var func2 = this;
673
- if (!isFunction(func2)) {
674
- return mixin(func2, Object(source));
675
- }
676
- var pairs2 = [];
677
- each(keys(source), function(key) {
678
- if (isFunction(source[key])) {
679
- pairs2.push([key, func2.prototype[key]]);
680
- }
681
- });
682
- mixin(func2, Object(source));
683
- each(pairs2, function(pair) {
684
- var value = pair[1];
685
- if (isFunction(value)) {
686
- func2.prototype[pair[0]] = value;
687
- } else {
688
- delete func2.prototype[pair[0]];
689
- }
690
- });
691
- return func2;
692
- };
693
- },
694
- "nthArg": function(nthArg) {
695
- return function(n) {
696
- var arity = n < 0 ? 1 : toInteger(n) + 1;
697
- return curry(nthArg(n), arity);
698
- };
699
- },
700
- "rearg": function(rearg2) {
701
- return function(func2, indexes) {
702
- var arity = indexes ? indexes.length : 0;
703
- return curry(rearg2(func2, indexes), arity);
704
- };
705
- },
706
- "runInContext": function(runInContext) {
707
- return function(context) {
708
- return baseConvert(util, runInContext(context), options);
709
- };
710
- }
711
- };
712
- function castCap(name2, func2) {
713
- if (config.cap) {
714
- var indexes = mapping.iterateeRearg[name2];
715
- if (indexes) {
716
- return iterateeRearg(func2, indexes);
717
- }
718
- var n = !isLib && mapping.iterateeAry[name2];
719
- if (n) {
720
- return iterateeAry(func2, n);
721
- }
722
- }
723
- return func2;
724
- }
725
- function castCurry(name2, func2, n) {
726
- return forceCurry || config.curry && n > 1 ? curry(func2, n) : func2;
727
- }
728
- function castFixed(name2, func2, n) {
729
- if (config.fixed && (forceFixed || !mapping.skipFixed[name2])) {
730
- var data = mapping.methodSpread[name2], start = data && data.start;
731
- return start === void 0 ? ary(func2, n) : flatSpread(func2, start);
732
- }
733
- return func2;
734
- }
735
- function castRearg(name2, func2, n) {
736
- return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name2]) ? rearg(func2, mapping.methodRearg[name2] || mapping.aryRearg[n]) : func2;
737
- }
738
- function cloneByPath(object, path) {
739
- path = toPath(path);
740
- var index = -1, length = path.length, lastIndex = length - 1, result = clone(Object(object)), nested = result;
741
- while (nested != null && ++index < length) {
742
- var key = path[index], value = nested[key];
743
- if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) {
744
- nested[key] = clone(index == lastIndex ? value : Object(value));
745
- }
746
- nested = nested[key];
747
- }
748
- return result;
749
- }
750
- function convertLib(options2) {
751
- return _.runInContext.convert(options2)(void 0);
752
- }
753
- function createConverter(name2, func2) {
754
- var realName = mapping.aliasToReal[name2] || name2, methodName = mapping.remap[realName] || realName, oldOptions = options;
755
- return function(options2) {
756
- var newUtil = isLib ? pristine : helpers, newFunc = isLib ? pristine[methodName] : func2, newOptions = assign(assign({}, oldOptions), options2);
757
- return baseConvert(newUtil, realName, newFunc, newOptions);
758
- };
759
- }
760
- function iterateeAry(func2, n) {
761
- return overArg(func2, function(func3) {
762
- return typeof func3 == "function" ? baseAry(func3, n) : func3;
763
- });
764
- }
765
- function iterateeRearg(func2, indexes) {
766
- return overArg(func2, function(func3) {
767
- var n = indexes.length;
768
- return baseArity(rearg(baseAry(func3, n), indexes), n);
769
- });
770
- }
771
- function overArg(func2, transform) {
772
- return function() {
773
- var length = arguments.length;
774
- if (!length) {
775
- return func2();
776
- }
777
- var args = Array(length);
778
- while (length--) {
779
- args[length] = arguments[length];
780
- }
781
- var index = config.rearg ? 0 : length - 1;
782
- args[index] = transform(args[index]);
783
- return func2.apply(void 0, args);
784
- };
785
- }
786
- function wrap(name2, func2, placeholder2) {
787
- var result, realName = mapping.aliasToReal[name2] || name2, wrapped = func2, wrapper = wrappers[realName];
788
- if (wrapper) {
789
- wrapped = wrapper(func2);
790
- } else if (config.immutable) {
791
- if (mapping.mutate.array[realName]) {
792
- wrapped = wrapImmutable(func2, cloneArray);
793
- } else if (mapping.mutate.object[realName]) {
794
- wrapped = wrapImmutable(func2, createCloner(func2));
795
- } else if (mapping.mutate.set[realName]) {
796
- wrapped = wrapImmutable(func2, cloneByPath);
797
- }
798
- }
799
- each(aryMethodKeys, function(aryKey) {
800
- each(mapping.aryMethod[aryKey], function(otherName) {
801
- if (realName == otherName) {
802
- var data = mapping.methodSpread[realName], afterRearg = data && data.afterRearg;
803
- result = afterRearg ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
804
- result = castCap(realName, result);
805
- result = castCurry(realName, result, aryKey);
806
- return false;
807
- }
808
- });
809
- return !result;
810
- });
811
- result || (result = wrapped);
812
- if (result == func2) {
813
- result = forceCurry ? curry(result, 1) : function() {
814
- return func2.apply(this, arguments);
815
- };
816
- }
817
- result.convert = createConverter(realName, func2);
818
- result.placeholder = func2.placeholder = placeholder2;
819
- return result;
820
- }
821
- if (!isObj) {
822
- return wrap(name, func, defaultHolder);
823
- }
824
- var _ = func;
825
- var pairs = [];
826
- each(aryMethodKeys, function(aryKey) {
827
- each(mapping.aryMethod[aryKey], function(key) {
828
- var func2 = _[mapping.remap[key] || key];
829
- if (func2) {
830
- pairs.push([key, wrap(key, func2, _)]);
831
- }
832
- });
833
- });
834
- each(keys(_), function(key) {
835
- var func2 = _[key];
836
- if (typeof func2 == "function") {
837
- var length = pairs.length;
838
- while (length--) {
839
- if (pairs[length][0] == key) {
840
- return;
841
- }
842
- }
843
- func2.convert = createConverter(key, func2);
844
- pairs.push([key, func2]);
845
- }
846
- });
847
- each(pairs, function(pair) {
848
- _[pair[0]] = pair[1];
849
- });
850
- _.convert = convertLib;
851
- _.placeholder = _;
852
- each(keys(_), function(key) {
853
- each(mapping.realToAlias[key] || [], function(alias) {
854
- _[alias] = _[key];
855
- });
856
- });
857
- return _;
858
- }
859
- var _baseConvert = baseConvert;
860
- exports._baseConvert = _baseConvert;
861
- exports.commonjsGlobal = commonjsGlobal;
862
- exports.getAugmentedNamespace = getAugmentedNamespace;
863
- exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
864
- exports.requirePlaceholder = requirePlaceholder;