@mchp-mcc/dspic33a-flash 1.0.1 → 1.0.3

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.
@@ -1,4378 +1,2 @@
1
- var autoCreator =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = "./generated_module/src/autoCreator.ts");
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ "./generated_module/src/autoCreator.ts":
91
- /*!*********************************************!*\
92
- !*** ./generated_module/src/autoCreator.ts ***!
93
- \*********************************************/
94
- /*! exports provided: getCreatorFunctions */
95
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
96
-
97
- "use strict";
98
- __webpack_require__.r(__webpack_exports__);
99
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
100
- /* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getUserData */ "./generated_module/src/getUserData.ts");
101
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
102
-
103
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
104
-
105
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
106
-
107
-
108
-
109
- var createAutoCreator = function createAutoCreator(getCreatorFunctions) {
110
- return function () {
111
- return _objectSpread({
112
- getModuleConfig: _getUserData__WEBPACK_IMPORTED_MODULE_0__["getModuleConfigFromFile"]
113
- }, getCreatorFunctions());
114
- };
115
- };
116
-
117
- var getCreatorFunctions = createAutoCreator(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]);
118
-
119
- /***/ }),
120
-
121
- /***/ "./generated_module/src/getUserData.ts":
122
- /*!*********************************************!*\
123
- !*** ./generated_module/src/getUserData.ts ***!
124
- \*********************************************/
125
- /*! exports provided: getCreatorFunctions, getDerivedData, getPinsDataFromFile, getPinsLogicFromFile, getModuleConfigFromFile */
126
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
127
-
128
- "use strict";
129
- __webpack_require__.r(__webpack_exports__);
130
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsDataFromFile", function() { return getPinsDataFromFile; });
131
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogicFromFile", function() { return getPinsLogicFromFile; });
132
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleConfigFromFile", function() { return getModuleConfigFromFile; });
133
- /* harmony import */ var _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../src/CreatorFunctions */ "./src/CreatorFunctions.ts");
134
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]; });
135
-
136
- /* harmony import */ var _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../src/DerivedData */ "./src/DerivedData.ts");
137
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__["getDerivedData"]; });
138
-
139
-
140
-
141
- var getPinsDataFromFile = function getPinsDataFromFile() {
142
- try {
143
- return __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '../../src/pinsdata.json'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
144
- } catch (_unused) {
145
- return undefined;
146
- }
147
- };
148
- var getPinsLogicFromFile = function getPinsLogicFromFile() {
149
- try {
150
- return __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '../../src/PinsLogic.ts'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
151
- } catch (_unused2) {
152
- return undefined;
153
- }
154
- };
155
- var getModuleConfigFromFile = function getModuleConfigFromFile() {
156
- try {
157
- return __webpack_require__(/*! ../../src/moduleConfig.json */ "./src/moduleConfig.json");
158
- } catch (_unused3) {
159
- return undefined;
160
- }
161
- };
162
-
163
- /***/ }),
164
-
165
- /***/ "./node_modules/@microchip/flash-interface/lib/package.json":
166
- /*!******************************************************************!*\
167
- !*** ./node_modules/@microchip/flash-interface/lib/package.json ***!
168
- \******************************************************************/
169
- /*! exports provided: name, version, license, main, typings, scripts, husky, lint-staged, bitBucketRepository, repository, publishConfig, jest, dependencies, devDependencies, files, notificationEmail, default */
170
- /***/ (function(module) {
171
-
172
- module.exports = JSON.parse("{\"name\":\"@microchip/flash-interface\",\"version\":\"1.3.1\",\"license\":\"SEE LICENSE IN LICENSE.txt\",\"main\":\"lib/src/index.js\",\"typings\":\"./lib/src/index.d.ts\",\"scripts\":{\"build\":\"tsc\",\"test\":\"jest\",\"lint:nofix\":\"eslint \\\"./src/**/*.{ts,tsx}\\\" --quiet\",\"lint\":\"tsc --noEmit && yarn lint:nofix --fix\"},\"husky\":{\"hooks\":{\"pre-commit\":\"tsc --noEmit && lint-staged\"}},\"lint-staged\":{\"./src/**/*.{ts,tsx}\":[\"eslint --fix\"]},\"bitBucketRepository\":\"https://bitbucket.microchip.com/projects/CC16SCRIP/repos/basic-flash-interface/browse\",\"repository\":{\"type\":\"git\",\"url\":\"git+ssh://git@https://bitbucket.microchip.com/scm/cc16scrip/basic-flash-interface.git\"},\"publishConfig\":{\"registry\":\"https://artifacts.microchip.com/artifactory/api/npm/npm/\"},\"jest\":{\"testPathIgnorePatterns\":[\"/node_modules/\",\"/run/\",\"/lib/\"],\"modulePathIgnorePatterns\":[\"<rootDir>/run\"],\"preset\":\"ts-jest\",\"collectCoverage\":true},\"dependencies\":{\"@microchip/scf-common\":\"^3.5.0\",\"@microchip/scf-interface\":\"^1.4.0\"},\"devDependencies\":{\"@types/jest\":\"^24.0.14\",\"@types/node\":\"^12.0.10\",\"@typescript-eslint/eslint-plugin\":\"^2.27.0\",\"@typescript-eslint/parser\":\"^2.27.0\",\"eslint\":\"^6.8.0\",\"eslint-config-prettier\":\"^6.10.1\",\"eslint-plugin-prettier\":\"^3.1.2\",\"fs-extra\":\"^8.1.0\",\"husky\":\"^4.2.4\",\"jest\":\"^24.8.0\",\"lint-staged\":\"^10.2.0\",\"prettier\":\"^2.0.4\",\"ts-jest\":\"^24.0.2\",\"typescript\":\"^3.8.3\"},\"files\":[\"lib/**/*\"],\"notificationEmail\":\"03234d44.microchip.com@amer.teams.ms\"}");
173
-
174
- /***/ }),
175
-
176
- /***/ "./node_modules/@microchip/flash-interface/lib/src/flash-basic.js":
177
- /*!************************************************************************!*\
178
- !*** ./node_modules/@microchip/flash-interface/lib/src/flash-basic.js ***!
179
- \************************************************************************/
180
- /*! no static exports found */
181
- /***/ (function(module, exports, __webpack_require__) {
182
-
183
- "use strict";
184
-
185
- var __importStar = (this && this.__importStar) || function (mod) {
186
- if (mod && mod.__esModule) return mod;
187
- var result = {};
188
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
189
- result["default"] = mod;
190
- return result;
191
- };
192
- Object.defineProperty(exports, "__esModule", { value: true });
193
- var InterfaceTypes = __importStar(__webpack_require__(/*! @microchip/scf-interface */ "./node_modules/@microchip/scf-interface/lib/index.js"));
194
- var pkgJson = __importStar(__webpack_require__(/*! ../package.json */ "./node_modules/@microchip/flash-interface/lib/package.json"));
195
- exports.getInterfaceId = function () {
196
- return {
197
- name: InterfaceTypes.getInterfaceName(pkgJson),
198
- version: InterfaceTypes.getInterfaceVersion(pkgJson),
199
- };
200
- };
201
- var createMock = function () {
202
- return {
203
- interfaceId: exports.getInterfaceId(),
204
- payload: {
205
- interfaceApi: exports.Interface.createFirmwareApi("flash-interface", [
206
- { name: "BasicFlash.h", path: "flash/" },
207
- ]),
208
- flashWriteInstructionCount: 2,
209
- flashInterface: "FLASH_NON_TRANSPARENT_DOUBLE_WORD_v1.0",
210
- flashWordWriteSizeInInstructions: 2,
211
- flashEraseInstructionCount: 1024,
212
- flashHasAuxiliary: 0,
213
- flashEnduranceMinimum: 10000,
214
- flashBytesPerInstruction: 3,
215
- flashPcUnitsPerInstruction: 2,
216
- flashWordWriteOpCode: 16385,
217
- flashOpCodeMask: 16399,
218
- flashErasePageSizeInInstructions: 1024,
219
- flashErasePageOpCode: 16387,
220
- flashHasEcc: 1,
221
- flashHasRowProgramming: 1,
222
- flashWriteRowSizeInInstructions: 128,
223
- flashWriteRowOpCode: 16386,
224
- flashLatchIsMemoryMapped: 1,
225
- flashLatchIsTransparent: 0,
226
- flashLatchIsBusMastered: 0,
227
- flashEndAddress: 704256,
228
- flashProgramBeginAddress: 256,
229
- flashUnlockKey: "0x00AA0055",
230
- flashHasDualPartition: true,
231
- flashBootMode: "SINGLE",
232
- flashFirstPartitionEndAddress: 44800,
233
- flashSecondPartitionBeginAddress: 4194304,
234
- flashSecondPartitionProgramBeginAddress: 4194816,
235
- flashSecondPartitionEndAddress: 4239104,
236
- },
237
- args: {
238
- requestId: {
239
- flashWriteInstructionCount: 2,
240
- },
241
- },
242
- };
243
- };
244
- exports.createApi = function (prefix) {
245
- return {
246
- PageErase: {
247
- name: prefix + "_PageErase",
248
- returns: prefix + "_RETURN_STATUS",
249
- arguments: [
250
- {
251
- name: "flashAddress",
252
- type: "flash_adr_t",
253
- },
254
- {
255
- name: "unlockKey",
256
- type: "flash_key_t",
257
- },
258
- ],
259
- },
260
- WordWrite: {
261
- name: prefix + "_WordWrite",
262
- returns: prefix + "_RETURN_STATUS",
263
- arguments: [
264
- {
265
- name: "flashAddress",
266
- type: "flash_adr_t",
267
- },
268
- {
269
- name: "flash_data_t *",
270
- type: "data",
271
- },
272
- {
273
- name: "unlockKey",
274
- type: "flash_key_t",
275
- },
276
- ],
277
- },
278
- RowWrite: {
279
- name: prefix + "_RowWrite",
280
- returns: prefix + "_RETURN_STATUS",
281
- arguments: [
282
- {
283
- name: "flashAddress",
284
- type: "flash_adr_t",
285
- },
286
- {
287
- name: "flash_data_t *",
288
- type: "data",
289
- },
290
- {
291
- name: "unlockKey",
292
- type: "flash_key_t",
293
- },
294
- ],
295
- },
296
- Read: {
297
- name: prefix + "_Read",
298
- returns: prefix + "_RETURN_STATUS",
299
- arguments: [
300
- {
301
- name: "flashAddress",
302
- type: "flash_adr_t",
303
- },
304
- {
305
- name: "count",
306
- type: "uint32_t",
307
- },
308
- {
309
- name: "flash_data_t *",
310
- type: "data",
311
- },
312
- ],
313
- },
314
- ErasePageOffsetGet: {
315
- name: prefix + "_ErasePageOffsetGet",
316
- returns: "uint32_t",
317
- arguments: [
318
- {
319
- name: "flashAddress",
320
- type: "flash_adr_t",
321
- },
322
- ],
323
- },
324
- ErasePageAddressGet: {
325
- name: prefix + "_ErasePageAddressGet",
326
- returns: "uint32_t",
327
- arguments: [
328
- {
329
- name: "flashAddress",
330
- type: "flash_adr_t",
331
- },
332
- ],
333
- },
334
- Initialize: {
335
- name: prefix + "_Initialize",
336
- returns: "void",
337
- arguments: [],
338
- },
339
- NonBlockingPageErase: {
340
- name: prefix + "_NonBlockingPageErase",
341
- returns: prefix + "_RETURN_STATUS",
342
- arguments: [
343
- {
344
- name: "flashAddress",
345
- type: "flash_adr_t",
346
- },
347
- {
348
- name: "unlockKey",
349
- type: "flash_key_t",
350
- },
351
- {
352
- name: "callbackHandler",
353
- type: "FLASH_CALLBACK",
354
- },
355
- {
356
- name: "context",
357
- type: "void*",
358
- },
359
- ],
360
- },
361
- NonBlockingBulkErase: {
362
- name: prefix + "_NonBlockingBulkErase",
363
- returns: prefix + "_RETURN_STATUS",
364
- arguments: [
365
- {
366
- name: "panel",
367
- type: "enum FLASH_PANEL",
368
- },
369
- {
370
- name: "unlockKey",
371
- type: "flash_key_t",
372
- },
373
- {
374
- name: "callbackHandler",
375
- type: "FLASH_CALLBACK",
376
- },
377
- {
378
- name: "context",
379
- type: "void*",
380
- },
381
- ],
382
- },
383
- NonBlockingWordWrite: {
384
- name: prefix + "_NonBlockingWordWrite",
385
- returns: prefix + "_RETURN_STATUS",
386
- arguments: [
387
- {
388
- name: "flashAddress",
389
- type: "flash_adr_t",
390
- },
391
- {
392
- name: "flash_data_t *",
393
- type: "data",
394
- },
395
- {
396
- name: "unlockKey",
397
- type: "flash_key_t",
398
- },
399
- {
400
- name: "callbackHandler",
401
- type: "FLASH_CALLBACK",
402
- },
403
- {
404
- name: "context",
405
- type: "void*",
406
- },
407
- ],
408
- },
409
- NonBlockingRowWrite: {
410
- name: prefix + "_NonBlockingRowWrite",
411
- returns: prefix + "_RETURN_STATUS",
412
- arguments: [
413
- {
414
- name: "flashAddress",
415
- type: "flash_adr_t",
416
- },
417
- {
418
- name: "flash_data_t *",
419
- type: "data",
420
- },
421
- {
422
- name: "unlockKey",
423
- type: "flash_key_t",
424
- },
425
- {
426
- name: "callbackHandler",
427
- type: "FLASH_CALLBACK",
428
- },
429
- {
430
- name: "context",
431
- type: "void*",
432
- },
433
- ],
434
- },
435
- NonBlockingRead: {
436
- name: prefix + "_NonBlockingRead",
437
- returns: prefix + "_RETURN_STATUS",
438
- arguments: [
439
- {
440
- name: "flashAddress",
441
- type: "flash_adr_t",
442
- },
443
- {
444
- name: "count",
445
- type: "uint32_t",
446
- },
447
- {
448
- name: "flash_data_t *",
449
- type: "data",
450
- },
451
- ],
452
- },
453
- NonBlockingPolledPageErase: {
454
- name: prefix + "_NonBlockingPolledPageErase",
455
- returns: prefix + "_RETURN_STATUS",
456
- arguments: [
457
- {
458
- name: "flashAddress",
459
- type: "flash_adr_t",
460
- },
461
- {
462
- name: "unlockKey",
463
- type: "flash_key_t",
464
- },
465
- ],
466
- },
467
- NonBlockingPolledBulkErase: {
468
- name: prefix + "_NonBlockingBulkErase",
469
- returns: prefix + "_RETURN_STATUS",
470
- arguments: [
471
- {
472
- name: "panel",
473
- type: "enum FLASH_PANEL",
474
- },
475
- {
476
- name: "unlockKey",
477
- type: "flash_key_t",
478
- },
479
- ],
480
- },
481
- NonBlockingPolledWordWrite: {
482
- name: prefix + "_NonBlockingPolledWordWrite",
483
- returns: prefix + "_RETURN_STATUS",
484
- arguments: [
485
- {
486
- name: "flashAddress",
487
- type: "flash_adr_t",
488
- },
489
- {
490
- name: "flash_data_t *",
491
- type: "data",
492
- },
493
- {
494
- name: "unlockKey",
495
- type: "flash_key_t",
496
- },
497
- ],
498
- },
499
- NonBlockingPolledRowWrite: {
500
- name: prefix + "_NonBlockingPolledRowWrite",
501
- returns: prefix + "_RETURN_STATUS",
502
- arguments: [
503
- {
504
- name: "flashAddress",
505
- type: "flash_adr_t",
506
- },
507
- {
508
- name: "flash_data_t *",
509
- type: "data",
510
- },
511
- {
512
- name: "unlockKey",
513
- type: "flash_key_t",
514
- },
515
- ],
516
- },
517
- NonBlockingPolledRead: {
518
- name: prefix + "_NonBlockingPolledRead",
519
- returns: prefix + "_RETURN_STATUS",
520
- arguments: [
521
- {
522
- name: "flashAddress",
523
- type: "flash_adr_t",
524
- },
525
- {
526
- name: "count",
527
- type: "uint32_t",
528
- },
529
- {
530
- name: "flash_data_t *",
531
- type: "data",
532
- },
533
- ],
534
- },
535
- operationStatusGet: {
536
- name: prefix + "_OperationStatusGet",
537
- returns: prefix + "_RETURN_STATUS",
538
- arguments: [],
539
- },
540
- };
541
- };
542
- var createPrototypeImport = function () {
543
- return {
544
- interfaceId: exports.getInterfaceId(),
545
- };
546
- };
547
- var createPrototypeExport = function () {
548
- return {
549
- interfaces: [{ interfaceId: exports.getInterfaceId() }],
550
- };
551
- };
552
- exports.createFirmwareApi = function (moduleName, headerFiles, createCustomApi) {
553
- var prefix = moduleName ? moduleName.toUpperCase() : "undefined";
554
- var api = createCustomApi ? createCustomApi() : exports.createApi(prefix);
555
- return {
556
- api: api,
557
- simpleApi: InterfaceTypes.buildSimpleApi(api),
558
- headerFiles: headerFiles
559
- ? headerFiles
560
- : [{ name: prefix.toLowerCase() + ".h", path: "flash/" }],
561
- };
562
- };
563
- exports.Interface = {
564
- createPrototypeExport: createPrototypeExport,
565
- createPrototypeImport: createPrototypeImport,
566
- getInterfaceId: exports.getInterfaceId,
567
- createMock: createMock,
568
- createFirmwareApi: exports.createFirmwareApi,
569
- };
570
- //# sourceMappingURL=flash-basic.js.map
571
-
572
- /***/ }),
573
-
574
- /***/ "./node_modules/@microchip/flash-interface/lib/src/index.js":
575
- /*!******************************************************************!*\
576
- !*** ./node_modules/@microchip/flash-interface/lib/src/index.js ***!
577
- \******************************************************************/
578
- /*! no static exports found */
579
- /***/ (function(module, exports, __webpack_require__) {
580
-
581
- "use strict";
582
-
583
- Object.defineProperty(exports, "__esModule", { value: true });
584
- var flash_basic_1 = __webpack_require__(/*! ./flash-basic */ "./node_modules/@microchip/flash-interface/lib/src/flash-basic.js");
585
- exports.Interface = flash_basic_1.Interface;
586
- //# sourceMappingURL=index.js.map
587
-
588
- /***/ }),
589
-
590
- /***/ "./node_modules/@microchip/scf-interface/lib/c-function-types.js":
591
- /*!***********************************************************************!*\
592
- !*** ./node_modules/@microchip/scf-interface/lib/c-function-types.js ***!
593
- \***********************************************************************/
594
- /*! no static exports found */
595
- /***/ (function(module, exports, __webpack_require__) {
596
-
597
- "use strict";
598
-
599
- Object.defineProperty(exports, "__esModule", { value: true });
600
- exports.buildSimpleApi = function (functions) {
601
- var api = {};
602
- for (var key in functions) {
603
- api[key] = buildFunction(functions[key]);
604
- }
605
- return api;
606
- };
607
- var buildFunction = function (cFunction) {
608
- return cFunction.returns + " " + cFunction.name + "(" + buildArguments(cFunction.arguments) + ")";
609
- };
610
- var buildArguments = function (args) {
611
- if (args) {
612
- return args.map(function (arg) { return arg.type + " " + arg.name; }).join(", ");
613
- }
614
- else {
615
- return "void";
616
- }
617
- };
618
-
619
-
620
- /***/ }),
621
-
622
- /***/ "./node_modules/@microchip/scf-interface/lib/helpers.js":
623
- /*!**************************************************************!*\
624
- !*** ./node_modules/@microchip/scf-interface/lib/helpers.js ***!
625
- \**************************************************************/
626
- /*! no static exports found */
627
- /***/ (function(module, exports, __webpack_require__) {
628
-
629
- "use strict";
630
-
631
- Object.defineProperty(exports, "__esModule", { value: true });
632
- exports.getInterfaceName = function (pkgJson) {
633
- var strReplace = "@microchip/";
634
- var interfaceName;
635
- if (pkgJson) {
636
- interfaceName = pkgJson["name"];
637
- if (interfaceName) {
638
- interfaceName = interfaceName.replace(strReplace, "");
639
- }
640
- }
641
- if (!interfaceName) {
642
- throw new Error("Invalid Interface Name...!");
643
- }
644
- return interfaceName;
645
- };
646
- exports.getInterfaceVersion = function (pkgJson) {
647
- var versionRegex = new RegExp("\\d+.\\d+.\\d+");
648
- var version;
649
- if (pkgJson) {
650
- version = pkgJson["version"];
651
- }
652
- if (!version && !versionRegex.test(version)) {
653
- throw new Error("Invalid Interface Version...!");
654
- }
655
- return version;
656
- };
657
-
658
-
659
- /***/ }),
660
-
661
- /***/ "./node_modules/@microchip/scf-interface/lib/index.js":
662
- /*!************************************************************!*\
663
- !*** ./node_modules/@microchip/scf-interface/lib/index.js ***!
664
- \************************************************************/
665
- /*! no static exports found */
666
- /***/ (function(module, exports, __webpack_require__) {
667
-
668
- "use strict";
669
-
670
- Object.defineProperty(exports, "__esModule", { value: true });
671
- var c_function_types_1 = __webpack_require__(/*! ./c-function-types */ "./node_modules/@microchip/scf-interface/lib/c-function-types.js");
672
- exports.buildSimpleApi = c_function_types_1.buildSimpleApi;
673
- var helpers_1 = __webpack_require__(/*! ./helpers */ "./node_modules/@microchip/scf-interface/lib/helpers.js");
674
- exports.getInterfaceName = helpers_1.getInterfaceName;
675
- exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
676
-
677
-
678
- /***/ }),
679
-
680
- /***/ "./node_modules/lodash.find/index.js":
681
- /*!*******************************************!*\
682
- !*** ./node_modules/lodash.find/index.js ***!
683
- \*******************************************/
684
- /*! no static exports found */
685
- /***/ (function(module, exports, __webpack_require__) {
686
-
687
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
688
- * lodash (Custom Build) <https://lodash.com/>
689
- * Build: `lodash modularize exports="npm" -o ./`
690
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
691
- * Released under MIT license <https://lodash.com/license>
692
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
693
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
694
- */
695
-
696
- /** Used as the size to enable large array optimizations. */
697
- var LARGE_ARRAY_SIZE = 200;
698
-
699
- /** Used as the `TypeError` message for "Functions" methods. */
700
- var FUNC_ERROR_TEXT = 'Expected a function';
701
-
702
- /** Used to stand-in for `undefined` hash values. */
703
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
704
-
705
- /** Used to compose bitmasks for comparison styles. */
706
- var UNORDERED_COMPARE_FLAG = 1,
707
- PARTIAL_COMPARE_FLAG = 2;
708
-
709
- /** Used as references for various `Number` constants. */
710
- var INFINITY = 1 / 0,
711
- MAX_SAFE_INTEGER = 9007199254740991,
712
- MAX_INTEGER = 1.7976931348623157e+308,
713
- NAN = 0 / 0;
714
-
715
- /** `Object#toString` result references. */
716
- var argsTag = '[object Arguments]',
717
- arrayTag = '[object Array]',
718
- boolTag = '[object Boolean]',
719
- dateTag = '[object Date]',
720
- errorTag = '[object Error]',
721
- funcTag = '[object Function]',
722
- genTag = '[object GeneratorFunction]',
723
- mapTag = '[object Map]',
724
- numberTag = '[object Number]',
725
- objectTag = '[object Object]',
726
- promiseTag = '[object Promise]',
727
- regexpTag = '[object RegExp]',
728
- setTag = '[object Set]',
729
- stringTag = '[object String]',
730
- symbolTag = '[object Symbol]',
731
- weakMapTag = '[object WeakMap]';
732
-
733
- var arrayBufferTag = '[object ArrayBuffer]',
734
- dataViewTag = '[object DataView]',
735
- float32Tag = '[object Float32Array]',
736
- float64Tag = '[object Float64Array]',
737
- int8Tag = '[object Int8Array]',
738
- int16Tag = '[object Int16Array]',
739
- int32Tag = '[object Int32Array]',
740
- uint8Tag = '[object Uint8Array]',
741
- uint8ClampedTag = '[object Uint8ClampedArray]',
742
- uint16Tag = '[object Uint16Array]',
743
- uint32Tag = '[object Uint32Array]';
744
-
745
- /** Used to match property names within property paths. */
746
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
747
- reIsPlainProp = /^\w*$/,
748
- reLeadingDot = /^\./,
749
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
750
-
751
- /**
752
- * Used to match `RegExp`
753
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
754
- */
755
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
756
-
757
- /** Used to match leading and trailing whitespace. */
758
- var reTrim = /^\s+|\s+$/g;
759
-
760
- /** Used to match backslashes in property paths. */
761
- var reEscapeChar = /\\(\\)?/g;
762
-
763
- /** Used to detect bad signed hexadecimal string values. */
764
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
765
-
766
- /** Used to detect binary string values. */
767
- var reIsBinary = /^0b[01]+$/i;
768
-
769
- /** Used to detect host constructors (Safari). */
770
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
771
-
772
- /** Used to detect octal string values. */
773
- var reIsOctal = /^0o[0-7]+$/i;
774
-
775
- /** Used to detect unsigned integer values. */
776
- var reIsUint = /^(?:0|[1-9]\d*)$/;
777
-
778
- /** Used to identify `toStringTag` values of typed arrays. */
779
- var typedArrayTags = {};
780
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
781
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
782
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
783
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
784
- typedArrayTags[uint32Tag] = true;
785
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
786
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
787
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
788
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
789
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
790
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
791
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
792
- typedArrayTags[weakMapTag] = false;
793
-
794
- /** Built-in method references without a dependency on `root`. */
795
- var freeParseInt = parseInt;
796
-
797
- /** Detect free variable `global` from Node.js. */
798
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
799
-
800
- /** Detect free variable `self`. */
801
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
802
-
803
- /** Used as a reference to the global object. */
804
- var root = freeGlobal || freeSelf || Function('return this')();
805
-
806
- /** Detect free variable `exports`. */
807
- var freeExports = true && exports && !exports.nodeType && exports;
808
-
809
- /** Detect free variable `module`. */
810
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
811
-
812
- /** Detect the popular CommonJS extension `module.exports`. */
813
- var moduleExports = freeModule && freeModule.exports === freeExports;
814
-
815
- /** Detect free variable `process` from Node.js. */
816
- var freeProcess = moduleExports && freeGlobal.process;
817
-
818
- /** Used to access faster Node.js helpers. */
819
- var nodeUtil = (function() {
820
- try {
821
- return freeProcess && freeProcess.binding('util');
822
- } catch (e) {}
823
- }());
824
-
825
- /* Node.js helper references. */
826
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
827
-
828
- /**
829
- * A specialized version of `_.some` for arrays without support for iteratee
830
- * shorthands.
831
- *
832
- * @private
833
- * @param {Array} [array] The array to iterate over.
834
- * @param {Function} predicate The function invoked per iteration.
835
- * @returns {boolean} Returns `true` if any element passes the predicate check,
836
- * else `false`.
837
- */
838
- function arraySome(array, predicate) {
839
- var index = -1,
840
- length = array ? array.length : 0;
841
-
842
- while (++index < length) {
843
- if (predicate(array[index], index, array)) {
844
- return true;
845
- }
846
- }
847
- return false;
848
- }
849
-
850
- /**
851
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
852
- * support for iteratee shorthands.
853
- *
854
- * @private
855
- * @param {Array} array The array to inspect.
856
- * @param {Function} predicate The function invoked per iteration.
857
- * @param {number} fromIndex The index to search from.
858
- * @param {boolean} [fromRight] Specify iterating from right to left.
859
- * @returns {number} Returns the index of the matched value, else `-1`.
860
- */
861
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
862
- var length = array.length,
863
- index = fromIndex + (fromRight ? 1 : -1);
864
-
865
- while ((fromRight ? index-- : ++index < length)) {
866
- if (predicate(array[index], index, array)) {
867
- return index;
868
- }
869
- }
870
- return -1;
871
- }
872
-
873
- /**
874
- * The base implementation of `_.property` without support for deep paths.
875
- *
876
- * @private
877
- * @param {string} key The key of the property to get.
878
- * @returns {Function} Returns the new accessor function.
879
- */
880
- function baseProperty(key) {
881
- return function(object) {
882
- return object == null ? undefined : object[key];
883
- };
884
- }
885
-
886
- /**
887
- * The base implementation of `_.times` without support for iteratee shorthands
888
- * or max array length checks.
889
- *
890
- * @private
891
- * @param {number} n The number of times to invoke `iteratee`.
892
- * @param {Function} iteratee The function invoked per iteration.
893
- * @returns {Array} Returns the array of results.
894
- */
895
- function baseTimes(n, iteratee) {
896
- var index = -1,
897
- result = Array(n);
898
-
899
- while (++index < n) {
900
- result[index] = iteratee(index);
901
- }
902
- return result;
903
- }
904
-
905
- /**
906
- * The base implementation of `_.unary` without support for storing metadata.
907
- *
908
- * @private
909
- * @param {Function} func The function to cap arguments for.
910
- * @returns {Function} Returns the new capped function.
911
- */
912
- function baseUnary(func) {
913
- return function(value) {
914
- return func(value);
915
- };
916
- }
917
-
918
- /**
919
- * Gets the value at `key` of `object`.
920
- *
921
- * @private
922
- * @param {Object} [object] The object to query.
923
- * @param {string} key The key of the property to get.
924
- * @returns {*} Returns the property value.
925
- */
926
- function getValue(object, key) {
927
- return object == null ? undefined : object[key];
928
- }
929
-
930
- /**
931
- * Checks if `value` is a host object in IE < 9.
932
- *
933
- * @private
934
- * @param {*} value The value to check.
935
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
936
- */
937
- function isHostObject(value) {
938
- // Many host objects are `Object` objects that can coerce to strings
939
- // despite having improperly defined `toString` methods.
940
- var result = false;
941
- if (value != null && typeof value.toString != 'function') {
942
- try {
943
- result = !!(value + '');
944
- } catch (e) {}
945
- }
946
- return result;
947
- }
948
-
949
- /**
950
- * Converts `map` to its key-value pairs.
951
- *
952
- * @private
953
- * @param {Object} map The map to convert.
954
- * @returns {Array} Returns the key-value pairs.
955
- */
956
- function mapToArray(map) {
957
- var index = -1,
958
- result = Array(map.size);
959
-
960
- map.forEach(function(value, key) {
961
- result[++index] = [key, value];
962
- });
963
- return result;
964
- }
965
-
966
- /**
967
- * Creates a unary function that invokes `func` with its argument transformed.
968
- *
969
- * @private
970
- * @param {Function} func The function to wrap.
971
- * @param {Function} transform The argument transform.
972
- * @returns {Function} Returns the new function.
973
- */
974
- function overArg(func, transform) {
975
- return function(arg) {
976
- return func(transform(arg));
977
- };
978
- }
979
-
980
- /**
981
- * Converts `set` to an array of its values.
982
- *
983
- * @private
984
- * @param {Object} set The set to convert.
985
- * @returns {Array} Returns the values.
986
- */
987
- function setToArray(set) {
988
- var index = -1,
989
- result = Array(set.size);
990
-
991
- set.forEach(function(value) {
992
- result[++index] = value;
993
- });
994
- return result;
995
- }
996
-
997
- /** Used for built-in method references. */
998
- var arrayProto = Array.prototype,
999
- funcProto = Function.prototype,
1000
- objectProto = Object.prototype;
1001
-
1002
- /** Used to detect overreaching core-js shims. */
1003
- var coreJsData = root['__core-js_shared__'];
1004
-
1005
- /** Used to detect methods masquerading as native. */
1006
- var maskSrcKey = (function() {
1007
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
1008
- return uid ? ('Symbol(src)_1.' + uid) : '';
1009
- }());
1010
-
1011
- /** Used to resolve the decompiled source of functions. */
1012
- var funcToString = funcProto.toString;
1013
-
1014
- /** Used to check objects for own properties. */
1015
- var hasOwnProperty = objectProto.hasOwnProperty;
1016
-
1017
- /**
1018
- * Used to resolve the
1019
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1020
- * of values.
1021
- */
1022
- var objectToString = objectProto.toString;
1023
-
1024
- /** Used to detect if a method is native. */
1025
- var reIsNative = RegExp('^' +
1026
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1027
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1028
- );
1029
-
1030
- /** Built-in value references. */
1031
- var Symbol = root.Symbol,
1032
- Uint8Array = root.Uint8Array,
1033
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
1034
- splice = arrayProto.splice;
1035
-
1036
- /* Built-in method references for those with the same name as other `lodash` methods. */
1037
- var nativeKeys = overArg(Object.keys, Object),
1038
- nativeMax = Math.max;
1039
-
1040
- /* Built-in method references that are verified to be native. */
1041
- var DataView = getNative(root, 'DataView'),
1042
- Map = getNative(root, 'Map'),
1043
- Promise = getNative(root, 'Promise'),
1044
- Set = getNative(root, 'Set'),
1045
- WeakMap = getNative(root, 'WeakMap'),
1046
- nativeCreate = getNative(Object, 'create');
1047
-
1048
- /** Used to detect maps, sets, and weakmaps. */
1049
- var dataViewCtorString = toSource(DataView),
1050
- mapCtorString = toSource(Map),
1051
- promiseCtorString = toSource(Promise),
1052
- setCtorString = toSource(Set),
1053
- weakMapCtorString = toSource(WeakMap);
1054
-
1055
- /** Used to convert symbols to primitives and strings. */
1056
- var symbolProto = Symbol ? Symbol.prototype : undefined,
1057
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
1058
- symbolToString = symbolProto ? symbolProto.toString : undefined;
1059
-
1060
- /**
1061
- * Creates a hash object.
1062
- *
1063
- * @private
1064
- * @constructor
1065
- * @param {Array} [entries] The key-value pairs to cache.
1066
- */
1067
- function Hash(entries) {
1068
- var index = -1,
1069
- length = entries ? entries.length : 0;
1070
-
1071
- this.clear();
1072
- while (++index < length) {
1073
- var entry = entries[index];
1074
- this.set(entry[0], entry[1]);
1075
- }
1076
- }
1077
-
1078
- /**
1079
- * Removes all key-value entries from the hash.
1080
- *
1081
- * @private
1082
- * @name clear
1083
- * @memberOf Hash
1084
- */
1085
- function hashClear() {
1086
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
1087
- }
1088
-
1089
- /**
1090
- * Removes `key` and its value from the hash.
1091
- *
1092
- * @private
1093
- * @name delete
1094
- * @memberOf Hash
1095
- * @param {Object} hash The hash to modify.
1096
- * @param {string} key The key of the value to remove.
1097
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1098
- */
1099
- function hashDelete(key) {
1100
- return this.has(key) && delete this.__data__[key];
1101
- }
1102
-
1103
- /**
1104
- * Gets the hash value for `key`.
1105
- *
1106
- * @private
1107
- * @name get
1108
- * @memberOf Hash
1109
- * @param {string} key The key of the value to get.
1110
- * @returns {*} Returns the entry value.
1111
- */
1112
- function hashGet(key) {
1113
- var data = this.__data__;
1114
- if (nativeCreate) {
1115
- var result = data[key];
1116
- return result === HASH_UNDEFINED ? undefined : result;
1117
- }
1118
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
1119
- }
1120
-
1121
- /**
1122
- * Checks if a hash value for `key` exists.
1123
- *
1124
- * @private
1125
- * @name has
1126
- * @memberOf Hash
1127
- * @param {string} key The key of the entry to check.
1128
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1129
- */
1130
- function hashHas(key) {
1131
- var data = this.__data__;
1132
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
1133
- }
1134
-
1135
- /**
1136
- * Sets the hash `key` to `value`.
1137
- *
1138
- * @private
1139
- * @name set
1140
- * @memberOf Hash
1141
- * @param {string} key The key of the value to set.
1142
- * @param {*} value The value to set.
1143
- * @returns {Object} Returns the hash instance.
1144
- */
1145
- function hashSet(key, value) {
1146
- var data = this.__data__;
1147
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1148
- return this;
1149
- }
1150
-
1151
- // Add methods to `Hash`.
1152
- Hash.prototype.clear = hashClear;
1153
- Hash.prototype['delete'] = hashDelete;
1154
- Hash.prototype.get = hashGet;
1155
- Hash.prototype.has = hashHas;
1156
- Hash.prototype.set = hashSet;
1157
-
1158
- /**
1159
- * Creates an list cache object.
1160
- *
1161
- * @private
1162
- * @constructor
1163
- * @param {Array} [entries] The key-value pairs to cache.
1164
- */
1165
- function ListCache(entries) {
1166
- var index = -1,
1167
- length = entries ? entries.length : 0;
1168
-
1169
- this.clear();
1170
- while (++index < length) {
1171
- var entry = entries[index];
1172
- this.set(entry[0], entry[1]);
1173
- }
1174
- }
1175
-
1176
- /**
1177
- * Removes all key-value entries from the list cache.
1178
- *
1179
- * @private
1180
- * @name clear
1181
- * @memberOf ListCache
1182
- */
1183
- function listCacheClear() {
1184
- this.__data__ = [];
1185
- }
1186
-
1187
- /**
1188
- * Removes `key` and its value from the list cache.
1189
- *
1190
- * @private
1191
- * @name delete
1192
- * @memberOf ListCache
1193
- * @param {string} key The key of the value to remove.
1194
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1195
- */
1196
- function listCacheDelete(key) {
1197
- var data = this.__data__,
1198
- index = assocIndexOf(data, key);
1199
-
1200
- if (index < 0) {
1201
- return false;
1202
- }
1203
- var lastIndex = data.length - 1;
1204
- if (index == lastIndex) {
1205
- data.pop();
1206
- } else {
1207
- splice.call(data, index, 1);
1208
- }
1209
- return true;
1210
- }
1211
-
1212
- /**
1213
- * Gets the list cache value for `key`.
1214
- *
1215
- * @private
1216
- * @name get
1217
- * @memberOf ListCache
1218
- * @param {string} key The key of the value to get.
1219
- * @returns {*} Returns the entry value.
1220
- */
1221
- function listCacheGet(key) {
1222
- var data = this.__data__,
1223
- index = assocIndexOf(data, key);
1224
-
1225
- return index < 0 ? undefined : data[index][1];
1226
- }
1227
-
1228
- /**
1229
- * Checks if a list cache value for `key` exists.
1230
- *
1231
- * @private
1232
- * @name has
1233
- * @memberOf ListCache
1234
- * @param {string} key The key of the entry to check.
1235
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1236
- */
1237
- function listCacheHas(key) {
1238
- return assocIndexOf(this.__data__, key) > -1;
1239
- }
1240
-
1241
- /**
1242
- * Sets the list cache `key` to `value`.
1243
- *
1244
- * @private
1245
- * @name set
1246
- * @memberOf ListCache
1247
- * @param {string} key The key of the value to set.
1248
- * @param {*} value The value to set.
1249
- * @returns {Object} Returns the list cache instance.
1250
- */
1251
- function listCacheSet(key, value) {
1252
- var data = this.__data__,
1253
- index = assocIndexOf(data, key);
1254
-
1255
- if (index < 0) {
1256
- data.push([key, value]);
1257
- } else {
1258
- data[index][1] = value;
1259
- }
1260
- return this;
1261
- }
1262
-
1263
- // Add methods to `ListCache`.
1264
- ListCache.prototype.clear = listCacheClear;
1265
- ListCache.prototype['delete'] = listCacheDelete;
1266
- ListCache.prototype.get = listCacheGet;
1267
- ListCache.prototype.has = listCacheHas;
1268
- ListCache.prototype.set = listCacheSet;
1269
-
1270
- /**
1271
- * Creates a map cache object to store key-value pairs.
1272
- *
1273
- * @private
1274
- * @constructor
1275
- * @param {Array} [entries] The key-value pairs to cache.
1276
- */
1277
- function MapCache(entries) {
1278
- var index = -1,
1279
- length = entries ? entries.length : 0;
1280
-
1281
- this.clear();
1282
- while (++index < length) {
1283
- var entry = entries[index];
1284
- this.set(entry[0], entry[1]);
1285
- }
1286
- }
1287
-
1288
- /**
1289
- * Removes all key-value entries from the map.
1290
- *
1291
- * @private
1292
- * @name clear
1293
- * @memberOf MapCache
1294
- */
1295
- function mapCacheClear() {
1296
- this.__data__ = {
1297
- 'hash': new Hash,
1298
- 'map': new (Map || ListCache),
1299
- 'string': new Hash
1300
- };
1301
- }
1302
-
1303
- /**
1304
- * Removes `key` and its value from the map.
1305
- *
1306
- * @private
1307
- * @name delete
1308
- * @memberOf MapCache
1309
- * @param {string} key The key of the value to remove.
1310
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1311
- */
1312
- function mapCacheDelete(key) {
1313
- return getMapData(this, key)['delete'](key);
1314
- }
1315
-
1316
- /**
1317
- * Gets the map value for `key`.
1318
- *
1319
- * @private
1320
- * @name get
1321
- * @memberOf MapCache
1322
- * @param {string} key The key of the value to get.
1323
- * @returns {*} Returns the entry value.
1324
- */
1325
- function mapCacheGet(key) {
1326
- return getMapData(this, key).get(key);
1327
- }
1328
-
1329
- /**
1330
- * Checks if a map value for `key` exists.
1331
- *
1332
- * @private
1333
- * @name has
1334
- * @memberOf MapCache
1335
- * @param {string} key The key of the entry to check.
1336
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1337
- */
1338
- function mapCacheHas(key) {
1339
- return getMapData(this, key).has(key);
1340
- }
1341
-
1342
- /**
1343
- * Sets the map `key` to `value`.
1344
- *
1345
- * @private
1346
- * @name set
1347
- * @memberOf MapCache
1348
- * @param {string} key The key of the value to set.
1349
- * @param {*} value The value to set.
1350
- * @returns {Object} Returns the map cache instance.
1351
- */
1352
- function mapCacheSet(key, value) {
1353
- getMapData(this, key).set(key, value);
1354
- return this;
1355
- }
1356
-
1357
- // Add methods to `MapCache`.
1358
- MapCache.prototype.clear = mapCacheClear;
1359
- MapCache.prototype['delete'] = mapCacheDelete;
1360
- MapCache.prototype.get = mapCacheGet;
1361
- MapCache.prototype.has = mapCacheHas;
1362
- MapCache.prototype.set = mapCacheSet;
1363
-
1364
- /**
1365
- *
1366
- * Creates an array cache object to store unique values.
1367
- *
1368
- * @private
1369
- * @constructor
1370
- * @param {Array} [values] The values to cache.
1371
- */
1372
- function SetCache(values) {
1373
- var index = -1,
1374
- length = values ? values.length : 0;
1375
-
1376
- this.__data__ = new MapCache;
1377
- while (++index < length) {
1378
- this.add(values[index]);
1379
- }
1380
- }
1381
-
1382
- /**
1383
- * Adds `value` to the array cache.
1384
- *
1385
- * @private
1386
- * @name add
1387
- * @memberOf SetCache
1388
- * @alias push
1389
- * @param {*} value The value to cache.
1390
- * @returns {Object} Returns the cache instance.
1391
- */
1392
- function setCacheAdd(value) {
1393
- this.__data__.set(value, HASH_UNDEFINED);
1394
- return this;
1395
- }
1396
-
1397
- /**
1398
- * Checks if `value` is in the array cache.
1399
- *
1400
- * @private
1401
- * @name has
1402
- * @memberOf SetCache
1403
- * @param {*} value The value to search for.
1404
- * @returns {number} Returns `true` if `value` is found, else `false`.
1405
- */
1406
- function setCacheHas(value) {
1407
- return this.__data__.has(value);
1408
- }
1409
-
1410
- // Add methods to `SetCache`.
1411
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
1412
- SetCache.prototype.has = setCacheHas;
1413
-
1414
- /**
1415
- * Creates a stack cache object to store key-value pairs.
1416
- *
1417
- * @private
1418
- * @constructor
1419
- * @param {Array} [entries] The key-value pairs to cache.
1420
- */
1421
- function Stack(entries) {
1422
- this.__data__ = new ListCache(entries);
1423
- }
1424
-
1425
- /**
1426
- * Removes all key-value entries from the stack.
1427
- *
1428
- * @private
1429
- * @name clear
1430
- * @memberOf Stack
1431
- */
1432
- function stackClear() {
1433
- this.__data__ = new ListCache;
1434
- }
1435
-
1436
- /**
1437
- * Removes `key` and its value from the stack.
1438
- *
1439
- * @private
1440
- * @name delete
1441
- * @memberOf Stack
1442
- * @param {string} key The key of the value to remove.
1443
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1444
- */
1445
- function stackDelete(key) {
1446
- return this.__data__['delete'](key);
1447
- }
1448
-
1449
- /**
1450
- * Gets the stack value for `key`.
1451
- *
1452
- * @private
1453
- * @name get
1454
- * @memberOf Stack
1455
- * @param {string} key The key of the value to get.
1456
- * @returns {*} Returns the entry value.
1457
- */
1458
- function stackGet(key) {
1459
- return this.__data__.get(key);
1460
- }
1461
-
1462
- /**
1463
- * Checks if a stack value for `key` exists.
1464
- *
1465
- * @private
1466
- * @name has
1467
- * @memberOf Stack
1468
- * @param {string} key The key of the entry to check.
1469
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1470
- */
1471
- function stackHas(key) {
1472
- return this.__data__.has(key);
1473
- }
1474
-
1475
- /**
1476
- * Sets the stack `key` to `value`.
1477
- *
1478
- * @private
1479
- * @name set
1480
- * @memberOf Stack
1481
- * @param {string} key The key of the value to set.
1482
- * @param {*} value The value to set.
1483
- * @returns {Object} Returns the stack cache instance.
1484
- */
1485
- function stackSet(key, value) {
1486
- var cache = this.__data__;
1487
- if (cache instanceof ListCache) {
1488
- var pairs = cache.__data__;
1489
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1490
- pairs.push([key, value]);
1491
- return this;
1492
- }
1493
- cache = this.__data__ = new MapCache(pairs);
1494
- }
1495
- cache.set(key, value);
1496
- return this;
1497
- }
1498
-
1499
- // Add methods to `Stack`.
1500
- Stack.prototype.clear = stackClear;
1501
- Stack.prototype['delete'] = stackDelete;
1502
- Stack.prototype.get = stackGet;
1503
- Stack.prototype.has = stackHas;
1504
- Stack.prototype.set = stackSet;
1505
-
1506
- /**
1507
- * Creates an array of the enumerable property names of the array-like `value`.
1508
- *
1509
- * @private
1510
- * @param {*} value The value to query.
1511
- * @param {boolean} inherited Specify returning inherited property names.
1512
- * @returns {Array} Returns the array of property names.
1513
- */
1514
- function arrayLikeKeys(value, inherited) {
1515
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
1516
- // Safari 9 makes `arguments.length` enumerable in strict mode.
1517
- var result = (isArray(value) || isArguments(value))
1518
- ? baseTimes(value.length, String)
1519
- : [];
1520
-
1521
- var length = result.length,
1522
- skipIndexes = !!length;
1523
-
1524
- for (var key in value) {
1525
- if ((inherited || hasOwnProperty.call(value, key)) &&
1526
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
1527
- result.push(key);
1528
- }
1529
- }
1530
- return result;
1531
- }
1532
-
1533
- /**
1534
- * Gets the index at which the `key` is found in `array` of key-value pairs.
1535
- *
1536
- * @private
1537
- * @param {Array} array The array to inspect.
1538
- * @param {*} key The key to search for.
1539
- * @returns {number} Returns the index of the matched value, else `-1`.
1540
- */
1541
- function assocIndexOf(array, key) {
1542
- var length = array.length;
1543
- while (length--) {
1544
- if (eq(array[length][0], key)) {
1545
- return length;
1546
- }
1547
- }
1548
- return -1;
1549
- }
1550
-
1551
- /**
1552
- * The base implementation of `_.get` without support for default values.
1553
- *
1554
- * @private
1555
- * @param {Object} object The object to query.
1556
- * @param {Array|string} path The path of the property to get.
1557
- * @returns {*} Returns the resolved value.
1558
- */
1559
- function baseGet(object, path) {
1560
- path = isKey(path, object) ? [path] : castPath(path);
1561
-
1562
- var index = 0,
1563
- length = path.length;
1564
-
1565
- while (object != null && index < length) {
1566
- object = object[toKey(path[index++])];
1567
- }
1568
- return (index && index == length) ? object : undefined;
1569
- }
1570
-
1571
- /**
1572
- * The base implementation of `getTag`.
1573
- *
1574
- * @private
1575
- * @param {*} value The value to query.
1576
- * @returns {string} Returns the `toStringTag`.
1577
- */
1578
- function baseGetTag(value) {
1579
- return objectToString.call(value);
1580
- }
1581
-
1582
- /**
1583
- * The base implementation of `_.hasIn` without support for deep paths.
1584
- *
1585
- * @private
1586
- * @param {Object} [object] The object to query.
1587
- * @param {Array|string} key The key to check.
1588
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
1589
- */
1590
- function baseHasIn(object, key) {
1591
- return object != null && key in Object(object);
1592
- }
1593
-
1594
- /**
1595
- * The base implementation of `_.isEqual` which supports partial comparisons
1596
- * and tracks traversed objects.
1597
- *
1598
- * @private
1599
- * @param {*} value The value to compare.
1600
- * @param {*} other The other value to compare.
1601
- * @param {Function} [customizer] The function to customize comparisons.
1602
- * @param {boolean} [bitmask] The bitmask of comparison flags.
1603
- * The bitmask may be composed of the following flags:
1604
- * 1 - Unordered comparison
1605
- * 2 - Partial comparison
1606
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
1607
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1608
- */
1609
- function baseIsEqual(value, other, customizer, bitmask, stack) {
1610
- if (value === other) {
1611
- return true;
1612
- }
1613
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
1614
- return value !== value && other !== other;
1615
- }
1616
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
1617
- }
1618
-
1619
- /**
1620
- * A specialized version of `baseIsEqual` for arrays and objects which performs
1621
- * deep comparisons and tracks traversed objects enabling objects with circular
1622
- * references to be compared.
1623
- *
1624
- * @private
1625
- * @param {Object} object The object to compare.
1626
- * @param {Object} other The other object to compare.
1627
- * @param {Function} equalFunc The function to determine equivalents of values.
1628
- * @param {Function} [customizer] The function to customize comparisons.
1629
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
1630
- * for more details.
1631
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
1632
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1633
- */
1634
- function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
1635
- var objIsArr = isArray(object),
1636
- othIsArr = isArray(other),
1637
- objTag = arrayTag,
1638
- othTag = arrayTag;
1639
-
1640
- if (!objIsArr) {
1641
- objTag = getTag(object);
1642
- objTag = objTag == argsTag ? objectTag : objTag;
1643
- }
1644
- if (!othIsArr) {
1645
- othTag = getTag(other);
1646
- othTag = othTag == argsTag ? objectTag : othTag;
1647
- }
1648
- var objIsObj = objTag == objectTag && !isHostObject(object),
1649
- othIsObj = othTag == objectTag && !isHostObject(other),
1650
- isSameTag = objTag == othTag;
1651
-
1652
- if (isSameTag && !objIsObj) {
1653
- stack || (stack = new Stack);
1654
- return (objIsArr || isTypedArray(object))
1655
- ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
1656
- : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
1657
- }
1658
- if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
1659
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
1660
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
1661
-
1662
- if (objIsWrapped || othIsWrapped) {
1663
- var objUnwrapped = objIsWrapped ? object.value() : object,
1664
- othUnwrapped = othIsWrapped ? other.value() : other;
1665
-
1666
- stack || (stack = new Stack);
1667
- return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
1668
- }
1669
- }
1670
- if (!isSameTag) {
1671
- return false;
1672
- }
1673
- stack || (stack = new Stack);
1674
- return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
1675
- }
1676
-
1677
- /**
1678
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
1679
- *
1680
- * @private
1681
- * @param {Object} object The object to inspect.
1682
- * @param {Object} source The object of property values to match.
1683
- * @param {Array} matchData The property names, values, and compare flags to match.
1684
- * @param {Function} [customizer] The function to customize comparisons.
1685
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
1686
- */
1687
- function baseIsMatch(object, source, matchData, customizer) {
1688
- var index = matchData.length,
1689
- length = index,
1690
- noCustomizer = !customizer;
1691
-
1692
- if (object == null) {
1693
- return !length;
1694
- }
1695
- object = Object(object);
1696
- while (index--) {
1697
- var data = matchData[index];
1698
- if ((noCustomizer && data[2])
1699
- ? data[1] !== object[data[0]]
1700
- : !(data[0] in object)
1701
- ) {
1702
- return false;
1703
- }
1704
- }
1705
- while (++index < length) {
1706
- data = matchData[index];
1707
- var key = data[0],
1708
- objValue = object[key],
1709
- srcValue = data[1];
1710
-
1711
- if (noCustomizer && data[2]) {
1712
- if (objValue === undefined && !(key in object)) {
1713
- return false;
1714
- }
1715
- } else {
1716
- var stack = new Stack;
1717
- if (customizer) {
1718
- var result = customizer(objValue, srcValue, key, object, source, stack);
1719
- }
1720
- if (!(result === undefined
1721
- ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
1722
- : result
1723
- )) {
1724
- return false;
1725
- }
1726
- }
1727
- }
1728
- return true;
1729
- }
1730
-
1731
- /**
1732
- * The base implementation of `_.isNative` without bad shim checks.
1733
- *
1734
- * @private
1735
- * @param {*} value The value to check.
1736
- * @returns {boolean} Returns `true` if `value` is a native function,
1737
- * else `false`.
1738
- */
1739
- function baseIsNative(value) {
1740
- if (!isObject(value) || isMasked(value)) {
1741
- return false;
1742
- }
1743
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
1744
- return pattern.test(toSource(value));
1745
- }
1746
-
1747
- /**
1748
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1749
- *
1750
- * @private
1751
- * @param {*} value The value to check.
1752
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1753
- */
1754
- function baseIsTypedArray(value) {
1755
- return isObjectLike(value) &&
1756
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
1757
- }
1758
-
1759
- /**
1760
- * The base implementation of `_.iteratee`.
1761
- *
1762
- * @private
1763
- * @param {*} [value=_.identity] The value to convert to an iteratee.
1764
- * @returns {Function} Returns the iteratee.
1765
- */
1766
- function baseIteratee(value) {
1767
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
1768
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
1769
- if (typeof value == 'function') {
1770
- return value;
1771
- }
1772
- if (value == null) {
1773
- return identity;
1774
- }
1775
- if (typeof value == 'object') {
1776
- return isArray(value)
1777
- ? baseMatchesProperty(value[0], value[1])
1778
- : baseMatches(value);
1779
- }
1780
- return property(value);
1781
- }
1782
-
1783
- /**
1784
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1785
- *
1786
- * @private
1787
- * @param {Object} object The object to query.
1788
- * @returns {Array} Returns the array of property names.
1789
- */
1790
- function baseKeys(object) {
1791
- if (!isPrototype(object)) {
1792
- return nativeKeys(object);
1793
- }
1794
- var result = [];
1795
- for (var key in Object(object)) {
1796
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
1797
- result.push(key);
1798
- }
1799
- }
1800
- return result;
1801
- }
1802
-
1803
- /**
1804
- * The base implementation of `_.matches` which doesn't clone `source`.
1805
- *
1806
- * @private
1807
- * @param {Object} source The object of property values to match.
1808
- * @returns {Function} Returns the new spec function.
1809
- */
1810
- function baseMatches(source) {
1811
- var matchData = getMatchData(source);
1812
- if (matchData.length == 1 && matchData[0][2]) {
1813
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
1814
- }
1815
- return function(object) {
1816
- return object === source || baseIsMatch(object, source, matchData);
1817
- };
1818
- }
1819
-
1820
- /**
1821
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
1822
- *
1823
- * @private
1824
- * @param {string} path The path of the property to get.
1825
- * @param {*} srcValue The value to match.
1826
- * @returns {Function} Returns the new spec function.
1827
- */
1828
- function baseMatchesProperty(path, srcValue) {
1829
- if (isKey(path) && isStrictComparable(srcValue)) {
1830
- return matchesStrictComparable(toKey(path), srcValue);
1831
- }
1832
- return function(object) {
1833
- var objValue = get(object, path);
1834
- return (objValue === undefined && objValue === srcValue)
1835
- ? hasIn(object, path)
1836
- : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
1837
- };
1838
- }
1839
-
1840
- /**
1841
- * A specialized version of `baseProperty` which supports deep paths.
1842
- *
1843
- * @private
1844
- * @param {Array|string} path The path of the property to get.
1845
- * @returns {Function} Returns the new accessor function.
1846
- */
1847
- function basePropertyDeep(path) {
1848
- return function(object) {
1849
- return baseGet(object, path);
1850
- };
1851
- }
1852
-
1853
- /**
1854
- * The base implementation of `_.toString` which doesn't convert nullish
1855
- * values to empty strings.
1856
- *
1857
- * @private
1858
- * @param {*} value The value to process.
1859
- * @returns {string} Returns the string.
1860
- */
1861
- function baseToString(value) {
1862
- // Exit early for strings to avoid a performance hit in some environments.
1863
- if (typeof value == 'string') {
1864
- return value;
1865
- }
1866
- if (isSymbol(value)) {
1867
- return symbolToString ? symbolToString.call(value) : '';
1868
- }
1869
- var result = (value + '');
1870
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1871
- }
1872
-
1873
- /**
1874
- * Casts `value` to a path array if it's not one.
1875
- *
1876
- * @private
1877
- * @param {*} value The value to inspect.
1878
- * @returns {Array} Returns the cast property path array.
1879
- */
1880
- function castPath(value) {
1881
- return isArray(value) ? value : stringToPath(value);
1882
- }
1883
-
1884
- /**
1885
- * Creates a `_.find` or `_.findLast` function.
1886
- *
1887
- * @private
1888
- * @param {Function} findIndexFunc The function to find the collection index.
1889
- * @returns {Function} Returns the new find function.
1890
- */
1891
- function createFind(findIndexFunc) {
1892
- return function(collection, predicate, fromIndex) {
1893
- var iterable = Object(collection);
1894
- if (!isArrayLike(collection)) {
1895
- var iteratee = baseIteratee(predicate, 3);
1896
- collection = keys(collection);
1897
- predicate = function(key) { return iteratee(iterable[key], key, iterable); };
1898
- }
1899
- var index = findIndexFunc(collection, predicate, fromIndex);
1900
- return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
1901
- };
1902
- }
1903
-
1904
- /**
1905
- * A specialized version of `baseIsEqualDeep` for arrays with support for
1906
- * partial deep comparisons.
1907
- *
1908
- * @private
1909
- * @param {Array} array The array to compare.
1910
- * @param {Array} other The other array to compare.
1911
- * @param {Function} equalFunc The function to determine equivalents of values.
1912
- * @param {Function} customizer The function to customize comparisons.
1913
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
1914
- * for more details.
1915
- * @param {Object} stack Tracks traversed `array` and `other` objects.
1916
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1917
- */
1918
- function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
1919
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
1920
- arrLength = array.length,
1921
- othLength = other.length;
1922
-
1923
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1924
- return false;
1925
- }
1926
- // Assume cyclic values are equal.
1927
- var stacked = stack.get(array);
1928
- if (stacked && stack.get(other)) {
1929
- return stacked == other;
1930
- }
1931
- var index = -1,
1932
- result = true,
1933
- seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
1934
-
1935
- stack.set(array, other);
1936
- stack.set(other, array);
1937
-
1938
- // Ignore non-index properties.
1939
- while (++index < arrLength) {
1940
- var arrValue = array[index],
1941
- othValue = other[index];
1942
-
1943
- if (customizer) {
1944
- var compared = isPartial
1945
- ? customizer(othValue, arrValue, index, other, array, stack)
1946
- : customizer(arrValue, othValue, index, array, other, stack);
1947
- }
1948
- if (compared !== undefined) {
1949
- if (compared) {
1950
- continue;
1951
- }
1952
- result = false;
1953
- break;
1954
- }
1955
- // Recursively compare arrays (susceptible to call stack limits).
1956
- if (seen) {
1957
- if (!arraySome(other, function(othValue, othIndex) {
1958
- if (!seen.has(othIndex) &&
1959
- (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
1960
- return seen.add(othIndex);
1961
- }
1962
- })) {
1963
- result = false;
1964
- break;
1965
- }
1966
- } else if (!(
1967
- arrValue === othValue ||
1968
- equalFunc(arrValue, othValue, customizer, bitmask, stack)
1969
- )) {
1970
- result = false;
1971
- break;
1972
- }
1973
- }
1974
- stack['delete'](array);
1975
- stack['delete'](other);
1976
- return result;
1977
- }
1978
-
1979
- /**
1980
- * A specialized version of `baseIsEqualDeep` for comparing objects of
1981
- * the same `toStringTag`.
1982
- *
1983
- * **Note:** This function only supports comparing values with tags of
1984
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
1985
- *
1986
- * @private
1987
- * @param {Object} object The object to compare.
1988
- * @param {Object} other The other object to compare.
1989
- * @param {string} tag The `toStringTag` of the objects to compare.
1990
- * @param {Function} equalFunc The function to determine equivalents of values.
1991
- * @param {Function} customizer The function to customize comparisons.
1992
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
1993
- * for more details.
1994
- * @param {Object} stack Tracks traversed `object` and `other` objects.
1995
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1996
- */
1997
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
1998
- switch (tag) {
1999
- case dataViewTag:
2000
- if ((object.byteLength != other.byteLength) ||
2001
- (object.byteOffset != other.byteOffset)) {
2002
- return false;
2003
- }
2004
- object = object.buffer;
2005
- other = other.buffer;
2006
-
2007
- case arrayBufferTag:
2008
- if ((object.byteLength != other.byteLength) ||
2009
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
2010
- return false;
2011
- }
2012
- return true;
2013
-
2014
- case boolTag:
2015
- case dateTag:
2016
- case numberTag:
2017
- // Coerce booleans to `1` or `0` and dates to milliseconds.
2018
- // Invalid dates are coerced to `NaN`.
2019
- return eq(+object, +other);
2020
-
2021
- case errorTag:
2022
- return object.name == other.name && object.message == other.message;
2023
-
2024
- case regexpTag:
2025
- case stringTag:
2026
- // Coerce regexes to strings and treat strings, primitives and objects,
2027
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
2028
- // for more details.
2029
- return object == (other + '');
2030
-
2031
- case mapTag:
2032
- var convert = mapToArray;
2033
-
2034
- case setTag:
2035
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
2036
- convert || (convert = setToArray);
2037
-
2038
- if (object.size != other.size && !isPartial) {
2039
- return false;
2040
- }
2041
- // Assume cyclic values are equal.
2042
- var stacked = stack.get(object);
2043
- if (stacked) {
2044
- return stacked == other;
2045
- }
2046
- bitmask |= UNORDERED_COMPARE_FLAG;
2047
-
2048
- // Recursively compare objects (susceptible to call stack limits).
2049
- stack.set(object, other);
2050
- var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
2051
- stack['delete'](object);
2052
- return result;
2053
-
2054
- case symbolTag:
2055
- if (symbolValueOf) {
2056
- return symbolValueOf.call(object) == symbolValueOf.call(other);
2057
- }
2058
- }
2059
- return false;
2060
- }
2061
-
2062
- /**
2063
- * A specialized version of `baseIsEqualDeep` for objects with support for
2064
- * partial deep comparisons.
2065
- *
2066
- * @private
2067
- * @param {Object} object The object to compare.
2068
- * @param {Object} other The other object to compare.
2069
- * @param {Function} equalFunc The function to determine equivalents of values.
2070
- * @param {Function} customizer The function to customize comparisons.
2071
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
2072
- * for more details.
2073
- * @param {Object} stack Tracks traversed `object` and `other` objects.
2074
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2075
- */
2076
- function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
2077
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
2078
- objProps = keys(object),
2079
- objLength = objProps.length,
2080
- othProps = keys(other),
2081
- othLength = othProps.length;
2082
-
2083
- if (objLength != othLength && !isPartial) {
2084
- return false;
2085
- }
2086
- var index = objLength;
2087
- while (index--) {
2088
- var key = objProps[index];
2089
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
2090
- return false;
2091
- }
2092
- }
2093
- // Assume cyclic values are equal.
2094
- var stacked = stack.get(object);
2095
- if (stacked && stack.get(other)) {
2096
- return stacked == other;
2097
- }
2098
- var result = true;
2099
- stack.set(object, other);
2100
- stack.set(other, object);
2101
-
2102
- var skipCtor = isPartial;
2103
- while (++index < objLength) {
2104
- key = objProps[index];
2105
- var objValue = object[key],
2106
- othValue = other[key];
2107
-
2108
- if (customizer) {
2109
- var compared = isPartial
2110
- ? customizer(othValue, objValue, key, other, object, stack)
2111
- : customizer(objValue, othValue, key, object, other, stack);
2112
- }
2113
- // Recursively compare objects (susceptible to call stack limits).
2114
- if (!(compared === undefined
2115
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
2116
- : compared
2117
- )) {
2118
- result = false;
2119
- break;
2120
- }
2121
- skipCtor || (skipCtor = key == 'constructor');
2122
- }
2123
- if (result && !skipCtor) {
2124
- var objCtor = object.constructor,
2125
- othCtor = other.constructor;
2126
-
2127
- // Non `Object` object instances with different constructors are not equal.
2128
- if (objCtor != othCtor &&
2129
- ('constructor' in object && 'constructor' in other) &&
2130
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2131
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2132
- result = false;
2133
- }
2134
- }
2135
- stack['delete'](object);
2136
- stack['delete'](other);
2137
- return result;
2138
- }
2139
-
2140
- /**
2141
- * Gets the data for `map`.
2142
- *
2143
- * @private
2144
- * @param {Object} map The map to query.
2145
- * @param {string} key The reference key.
2146
- * @returns {*} Returns the map data.
2147
- */
2148
- function getMapData(map, key) {
2149
- var data = map.__data__;
2150
- return isKeyable(key)
2151
- ? data[typeof key == 'string' ? 'string' : 'hash']
2152
- : data.map;
2153
- }
2154
-
2155
- /**
2156
- * Gets the property names, values, and compare flags of `object`.
2157
- *
2158
- * @private
2159
- * @param {Object} object The object to query.
2160
- * @returns {Array} Returns the match data of `object`.
2161
- */
2162
- function getMatchData(object) {
2163
- var result = keys(object),
2164
- length = result.length;
2165
-
2166
- while (length--) {
2167
- var key = result[length],
2168
- value = object[key];
2169
-
2170
- result[length] = [key, value, isStrictComparable(value)];
2171
- }
2172
- return result;
2173
- }
2174
-
2175
- /**
2176
- * Gets the native function at `key` of `object`.
2177
- *
2178
- * @private
2179
- * @param {Object} object The object to query.
2180
- * @param {string} key The key of the method to get.
2181
- * @returns {*} Returns the function if it's native, else `undefined`.
2182
- */
2183
- function getNative(object, key) {
2184
- var value = getValue(object, key);
2185
- return baseIsNative(value) ? value : undefined;
2186
- }
2187
-
2188
- /**
2189
- * Gets the `toStringTag` of `value`.
2190
- *
2191
- * @private
2192
- * @param {*} value The value to query.
2193
- * @returns {string} Returns the `toStringTag`.
2194
- */
2195
- var getTag = baseGetTag;
2196
-
2197
- // Fallback for data views, maps, sets, and weak maps in IE 11,
2198
- // for data views in Edge < 14, and promises in Node.js.
2199
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
2200
- (Map && getTag(new Map) != mapTag) ||
2201
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
2202
- (Set && getTag(new Set) != setTag) ||
2203
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
2204
- getTag = function(value) {
2205
- var result = objectToString.call(value),
2206
- Ctor = result == objectTag ? value.constructor : undefined,
2207
- ctorString = Ctor ? toSource(Ctor) : undefined;
2208
-
2209
- if (ctorString) {
2210
- switch (ctorString) {
2211
- case dataViewCtorString: return dataViewTag;
2212
- case mapCtorString: return mapTag;
2213
- case promiseCtorString: return promiseTag;
2214
- case setCtorString: return setTag;
2215
- case weakMapCtorString: return weakMapTag;
2216
- }
2217
- }
2218
- return result;
2219
- };
2220
- }
2221
-
2222
- /**
2223
- * Checks if `path` exists on `object`.
2224
- *
2225
- * @private
2226
- * @param {Object} object The object to query.
2227
- * @param {Array|string} path The path to check.
2228
- * @param {Function} hasFunc The function to check properties.
2229
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
2230
- */
2231
- function hasPath(object, path, hasFunc) {
2232
- path = isKey(path, object) ? [path] : castPath(path);
2233
-
2234
- var result,
2235
- index = -1,
2236
- length = path.length;
2237
-
2238
- while (++index < length) {
2239
- var key = toKey(path[index]);
2240
- if (!(result = object != null && hasFunc(object, key))) {
2241
- break;
2242
- }
2243
- object = object[key];
2244
- }
2245
- if (result) {
2246
- return result;
2247
- }
2248
- var length = object ? object.length : 0;
2249
- return !!length && isLength(length) && isIndex(key, length) &&
2250
- (isArray(object) || isArguments(object));
2251
- }
2252
-
2253
- /**
2254
- * Checks if `value` is a valid array-like index.
2255
- *
2256
- * @private
2257
- * @param {*} value The value to check.
2258
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2259
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2260
- */
2261
- function isIndex(value, length) {
2262
- length = length == null ? MAX_SAFE_INTEGER : length;
2263
- return !!length &&
2264
- (typeof value == 'number' || reIsUint.test(value)) &&
2265
- (value > -1 && value % 1 == 0 && value < length);
2266
- }
2267
-
2268
- /**
2269
- * Checks if `value` is a property name and not a property path.
2270
- *
2271
- * @private
2272
- * @param {*} value The value to check.
2273
- * @param {Object} [object] The object to query keys on.
2274
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2275
- */
2276
- function isKey(value, object) {
2277
- if (isArray(value)) {
2278
- return false;
2279
- }
2280
- var type = typeof value;
2281
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2282
- value == null || isSymbol(value)) {
2283
- return true;
2284
- }
2285
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2286
- (object != null && value in Object(object));
2287
- }
2288
-
2289
- /**
2290
- * Checks if `value` is suitable for use as unique object key.
2291
- *
2292
- * @private
2293
- * @param {*} value The value to check.
2294
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
2295
- */
2296
- function isKeyable(value) {
2297
- var type = typeof value;
2298
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
2299
- ? (value !== '__proto__')
2300
- : (value === null);
2301
- }
2302
-
2303
- /**
2304
- * Checks if `func` has its source masked.
2305
- *
2306
- * @private
2307
- * @param {Function} func The function to check.
2308
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
2309
- */
2310
- function isMasked(func) {
2311
- return !!maskSrcKey && (maskSrcKey in func);
2312
- }
2313
-
2314
- /**
2315
- * Checks if `value` is likely a prototype object.
2316
- *
2317
- * @private
2318
- * @param {*} value The value to check.
2319
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2320
- */
2321
- function isPrototype(value) {
2322
- var Ctor = value && value.constructor,
2323
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2324
-
2325
- return value === proto;
2326
- }
2327
-
2328
- /**
2329
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
2330
- *
2331
- * @private
2332
- * @param {*} value The value to check.
2333
- * @returns {boolean} Returns `true` if `value` if suitable for strict
2334
- * equality comparisons, else `false`.
2335
- */
2336
- function isStrictComparable(value) {
2337
- return value === value && !isObject(value);
2338
- }
2339
-
2340
- /**
2341
- * A specialized version of `matchesProperty` for source values suitable
2342
- * for strict equality comparisons, i.e. `===`.
2343
- *
2344
- * @private
2345
- * @param {string} key The key of the property to get.
2346
- * @param {*} srcValue The value to match.
2347
- * @returns {Function} Returns the new spec function.
2348
- */
2349
- function matchesStrictComparable(key, srcValue) {
2350
- return function(object) {
2351
- if (object == null) {
2352
- return false;
2353
- }
2354
- return object[key] === srcValue &&
2355
- (srcValue !== undefined || (key in Object(object)));
2356
- };
2357
- }
2358
-
2359
- /**
2360
- * Converts `string` to a property path array.
2361
- *
2362
- * @private
2363
- * @param {string} string The string to convert.
2364
- * @returns {Array} Returns the property path array.
2365
- */
2366
- var stringToPath = memoize(function(string) {
2367
- string = toString(string);
2368
-
2369
- var result = [];
2370
- if (reLeadingDot.test(string)) {
2371
- result.push('');
2372
- }
2373
- string.replace(rePropName, function(match, number, quote, string) {
2374
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
2375
- });
2376
- return result;
2377
- });
2378
-
2379
- /**
2380
- * Converts `value` to a string key if it's not a string or symbol.
2381
- *
2382
- * @private
2383
- * @param {*} value The value to inspect.
2384
- * @returns {string|symbol} Returns the key.
2385
- */
2386
- function toKey(value) {
2387
- if (typeof value == 'string' || isSymbol(value)) {
2388
- return value;
2389
- }
2390
- var result = (value + '');
2391
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2392
- }
2393
-
2394
- /**
2395
- * Converts `func` to its source code.
2396
- *
2397
- * @private
2398
- * @param {Function} func The function to process.
2399
- * @returns {string} Returns the source code.
2400
- */
2401
- function toSource(func) {
2402
- if (func != null) {
2403
- try {
2404
- return funcToString.call(func);
2405
- } catch (e) {}
2406
- try {
2407
- return (func + '');
2408
- } catch (e) {}
2409
- }
2410
- return '';
2411
- }
2412
-
2413
- /**
2414
- * This method is like `_.find` except that it returns the index of the first
2415
- * element `predicate` returns truthy for instead of the element itself.
2416
- *
2417
- * @static
2418
- * @memberOf _
2419
- * @since 1.1.0
2420
- * @category Array
2421
- * @param {Array} array The array to inspect.
2422
- * @param {Function} [predicate=_.identity]
2423
- * The function invoked per iteration.
2424
- * @param {number} [fromIndex=0] The index to search from.
2425
- * @returns {number} Returns the index of the found element, else `-1`.
2426
- * @example
2427
- *
2428
- * var users = [
2429
- * { 'user': 'barney', 'active': false },
2430
- * { 'user': 'fred', 'active': false },
2431
- * { 'user': 'pebbles', 'active': true }
2432
- * ];
2433
- *
2434
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
2435
- * // => 0
2436
- *
2437
- * // The `_.matches` iteratee shorthand.
2438
- * _.findIndex(users, { 'user': 'fred', 'active': false });
2439
- * // => 1
2440
- *
2441
- * // The `_.matchesProperty` iteratee shorthand.
2442
- * _.findIndex(users, ['active', false]);
2443
- * // => 0
2444
- *
2445
- * // The `_.property` iteratee shorthand.
2446
- * _.findIndex(users, 'active');
2447
- * // => 2
2448
- */
2449
- function findIndex(array, predicate, fromIndex) {
2450
- var length = array ? array.length : 0;
2451
- if (!length) {
2452
- return -1;
2453
- }
2454
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
2455
- if (index < 0) {
2456
- index = nativeMax(length + index, 0);
2457
- }
2458
- return baseFindIndex(array, baseIteratee(predicate, 3), index);
2459
- }
2460
-
2461
- /**
2462
- * Iterates over elements of `collection`, returning the first element
2463
- * `predicate` returns truthy for. The predicate is invoked with three
2464
- * arguments: (value, index|key, collection).
2465
- *
2466
- * @static
2467
- * @memberOf _
2468
- * @since 0.1.0
2469
- * @category Collection
2470
- * @param {Array|Object} collection The collection to inspect.
2471
- * @param {Function} [predicate=_.identity]
2472
- * The function invoked per iteration.
2473
- * @param {number} [fromIndex=0] The index to search from.
2474
- * @returns {*} Returns the matched element, else `undefined`.
2475
- * @example
2476
- *
2477
- * var users = [
2478
- * { 'user': 'barney', 'age': 36, 'active': true },
2479
- * { 'user': 'fred', 'age': 40, 'active': false },
2480
- * { 'user': 'pebbles', 'age': 1, 'active': true }
2481
- * ];
2482
- *
2483
- * _.find(users, function(o) { return o.age < 40; });
2484
- * // => object for 'barney'
2485
- *
2486
- * // The `_.matches` iteratee shorthand.
2487
- * _.find(users, { 'age': 1, 'active': true });
2488
- * // => object for 'pebbles'
2489
- *
2490
- * // The `_.matchesProperty` iteratee shorthand.
2491
- * _.find(users, ['active', false]);
2492
- * // => object for 'fred'
2493
- *
2494
- * // The `_.property` iteratee shorthand.
2495
- * _.find(users, 'active');
2496
- * // => object for 'barney'
2497
- */
2498
- var find = createFind(findIndex);
2499
-
2500
- /**
2501
- * Creates a function that memoizes the result of `func`. If `resolver` is
2502
- * provided, it determines the cache key for storing the result based on the
2503
- * arguments provided to the memoized function. By default, the first argument
2504
- * provided to the memoized function is used as the map cache key. The `func`
2505
- * is invoked with the `this` binding of the memoized function.
2506
- *
2507
- * **Note:** The cache is exposed as the `cache` property on the memoized
2508
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
2509
- * constructor with one whose instances implement the
2510
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2511
- * method interface of `delete`, `get`, `has`, and `set`.
2512
- *
2513
- * @static
2514
- * @memberOf _
2515
- * @since 0.1.0
2516
- * @category Function
2517
- * @param {Function} func The function to have its output memoized.
2518
- * @param {Function} [resolver] The function to resolve the cache key.
2519
- * @returns {Function} Returns the new memoized function.
2520
- * @example
2521
- *
2522
- * var object = { 'a': 1, 'b': 2 };
2523
- * var other = { 'c': 3, 'd': 4 };
2524
- *
2525
- * var values = _.memoize(_.values);
2526
- * values(object);
2527
- * // => [1, 2]
2528
- *
2529
- * values(other);
2530
- * // => [3, 4]
2531
- *
2532
- * object.a = 2;
2533
- * values(object);
2534
- * // => [1, 2]
2535
- *
2536
- * // Modify the result cache.
2537
- * values.cache.set(object, ['a', 'b']);
2538
- * values(object);
2539
- * // => ['a', 'b']
2540
- *
2541
- * // Replace `_.memoize.Cache`.
2542
- * _.memoize.Cache = WeakMap;
2543
- */
2544
- function memoize(func, resolver) {
2545
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
2546
- throw new TypeError(FUNC_ERROR_TEXT);
2547
- }
2548
- var memoized = function() {
2549
- var args = arguments,
2550
- key = resolver ? resolver.apply(this, args) : args[0],
2551
- cache = memoized.cache;
2552
-
2553
- if (cache.has(key)) {
2554
- return cache.get(key);
2555
- }
2556
- var result = func.apply(this, args);
2557
- memoized.cache = cache.set(key, result);
2558
- return result;
2559
- };
2560
- memoized.cache = new (memoize.Cache || MapCache);
2561
- return memoized;
2562
- }
2563
-
2564
- // Assign cache to `_.memoize`.
2565
- memoize.Cache = MapCache;
2566
-
2567
- /**
2568
- * Performs a
2569
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2570
- * comparison between two values to determine if they are equivalent.
2571
- *
2572
- * @static
2573
- * @memberOf _
2574
- * @since 4.0.0
2575
- * @category Lang
2576
- * @param {*} value The value to compare.
2577
- * @param {*} other The other value to compare.
2578
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2579
- * @example
2580
- *
2581
- * var object = { 'a': 1 };
2582
- * var other = { 'a': 1 };
2583
- *
2584
- * _.eq(object, object);
2585
- * // => true
2586
- *
2587
- * _.eq(object, other);
2588
- * // => false
2589
- *
2590
- * _.eq('a', 'a');
2591
- * // => true
2592
- *
2593
- * _.eq('a', Object('a'));
2594
- * // => false
2595
- *
2596
- * _.eq(NaN, NaN);
2597
- * // => true
2598
- */
2599
- function eq(value, other) {
2600
- return value === other || (value !== value && other !== other);
2601
- }
2602
-
2603
- /**
2604
- * Checks if `value` is likely an `arguments` object.
2605
- *
2606
- * @static
2607
- * @memberOf _
2608
- * @since 0.1.0
2609
- * @category Lang
2610
- * @param {*} value The value to check.
2611
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2612
- * else `false`.
2613
- * @example
2614
- *
2615
- * _.isArguments(function() { return arguments; }());
2616
- * // => true
2617
- *
2618
- * _.isArguments([1, 2, 3]);
2619
- * // => false
2620
- */
2621
- function isArguments(value) {
2622
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
2623
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
2624
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
2625
- }
2626
-
2627
- /**
2628
- * Checks if `value` is classified as an `Array` object.
2629
- *
2630
- * @static
2631
- * @memberOf _
2632
- * @since 0.1.0
2633
- * @category Lang
2634
- * @param {*} value The value to check.
2635
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
2636
- * @example
2637
- *
2638
- * _.isArray([1, 2, 3]);
2639
- * // => true
2640
- *
2641
- * _.isArray(document.body.children);
2642
- * // => false
2643
- *
2644
- * _.isArray('abc');
2645
- * // => false
2646
- *
2647
- * _.isArray(_.noop);
2648
- * // => false
2649
- */
2650
- var isArray = Array.isArray;
2651
-
2652
- /**
2653
- * Checks if `value` is array-like. A value is considered array-like if it's
2654
- * not a function and has a `value.length` that's an integer greater than or
2655
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2656
- *
2657
- * @static
2658
- * @memberOf _
2659
- * @since 4.0.0
2660
- * @category Lang
2661
- * @param {*} value The value to check.
2662
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2663
- * @example
2664
- *
2665
- * _.isArrayLike([1, 2, 3]);
2666
- * // => true
2667
- *
2668
- * _.isArrayLike(document.body.children);
2669
- * // => true
2670
- *
2671
- * _.isArrayLike('abc');
2672
- * // => true
2673
- *
2674
- * _.isArrayLike(_.noop);
2675
- * // => false
2676
- */
2677
- function isArrayLike(value) {
2678
- return value != null && isLength(value.length) && !isFunction(value);
2679
- }
2680
-
2681
- /**
2682
- * This method is like `_.isArrayLike` except that it also checks if `value`
2683
- * is an object.
2684
- *
2685
- * @static
2686
- * @memberOf _
2687
- * @since 4.0.0
2688
- * @category Lang
2689
- * @param {*} value The value to check.
2690
- * @returns {boolean} Returns `true` if `value` is an array-like object,
2691
- * else `false`.
2692
- * @example
2693
- *
2694
- * _.isArrayLikeObject([1, 2, 3]);
2695
- * // => true
2696
- *
2697
- * _.isArrayLikeObject(document.body.children);
2698
- * // => true
2699
- *
2700
- * _.isArrayLikeObject('abc');
2701
- * // => false
2702
- *
2703
- * _.isArrayLikeObject(_.noop);
2704
- * // => false
2705
- */
2706
- function isArrayLikeObject(value) {
2707
- return isObjectLike(value) && isArrayLike(value);
2708
- }
2709
-
2710
- /**
2711
- * Checks if `value` is classified as a `Function` object.
2712
- *
2713
- * @static
2714
- * @memberOf _
2715
- * @since 0.1.0
2716
- * @category Lang
2717
- * @param {*} value The value to check.
2718
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
2719
- * @example
2720
- *
2721
- * _.isFunction(_);
2722
- * // => true
2723
- *
2724
- * _.isFunction(/abc/);
2725
- * // => false
2726
- */
2727
- function isFunction(value) {
2728
- // The use of `Object#toString` avoids issues with the `typeof` operator
2729
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
2730
- var tag = isObject(value) ? objectToString.call(value) : '';
2731
- return tag == funcTag || tag == genTag;
2732
- }
2733
-
2734
- /**
2735
- * Checks if `value` is a valid array-like length.
2736
- *
2737
- * **Note:** This method is loosely based on
2738
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
2739
- *
2740
- * @static
2741
- * @memberOf _
2742
- * @since 4.0.0
2743
- * @category Lang
2744
- * @param {*} value The value to check.
2745
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
2746
- * @example
2747
- *
2748
- * _.isLength(3);
2749
- * // => true
2750
- *
2751
- * _.isLength(Number.MIN_VALUE);
2752
- * // => false
2753
- *
2754
- * _.isLength(Infinity);
2755
- * // => false
2756
- *
2757
- * _.isLength('3');
2758
- * // => false
2759
- */
2760
- function isLength(value) {
2761
- return typeof value == 'number' &&
2762
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
2763
- }
2764
-
2765
- /**
2766
- * Checks if `value` is the
2767
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
2768
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
2769
- *
2770
- * @static
2771
- * @memberOf _
2772
- * @since 0.1.0
2773
- * @category Lang
2774
- * @param {*} value The value to check.
2775
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
2776
- * @example
2777
- *
2778
- * _.isObject({});
2779
- * // => true
2780
- *
2781
- * _.isObject([1, 2, 3]);
2782
- * // => true
2783
- *
2784
- * _.isObject(_.noop);
2785
- * // => true
2786
- *
2787
- * _.isObject(null);
2788
- * // => false
2789
- */
2790
- function isObject(value) {
2791
- var type = typeof value;
2792
- return !!value && (type == 'object' || type == 'function');
2793
- }
2794
-
2795
- /**
2796
- * Checks if `value` is object-like. A value is object-like if it's not `null`
2797
- * and has a `typeof` result of "object".
2798
- *
2799
- * @static
2800
- * @memberOf _
2801
- * @since 4.0.0
2802
- * @category Lang
2803
- * @param {*} value The value to check.
2804
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2805
- * @example
2806
- *
2807
- * _.isObjectLike({});
2808
- * // => true
2809
- *
2810
- * _.isObjectLike([1, 2, 3]);
2811
- * // => true
2812
- *
2813
- * _.isObjectLike(_.noop);
2814
- * // => false
2815
- *
2816
- * _.isObjectLike(null);
2817
- * // => false
2818
- */
2819
- function isObjectLike(value) {
2820
- return !!value && typeof value == 'object';
2821
- }
2822
-
2823
- /**
2824
- * Checks if `value` is classified as a `Symbol` primitive or object.
2825
- *
2826
- * @static
2827
- * @memberOf _
2828
- * @since 4.0.0
2829
- * @category Lang
2830
- * @param {*} value The value to check.
2831
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2832
- * @example
2833
- *
2834
- * _.isSymbol(Symbol.iterator);
2835
- * // => true
2836
- *
2837
- * _.isSymbol('abc');
2838
- * // => false
2839
- */
2840
- function isSymbol(value) {
2841
- return typeof value == 'symbol' ||
2842
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
2843
- }
2844
-
2845
- /**
2846
- * Checks if `value` is classified as a typed array.
2847
- *
2848
- * @static
2849
- * @memberOf _
2850
- * @since 3.0.0
2851
- * @category Lang
2852
- * @param {*} value The value to check.
2853
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2854
- * @example
2855
- *
2856
- * _.isTypedArray(new Uint8Array);
2857
- * // => true
2858
- *
2859
- * _.isTypedArray([]);
2860
- * // => false
2861
- */
2862
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
2863
-
2864
- /**
2865
- * Converts `value` to a finite number.
2866
- *
2867
- * @static
2868
- * @memberOf _
2869
- * @since 4.12.0
2870
- * @category Lang
2871
- * @param {*} value The value to convert.
2872
- * @returns {number} Returns the converted number.
2873
- * @example
2874
- *
2875
- * _.toFinite(3.2);
2876
- * // => 3.2
2877
- *
2878
- * _.toFinite(Number.MIN_VALUE);
2879
- * // => 5e-324
2880
- *
2881
- * _.toFinite(Infinity);
2882
- * // => 1.7976931348623157e+308
2883
- *
2884
- * _.toFinite('3.2');
2885
- * // => 3.2
2886
- */
2887
- function toFinite(value) {
2888
- if (!value) {
2889
- return value === 0 ? value : 0;
2890
- }
2891
- value = toNumber(value);
2892
- if (value === INFINITY || value === -INFINITY) {
2893
- var sign = (value < 0 ? -1 : 1);
2894
- return sign * MAX_INTEGER;
2895
- }
2896
- return value === value ? value : 0;
2897
- }
2898
-
2899
- /**
2900
- * Converts `value` to an integer.
2901
- *
2902
- * **Note:** This method is loosely based on
2903
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
2904
- *
2905
- * @static
2906
- * @memberOf _
2907
- * @since 4.0.0
2908
- * @category Lang
2909
- * @param {*} value The value to convert.
2910
- * @returns {number} Returns the converted integer.
2911
- * @example
2912
- *
2913
- * _.toInteger(3.2);
2914
- * // => 3
2915
- *
2916
- * _.toInteger(Number.MIN_VALUE);
2917
- * // => 0
2918
- *
2919
- * _.toInteger(Infinity);
2920
- * // => 1.7976931348623157e+308
2921
- *
2922
- * _.toInteger('3.2');
2923
- * // => 3
2924
- */
2925
- function toInteger(value) {
2926
- var result = toFinite(value),
2927
- remainder = result % 1;
2928
-
2929
- return result === result ? (remainder ? result - remainder : result) : 0;
2930
- }
2931
-
2932
- /**
2933
- * Converts `value` to a number.
2934
- *
2935
- * @static
2936
- * @memberOf _
2937
- * @since 4.0.0
2938
- * @category Lang
2939
- * @param {*} value The value to process.
2940
- * @returns {number} Returns the number.
2941
- * @example
2942
- *
2943
- * _.toNumber(3.2);
2944
- * // => 3.2
2945
- *
2946
- * _.toNumber(Number.MIN_VALUE);
2947
- * // => 5e-324
2948
- *
2949
- * _.toNumber(Infinity);
2950
- * // => Infinity
2951
- *
2952
- * _.toNumber('3.2');
2953
- * // => 3.2
2954
- */
2955
- function toNumber(value) {
2956
- if (typeof value == 'number') {
2957
- return value;
2958
- }
2959
- if (isSymbol(value)) {
2960
- return NAN;
2961
- }
2962
- if (isObject(value)) {
2963
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
2964
- value = isObject(other) ? (other + '') : other;
2965
- }
2966
- if (typeof value != 'string') {
2967
- return value === 0 ? value : +value;
2968
- }
2969
- value = value.replace(reTrim, '');
2970
- var isBinary = reIsBinary.test(value);
2971
- return (isBinary || reIsOctal.test(value))
2972
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
2973
- : (reIsBadHex.test(value) ? NAN : +value);
2974
- }
2975
-
2976
- /**
2977
- * Converts `value` to a string. An empty string is returned for `null`
2978
- * and `undefined` values. The sign of `-0` is preserved.
2979
- *
2980
- * @static
2981
- * @memberOf _
2982
- * @since 4.0.0
2983
- * @category Lang
2984
- * @param {*} value The value to process.
2985
- * @returns {string} Returns the string.
2986
- * @example
2987
- *
2988
- * _.toString(null);
2989
- * // => ''
2990
- *
2991
- * _.toString(-0);
2992
- * // => '-0'
2993
- *
2994
- * _.toString([1, 2, 3]);
2995
- * // => '1,2,3'
2996
- */
2997
- function toString(value) {
2998
- return value == null ? '' : baseToString(value);
2999
- }
3000
-
3001
- /**
3002
- * Gets the value at `path` of `object`. If the resolved value is
3003
- * `undefined`, the `defaultValue` is returned in its place.
3004
- *
3005
- * @static
3006
- * @memberOf _
3007
- * @since 3.7.0
3008
- * @category Object
3009
- * @param {Object} object The object to query.
3010
- * @param {Array|string} path The path of the property to get.
3011
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
3012
- * @returns {*} Returns the resolved value.
3013
- * @example
3014
- *
3015
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
3016
- *
3017
- * _.get(object, 'a[0].b.c');
3018
- * // => 3
3019
- *
3020
- * _.get(object, ['a', '0', 'b', 'c']);
3021
- * // => 3
3022
- *
3023
- * _.get(object, 'a.b.c', 'default');
3024
- * // => 'default'
3025
- */
3026
- function get(object, path, defaultValue) {
3027
- var result = object == null ? undefined : baseGet(object, path);
3028
- return result === undefined ? defaultValue : result;
3029
- }
3030
-
3031
- /**
3032
- * Checks if `path` is a direct or inherited property of `object`.
3033
- *
3034
- * @static
3035
- * @memberOf _
3036
- * @since 4.0.0
3037
- * @category Object
3038
- * @param {Object} object The object to query.
3039
- * @param {Array|string} path The path to check.
3040
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
3041
- * @example
3042
- *
3043
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
3044
- *
3045
- * _.hasIn(object, 'a');
3046
- * // => true
3047
- *
3048
- * _.hasIn(object, 'a.b');
3049
- * // => true
3050
- *
3051
- * _.hasIn(object, ['a', 'b']);
3052
- * // => true
3053
- *
3054
- * _.hasIn(object, 'b');
3055
- * // => false
3056
- */
3057
- function hasIn(object, path) {
3058
- return object != null && hasPath(object, path, baseHasIn);
3059
- }
3060
-
3061
- /**
3062
- * Creates an array of the own enumerable property names of `object`.
3063
- *
3064
- * **Note:** Non-object values are coerced to objects. See the
3065
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
3066
- * for more details.
3067
- *
3068
- * @static
3069
- * @since 0.1.0
3070
- * @memberOf _
3071
- * @category Object
3072
- * @param {Object} object The object to query.
3073
- * @returns {Array} Returns the array of property names.
3074
- * @example
3075
- *
3076
- * function Foo() {
3077
- * this.a = 1;
3078
- * this.b = 2;
3079
- * }
3080
- *
3081
- * Foo.prototype.c = 3;
3082
- *
3083
- * _.keys(new Foo);
3084
- * // => ['a', 'b'] (iteration order is not guaranteed)
3085
- *
3086
- * _.keys('hi');
3087
- * // => ['0', '1']
3088
- */
3089
- function keys(object) {
3090
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
3091
- }
3092
-
3093
- /**
3094
- * This method returns the first argument it receives.
3095
- *
3096
- * @static
3097
- * @since 0.1.0
3098
- * @memberOf _
3099
- * @category Util
3100
- * @param {*} value Any value.
3101
- * @returns {*} Returns `value`.
3102
- * @example
3103
- *
3104
- * var object = { 'a': 1 };
3105
- *
3106
- * console.log(_.identity(object) === object);
3107
- * // => true
3108
- */
3109
- function identity(value) {
3110
- return value;
3111
- }
3112
-
3113
- /**
3114
- * Creates a function that returns the value at `path` of a given object.
3115
- *
3116
- * @static
3117
- * @memberOf _
3118
- * @since 2.4.0
3119
- * @category Util
3120
- * @param {Array|string} path The path of the property to get.
3121
- * @returns {Function} Returns the new accessor function.
3122
- * @example
3123
- *
3124
- * var objects = [
3125
- * { 'a': { 'b': 2 } },
3126
- * { 'a': { 'b': 1 } }
3127
- * ];
3128
- *
3129
- * _.map(objects, _.property('a.b'));
3130
- * // => [2, 1]
3131
- *
3132
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
3133
- * // => [1, 2]
3134
- */
3135
- function property(path) {
3136
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
3137
- }
3138
-
3139
- module.exports = find;
3140
-
3141
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
3142
-
3143
- /***/ }),
3144
-
3145
- /***/ "./node_modules/webpack/buildin/global.js":
3146
- /*!***********************************!*\
3147
- !*** (webpack)/buildin/global.js ***!
3148
- \***********************************/
3149
- /*! no static exports found */
3150
- /***/ (function(module, exports) {
3151
-
3152
- var g;
3153
-
3154
- // This works in non-strict mode
3155
- g = (function() {
3156
- return this;
3157
- })();
3158
-
3159
- try {
3160
- // This works if eval is allowed (see CSP)
3161
- g = g || new Function("return this")();
3162
- } catch (e) {
3163
- // This works if the window reference is available
3164
- if (typeof window === "object") g = window;
3165
- }
3166
-
3167
- // g can still be undefined, but nothing to do about it...
3168
- // We return undefined, instead of nothing here, so it's
3169
- // easier to handle this case. if(!global) { ...}
3170
-
3171
- module.exports = g;
3172
-
3173
-
3174
- /***/ }),
3175
-
3176
- /***/ "./node_modules/webpack/buildin/module.js":
3177
- /*!***********************************!*\
3178
- !*** (webpack)/buildin/module.js ***!
3179
- \***********************************/
3180
- /*! no static exports found */
3181
- /***/ (function(module, exports) {
3182
-
3183
- module.exports = function(module) {
3184
- if (!module.webpackPolyfill) {
3185
- module.deprecate = function() {};
3186
- module.paths = [];
3187
- // module.parent = undefined by default
3188
- if (!module.children) module.children = [];
3189
- Object.defineProperty(module, "loaded", {
3190
- enumerable: true,
3191
- get: function() {
3192
- return module.l;
3193
- }
3194
- });
3195
- Object.defineProperty(module, "id", {
3196
- enumerable: true,
3197
- get: function() {
3198
- return module.i;
3199
- }
3200
- });
3201
- module.webpackPolyfill = 1;
3202
- }
3203
- return module;
3204
- };
3205
-
3206
-
3207
- /***/ }),
3208
-
3209
- /***/ "./src/CreatorFunctions.ts":
3210
- /*!*********************************!*\
3211
- !*** ./src/CreatorFunctions.ts ***!
3212
- \*********************************/
3213
- /*! exports provided: getCreatorFunctions */
3214
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3215
-
3216
- "use strict";
3217
- __webpack_require__.r(__webpack_exports__);
3218
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
3219
- var getCreatorFunctions = function getCreatorFunctions() {
3220
- return {
3221
- shouldImport: shouldImport,
3222
- getCreatorImportArgs: getCreatorImportArgs
3223
- };
3224
- };
3225
-
3226
- var shouldImport = function shouldImport(importKey, state) {
3227
- return true;
3228
- };
3229
-
3230
- var getCreatorImportArgs = function getCreatorImportArgs(importKey, state) {
3231
- return undefined;
3232
- };
3233
-
3234
- /***/ }),
3235
-
3236
- /***/ "./src/DerivedData.ts":
3237
- /*!****************************!*\
3238
- !*** ./src/DerivedData.ts ***!
3239
- \****************************/
3240
- /*! exports provided: FLASH_INSTRUCTION_TYPE, MODULE_NAME, ARGUMENT_GENERATE_API, ARGUMENT_INTERRUPT_DRIVEN, getDerivedData, getMyDerivedData, MyDerivedData */
3241
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3242
-
3243
- "use strict";
3244
- __webpack_require__.r(__webpack_exports__);
3245
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FLASH_INSTRUCTION_TYPE", function() { return FLASH_INSTRUCTION_TYPE; });
3246
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MODULE_NAME", function() { return MODULE_NAME; });
3247
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARGUMENT_GENERATE_API", function() { return ARGUMENT_GENERATE_API; });
3248
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARGUMENT_INTERRUPT_DRIVEN", function() { return ARGUMENT_INTERRUPT_DRIVEN; });
3249
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return getDerivedData; });
3250
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMyDerivedData", function() { return getMyDerivedData; });
3251
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MyDerivedData", function() { return MyDerivedData; });
3252
- /* harmony import */ var _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/flash-interface */ "./node_modules/@microchip/flash-interface/lib/src/index.js");
3253
- /* harmony import */ var _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__);
3254
- /* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.ts");
3255
- /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash.find */ "./node_modules/lodash.find/index.js");
3256
- /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_2__);
3257
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3258
-
3259
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3260
-
3261
-
3262
-
3263
-
3264
- var FLASH_UNLOCK_KEY = "0x00AA0055";
3265
- var FLASH_INSTRUCTION_TYPE = "uint32_t";
3266
- var MODULE_NAME = "FLASH";
3267
- var FLASH_WRITE_INSTRUCTION_COUNT = "flashWriteInstructionCount";
3268
- var DEFAULT_WRITE_SIZE = 4;
3269
- var OPTION_BLOCKING = "Blocking";
3270
- var OPTION_NON_BLOCKING = "Non-Blocking";
3271
- var CONFIG_16BIT_INTERFACE = "config_16bit_interface";
3272
- var ARGUMENT_GENERATE_API = "generateAPI";
3273
- var ARGUMENT_INTERRUPT_DRIVEN = "interruptDriven";
3274
- var getDerivedData = function getDerivedData(dataModel) {
3275
- if (dataModel) {
3276
- return new MyDerivedData(dataModel);
3277
- }
3278
-
3279
- return new EmptyDerivedData();
3280
- };
3281
- var getMyDerivedData = function getMyDerivedData(dataModel) {
3282
- if (dataModel) {
3283
- return new MyDerivedData(dataModel);
3284
- }
3285
-
3286
- return new EmptyDerivedData();
3287
- }; //This data will be used at the creator stage and relies on only the state
3288
-
3289
- var EmptyDerivedData = function EmptyDerivedData() {
3290
- _classCallCheck(this, EmptyDerivedData);
3291
-
3292
- _defineProperty(this, "getMyFunctions", function () {
3293
- return {};
3294
- });
3295
-
3296
- _defineProperty(this, "getModel", function () {
3297
- return undefined;
3298
- });
3299
- }; //This data will be used at the processor stage
3300
-
3301
-
3302
- var MyDerivedData = function MyDerivedData(dataModel) {
3303
- var _this = this;
3304
-
3305
- _classCallCheck(this, MyDerivedData);
3306
-
3307
- _defineProperty(this, "dataModel", void 0);
3308
-
3309
- _defineProperty(this, "getMyFunctions", function () {
3310
- return {
3311
- exportApi: _this.getMyExportApi,
3312
- templateData: _this.getMyTemplateData,
3313
- alerts: _this.getMyAlerts,
3314
- blockingAPIGenerate: _this.getBlockingAPIGenerationStatus,
3315
- nonBlockingAPIGenerate: _this.getNonBlockingAPIGenerationStatus,
3316
- overrideOptions: _this.overrideOptions,
3317
- overrideDefaultValues: _this.overrideDefaultValue,
3318
- "flash-interface_payload": _this.basic_flash_payload,
3319
- importName: _this.friendlyImportName,
3320
- exportName: _this.friendlyExportName,
3321
- isInterfaceUsed: _this.isFlashInterfaceUsed,
3322
- enableInterfaceDefinitionGeneration: _this.enableInterfaceDefinitionGeneration,
3323
- interrupt_service_results: _this.getFlashInterruptData,
3324
- system_16bit_initializer_results: _this.system_16bit_initializer_results,
3325
- config_16bit_interface_args: _this.getConfigBitArgs,
3326
- config_16bit_interface_results: _this.getConfigBitArgs,
3327
- calculatedFunction: _this.calculatedFunction
3328
- };
3329
- });
3330
-
3331
- _defineProperty(this, "getMyExportApi", function (interfaceId) {
3332
- if (interfaceId.name === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name && interfaceId.version === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().version) {
3333
- var firmwareApi = _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi(MODULE_NAME);
3334
- return {
3335
- api: firmwareApi.api,
3336
- headerFiles: firmwareApi.headerFiles
3337
- };
3338
- }
3339
- });
3340
-
3341
- _defineProperty(this, "getMyTemplateData", function () {
3342
- return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_1__["generatableItems"])(_this.dataModel).getGeneratableItems();
3343
- });
3344
-
3345
- _defineProperty(this, "getMyProcessedArgValue", function (componentName, exportArg) {
3346
- var processedArg;
3347
- exportArg.some(function (arg) {
3348
- if (arg["interface"] === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name) {
3349
- processedArg = _this.basic_flash_args(componentName, arg);
3350
-
3351
- if (processedArg != undefined) {
3352
- return true;
3353
- }
3354
- }
3355
- });
3356
- return processedArg;
3357
- });
3358
-
3359
- _defineProperty(this, "overrideOptions", function (componentName) {
3360
- var defaultValue = [];
3361
-
3362
- switch (componentName) {
3363
- case FLASH_WRITE_INSTRUCTION_COUNT:
3364
- {
3365
- var flashWriteSize = String(_this.getFlashWordWriteSizeInInstructions());
3366
- var flashRowWriteSize = String(_this.getFlashWriteRowSizeInInstructions());
3367
- return [flashWriteSize, flashRowWriteSize];
3368
- }
3369
-
3370
- default:
3371
- return defaultValue;
3372
- }
3373
- });
3374
-
3375
- _defineProperty(this, "overrideDefaultValue", function (componentName) {
3376
- var retValue;
3377
-
3378
- switch (componentName) {
3379
- case FLASH_WRITE_INSTRUCTION_COUNT:
3380
- {
3381
- retValue = String(_this.getFlashWordWriteSizeInInstructions());
3382
- break;
3383
- }
3384
-
3385
- default:
3386
- {
3387
- break;
3388
- }
3389
- }
3390
-
3391
- return retValue;
3392
- });
3393
-
3394
- _defineProperty(this, "friendlyImportName", function (importKey) {
3395
- var importName;
3396
-
3397
- switch (importKey) {
3398
- case "nvm_ctrl_32bit_v1":
3399
- importName = "Flash Hardware";
3400
- break;
3401
-
3402
- case "system_16bit_initializer":
3403
- importName = "System Initializer";
3404
- break;
3405
-
3406
- case "config_16bit_interface":
3407
- importName = "Configuration Bits";
3408
- break;
3409
-
3410
- default:
3411
- importName = importKey;
3412
- }
3413
-
3414
- return importName;
3415
- });
3416
-
3417
- _defineProperty(this, "friendlyExportName", function (exportKey) {
3418
- var exportName = exportKey;
3419
-
3420
- if (exportKey === "flash") {
3421
- exportName = "Flash";
3422
- }
3423
-
3424
- return exportName;
3425
- });
3426
-
3427
- _defineProperty(this, "getActiveName", function () {
3428
- return "Flash PLIB";
3429
- });
3430
-
3431
- _defineProperty(this, "isFlashInterfaceUsed", function () {
3432
- var _this$dataModel, _this$dataModel$getEx;
3433
-
3434
- var exportData = _this.dataModel.getExportInterfaces().getInterfaceData();
3435
-
3436
- var interfaceData = lodash_find__WEBPACK_IMPORTED_MODULE_2___default()(exportData, function (i) {
3437
- return i["interface"] === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name;
3438
- });
3439
-
3440
- var result = (_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : (_this$dataModel$getEx = _this$dataModel.getExportInterfaces().getInterface("flash_interface", _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId())) === null || _this$dataModel$getEx === void 0 ? void 0 : _this$dataModel$getEx.results;
3441
-
3442
- if (interfaceData || result) {
3443
- return true;
3444
- }
3445
-
3446
- return false;
3447
- });
3448
-
3449
- _defineProperty(this, "getModuleNameForInterrupt", function () {
3450
- var _this$getFlashHardwar, _this$getFlashHardwar2;
3451
-
3452
- return (_this$getFlashHardwar = (_this$getFlashHardwar2 = _this.getFlashHardwareData()) === null || _this$getFlashHardwar2 === void 0 ? void 0 : _this$getFlashHardwar2.name.toLocaleUpperCase()) !== null && _this$getFlashHardwar !== void 0 ? _this$getFlashHardwar : "FLASH";
3453
- });
3454
-
3455
- _defineProperty(this, "getInterruptData", function (interruptAliasList) {
3456
- var interruptData = [];
3457
-
3458
- var isInterruptDriven = _this.isInterruptMode();
3459
-
3460
- interruptAliasList.forEach(function (interruptAlias) {
3461
- var _this$dataModel$getHa, _this$dataModel2, _this$dataModel2$getH, _this$dataModel2$getH2, _this$dataModel2$getH3, _this$dataModel2$getH4;
3462
-
3463
- interruptData.push({
3464
- interruptName: (_this$dataModel$getHa = (_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : (_this$dataModel2$getH = _this$dataModel2.getHardware()) === null || _this$dataModel2$getH === void 0 ? void 0 : (_this$dataModel2$getH2 = _this$dataModel2$getH.getPeripheral()) === null || _this$dataModel2$getH2 === void 0 ? void 0 : (_this$dataModel2$getH3 = _this$dataModel2$getH2.interrupts) === null || _this$dataModel2$getH3 === void 0 ? void 0 : (_this$dataModel2$getH4 = _this$dataModel2$getH3[interruptAlias]) === null || _this$dataModel2$getH4 === void 0 ? void 0 : _this$dataModel2$getH4.name) !== null && _this$dataModel$getHa !== void 0 ? _this$dataModel$getHa : "",
3465
- isEnabled: isInterruptDriven
3466
- });
3467
- });
3468
- return interruptData;
3469
- });
3470
-
3471
- _defineProperty(this, "getFlashHardwareData", function () {
3472
- return _this.getModel().getImportValue("nvm_ctrl_32bit_upb_v1");
3473
- });
3474
-
3475
- _defineProperty(this, "basic_flash_args", function (componentName, arg) {
3476
- var processedArg;
3477
-
3478
- switch (componentName) {
3479
- case FLASH_WRITE_INSTRUCTION_COUNT:
3480
- if (arg != undefined && arg.name === FLASH_WRITE_INSTRUCTION_COUNT) {
3481
- processedArg = {
3482
- "interface": arg["interface"],
3483
- name: arg.name,
3484
- value: _this.getFlashWriteInstructionCountToImpl(arg.value),
3485
- module: arg.module
3486
- };
3487
- }
3488
-
3489
- break;
3490
-
3491
- default:
3492
- break;
3493
- }
3494
-
3495
- return processedArg;
3496
- });
3497
-
3498
- _defineProperty(this, "getFlashWriteInstructionCountToImpl", function (flashWriteInstCount) {
3499
- if (flashWriteInstCount != undefined) {
3500
- var flashWriteCount = flashWriteInstCount;
3501
-
3502
- var minFlashWordSize = _this.getFlashWordWriteSizeInInstructions();
3503
-
3504
- var flashRowWriteSize = _this.getFlashWriteRowSizeInInstructions();
3505
-
3506
- if (flashWriteInstCount != minFlashWordSize && flashWriteInstCount != flashRowWriteSize) {
3507
- flashWriteCount = minFlashWordSize;
3508
- }
3509
-
3510
- return flashWriteCount;
3511
- } else {
3512
- return DEFAULT_WRITE_SIZE;
3513
- }
3514
- });
3515
-
3516
- _defineProperty(this, "isGenerateNonBlockingAPI", function () {
3517
- var generateNonBlockingAPI = false;
3518
-
3519
- var flashInterfaceResult = _this.getFlashResults(ARGUMENT_GENERATE_API);
3520
-
3521
- if (flashInterfaceResult != undefined) {
3522
- if (flashInterfaceResult != OPTION_BLOCKING) {
3523
- generateNonBlockingAPI = true;
3524
- } else {
3525
- generateNonBlockingAPI = false;
3526
- }
3527
- }
3528
-
3529
- return generateNonBlockingAPI;
3530
- });
3531
-
3532
- _defineProperty(this, "system_16bit_initializer_results", function () {
3533
- if (_this.isFlashInterfaceUsed()) {
3534
- if (_this.getNonBlockingAPIGenerationStatus() && _this.getInterruptDrivenStatus()) {
3535
- return {
3536
- initializer: [{
3537
- funcName: "FLASH_Initialize",
3538
- header: {
3539
- name: "flash_nonblocking.h",
3540
- path: "../flash/"
3541
- }
3542
- }]
3543
- };
3544
- }
3545
- }
3546
-
3547
- return {};
3548
- });
3549
-
3550
- _defineProperty(this, "getExportArg", function (componentName) {
3551
- var exportData = _this.dataModel.getExportInterfaces().getInterfaceData();
3552
-
3553
- var expArg = lodash_find__WEBPACK_IMPORTED_MODULE_2___default()(exportData, function (i) {
3554
- return i["interface"] === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name && i.name === componentName;
3555
- });
3556
-
3557
- return expArg;
3558
- });
3559
-
3560
- _defineProperty(this, "getConfigBitArgs", function () {
3561
- return {
3562
- configBitByAliasFilter: ["BTMODE"],
3563
- configBitSet: {}
3564
- };
3565
- });
3566
-
3567
- _defineProperty(this, "getDualPartitionDetails", function () {
3568
- var hasDualPartition = _this.getFlashHasDualPartition();
3569
-
3570
- if (hasDualPartition) {
3571
- return {
3572
- flashFirstPartitionEndAddress: _this.getFlashFirstPartitionEndAddress(),
3573
- flashSecondPartitionBeginAddress: _this.getFlashSecondPartitionStartAddress(),
3574
- flashSecondPartitionProgramBeginAddress: _this.getFlashSecondPartitionProgramStartAddress(),
3575
- flashSecondPartitionEndAddress: _this.getFlashSecondPartitionEndAddress()
3576
- };
3577
- }
3578
- });
3579
-
3580
- _defineProperty(this, "getMyAlerts", function () {
3581
- return [];
3582
- });
3583
-
3584
- _defineProperty(this, "calculatedFunction", function () {
3585
- return;
3586
- });
3587
-
3588
- _defineProperty(this, "basic_flash_payload", function () {
3589
- var headerFiles = [];
3590
-
3591
- if (_this.getFlashHasDualPartition() && _this.getFlashDualPartitionEnabled()) {
3592
- headerFiles = [{
3593
- name: "flash_nonblocking.h",
3594
- path: "flash/"
3595
- }];
3596
- } else {
3597
- headerFiles = _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi(_this.dataModel.getName()).headerFiles;
3598
- }
3599
-
3600
- return {
3601
- interfaceApi: _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi(_this.dataModel.getName(), headerFiles),
3602
- flashWriteInstructionCount: _this.getFlashWriteInstructionCount(),
3603
- flashInterface: _this.getFlashInterface(),
3604
- flashWordWriteSizeInInstructions: _this.getFlashWordWriteSizeInInstructions(),
3605
- flashEraseInstructionCount: _this.getFlashEraseInstructionCount(),
3606
- flashHasAuxiliary: _this.getFlashHasAuxiliary(),
3607
- flashEnduranceMinimum: _this.getFlashEnduranceMinimum(),
3608
- flashBytesPerInstruction: _this.getFlashBytesPerInstruction(),
3609
- flashPcUnitsPerInstruction: _this.getFlashPcUnitsPerInstruction(),
3610
- flashWordWriteOpCode: _this.getFlashWordWriteOpCode(),
3611
- flashOpCodeMask: _this.getFlashOpCodeMask(),
3612
- flashErasePageSizeInInstructions: _this.getFlashErasePageSizeInInstructions(),
3613
- flashErasePageOpCode: _this.getFlashErasePageOpCode(),
3614
- flashHasEcc: _this.getFlashHasEcc(),
3615
- flashHasRowProgramming: _this.getFlashHasRowProgramming(),
3616
- flashWriteRowSizeInInstructions: _this.getFlashWriteRowSizeInInstructions(),
3617
- flashWriteRowOpCode: _this.getFlashWriteRowOpCode(),
3618
- flashEndAddress: _this.getFlashEndAddress(),
3619
- flashProgramBeginAddress: _this.getFlashProgramBeginAddress(),
3620
- flashUnlockKey: _this.getFlashUnlockKey(),
3621
- flashHasDualPartition: _this.getFlashHasDualPartition(),
3622
- flashBootMode: _this.getFlashBootModeValue(),
3623
- flashDualPartitionDetails: _this.getDualPartitionDetails()
3624
- };
3625
- });
3626
-
3627
- _defineProperty(this, "getFlashInterface", function () {
3628
- return "FLASH_UNIFIED_MEMORY_MAP_QUAD_WORD_v1.0";
3629
- });
3630
-
3631
- _defineProperty(this, "enableInterfaceDefinitionGeneration", function () {
3632
- var _this$dataModel3, _this$dataModel3$getI;
3633
-
3634
- var enableInterfaceGeneration = false;
3635
-
3636
- if (_this.isFlashInterfaceUsed() && ((_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : (_this$dataModel3$getI = _this$dataModel3.getImportValue("system_16bit_initializer")) === null || _this$dataModel3$getI === void 0 ? void 0 : _this$dataModel3$getI.enableInterfaceDefinitionGeneration)) {
3637
- enableInterfaceGeneration = true;
3638
- }
3639
-
3640
- return enableInterfaceGeneration;
3641
- });
3642
-
3643
- _defineProperty(this, "getFlashInterruptData", function () {
3644
- var _this$getFlashHardwar3;
3645
-
3646
- var interruptList = [];
3647
- var interrupts = (_this$getFlashHardwar3 = _this.getFlashHardwareData()) === null || _this$getFlashHardwar3 === void 0 ? void 0 : _this$getFlashHardwar3.interrupts;
3648
-
3649
- for (var key in interrupts) {
3650
- interruptList.push(key);
3651
- }
3652
-
3653
- return {
3654
- moduleName: _this.getModuleNameForInterrupt(),
3655
- interruptData: _this.getInterruptData(interruptList)
3656
- };
3657
- });
3658
-
3659
- _defineProperty(this, "isInterruptMode", function () {
3660
- if (_this.isFlashInterfaceUsed()) {
3661
- return _this.getInterruptDrivenStatus();
3662
- } else {
3663
- return false;
3664
- }
3665
- });
3666
-
3667
- _defineProperty(this, "getInterruptDrivenStatus", function () {
3668
- var interruptDriven = false;
3669
-
3670
- var flashInterfaceResult = _this.getFlashResults(ARGUMENT_INTERRUPT_DRIVEN);
3671
-
3672
- if (flashInterfaceResult != undefined) {
3673
- interruptDriven = flashInterfaceResult;
3674
- }
3675
-
3676
- return interruptDriven;
3677
- });
3678
-
3679
- _defineProperty(this, "getFlashWordWriteSizeInInstructions", function () {
3680
- return _this.getFlashWordWriteSizeInInstructionsValue(_this.dataModel);
3681
- });
3682
-
3683
- _defineProperty(this, "getFlashWordWriteSizeInInstructionsValue", function (model) {
3684
- var _model$getHardware, _model$getHardware$ge, _model$getHardware$ge2, _model$getHardware$ge3;
3685
-
3686
- var flashWordWriteSizeInInstructions;
3687
-
3688
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware = model.getHardware()) === null || _model$getHardware === void 0 ? void 0 : (_model$getHardware$ge = _model$getHardware.getPeripheral()) === null || _model$getHardware$ge === void 0 ? void 0 : (_model$getHardware$ge2 = _model$getHardware$ge.properties) === null || _model$getHardware$ge2 === void 0 ? void 0 : (_model$getHardware$ge3 = _model$getHardware$ge2.FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware$ge3 === void 0 ? void 0 : _model$getHardware$ge3.value) != undefined) {
3689
- var _model$getHardware2, _model$getHardware2$g, _model$getHardware2$g2, _model$getHardware2$g3;
3690
-
3691
- flashWordWriteSizeInInstructions = Number((_model$getHardware2 = model.getHardware()) === null || _model$getHardware2 === void 0 ? void 0 : (_model$getHardware2$g = _model$getHardware2.getPeripheral()) === null || _model$getHardware2$g === void 0 ? void 0 : (_model$getHardware2$g2 = _model$getHardware2$g.properties) === null || _model$getHardware2$g2 === void 0 ? void 0 : (_model$getHardware2$g3 = _model$getHardware2$g2.FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware2$g3 === void 0 ? void 0 : _model$getHardware2$g3.value);
3692
- }
3693
-
3694
- return flashWordWriteSizeInInstructions;
3695
- });
3696
-
3697
- _defineProperty(this, "getFlashEraseInstructionCount", function () {
3698
- return _this.getFlashEraseInstructionCountValue(_this.dataModel);
3699
- });
3700
-
3701
- _defineProperty(this, "getFlashEraseInstructionCountValue", function (model) {
3702
- var _model$getHardware3, _model$getHardware3$g, _model$getHardware3$g2, _model$getHardware3$g3;
3703
-
3704
- var flashEraseInstructionCount;
3705
-
3706
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware3 = model.getHardware()) === null || _model$getHardware3 === void 0 ? void 0 : (_model$getHardware3$g = _model$getHardware3.getPeripheral()) === null || _model$getHardware3$g === void 0 ? void 0 : (_model$getHardware3$g2 = _model$getHardware3$g.properties) === null || _model$getHardware3$g2 === void 0 ? void 0 : (_model$getHardware3$g3 = _model$getHardware3$g2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware3$g3 === void 0 ? void 0 : _model$getHardware3$g3.value) != undefined) {
3707
- var _model$getHardware4, _model$getHardware4$g, _model$getHardware4$g2, _model$getHardware4$g3;
3708
-
3709
- flashEraseInstructionCount = Number(model === null || model === void 0 ? void 0 : (_model$getHardware4 = model.getHardware()) === null || _model$getHardware4 === void 0 ? void 0 : (_model$getHardware4$g = _model$getHardware4.getPeripheral()) === null || _model$getHardware4$g === void 0 ? void 0 : (_model$getHardware4$g2 = _model$getHardware4$g.properties) === null || _model$getHardware4$g2 === void 0 ? void 0 : (_model$getHardware4$g3 = _model$getHardware4$g2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware4$g3 === void 0 ? void 0 : _model$getHardware4$g3.value);
3710
- }
3711
-
3712
- return flashEraseInstructionCount;
3713
- });
3714
-
3715
- _defineProperty(this, "getFlashHasAuxiliary", function () {
3716
- return _this.getFlashHasAuxiliaryValue(_this.dataModel);
3717
- });
3718
-
3719
- _defineProperty(this, "getFlashHasAuxiliaryValue", function (model) {
3720
- var _model$getHardware5, _model$getHardware5$g, _model$getHardware5$g2, _model$getHardware5$g3;
3721
-
3722
- var flashHasAuxiliary;
3723
-
3724
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware5 = model.getHardware()) === null || _model$getHardware5 === void 0 ? void 0 : (_model$getHardware5$g = _model$getHardware5.getPeripheral()) === null || _model$getHardware5$g === void 0 ? void 0 : (_model$getHardware5$g2 = _model$getHardware5$g.properties) === null || _model$getHardware5$g2 === void 0 ? void 0 : (_model$getHardware5$g3 = _model$getHardware5$g2.FLASH_HAS_AUXILIARY) === null || _model$getHardware5$g3 === void 0 ? void 0 : _model$getHardware5$g3.value) != undefined) {
3725
- var _model$getHardware6, _model$getHardware6$g, _model$getHardware6$g2, _model$getHardware6$g3;
3726
-
3727
- flashHasAuxiliary = (model === null || model === void 0 ? void 0 : (_model$getHardware6 = model.getHardware()) === null || _model$getHardware6 === void 0 ? void 0 : (_model$getHardware6$g = _model$getHardware6.getPeripheral()) === null || _model$getHardware6$g === void 0 ? void 0 : (_model$getHardware6$g2 = _model$getHardware6$g.properties) === null || _model$getHardware6$g2 === void 0 ? void 0 : (_model$getHardware6$g3 = _model$getHardware6$g2.FLASH_HAS_AUXILIARY) === null || _model$getHardware6$g3 === void 0 ? void 0 : _model$getHardware6$g3.value) == "TRUE" ? 1 : 0;
3728
- }
3729
-
3730
- return flashHasAuxiliary;
3731
- });
3732
-
3733
- _defineProperty(this, "getFlashEnduranceMinimum", function () {
3734
- return _this.getFlashEnduranceMinimumValue(_this.dataModel);
3735
- });
3736
-
3737
- _defineProperty(this, "getFlashEnduranceMinimumValue", function (model) {
3738
- var _model$getHardware7, _model$getHardware7$g, _model$getHardware7$g2, _model$getHardware7$g3;
3739
-
3740
- var flashMinEndurance;
3741
-
3742
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware7 = model.getHardware()) === null || _model$getHardware7 === void 0 ? void 0 : (_model$getHardware7$g = _model$getHardware7.getPeripheral()) === null || _model$getHardware7$g === void 0 ? void 0 : (_model$getHardware7$g2 = _model$getHardware7$g.properties) === null || _model$getHardware7$g2 === void 0 ? void 0 : (_model$getHardware7$g3 = _model$getHardware7$g2.FLASH_ENDURANCE_MINIMUM) === null || _model$getHardware7$g3 === void 0 ? void 0 : _model$getHardware7$g3.value) != undefined) {
3743
- var _model$getHardware8, _model$getHardware8$g, _model$getHardware8$g2, _model$getHardware8$g3;
3744
-
3745
- flashMinEndurance = Number((_model$getHardware8 = model.getHardware()) === null || _model$getHardware8 === void 0 ? void 0 : (_model$getHardware8$g = _model$getHardware8.getPeripheral()) === null || _model$getHardware8$g === void 0 ? void 0 : (_model$getHardware8$g2 = _model$getHardware8$g.properties) === null || _model$getHardware8$g2 === void 0 ? void 0 : (_model$getHardware8$g3 = _model$getHardware8$g2.FLASH_ENDURANCE_MINIMUM) === null || _model$getHardware8$g3 === void 0 ? void 0 : _model$getHardware8$g3.value);
3746
- }
3747
-
3748
- return flashMinEndurance;
3749
- });
3750
-
3751
- _defineProperty(this, "getFlashBytesPerInstruction", function () {
3752
- return _this.getFlashBytesPerInstructionValue(_this.dataModel);
3753
- });
3754
-
3755
- _defineProperty(this, "getFlashBytesPerInstructionValue", function (model) {
3756
- var _model$getHardware9, _model$getHardware9$g, _model$getHardware9$g2, _model$getHardware9$g3;
3757
-
3758
- var flashBytesPerInstruction = 4;
3759
-
3760
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware9 = model.getHardware()) === null || _model$getHardware9 === void 0 ? void 0 : (_model$getHardware9$g = _model$getHardware9.getPeripheral()) === null || _model$getHardware9$g === void 0 ? void 0 : (_model$getHardware9$g2 = _model$getHardware9$g.properties) === null || _model$getHardware9$g2 === void 0 ? void 0 : (_model$getHardware9$g3 = _model$getHardware9$g2.FLASH_BYTES_PER_INSTRUCTION) === null || _model$getHardware9$g3 === void 0 ? void 0 : _model$getHardware9$g3.value) != undefined) {
3761
- var _model$getHardware10, _model$getHardware10$, _model$getHardware10$2, _model$getHardware10$3;
3762
-
3763
- flashBytesPerInstruction = Number((_model$getHardware10 = model.getHardware()) === null || _model$getHardware10 === void 0 ? void 0 : (_model$getHardware10$ = _model$getHardware10.getPeripheral()) === null || _model$getHardware10$ === void 0 ? void 0 : (_model$getHardware10$2 = _model$getHardware10$.properties) === null || _model$getHardware10$2 === void 0 ? void 0 : (_model$getHardware10$3 = _model$getHardware10$2.FLASH_BYTES_PER_INSTRUCTION) === null || _model$getHardware10$3 === void 0 ? void 0 : _model$getHardware10$3.value);
3764
- }
3765
-
3766
- return flashBytesPerInstruction;
3767
- });
3768
-
3769
- _defineProperty(this, "getFlashPcUnitsPerInstruction", function () {
3770
- return _this.getFlashPcUnitsPerInstructionValue(_this.dataModel);
3771
- });
3772
-
3773
- _defineProperty(this, "getFlashPcUnitsPerInstructionValue", function (model) {
3774
- var _model$getHardware11, _model$getHardware11$, _model$getHardware11$2, _model$getHardware11$3;
3775
-
3776
- var flashPcUnitsPerInstruction = 1;
3777
-
3778
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware11 = model.getHardware()) === null || _model$getHardware11 === void 0 ? void 0 : (_model$getHardware11$ = _model$getHardware11.getPeripheral()) === null || _model$getHardware11$ === void 0 ? void 0 : (_model$getHardware11$2 = _model$getHardware11$.properties) === null || _model$getHardware11$2 === void 0 ? void 0 : (_model$getHardware11$3 = _model$getHardware11$2.FLASH_PC_UNITS_PER_INSTRUCTION) === null || _model$getHardware11$3 === void 0 ? void 0 : _model$getHardware11$3.value) != undefined) {
3779
- var _model$getHardware12, _model$getHardware12$, _model$getHardware12$2, _model$getHardware12$3;
3780
-
3781
- flashPcUnitsPerInstruction = Number((_model$getHardware12 = model.getHardware()) === null || _model$getHardware12 === void 0 ? void 0 : (_model$getHardware12$ = _model$getHardware12.getPeripheral()) === null || _model$getHardware12$ === void 0 ? void 0 : (_model$getHardware12$2 = _model$getHardware12$.properties) === null || _model$getHardware12$2 === void 0 ? void 0 : (_model$getHardware12$3 = _model$getHardware12$2.FLASH_PC_UNITS_PER_INSTRUCTION) === null || _model$getHardware12$3 === void 0 ? void 0 : _model$getHardware12$3.value);
3782
- }
3783
-
3784
- return flashPcUnitsPerInstruction;
3785
- });
3786
-
3787
- _defineProperty(this, "getFlashWordWriteOpCode", function () {
3788
- return _this.getFlashWordWriteOpCodeValue(_this.dataModel);
3789
- });
3790
-
3791
- _defineProperty(this, "getFlashWordWriteOpCodeValue", function (model) {
3792
- var _model$getHardware13, _model$getHardware13$, _model$getHardware13$2, _model$getHardware13$3;
3793
-
3794
- var flashWordWriteOpcode;
3795
-
3796
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware13 = model.getHardware()) === null || _model$getHardware13 === void 0 ? void 0 : (_model$getHardware13$ = _model$getHardware13.getPeripheral()) === null || _model$getHardware13$ === void 0 ? void 0 : (_model$getHardware13$2 = _model$getHardware13$.properties) === null || _model$getHardware13$2 === void 0 ? void 0 : (_model$getHardware13$3 = _model$getHardware13$2.FLASH_WORD_WRITE_OP_CODE) === null || _model$getHardware13$3 === void 0 ? void 0 : _model$getHardware13$3.value) != undefined) {
3797
- var _model$getHardware14, _model$getHardware14$, _model$getHardware14$2, _model$getHardware14$3;
3798
-
3799
- flashWordWriteOpcode = Number((_model$getHardware14 = model.getHardware()) === null || _model$getHardware14 === void 0 ? void 0 : (_model$getHardware14$ = _model$getHardware14.getPeripheral()) === null || _model$getHardware14$ === void 0 ? void 0 : (_model$getHardware14$2 = _model$getHardware14$.properties) === null || _model$getHardware14$2 === void 0 ? void 0 : (_model$getHardware14$3 = _model$getHardware14$2.FLASH_WORD_WRITE_OP_CODE) === null || _model$getHardware14$3 === void 0 ? void 0 : _model$getHardware14$3.value);
3800
- }
3801
-
3802
- return flashWordWriteOpcode;
3803
- });
3804
-
3805
- _defineProperty(this, "getFlashOpCodeMask", function () {
3806
- return _this.getFlashOpCodeMaskValue(_this.dataModel);
3807
- });
3808
-
3809
- _defineProperty(this, "getFlashOpCodeMaskValue", function (model) {
3810
- var _model$getHardware15, _model$getHardware15$, _model$getHardware15$2, _model$getHardware15$3;
3811
-
3812
- var flashOpcodeMaks;
3813
-
3814
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware15 = model.getHardware()) === null || _model$getHardware15 === void 0 ? void 0 : (_model$getHardware15$ = _model$getHardware15.getPeripheral()) === null || _model$getHardware15$ === void 0 ? void 0 : (_model$getHardware15$2 = _model$getHardware15$.properties) === null || _model$getHardware15$2 === void 0 ? void 0 : (_model$getHardware15$3 = _model$getHardware15$2.FLASH_OP_CODE_MASK) === null || _model$getHardware15$3 === void 0 ? void 0 : _model$getHardware15$3.value) != undefined) {
3815
- var _model$getHardware16, _model$getHardware16$, _model$getHardware16$2, _model$getHardware16$3;
3816
-
3817
- flashOpcodeMaks = Number((_model$getHardware16 = model.getHardware()) === null || _model$getHardware16 === void 0 ? void 0 : (_model$getHardware16$ = _model$getHardware16.getPeripheral()) === null || _model$getHardware16$ === void 0 ? void 0 : (_model$getHardware16$2 = _model$getHardware16$.properties) === null || _model$getHardware16$2 === void 0 ? void 0 : (_model$getHardware16$3 = _model$getHardware16$2.FLASH_OP_CODE_MASK) === null || _model$getHardware16$3 === void 0 ? void 0 : _model$getHardware16$3.value);
3818
- }
3819
-
3820
- return flashOpcodeMaks;
3821
- });
3822
-
3823
- _defineProperty(this, "getFlashErasePageSizeInInstructions", function () {
3824
- return _this.getFlashErasePageSizeInInstructionsValue(_this.dataModel);
3825
- });
3826
-
3827
- _defineProperty(this, "getFlashErasePageSizeInInstructionsValue", function (model) {
3828
- var _model$getHardware17, _model$getHardware17$, _model$getHardware17$2, _model$getHardware17$3;
3829
-
3830
- var flashErasePageSizeInInstructions;
3831
-
3832
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware17 = model.getHardware()) === null || _model$getHardware17 === void 0 ? void 0 : (_model$getHardware17$ = _model$getHardware17.getPeripheral()) === null || _model$getHardware17$ === void 0 ? void 0 : (_model$getHardware17$2 = _model$getHardware17$.properties) === null || _model$getHardware17$2 === void 0 ? void 0 : (_model$getHardware17$3 = _model$getHardware17$2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware17$3 === void 0 ? void 0 : _model$getHardware17$3.value) != undefined) {
3833
- var _model$getHardware18, _model$getHardware18$, _model$getHardware18$2, _model$getHardware18$3;
3834
-
3835
- flashErasePageSizeInInstructions = Number((_model$getHardware18 = model.getHardware()) === null || _model$getHardware18 === void 0 ? void 0 : (_model$getHardware18$ = _model$getHardware18.getPeripheral()) === null || _model$getHardware18$ === void 0 ? void 0 : (_model$getHardware18$2 = _model$getHardware18$.properties) === null || _model$getHardware18$2 === void 0 ? void 0 : (_model$getHardware18$3 = _model$getHardware18$2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware18$3 === void 0 ? void 0 : _model$getHardware18$3.value);
3836
- }
3837
-
3838
- return flashErasePageSizeInInstructions;
3839
- });
3840
-
3841
- _defineProperty(this, "getFlashErasePageOpCode", function () {
3842
- return _this.getFlashErasePageOpCodeValue(_this.dataModel);
3843
- });
3844
-
3845
- _defineProperty(this, "getFlashErasePageOpCodeValue", function (model) {
3846
- var _model$getHardware19, _model$getHardware19$, _model$getHardware19$2, _model$getHardware19$3;
3847
-
3848
- var flashErasePageOpCode;
3849
-
3850
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware19 = model.getHardware()) === null || _model$getHardware19 === void 0 ? void 0 : (_model$getHardware19$ = _model$getHardware19.getPeripheral()) === null || _model$getHardware19$ === void 0 ? void 0 : (_model$getHardware19$2 = _model$getHardware19$.properties) === null || _model$getHardware19$2 === void 0 ? void 0 : (_model$getHardware19$3 = _model$getHardware19$2.FLASH_ERASE_PAGE_OP_CODE) === null || _model$getHardware19$3 === void 0 ? void 0 : _model$getHardware19$3.value) != undefined) {
3851
- var _model$getHardware20, _model$getHardware20$, _model$getHardware20$2, _model$getHardware20$3;
3852
-
3853
- flashErasePageOpCode = Number((_model$getHardware20 = model.getHardware()) === null || _model$getHardware20 === void 0 ? void 0 : (_model$getHardware20$ = _model$getHardware20.getPeripheral()) === null || _model$getHardware20$ === void 0 ? void 0 : (_model$getHardware20$2 = _model$getHardware20$.properties) === null || _model$getHardware20$2 === void 0 ? void 0 : (_model$getHardware20$3 = _model$getHardware20$2.FLASH_ERASE_PAGE_OP_CODE) === null || _model$getHardware20$3 === void 0 ? void 0 : _model$getHardware20$3.value);
3854
- }
3855
-
3856
- return flashErasePageOpCode;
3857
- });
3858
-
3859
- _defineProperty(this, "getFlashHasEcc", function () {
3860
- return _this.getFlashHasEccValue(_this.dataModel);
3861
- });
3862
-
3863
- _defineProperty(this, "getFlashHasEccValue", function (model) {
3864
- var _model$getHardware21, _model$getHardware21$, _model$getHardware21$2, _model$getHardware21$3;
3865
-
3866
- var flashHasEcc;
3867
-
3868
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware21 = model.getHardware()) === null || _model$getHardware21 === void 0 ? void 0 : (_model$getHardware21$ = _model$getHardware21.getPeripheral()) === null || _model$getHardware21$ === void 0 ? void 0 : (_model$getHardware21$2 = _model$getHardware21$.properties) === null || _model$getHardware21$2 === void 0 ? void 0 : (_model$getHardware21$3 = _model$getHardware21$2.FLASH_HAS_ECC) === null || _model$getHardware21$3 === void 0 ? void 0 : _model$getHardware21$3.value) != undefined) {
3869
- var _model$getHardware22, _model$getHardware22$, _model$getHardware22$2, _model$getHardware22$3;
3870
-
3871
- flashHasEcc = ((_model$getHardware22 = model.getHardware()) === null || _model$getHardware22 === void 0 ? void 0 : (_model$getHardware22$ = _model$getHardware22.getPeripheral()) === null || _model$getHardware22$ === void 0 ? void 0 : (_model$getHardware22$2 = _model$getHardware22$.properties) === null || _model$getHardware22$2 === void 0 ? void 0 : (_model$getHardware22$3 = _model$getHardware22$2.FLASH_HAS_ECC) === null || _model$getHardware22$3 === void 0 ? void 0 : _model$getHardware22$3.value) == "TRUE" ? 1 : 0;
3872
- }
3873
-
3874
- return flashHasEcc;
3875
- });
3876
-
3877
- _defineProperty(this, "getFlashHasRowProgramming", function () {
3878
- return _this.getFlashHasRowProgrammingValue(_this.dataModel);
3879
- });
3880
-
3881
- _defineProperty(this, "getFlashHasRowProgrammingValue", function (model) {
3882
- var _model$getHardware23, _model$getHardware23$, _model$getHardware23$2, _model$getHardware23$3;
3883
-
3884
- var flashHasRowProgramming;
3885
-
3886
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware23 = model.getHardware()) === null || _model$getHardware23 === void 0 ? void 0 : (_model$getHardware23$ = _model$getHardware23.getPeripheral()) === null || _model$getHardware23$ === void 0 ? void 0 : (_model$getHardware23$2 = _model$getHardware23$.properties) === null || _model$getHardware23$2 === void 0 ? void 0 : (_model$getHardware23$3 = _model$getHardware23$2.FLASH_HAS_ROW_PROGRAMMING) === null || _model$getHardware23$3 === void 0 ? void 0 : _model$getHardware23$3.value) != undefined) {
3887
- var _model$getHardware24, _model$getHardware24$, _model$getHardware24$2, _model$getHardware24$3;
3888
-
3889
- flashHasRowProgramming = ((_model$getHardware24 = model.getHardware()) === null || _model$getHardware24 === void 0 ? void 0 : (_model$getHardware24$ = _model$getHardware24.getPeripheral()) === null || _model$getHardware24$ === void 0 ? void 0 : (_model$getHardware24$2 = _model$getHardware24$.properties) === null || _model$getHardware24$2 === void 0 ? void 0 : (_model$getHardware24$3 = _model$getHardware24$2.FLASH_HAS_ROW_PROGRAMMING) === null || _model$getHardware24$3 === void 0 ? void 0 : _model$getHardware24$3.value) == "TRUE" ? 1 : 0;
3890
- }
3891
-
3892
- return flashHasRowProgramming;
3893
- });
3894
-
3895
- _defineProperty(this, "getFlashWriteRowSizeInInstructions", function () {
3896
- return _this.getFlashWriteRowSizeInInstructionsValue(_this.dataModel);
3897
- });
3898
-
3899
- _defineProperty(this, "getFlashWriteRowSizeInInstructionsValue", function (model) {
3900
- var _model$getHardware25, _model$getHardware25$, _model$getHardware25$2, _model$getHardware25$3;
3901
-
3902
- var flashWriteRowSizeInInstructions;
3903
-
3904
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware25 = model.getHardware()) === null || _model$getHardware25 === void 0 ? void 0 : (_model$getHardware25$ = _model$getHardware25.getPeripheral()) === null || _model$getHardware25$ === void 0 ? void 0 : (_model$getHardware25$2 = _model$getHardware25$.properties) === null || _model$getHardware25$2 === void 0 ? void 0 : (_model$getHardware25$3 = _model$getHardware25$2.FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware25$3 === void 0 ? void 0 : _model$getHardware25$3.value) != undefined) {
3905
- var _model$getHardware26, _model$getHardware26$, _model$getHardware26$2, _model$getHardware26$3;
3906
-
3907
- flashWriteRowSizeInInstructions = Number(model === null || model === void 0 ? void 0 : (_model$getHardware26 = model.getHardware()) === null || _model$getHardware26 === void 0 ? void 0 : (_model$getHardware26$ = _model$getHardware26.getPeripheral()) === null || _model$getHardware26$ === void 0 ? void 0 : (_model$getHardware26$2 = _model$getHardware26$.properties) === null || _model$getHardware26$2 === void 0 ? void 0 : (_model$getHardware26$3 = _model$getHardware26$2.FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware26$3 === void 0 ? void 0 : _model$getHardware26$3.value);
3908
- }
3909
-
3910
- return flashWriteRowSizeInInstructions;
3911
- });
3912
-
3913
- _defineProperty(this, "getFlashWriteRowOpCode", function () {
3914
- return _this.getFlashWriteRowOpCodeValue(_this.dataModel);
3915
- });
3916
-
3917
- _defineProperty(this, "getFlashWriteRowOpCodeValue", function (model) {
3918
- var _model$getHardware27, _model$getHardware27$, _model$getHardware27$2, _model$getHardware27$3;
3919
-
3920
- var flashWriteRowOpCode;
3921
-
3922
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware27 = model.getHardware()) === null || _model$getHardware27 === void 0 ? void 0 : (_model$getHardware27$ = _model$getHardware27.getPeripheral()) === null || _model$getHardware27$ === void 0 ? void 0 : (_model$getHardware27$2 = _model$getHardware27$.properties) === null || _model$getHardware27$2 === void 0 ? void 0 : (_model$getHardware27$3 = _model$getHardware27$2.FLASH_WRITE_ROW_OP_CODE) === null || _model$getHardware27$3 === void 0 ? void 0 : _model$getHardware27$3.value) != undefined) {
3923
- var _model$getHardware28, _model$getHardware28$, _model$getHardware28$2, _model$getHardware28$3;
3924
-
3925
- flashWriteRowOpCode = Number(model === null || model === void 0 ? void 0 : (_model$getHardware28 = model.getHardware()) === null || _model$getHardware28 === void 0 ? void 0 : (_model$getHardware28$ = _model$getHardware28.getPeripheral()) === null || _model$getHardware28$ === void 0 ? void 0 : (_model$getHardware28$2 = _model$getHardware28$.properties) === null || _model$getHardware28$2 === void 0 ? void 0 : (_model$getHardware28$3 = _model$getHardware28$2.FLASH_WRITE_ROW_OP_CODE) === null || _model$getHardware28$3 === void 0 ? void 0 : _model$getHardware28$3.value);
3926
- }
3927
-
3928
- return flashWriteRowOpCode;
3929
- });
3930
-
3931
- _defineProperty(this, "getFlashEndAddress", function () {
3932
- return _this.getFlashEndAddressValue(_this.dataModel);
3933
- });
3934
-
3935
- _defineProperty(this, "getFlashEndAddressValue", function (model) {
3936
- var _model$getHardware29, _model$getHardware29$, _model$getHardware29$2, _model$getHardware29$3;
3937
-
3938
- var flashEndAddress;
3939
-
3940
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware29 = model.getHardware()) === null || _model$getHardware29 === void 0 ? void 0 : (_model$getHardware29$ = _model$getHardware29.getPeripheral()) === null || _model$getHardware29$ === void 0 ? void 0 : (_model$getHardware29$2 = _model$getHardware29$.properties) === null || _model$getHardware29$2 === void 0 ? void 0 : (_model$getHardware29$3 = _model$getHardware29$2.FLASH_END_ADDRESS) === null || _model$getHardware29$3 === void 0 ? void 0 : _model$getHardware29$3.value) != undefined) {
3941
- var _model$getHardware30, _model$getHardware30$, _model$getHardware30$2, _model$getHardware30$3;
3942
-
3943
- flashEndAddress = Number((_model$getHardware30 = model.getHardware()) === null || _model$getHardware30 === void 0 ? void 0 : (_model$getHardware30$ = _model$getHardware30.getPeripheral()) === null || _model$getHardware30$ === void 0 ? void 0 : (_model$getHardware30$2 = _model$getHardware30$.properties) === null || _model$getHardware30$2 === void 0 ? void 0 : (_model$getHardware30$3 = _model$getHardware30$2.FLASH_END_ADDRESS) === null || _model$getHardware30$3 === void 0 ? void 0 : _model$getHardware30$3.value);
3944
- }
3945
-
3946
- return flashEndAddress;
3947
- });
3948
-
3949
- _defineProperty(this, "getFlashProgramBeginAddress", function () {
3950
- return _this.getFlashProgramBeginAddressValue(_this.dataModel);
3951
- });
3952
-
3953
- _defineProperty(this, "getFlashProgramBeginAddressValue", function (model) {
3954
- var _model$getHardware31, _model$getHardware31$, _model$getHardware31$2, _model$getHardware31$3;
3955
-
3956
- var flashProgramBeginAddress;
3957
-
3958
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware31 = model.getHardware()) === null || _model$getHardware31 === void 0 ? void 0 : (_model$getHardware31$ = _model$getHardware31.getPeripheral()) === null || _model$getHardware31$ === void 0 ? void 0 : (_model$getHardware31$2 = _model$getHardware31$.properties) === null || _model$getHardware31$2 === void 0 ? void 0 : (_model$getHardware31$3 = _model$getHardware31$2.PROGRAM_BEGIN_ADDRESS) === null || _model$getHardware31$3 === void 0 ? void 0 : _model$getHardware31$3.value) != undefined) {
3959
- var _model$getHardware32, _model$getHardware32$, _model$getHardware32$2, _model$getHardware32$3;
3960
-
3961
- flashProgramBeginAddress = Number((_model$getHardware32 = model.getHardware()) === null || _model$getHardware32 === void 0 ? void 0 : (_model$getHardware32$ = _model$getHardware32.getPeripheral()) === null || _model$getHardware32$ === void 0 ? void 0 : (_model$getHardware32$2 = _model$getHardware32$.properties) === null || _model$getHardware32$2 === void 0 ? void 0 : (_model$getHardware32$3 = _model$getHardware32$2.PROGRAM_BEGIN_ADDRESS) === null || _model$getHardware32$3 === void 0 ? void 0 : _model$getHardware32$3.value);
3962
- }
3963
-
3964
- return flashProgramBeginAddress;
3965
- });
3966
-
3967
- _defineProperty(this, "getFlashUnlockKey", function () {
3968
- return FLASH_UNLOCK_KEY;
3969
- });
3970
-
3971
- _defineProperty(this, "getFlashHasDualPartition", function () {
3972
- return _this.getHasDualPartitionValue(_this.dataModel);
3973
- });
3974
-
3975
- _defineProperty(this, "getHasDualPartitionValue", function (model) {
3976
- var _model$getHardware33, _model$getHardware33$, _model$getHardware33$2, _model$getHardware33$3;
3977
-
3978
- var flashHasDualPartition;
3979
- var hasDualPartition = model === null || model === void 0 ? void 0 : (_model$getHardware33 = model.getHardware()) === null || _model$getHardware33 === void 0 ? void 0 : (_model$getHardware33$ = _model$getHardware33.getPeripheral()) === null || _model$getHardware33$ === void 0 ? void 0 : (_model$getHardware33$2 = _model$getHardware33$.properties) === null || _model$getHardware33$2 === void 0 ? void 0 : (_model$getHardware33$3 = _model$getHardware33$2.FLASH_HAS_DUAL_PARTITION) === null || _model$getHardware33$3 === void 0 ? void 0 : _model$getHardware33$3.value;
3980
-
3981
- if (hasDualPartition != undefined) {
3982
- if (hasDualPartition == "TRUE") {
3983
- flashHasDualPartition = true;
3984
- } else {
3985
- flashHasDualPartition = false;
3986
- }
3987
- }
3988
-
3989
- return flashHasDualPartition;
3990
- });
3991
-
3992
- _defineProperty(this, "getFlashBootModeValue", function () {
3993
- var btMode;
3994
-
3995
- var interfaceData = _this.dataModel.getImportValue(CONFIG_16BIT_INTERFACE);
3996
-
3997
- if (interfaceData != undefined) {
3998
- btMode = interfaceData.configBitSettingValueAliasMap["BTMODE"];
3999
- }
4000
-
4001
- return btMode;
4002
- });
4003
-
4004
- _defineProperty(this, "getFlashFirstPartitionEndAddress", function () {
4005
- return _this.getFlashFirstPartitionEndAddressValue(_this.dataModel);
4006
- });
4007
-
4008
- _defineProperty(this, "getFlashFirstPartitionEndAddressValue", function (model) {
4009
- var _model$getHardware34, _model$getHardware34$, _model$getHardware34$2, _model$getHardware34$3;
4010
-
4011
- var flashFirstPartitionEndAddress;
4012
-
4013
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware34 = model.getHardware()) === null || _model$getHardware34 === void 0 ? void 0 : (_model$getHardware34$ = _model$getHardware34.getPeripheral()) === null || _model$getHardware34$ === void 0 ? void 0 : (_model$getHardware34$2 = _model$getHardware34$.properties) === null || _model$getHardware34$2 === void 0 ? void 0 : (_model$getHardware34$3 = _model$getHardware34$2.FLASH_FIRST_PARTITION_END_ADDRESS) === null || _model$getHardware34$3 === void 0 ? void 0 : _model$getHardware34$3.value) != undefined) {
4014
- var _model$getHardware35, _model$getHardware35$, _model$getHardware35$2, _model$getHardware35$3;
4015
-
4016
- flashFirstPartitionEndAddress = Number((_model$getHardware35 = model.getHardware()) === null || _model$getHardware35 === void 0 ? void 0 : (_model$getHardware35$ = _model$getHardware35.getPeripheral()) === null || _model$getHardware35$ === void 0 ? void 0 : (_model$getHardware35$2 = _model$getHardware35$.properties) === null || _model$getHardware35$2 === void 0 ? void 0 : (_model$getHardware35$3 = _model$getHardware35$2.FLASH_FIRST_PARTITION_END_ADDRESS) === null || _model$getHardware35$3 === void 0 ? void 0 : _model$getHardware35$3.value);
4017
- }
4018
-
4019
- return flashFirstPartitionEndAddress;
4020
- });
4021
-
4022
- _defineProperty(this, "getFlashSecondPartitionStartAddress", function () {
4023
- return _this.getFlashSecondPartitionStartAddressValue(_this.getModel());
4024
- });
4025
-
4026
- _defineProperty(this, "getFlashSecondPartitionStartAddressValue", function (model) {
4027
- var _model$getHardware36, _model$getHardware36$, _model$getHardware36$2, _model$getHardware36$3;
4028
-
4029
- var flashSecondPartitionStartAddress;
4030
-
4031
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware36 = model.getHardware()) === null || _model$getHardware36 === void 0 ? void 0 : (_model$getHardware36$ = _model$getHardware36.getPeripheral()) === null || _model$getHardware36$ === void 0 ? void 0 : (_model$getHardware36$2 = _model$getHardware36$.properties) === null || _model$getHardware36$2 === void 0 ? void 0 : (_model$getHardware36$3 = _model$getHardware36$2.FLASH_SECOND_PARTITION_START_ADDRESS) === null || _model$getHardware36$3 === void 0 ? void 0 : _model$getHardware36$3.value) != undefined) {
4032
- var _model$getHardware37, _model$getHardware37$, _model$getHardware37$2, _model$getHardware37$3;
4033
-
4034
- flashSecondPartitionStartAddress = Number((_model$getHardware37 = model.getHardware()) === null || _model$getHardware37 === void 0 ? void 0 : (_model$getHardware37$ = _model$getHardware37.getPeripheral()) === null || _model$getHardware37$ === void 0 ? void 0 : (_model$getHardware37$2 = _model$getHardware37$.properties) === null || _model$getHardware37$2 === void 0 ? void 0 : (_model$getHardware37$3 = _model$getHardware37$2.FLASH_SECOND_PARTITION_START_ADDRESS) === null || _model$getHardware37$3 === void 0 ? void 0 : _model$getHardware37$3.value);
4035
- }
4036
-
4037
- return flashSecondPartitionStartAddress;
4038
- });
4039
-
4040
- _defineProperty(this, "getFlashSecondPartitionProgramStartAddress", function () {
4041
- return _this.getFlashSecondPartitionProgramStartAddressValue(_this.getModel());
4042
- });
4043
-
4044
- _defineProperty(this, "getFlashSecondPartitionProgramStartAddressValue", function (model) {
4045
- var _model$getHardware38, _model$getHardware38$, _model$getHardware38$2, _model$getHardware38$3;
4046
-
4047
- var flashSecondPartitionProgramStartAddress;
4048
-
4049
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware38 = model.getHardware()) === null || _model$getHardware38 === void 0 ? void 0 : (_model$getHardware38$ = _model$getHardware38.getPeripheral()) === null || _model$getHardware38$ === void 0 ? void 0 : (_model$getHardware38$2 = _model$getHardware38$.properties) === null || _model$getHardware38$2 === void 0 ? void 0 : (_model$getHardware38$3 = _model$getHardware38$2.FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS) === null || _model$getHardware38$3 === void 0 ? void 0 : _model$getHardware38$3.value) != undefined) {
4050
- var _model$getHardware39, _model$getHardware39$, _model$getHardware39$2, _model$getHardware39$3;
4051
-
4052
- flashSecondPartitionProgramStartAddress = Number((_model$getHardware39 = model.getHardware()) === null || _model$getHardware39 === void 0 ? void 0 : (_model$getHardware39$ = _model$getHardware39.getPeripheral()) === null || _model$getHardware39$ === void 0 ? void 0 : (_model$getHardware39$2 = _model$getHardware39$.properties) === null || _model$getHardware39$2 === void 0 ? void 0 : (_model$getHardware39$3 = _model$getHardware39$2.FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS) === null || _model$getHardware39$3 === void 0 ? void 0 : _model$getHardware39$3.value);
4053
- }
4054
-
4055
- return flashSecondPartitionProgramStartAddress;
4056
- });
4057
-
4058
- _defineProperty(this, "getFlashSecondPartitionEndAddress", function () {
4059
- return _this.getFlashSecondPartitionEndAddressValue(_this.getModel());
4060
- });
4061
-
4062
- _defineProperty(this, "getFlashSecondPartitionEndAddressValue", function (model) {
4063
- var _model$getHardware40, _model$getHardware40$, _model$getHardware40$2, _model$getHardware40$3;
4064
-
4065
- var flashSecondPartitionEndAddress;
4066
-
4067
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware40 = model.getHardware()) === null || _model$getHardware40 === void 0 ? void 0 : (_model$getHardware40$ = _model$getHardware40.getPeripheral()) === null || _model$getHardware40$ === void 0 ? void 0 : (_model$getHardware40$2 = _model$getHardware40$.properties) === null || _model$getHardware40$2 === void 0 ? void 0 : (_model$getHardware40$3 = _model$getHardware40$2.FLASH_SECOND_PARTITION_END_ADDRESS) === null || _model$getHardware40$3 === void 0 ? void 0 : _model$getHardware40$3.value) != undefined) {
4068
- var _model$getHardware41, _model$getHardware41$, _model$getHardware41$2, _model$getHardware41$3;
4069
-
4070
- flashSecondPartitionEndAddress = Number((_model$getHardware41 = model.getHardware()) === null || _model$getHardware41 === void 0 ? void 0 : (_model$getHardware41$ = _model$getHardware41.getPeripheral()) === null || _model$getHardware41$ === void 0 ? void 0 : (_model$getHardware41$2 = _model$getHardware41$.properties) === null || _model$getHardware41$2 === void 0 ? void 0 : (_model$getHardware41$3 = _model$getHardware41$2.FLASH_SECOND_PARTITION_END_ADDRESS) === null || _model$getHardware41$3 === void 0 ? void 0 : _model$getHardware41$3.value);
4071
- }
4072
-
4073
- return flashSecondPartitionEndAddress;
4074
- });
4075
-
4076
- _defineProperty(this, "getFlashDualPartitionEnabled", function () {
4077
- return _this.getDualPartitionEnabledValue(_this.dataModel);
4078
- });
4079
-
4080
- _defineProperty(this, "getDualPartitionEnabledValue", function (model) {
4081
- var flashIsDualPartitionEnabled = false;
4082
-
4083
- var btMode = _this.getFlashBootModeValue();
4084
-
4085
- if (btMode != undefined) {
4086
- if (btMode != "SINGLE") {
4087
- flashIsDualPartitionEnabled = true;
4088
- }
4089
- }
4090
-
4091
- return flashIsDualPartitionEnabled;
4092
- });
4093
-
4094
- _defineProperty(this, "getFlashWriteInstructionCount", function () {
4095
- var flashWriteInstCount = _this.basic_flash_args(FLASH_WRITE_INSTRUCTION_COUNT, _this.getExportArg(FLASH_WRITE_INSTRUCTION_COUNT));
4096
-
4097
- if (flashWriteInstCount != undefined) {
4098
- return Number(flashWriteInstCount.value);
4099
- } else {
4100
- return Number(_this.getFlashWordWriteSizeInInstructions());
4101
- }
4102
- });
4103
-
4104
- _defineProperty(this, "getBlockingAPIGenerationStatus", function () {
4105
- var generateBlockingAPI = true;
4106
-
4107
- var flashInterfaceResult = _this.getFlashResults(ARGUMENT_GENERATE_API);
4108
-
4109
- if (flashInterfaceResult != undefined) {
4110
- if (flashInterfaceResult != OPTION_NON_BLOCKING) {
4111
- generateBlockingAPI = true;
4112
- } else {
4113
- generateBlockingAPI = false;
4114
- }
4115
- }
4116
-
4117
- return generateBlockingAPI;
4118
- });
4119
-
4120
- _defineProperty(this, "getNonBlockingAPIGenerationStatus", function () {
4121
- var nonBlockingAPIGenerate = _this.isGenerateNonBlockingAPI();
4122
-
4123
- if (nonBlockingAPIGenerate) {
4124
- if (_this.getFlashHasDualPartition() == undefined) {
4125
- nonBlockingAPIGenerate = false;
4126
- }
4127
- }
4128
-
4129
- return nonBlockingAPIGenerate;
4130
- });
4131
-
4132
- _defineProperty(this, "getFlashResults", function (resultsArg) {
4133
- var _this$dataModel4, _this$dataModel4$getE;
4134
-
4135
- var result;
4136
- var flashResults = (_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : (_this$dataModel4$getE = _this$dataModel4.getExportInterfaces().getInterface("flash_interface", _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId())) === null || _this$dataModel4$getE === void 0 ? void 0 : _this$dataModel4$getE.results;
4137
-
4138
- if (flashResults != undefined) {
4139
- for (var moduleId in flashResults) {
4140
- var _flashResults$moduleI;
4141
-
4142
- result = (_flashResults$moduleI = flashResults[moduleId]) === null || _flashResults$moduleI === void 0 ? void 0 : _flashResults$moduleI[resultsArg];
4143
- }
4144
- }
4145
-
4146
- return result;
4147
- });
4148
-
4149
- _defineProperty(this, "getProperties", function () {
4150
- return _this.getPropertiesValue(_this.dataModel);
4151
- });
4152
-
4153
- _defineProperty(this, "getPropertiesValue", function (model) {
4154
- if ((model === null || model === void 0 ? void 0 : model.getHardware()) != undefined) {
4155
- var _model$getHardware42, _model$getHardware42$;
4156
-
4157
- return (_model$getHardware42 = model.getHardware()) === null || _model$getHardware42 === void 0 ? void 0 : (_model$getHardware42$ = _model$getHardware42.getPeripheral()) === null || _model$getHardware42$ === void 0 ? void 0 : _model$getHardware42$.properties;
4158
- }
4159
- });
4160
-
4161
- _defineProperty(this, "getFlashWordWriteOpCodeHexString", function () {
4162
- var opcode = _this.getFlashWordWriteOpCode();
4163
-
4164
- return _this.getHexaDecimalString(opcode);
4165
- });
4166
-
4167
- _defineProperty(this, "getFlashOpCodeMaskHexString", function () {
4168
- var opcode = _this.getFlashOpCodeMask();
4169
-
4170
- return _this.getHexaDecimalString(opcode);
4171
- });
4172
-
4173
- _defineProperty(this, "getFlashErasePageOpCodeHexString", function () {
4174
- var opcode = _this.getFlashErasePageOpCode();
4175
-
4176
- return _this.getHexaDecimalString(opcode);
4177
- });
4178
-
4179
- _defineProperty(this, "getFlashWriteRowOpCodeHexString", function () {
4180
- var opcode = _this.getFlashWriteRowOpCode();
4181
-
4182
- return _this.getHexaDecimalString(opcode);
4183
- });
4184
-
4185
- _defineProperty(this, "getFlashEndAddressHexString", function () {
4186
- var opcode = _this.getFlashEndAddress();
4187
-
4188
- return _this.getHexaDecimalString(opcode);
4189
- });
4190
-
4191
- _defineProperty(this, "getFlashProgramBeginAddressHexString", function () {
4192
- var opcode = _this.getFlashProgramBeginAddress();
4193
-
4194
- return _this.getHexaDecimalString(opcode);
4195
- });
4196
-
4197
- _defineProperty(this, "getHexaDecimalString", function (opcode) {
4198
- if (opcode != undefined) {
4199
- return "0x" + opcode.toString(16);
4200
- } else {
4201
- opcode = 0;
4202
- return "0x" + opcode.toString(16);
4203
- }
4204
- });
4205
-
4206
- _defineProperty(this, "getModel", function () {
4207
- return _this.dataModel;
4208
- });
4209
-
4210
- this.dataModel = dataModel;
4211
- };
4212
-
4213
- /***/ }),
4214
-
4215
- /***/ "./src/GeneratorModel.ts":
4216
- /*!*******************************!*\
4217
- !*** ./src/GeneratorModel.ts ***!
4218
- \*******************************/
4219
- /*! exports provided: generatableItems, getInterruptContextList, isContextSupported */
4220
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4221
-
4222
- "use strict";
4223
- __webpack_require__.r(__webpack_exports__);
4224
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generatableItems", function() { return generatableItems; });
4225
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInterruptContextList", function() { return getInterruptContextList; });
4226
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContextSupported", function() { return isContextSupported; });
4227
- /* harmony import */ var _src_DerivedData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/DerivedData */ "./src/DerivedData.ts");
4228
- function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
4229
-
4230
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4231
-
4232
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
4233
-
4234
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4235
-
4236
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4237
-
4238
-
4239
- var generatableItems = function generatableItems(model) {
4240
- if (model) {
4241
- return new GeneratorModel(model);
4242
- }
4243
-
4244
- return undefined;
4245
- };
4246
-
4247
- var GeneratorModel = function GeneratorModel(dataModel) {
4248
- var _this = this;
4249
-
4250
- _classCallCheck(this, GeneratorModel);
4251
-
4252
- _defineProperty(this, "dataModel", void 0);
4253
-
4254
- _defineProperty(this, "getGeneratableItems", function () {
4255
- return _this.getFlashGeneratableItems();
4256
- });
4257
-
4258
- _defineProperty(this, "getFlashGeneratableItems", function () {
4259
- var _this$dataModel$getHa, _this$dataModel, _this$dataModel$getRe, _this$dataModel$getRe2, _this$dataModel2, _this$dataModel2$getR, _this$dataModel2$getR2, _this$dataModel3, _this$dataModel3$getR, _this$dataModel3$getR2, _this$dataModel4, _this$dataModel4$getR, _this$dataModel4$getR2, _this$dataModel5, _this$dataModel5$getR, _this$dataModel5$getR2, _this$dataModel6, _this$dataModel6$getR, _this$dataModel6$getR2, _this$dataModel7, _this$dataModel7$getR, _this$dataModel7$getR2;
4260
-
4261
- var derivedData = Object(_src_DerivedData__WEBPACK_IMPORTED_MODULE_0__["getMyDerivedData"])(_this.dataModel);
4262
- if (!derivedData) return;
4263
- var interruptDriven = derivedData.getInterruptDrivenStatus(); //The template data is now responsible for getting all the information for the ftl's
4264
-
4265
- var generatableItems = {
4266
- generatePLIBVersion: true,
4267
- PLIBVersion: "1.0.1",
4268
- disclaimer: "/*disclaimer*/",
4269
- generateInterfaceContent: derivedData.enableInterfaceDefinitionGeneration(),
4270
- moduleNameUpperCase: _this.dataModel.getName().toLocaleUpperCase(),
4271
- moduleNameLowerCase: _this.dataModel.getName().toLocaleLowerCase(),
4272
- generateBlockingAPI: derivedData.getBlockingAPIGenerationStatus(),
4273
- generateNonBlockingAPI: derivedData.getNonBlockingAPIGenerationStatus(),
4274
- interruptDriven: interruptDriven,
4275
- interfaceApi: derivedData.basic_flash_payload(),
4276
- properties: derivedData.getProperties(),
4277
- flashWordWriteSizeInInstructions: derivedData.getFlashWordWriteSizeInInstructions(),
4278
- flashInstructionType: _src_DerivedData__WEBPACK_IMPORTED_MODULE_0__["FLASH_INSTRUCTION_TYPE"],
4279
- flashWriteInstructionCount: String(derivedData.getFlashWriteInstructionCount()).replace(/,/g, ""),
4280
- flashInterface: derivedData.getFlashInterface(),
4281
- flashEraseInstructionCount: String(derivedData.getFlashEraseInstructionCount()).replace(/,/g, ""),
4282
- flashHasAuxiliary: derivedData.getFlashHasAuxiliary(),
4283
- flashEnduranceMinimum: derivedData.getFlashEnduranceMinimum(),
4284
- flashBytesPerInstruction: derivedData.getFlashBytesPerInstruction(),
4285
- flashPcUnitsPerInstruction: derivedData.getFlashPcUnitsPerInstruction(),
4286
- flashWordWriteOpCode: derivedData.getFlashWordWriteOpCodeHexString(),
4287
- flashRowWriteOpcode: derivedData.getFlashWriteRowOpCodeHexString(),
4288
- flashOpCodeMask: derivedData.getFlashOpCodeMaskHexString(),
4289
- flashErasePageSizeInInstructions: String(derivedData.getFlashErasePageSizeInInstructions()).replace(/,/g, ""),
4290
- flashPageEraseOpcode: derivedData.getFlashErasePageOpCodeHexString(),
4291
- flashHasEcc: derivedData.getFlashHasEcc(),
4292
- flashHasRowProgramming: derivedData.getFlashHasRowProgramming(),
4293
- flashWriteRowSizeInInstructions: String(derivedData.getFlashWriteRowSizeInInstructions()).replace(/,/g, ""),
4294
- flashEndAddress: derivedData.getFlashEndAddressHexString(),
4295
- flashProgramBeginAddress: derivedData.getFlashProgramBeginAddressHexString(),
4296
- flashUnlockKey: derivedData.getFlashUnlockKey(),
4297
- doxyDriverGroupName: "Flash Driver"
4298
- };
4299
- var interrupts = (_this$dataModel$getHa = _this.dataModel.getHardware()) === null || _this$dataModel$getHa === void 0 ? void 0 : _this$dataModel$getHa.getPeripheral().interrupts;
4300
-
4301
- if (interrupts != undefined) {
4302
- var flashInterrupt = interrupts["NVMI"];
4303
-
4304
- if (interruptDriven) {
4305
- var _flashInterrupt$enabl, _flashInterrupt$flag, _flashInterrupt$handl, _flashInterrupt$name;
4306
-
4307
- var contextList = getInterruptContextList(_this.dataModel);
4308
- generatableItems["flashInterruptEnable"] = (_flashInterrupt$enabl = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.enable) !== null && _flashInterrupt$enabl !== void 0 ? _flashInterrupt$enabl : "";
4309
- generatableItems["flashInterruptFlag"] = (_flashInterrupt$flag = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.flag) !== null && _flashInterrupt$flag !== void 0 ? _flashInterrupt$flag : "";
4310
- generatableItems["flashIsrHandlerName"] = (_flashInterrupt$handl = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.handlerName) !== null && _flashInterrupt$handl !== void 0 ? _flashInterrupt$handl : "";
4311
- generatableItems["isFlashContextSupported"] = isContextSupported(contextList, (_flashInterrupt$name = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.name) !== null && _flashInterrupt$name !== void 0 ? _flashInterrupt$name : "");
4312
- }
4313
- }
4314
-
4315
- generatableItems["nvmControlRegister"] = (_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : (_this$dataModel$getRe = _this$dataModel.getRegisters()) === null || _this$dataModel$getRe === void 0 ? void 0 : (_this$dataModel$getRe2 = _this$dataModel$getRe.NVMCON) === null || _this$dataModel$getRe2 === void 0 ? void 0 : _this$dataModel$getRe2.name;
4316
- generatableItems["nvmAddressRegister"] = (_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : (_this$dataModel2$getR = _this$dataModel2.getRegisters()) === null || _this$dataModel2$getR === void 0 ? void 0 : (_this$dataModel2$getR2 = _this$dataModel2$getR.NVMADR) === null || _this$dataModel2$getR2 === void 0 ? void 0 : _this$dataModel2$getR2.name;
4317
- generatableItems["nvmDataRegister0"] = (_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : (_this$dataModel3$getR = _this$dataModel3.getRegisters()) === null || _this$dataModel3$getR === void 0 ? void 0 : (_this$dataModel3$getR2 = _this$dataModel3$getR.NVMDATA0) === null || _this$dataModel3$getR2 === void 0 ? void 0 : _this$dataModel3$getR2.name;
4318
- generatableItems["nvmDataRegister1"] = (_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : (_this$dataModel4$getR = _this$dataModel4.getRegisters()) === null || _this$dataModel4$getR === void 0 ? void 0 : (_this$dataModel4$getR2 = _this$dataModel4$getR.NVMDATA1) === null || _this$dataModel4$getR2 === void 0 ? void 0 : _this$dataModel4$getR2.name;
4319
- generatableItems["nvmDataRegister2"] = (_this$dataModel5 = _this.dataModel) === null || _this$dataModel5 === void 0 ? void 0 : (_this$dataModel5$getR = _this$dataModel5.getRegisters()) === null || _this$dataModel5$getR === void 0 ? void 0 : (_this$dataModel5$getR2 = _this$dataModel5$getR.NVMDATA2) === null || _this$dataModel5$getR2 === void 0 ? void 0 : _this$dataModel5$getR2.name;
4320
- generatableItems["nvmDataRegister3"] = (_this$dataModel6 = _this.dataModel) === null || _this$dataModel6 === void 0 ? void 0 : (_this$dataModel6$getR = _this$dataModel6.getRegisters()) === null || _this$dataModel6$getR === void 0 ? void 0 : (_this$dataModel6$getR2 = _this$dataModel6$getR.NVMDATA3) === null || _this$dataModel6$getR2 === void 0 ? void 0 : _this$dataModel6$getR2.name;
4321
- generatableItems["nvmSrcAddressRegister"] = (_this$dataModel7 = _this.dataModel) === null || _this$dataModel7 === void 0 ? void 0 : (_this$dataModel7$getR = _this$dataModel7.getRegisters()) === null || _this$dataModel7$getR === void 0 ? void 0 : (_this$dataModel7$getR2 = _this$dataModel7$getR.NVMSRCADR) === null || _this$dataModel7$getR2 === void 0 ? void 0 : _this$dataModel7$getR2.name;
4322
- return generatableItems;
4323
- });
4324
-
4325
- this.dataModel = dataModel;
4326
- };
4327
-
4328
- var getInterruptContextList = function getInterruptContextList(dataModel) {
4329
- var interruptPayload = dataModel.getImportValue("interrupt_service");
4330
- var contextList = [];
4331
-
4332
- if (interruptPayload) {
4333
- if (interruptPayload === null || interruptPayload === void 0 ? void 0 : interruptPayload.contextEnabledInterruptList) {
4334
- contextList = interruptPayload["contextEnabledInterruptList"];
4335
- }
4336
- }
4337
-
4338
- return contextList;
4339
- };
4340
- var isContextSupported = function isContextSupported(contextList, interruptName) {
4341
- var isContextSupported = false;
4342
-
4343
- var _iterator = _createForOfIteratorHelper(contextList),
4344
- _step;
4345
-
4346
- try {
4347
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
4348
- var ctxName = _step.value;
4349
-
4350
- if (ctxName === interruptName) {
4351
- isContextSupported = true;
4352
- break;
4353
- }
4354
- }
4355
- } catch (err) {
4356
- _iterator.e(err);
4357
- } finally {
4358
- _iterator.f();
4359
- }
4360
-
4361
- return isContextSupported;
4362
- };
4363
-
4364
- /***/ }),
4365
-
4366
- /***/ "./src/moduleConfig.json":
4367
- /*!*******************************!*\
4368
- !*** ./src/moduleConfig.json ***!
4369
- \*******************************/
4370
- /*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, tabs, isEntryPoint, templates, imports, exports, peripherals, default */
4371
- /***/ (function(module) {
4372
-
4373
- module.exports = JSON.parse("{\"moduleName\":\"Flash\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{},\"UIOrder\":{},\"tabs\":{\"register\":\"Register Initialization\"},\"isEntryPoint\":false,\"templates\":[{\"src\":\"output/flash-a-core-ftl/flash.c.ftl\",\"dest\":\"flash/src/flash.c\",\"isGeneratableProperty\":\"blockingAPIGenerate\"},{\"src\":\"output/flash-a-core-ftl/flash.h.ftl\",\"dest\":\"flash/flash.h\",\"isGeneratableProperty\":\"blockingAPIGenerate\"},{\"src\":\"output/flash-a-core-ftl/flash_interface.h.ftl\",\"dest\":\"flash/flash_interface.h\",\"isGeneratableProperty\":\"enableInterfaceDefinitionGeneration\"},{\"src\":\"output/flash-a-core-ftl/flash_types.h.ftl\",\"dest\":\"flash/flash_types.h\"},{\"src\":\"output/flash-a-core-ftl/flash_nonblocking.c.ftl\",\"dest\":\"flash/src/flash_nonblocking.c\",\"isGeneratableProperty\":\"nonBlockingAPIGenerate\"},{\"src\":\"output/flash-a-core-ftl/flash_nonblocking.h.ftl\",\"dest\":\"flash/flash_nonblocking.h\",\"isGeneratableProperty\":\"nonBlockingAPIGenerate\"}],\"imports\":{\"nvm_ctrl_32bit_upb_v1\":{\"import\":{\"interfaceId\":{\"name\":\"nvm_ctrl_32bit_upb_v1\",\"version\":\"1.0.0\"},\"isRequired\":true}},\"system_16bit_initializer\":{\"nodeModule\":{\"importName\":\"system_16bit_initializer\",\"node\":\"@microchip/system-16bit-initializer\"},\"import\":{\"interfaceId\":{\"name\":\"system-16bit-initializer\",\"version\":\"^1.0.0\"}}},\"config_16bit_interface\":{\"import\":{\"interfaceId\":{\"name\":\"config-16bit-interface\",\"version\":\"^1.0.0\"}}},\"interrupt_service\":{\"import\":{\"interfaceId\":{\"name\":\"interrupt-16bit-interface\",\"version\":\"^1.0.0\"}}}},\"exports\":{\"flash_interface\":{\"interfaces\":[{\"interfaceId\":{\"name\":\"flash-interface\",\"version\":\"1.3.1\"}}]}},\"peripherals\":[{\"interfaceId\":{\"name\":\"nvm_ctrl_32bit_upb_v1\",\"version\":\"1.0.0\"},\"registers\":{\"NVMCON\":[{\"setting\":\"NVMOP\",\"name\":\"nvmopNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"DRBV\",\"name\":\"drbvNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"LOCK\",\"name\":\"lockNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"P2ACTIV\",\"name\":\"p2activNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"SFTSWP\",\"name\":\"sftswpNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"NVMPIDL\",\"name\":\"nvmpidlNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WRERR\",\"name\":\"wrerrNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WREN\",\"name\":\"wrenNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WR\",\"name\":\"wrNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WREC\",\"name\":\"wrecNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"WRRE\",\"name\":\"wrreNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMADR\":[{\"setting\":\"NVMADR\",\"name\":\"nvmadrNvmadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA0\":[{\"setting\":\"DATA0\",\"name\":\"data0Nvmdata0\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA1\":[{\"setting\":\"DATA1\",\"name\":\"data1Nvmdata1\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA2\":[{\"setting\":\"DATA2\",\"name\":\"data2Nvmdata2\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA3\":[{\"setting\":\"DATA3\",\"name\":\"data3Nvmdata3\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMSRCADR\":[{\"setting\":\"SRCADR\",\"name\":\"srcadrNvmsrcadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCCON\":[{\"setting\":\"FLTINJ\",\"name\":\"fltinjNvmecccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"SECIE\",\"name\":\"secieNvmecccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"ECCLOCK\",\"name\":\"ecclockNvmecccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCSTAT\":[{\"setting\":\"DED\",\"name\":\"dedNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"DEDO\",\"name\":\"dedoNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"SEC\",\"name\":\"secNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"SECO\",\"name\":\"secoNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"FLEC\",\"name\":\"flecNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"ESEL\",\"name\":\"eselNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCFPTR\":[{\"setting\":\"FLT1LPTR\",\"name\":\"flt1lptrNvmeccfptr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"FLT2LPTR\",\"name\":\"flt2lptrNvmeccfptr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCFADR\":[{\"setting\":\"ECCFADR\",\"name\":\"eccfadrNvmeccfadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEADR\":[{\"setting\":\"ECCEADR\",\"name\":\"ecceadrNvmecceadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA0\":[{\"setting\":\"ECCEDATA0\",\"name\":\"eccedata0Nvmeccedata0\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA1\":[{\"setting\":\"ECCEDATA1\",\"name\":\"eccedata1Nvmeccedata1\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA2\":[{\"setting\":\"ECCEDATA2\",\"name\":\"eccedata2Nvmeccedata2\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA3\":[{\"setting\":\"ECCEDATA3\",\"name\":\"eccedata3Nvmeccedata3\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCVAL\":[{\"setting\":\"ECCVAL\",\"name\":\"eccvalNvmeccval\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"NVMECCSYND\":[{\"setting\":\"ECCSYND\",\"name\":\"eccsyndNvmeccsynd\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"NVMCRCCON\":[{\"setting\":\"CRCEC\",\"name\":\"crcecNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"OM\",\"name\":\"omNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"CRCIDL\",\"name\":\"crcidlNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"START\",\"name\":\"startNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"ON\",\"name\":\"onNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"DELAY\",\"name\":\"delayNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCST\":[{\"setting\":\"CRCSTART\",\"name\":\"crcstartNvmcrcst\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCEND\":[{\"setting\":\"CRCEND\",\"name\":\"crcendNvmcrcend\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCSEED\":[{\"setting\":\"CRCSEED\",\"name\":\"crcseedNvmcrcseed\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCDATA\":[{\"setting\":\"CRCDATA\",\"name\":\"crcdataNvmcrcdata\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"]}]},\"properties\":[\"PROGRAM_BEGIN_ADDRESS\",\"FLASH_HAS_ROW_PROGRAMMING\",\"FLASH_ENDURANCE_MINIMUM\",\"FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS\",\"FLASH_END_ADDRESS\",\"FLASH_WORD_WRITE_OP_CODE\",\"FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS\",\"FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS\",\"FLASH_HAS_DUAL_PARTITION\",\"FLASH_WRITE_ROW_OP_CODE\",\"FLASH_BYTES_PER_INSTRUCTION\",\"FLASH_HAS_ECC\",\"FLASH_ERASE_PAGE_OP_CODE\",\"FLASH_SECOND_PARTITION_END_ADDRESS\",\"FLASH_FIRST_PARTITION_END_ADDRESS\",\"FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS\",\"FLASH_SECOND_PARTITION_START_ADDRESS\"]}]}");
4374
-
4375
- /***/ })
4376
-
4377
- /******/ });
1
+ var autoCreator;!function(){var e={6:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(408);t.buildSimpleApi=n.buildSimpleApi;var a=r(695);t.getInterfaceName=a.getInterfaceName,t.getInterfaceVersion=a.getInterfaceVersion},139:function(e){"use strict";e.exports=JSON.parse('{"moduleName":"Flash","deviceType":"PIC","booleanValues":{"true":"enabled","false":"disabled"},"UIGroups":{},"UIOrder":{},"tabs":{"register":"Register Initialization"},"isEntryPoint":false,"templates":[{"src":"output/flash-a-core-ftl/flash.c.ftl","dest":"flash/src/flash.c","isGeneratableProperty":"blockingAPIGenerate"},{"src":"output/flash-a-core-ftl/flash.h.ftl","dest":"flash/flash.h","isGeneratableProperty":"blockingAPIGenerate"},{"src":"output/flash-a-core-ftl/flash_interface.h.ftl","dest":"flash/flash_interface.h","isGeneratableProperty":"enableInterfaceDefinitionGeneration"},{"src":"output/flash-a-core-ftl/flash_types.h.ftl","dest":"flash/flash_types.h"},{"src":"output/flash-a-core-ftl/flash_nonblocking.c.ftl","dest":"flash/src/flash_nonblocking.c","isGeneratableProperty":"nonBlockingAPIGenerate"},{"src":"output/flash-a-core-ftl/flash_nonblocking.h.ftl","dest":"flash/flash_nonblocking.h","isGeneratableProperty":"nonBlockingAPIGenerate"}],"imports":{"nvm_ctrl_32bit_upb_v1":{"import":{"interfaceId":{"name":"nvm_ctrl_32bit_upb_v1","version":"1.0.0"},"isRequired":true}},"system_16bit_initializer":{"nodeModule":{"importName":"system_16bit_initializer","node":"@microchip/system-16bit-initializer"},"import":{"interfaceId":{"name":"system-16bit-initializer","version":"^1.0.0"}}},"config_16bit_interface":{"import":{"interfaceId":{"name":"config-16bit-interface","version":"^1.0.0"}}},"interrupt_service":{"import":{"interfaceId":{"name":"interrupt-16bit-interface","version":"^1.0.0"}}}},"exports":{"flash_interface":{"interfaces":[{"interfaceId":{"name":"flash-interface","version":"1.3.1"}}]}},"peripherals":[{"interfaceId":{"name":"nvm_ctrl_32bit_upb_v1","version":"1.0.0"},"registers":{"NVMCON":[{"setting":"NVMOP","name":"nvmopNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"DRBV","name":"drbvNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"LOCK","name":"lockNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"P2ACTIV","name":"p2activNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["register"]},{"setting":"SFTSWP","name":"sftswpNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"NVMPIDL","name":"nvmpidlNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"WRERR","name":"wrerrNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"WREN","name":"wrenNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"WR","name":"wrNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"WREC","name":"wrecNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["register"]},{"setting":"WRRE","name":"wrreNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]}],"NVMADR":[{"setting":"NVMADR","name":"nvmadrNvmadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA0":[{"setting":"DATA0","name":"data0Nvmdata0","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA1":[{"setting":"DATA1","name":"data1Nvmdata1","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA2":[{"setting":"DATA2","name":"data2Nvmdata2","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA3":[{"setting":"DATA3","name":"data3Nvmdata3","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMSRCADR":[{"setting":"SRCADR","name":"srcadrNvmsrcadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCCON":[{"setting":"FLTINJ","name":"fltinjNvmecccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"SECIE","name":"secieNvmecccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"ECCLOCK","name":"ecclockNvmecccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]}],"NVMECCSTAT":[{"setting":"DED","name":"dedNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"DEDO","name":"dedoNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"SEC","name":"secNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"SECO","name":"secoNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"FLEC","name":"flecNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["register"]},{"setting":"ESEL","name":"eselNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]}],"NVMECCFPTR":[{"setting":"FLT1LPTR","name":"flt1lptrNvmeccfptr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]},{"setting":"FLT2LPTR","name":"flt2lptrNvmeccfptr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCFADR":[{"setting":"ECCFADR","name":"eccfadrNvmeccfadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEADR":[{"setting":"ECCEADR","name":"ecceadrNvmecceadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA0":[{"setting":"ECCEDATA0","name":"eccedata0Nvmeccedata0","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA1":[{"setting":"ECCEDATA1","name":"eccedata1Nvmeccedata1","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA2":[{"setting":"ECCEDATA2","name":"eccedata2Nvmeccedata2","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA3":[{"setting":"ECCEDATA3","name":"eccedata3Nvmeccedata3","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCVAL":[{"setting":"ECCVAL","name":"eccvalNvmeccval","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["register"]}],"NVMECCSYND":[{"setting":"ECCSYND","name":"eccsyndNvmeccsynd","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["register"]}],"NVMCRCCON":[{"setting":"CRCEC","name":"crcecNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["register"]},{"setting":"OM","name":"omNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"CRCIDL","name":"crcidlNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"START","name":"startNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"ON","name":"onNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"DELAY","name":"delayNvmcrccon","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCST":[{"setting":"CRCSTART","name":"crcstartNvmcrcst","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCEND":[{"setting":"CRCEND","name":"crcendNvmcrcend","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCSEED":[{"setting":"CRCSEED","name":"crcseedNvmcrcseed","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCDATA":[{"setting":"CRCDATA","name":"crcdataNvmcrcdata","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["register"]}]},"properties":["PROGRAM_BEGIN_ADDRESS","FLASH_HAS_ROW_PROGRAMMING","FLASH_ENDURANCE_MINIMUM","FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS","FLASH_END_ADDRESS","FLASH_WORD_WRITE_OP_CODE","FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS","FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS","FLASH_HAS_DUAL_PARTITION","FLASH_WRITE_ROW_OP_CODE","FLASH_BYTES_PER_INSTRUCTION","FLASH_HAS_ECC","FLASH_ERASE_PAGE_OP_CODE","FLASH_SECOND_PARTITION_END_ADDRESS","FLASH_FIRST_PARTITION_END_ADDRESS","FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS","FLASH_SECOND_PARTITION_START_ADDRESS"]}]}')},408:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildSimpleApi=function(e){var t={};for(var n in e)t[n]=r(e[n]);return t};var r=function(e){return e.returns+" "+e.name+"("+n(e.arguments)+")"},n=function(e){return e?e.map(function(e){return e.type+" "+e.name}).join(", "):"void"}},557:function(e,t,r){e=r.nmd(e);var n="__lodash_hash_undefined__",a=1/0,i=9007199254740991,o=17976931348623157e292,s=NaN,c="[object Arguments]",u="[object Array]",p="[object Boolean]",l="[object Date]",f="[object Error]",d="[object Function]",h="[object Map]",g="[object Number]",_="[object Object]",m="[object Promise]",y="[object RegExp]",v="[object Set]",b="[object String]",A="[object Symbol]",N="[object WeakMap]",w="[object ArrayBuffer]",I="[object DataView]",E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S=/^\w*$/,C=/^\./,R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,D=/^\s+|\s+$/g,T=/\\(\\)?/g,O=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,j=/^\[object .+?Constructor\]$/,k=/^0o[0-7]+$/i,H=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[c]=L[u]=L[w]=L[p]=L[I]=L[l]=L[f]=L[d]=L[h]=L[g]=L[_]=L[y]=L[v]=L[b]=L[N]=!1;var M=parseInt,B="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,F="object"==typeof self&&self&&self.Object===Object&&self,U=B||F||Function("return this")(),W=t&&!t.nodeType&&t,x=W&&e&&!e.nodeType&&e,V=x&&x.exports===W&&B.process,G=function(){try{return V&&V.binding("util")}catch(e){}}(),K=G&&G.isTypedArray;function z(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function $(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}function Y(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function q(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var J,Z,Q=Array.prototype,X=Function.prototype,ee=Object.prototype,te=U["__core-js_shared__"],re=function(){var e=/[^.]+$/.exec(te&&te.keys&&te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ne=X.toString,ae=ee.hasOwnProperty,ie=ee.toString,oe=RegExp("^"+ne.call(ae).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),se=U.Symbol,ce=U.Uint8Array,ue=ee.propertyIsEnumerable,pe=Q.splice,le=(J=Object.keys,Z=Object,function(e){return J(Z(e))}),fe=Math.max,de=Ve(U,"DataView"),he=Ve(U,"Map"),ge=Ve(U,"Promise"),_e=Ve(U,"Set"),me=Ve(U,"WeakMap"),ye=Ve(Object,"create"),ve=Ze(de),be=Ze(he),Ae=Ze(ge),Ne=Ze(_e),we=Ze(me),Ie=se?se.prototype:void 0,Ee=Ie?Ie.valueOf:void 0,Se=Ie?Ie.toString:void 0;function Ce(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Re(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function De(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Te(e){var t=-1,r=e?e.length:0;for(this.__data__=new De;++t<r;)this.add(e[t])}function Oe(e){this.__data__=new Re(e)}function Pe(e,t){var r=nt(e)||rt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,a=!!n;for(var i in e)!t&&!ae.call(e,i)||a&&("length"==i||Ke(i,n))||r.push(i);return r}function je(e,t){for(var r=e.length;r--;)if(tt(e[r][0],t))return r;return-1}function ke(e,t){for(var r=0,n=(t=ze(t,e)?[t]:Ue(t)).length;null!=e&&r<n;)e=e[Je(t[r++])];return r&&r==n?e:void 0}function He(e,t){return null!=e&&t in Object(e)}function Le(e,t,r,n,a){return e===t||(null==e||null==t||!st(e)&&!ct(t)?e!==e&&t!==t:function(e,t,r,n,a,i){var o=nt(e),s=nt(t),d=u,m=u;o||(d=(d=Ge(e))==c?_:d);s||(m=(m=Ge(t))==c?_:m);var N=d==_&&!$(e),E=m==_&&!$(t),S=d==m;if(S&&!N)return i||(i=new Oe),o||pt(e)?We(e,t,r,n,a,i):function(e,t,r,n,a,i,o){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!n(new ce(e),new ce(t)));case p:case l:case g:return tt(+e,+t);case f:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case h:var s=Y;case v:var c=2&i;if(s||(s=q),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;i|=1,o.set(e,t);var d=We(s(e),s(t),n,a,i,o);return o.delete(e),d;case A:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,d,r,n,a,i);if(!(2&a)){var C=N&&ae.call(e,"__wrapped__"),R=E&&ae.call(t,"__wrapped__");if(C||R){var D=C?e.value():e,T=R?t.value():t;return i||(i=new Oe),r(D,T,n,a,i)}}if(!S)return!1;return i||(i=new Oe),function(e,t,r,n,a,i){var o=2&a,s=lt(e),c=s.length,u=lt(t),p=u.length;if(c!=p&&!o)return!1;var l=c;for(;l--;){var f=s[l];if(!(o?f in t:ae.call(t,f)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var h=!0;i.set(e,t),i.set(t,e);var g=o;for(;++l<c;){var _=e[f=s[l]],m=t[f];if(n)var y=o?n(m,_,f,t,e,i):n(_,m,f,e,t,i);if(!(void 0===y?_===m||r(_,m,n,a,i):y)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,a,i)}(e,t,Le,r,n,a))}function Me(e){return!(!st(e)||function(e){return!!re&&re in e}(e))&&(it(e)||$(e)?oe:j).test(Ze(e))}function Be(e){return"function"==typeof e?e:null==e?ft:"object"==typeof e?nt(e)?function(e,t){if(ze(e)&&$e(t))return Ye(Je(e),t);return function(r){var n=function(e,t,r){var n=null==e?void 0:ke(e,t);return void 0===n?r:n}(r,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){t=ze(t,e)?[t]:Ue(t);var n,a=-1,i=t.length;for(;++a<i;){var o=Je(t[a]);if(!(n=null!=e&&r(e,o)))break;e=e[o]}if(n)return n;i=e?e.length:0;return!!i&&ot(i)&&Ke(o,i)&&(nt(e)||rt(e))}(e,t,He)}(r,e):Le(t,n,void 0,3)}}(e[0],e[1]):function(e){var t=function(e){var t=lt(e),r=t.length;for(;r--;){var n=t[r],a=e[n];t[r]=[n,a,$e(a)]}return t}(e);if(1==t.length&&t[0][2])return Ye(t[0][0],t[0][1]);return function(r){return r===e||function(e,t,r,n){var a=r.length,i=a,o=!n;if(null==e)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){var c=(s=r[a])[0],u=e[c],p=s[1];if(o&&s[2]){if(void 0===u&&!(c in e))return!1}else{var l=new Oe;if(n)var f=n(u,p,c,e,t,l);if(!(void 0===f?Le(p,u,n,3,l):f))return!1}}return!0}(r,e,t)}}(e):function(e){return ze(e)?(t=Je(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return ke(t,e)}}(e);var t}(e)}function Fe(e){if(!function(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||ee;return e===r}(e))return le(e);var t=[];for(var r in Object(e))ae.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Ue(e){return nt(e)?e:qe(e)}function We(e,t,r,n,a,i){var o=2&a,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,l=!0,f=1&a?new Te:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var d=e[p],h=t[p];if(n)var g=o?n(h,d,p,t,e,i):n(d,h,p,e,t,i);if(void 0!==g){if(g)continue;l=!1;break}if(f){if(!z(t,function(e,t){if(!f.has(t)&&(d===e||r(d,e,n,a,i)))return f.add(t)})){l=!1;break}}else if(d!==h&&!r(d,h,n,a,i)){l=!1;break}}return i.delete(e),i.delete(t),l}function xe(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function Ve(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(r)?r:void 0}Ce.prototype.clear=function(){this.__data__=ye?ye(null):{}},Ce.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ce.prototype.get=function(e){var t=this.__data__;if(ye){var r=t[e];return r===n?void 0:r}return ae.call(t,e)?t[e]:void 0},Ce.prototype.has=function(e){var t=this.__data__;return ye?void 0!==t[e]:ae.call(t,e)},Ce.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?n:t,this},Re.prototype.clear=function(){this.__data__=[]},Re.prototype.delete=function(e){var t=this.__data__,r=je(t,e);return!(r<0)&&(r==t.length-1?t.pop():pe.call(t,r,1),!0)},Re.prototype.get=function(e){var t=this.__data__,r=je(t,e);return r<0?void 0:t[r][1]},Re.prototype.has=function(e){return je(this.__data__,e)>-1},Re.prototype.set=function(e,t){var r=this.__data__,n=je(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new Ce,map:new(he||Re),string:new Ce}},De.prototype.delete=function(e){return xe(this,e).delete(e)},De.prototype.get=function(e){return xe(this,e).get(e)},De.prototype.has=function(e){return xe(this,e).has(e)},De.prototype.set=function(e,t){return xe(this,e).set(e,t),this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,n),this},Te.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new Re},Oe.prototype.delete=function(e){return this.__data__.delete(e)},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Re){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this;r=this.__data__=new De(n)}return r.set(e,t),this};var Ge=function(e){return ie.call(e)};function Ke(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||H.test(e))&&e>-1&&e%1==0&&e<t}function ze(e,t){if(nt(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ut(e))||(S.test(e)||!E.test(e)||null!=t&&e in Object(t))}function $e(e){return e===e&&!st(e)}function Ye(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(de&&Ge(new de(new ArrayBuffer(1)))!=I||he&&Ge(new he)!=h||ge&&Ge(ge.resolve())!=m||_e&&Ge(new _e)!=v||me&&Ge(new me)!=N)&&(Ge=function(e){var t=ie.call(e),r=t==_?e.constructor:void 0,n=r?Ze(r):void 0;if(n)switch(n){case ve:return I;case be:return h;case Ae:return m;case Ne:return v;case we:return N}return t});var qe=et(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ut(e))return Se?Se.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return C.test(e)&&r.push(""),e.replace(R,function(e,t,n,a){r.push(n?a.replace(T,"$1"):t||e)}),r});function Je(e){if("string"==typeof e||ut(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ze(e){if(null!=e){try{return ne.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Qe,Xe=(Qe=function(e,t,r){var n=e?e.length:0;if(!n)return-1;var i=null==r?0:function(e){var t=function(e){return e?(e=function(e){if("number"==typeof e)return e;if(ut(e))return s;if(st(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=st(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(D,"");var r=P.test(e);return r||k.test(e)?M(e.slice(2),r?2:8):O.test(e)?s:+e}(e))===a||e===-1/0?(e<0?-1:1)*o:e===e?e:0:0===e?e:0}(e),r=t%1;return t===t?r?t-r:t:0}(r);return i<0&&(i=fe(n+i,0)),function(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}(e,Be(t),i)},function(e,t,r){var n=Object(e);if(!at(e)){var a=Be(t);e=lt(e),t=function(e){return a(n[e],e,n)}}var i=Qe(e,t,r);return i>-1?n[a?e[i]:i]:void 0});function et(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o),o};return r.cache=new(et.Cache||De),r}function tt(e,t){return e===t||e!==e&&t!==t}function rt(e){return function(e){return ct(e)&&at(e)}(e)&&ae.call(e,"callee")&&(!ue.call(e,"callee")||ie.call(e)==c)}et.Cache=De;var nt=Array.isArray;function at(e){return null!=e&&ot(e.length)&&!it(e)}function it(e){var t=st(e)?ie.call(e):"";return t==d||"[object GeneratorFunction]"==t}function ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||ct(e)&&ie.call(e)==A}var pt=K?function(e){return function(t){return e(t)}}(K):function(e){return ct(e)&&ot(e.length)&&!!L[ie.call(e)]};function lt(e){return at(e)?Pe(e):Fe(e)}function ft(e){return e}e.exports=Xe},623:function(e){"use strict";e.exports=JSON.parse('{"name":"@microchip/flash-interface","version":"1.3.1","license":"SEE LICENSE IN LICENSE.txt","main":"lib/src/index.js","typings":"./lib/src/index.d.ts","scripts":{"build":"tsc","test":"jest","lint:nofix":"eslint \\"./src/**/*.{ts,tsx}\\" --quiet","lint":"tsc --noEmit && yarn lint:nofix --fix"},"husky":{"hooks":{"pre-commit":"tsc --noEmit && lint-staged"}},"lint-staged":{"./src/**/*.{ts,tsx}":["eslint --fix"]},"bitBucketRepository":"https://bitbucket.microchip.com/projects/CC16SCRIP/repos/basic-flash-interface/browse","repository":{"type":"git","url":"git+ssh://git@https://bitbucket.microchip.com/scm/cc16scrip/basic-flash-interface.git"},"publishConfig":{"registry":"https://artifacts.microchip.com/artifactory/api/npm/npm/"},"jest":{"testPathIgnorePatterns":["/node_modules/","/run/","/lib/"],"modulePathIgnorePatterns":["<rootDir>/run"],"preset":"ts-jest","collectCoverage":true},"dependencies":{"@microchip/scf-common":"^3.5.0","@microchip/scf-interface":"^1.4.0"},"devDependencies":{"@types/jest":"^24.0.14","@types/node":"^12.0.10","@typescript-eslint/eslint-plugin":"^2.27.0","@typescript-eslint/parser":"^2.27.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.2","fs-extra":"^8.1.0","husky":"^4.2.4","jest":"^24.8.0","lint-staged":"^10.2.0","prettier":"^2.0.4","ts-jest":"^24.0.2","typescript":"^3.8.3"},"files":["lib/**/*"],"notificationEmail":"03234d44.microchip.com@amer.teams.ms"}')},645:function(e,t,r){"use strict";r(888).Interface},695:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInterfaceName=function(e){var t;if(e&&(t=e.name)&&(t=t.replace("@microchip/","")),!t)throw new Error("Invalid Interface Name...!");return t},t.getInterfaceVersion=function(e){var t,r=new RegExp("\\d+.\\d+.\\d+");if(e&&(t=e.version),!t&&!r.test(t))throw new Error("Invalid Interface Version...!");return t}},888:function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(6)),i=n(r(623));t.getInterfaceId=function(){return{name:a.getInterfaceName(i),version:a.getInterfaceVersion(i)}};t.createApi=function(e){return{PageErase:{name:e+"_PageErase",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"unlockKey",type:"flash_key_t"}]},WordWrite:{name:e+"_WordWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},RowWrite:{name:e+"_RowWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},Read:{name:e+"_Read",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"count",type:"uint32_t"},{name:"flash_data_t *",type:"data"}]},ErasePageOffsetGet:{name:e+"_ErasePageOffsetGet",returns:"uint32_t",arguments:[{name:"flashAddress",type:"flash_adr_t"}]},ErasePageAddressGet:{name:e+"_ErasePageAddressGet",returns:"uint32_t",arguments:[{name:"flashAddress",type:"flash_adr_t"}]},Initialize:{name:e+"_Initialize",returns:"void",arguments:[]},NonBlockingPageErase:{name:e+"_NonBlockingPageErase",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingBulkErase:{name:e+"_NonBlockingBulkErase",returns:e+"_RETURN_STATUS",arguments:[{name:"panel",type:"enum FLASH_PANEL"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingWordWrite:{name:e+"_NonBlockingWordWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingRowWrite:{name:e+"_NonBlockingRowWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingRead:{name:e+"_NonBlockingRead",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"count",type:"uint32_t"},{name:"flash_data_t *",type:"data"}]},NonBlockingPolledPageErase:{name:e+"_NonBlockingPolledPageErase",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledBulkErase:{name:e+"_NonBlockingBulkErase",returns:e+"_RETURN_STATUS",arguments:[{name:"panel",type:"enum FLASH_PANEL"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledWordWrite:{name:e+"_NonBlockingPolledWordWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledRowWrite:{name:e+"_NonBlockingPolledRowWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledRead:{name:e+"_NonBlockingPolledRead",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"count",type:"uint32_t"},{name:"flash_data_t *",type:"data"}]},operationStatusGet:{name:e+"_OperationStatusGet",returns:e+"_RETURN_STATUS",arguments:[]}}};t.createFirmwareApi=function(e,r,n){var i=e?e.toUpperCase():"undefined",o=n?n():t.createApi(i);return{api:o,simpleApi:a.buildSimpleApi(o),headerFiles:r||[{name:i.toLowerCase()+".h",path:"flash/"}]}},t.Interface={createPrototypeExport:function(){return{interfaces:[{interfaceId:t.getInterfaceId()}]}},createPrototypeImport:function(){return{interfaceId:t.getInterfaceId()}},getInterfaceId:t.getInterfaceId,createMock:function(){return{interfaceId:t.getInterfaceId(),payload:{interfaceApi:t.Interface.createFirmwareApi("flash-interface",[{name:"BasicFlash.h",path:"flash/"}]),flashWriteInstructionCount:2,flashInterface:"FLASH_NON_TRANSPARENT_DOUBLE_WORD_v1.0",flashWordWriteSizeInInstructions:2,flashEraseInstructionCount:1024,flashHasAuxiliary:0,flashEnduranceMinimum:1e4,flashBytesPerInstruction:3,flashPcUnitsPerInstruction:2,flashWordWriteOpCode:16385,flashOpCodeMask:16399,flashErasePageSizeInInstructions:1024,flashErasePageOpCode:16387,flashHasEcc:1,flashHasRowProgramming:1,flashWriteRowSizeInInstructions:128,flashWriteRowOpCode:16386,flashLatchIsMemoryMapped:1,flashLatchIsTransparent:0,flashLatchIsBusMastered:0,flashEndAddress:704256,flashProgramBeginAddress:256,flashUnlockKey:"0x00AA0055",flashHasDualPartition:!0,flashBootMode:"SINGLE",flashFirstPartitionEndAddress:44800,flashSecondPartitionBeginAddress:4194304,flashSecondPartitionProgramBeginAddress:4194816,flashSecondPartitionEndAddress:4239104},args:{requestId:{flashWriteInstructionCount:2}}}},createFirmwareApi:t.createFirmwareApi}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var n={};!function(){"use strict";r.r(n),r.d(n,{getCreatorFunctions:function(){return s}});var e=function(e,t){return!0},t=function(e,t){};r(645);r(557);var a=function(){try{return r(139)}catch(e){return}};function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=function(e){return function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({getModuleConfig:a},e())}}(function(){return{shouldImport:e,getCreatorImportArgs:t}})}(),autoCreator=n}();
4378
2
  //# sourceMappingURL=autoCreator.js.map