mario-education 2.2.3 → 2.2.8

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,4 +1,4 @@
1
- import { api, BASE_URL, setAlert, CustomSelector, LinkEditButton, DeleteButtonIcon, EmptyDataAlert, CommonModal, RequiredLabel, ErrorHandler, useFilters, setLoading, setClassList, setModal, QuitPrompt, AddButton, CustomPagination, setConferenceRubricList, SearchBoxContainer, getTextFromHTML, generateRandomString, QuestionCategorySelector, DetailActionButtons, SuggestionCategorySelector, CreatableSelector, setSuggestionList, setStrategyList, UploadFileButton, systemStudentBadge, setBadgeList, getFileUrl, setGoalExampleList, setSubjectList, setLearningSupportCategoryList, apiUpload, utcToLocalTime, DATE_FORMAT, setSemesterList, setBandScoreList, EditButtonIcon, setSchoolBlankDayList, SearchBox, CustomTab, SkillList, QUESTION_TYPES, EMOTIONS, QUESTION_TYPES_OPTIONS, setQuestionList, setQuestionByCategory, setSelectQuestion, setResetQuestionList, setMoveItemQuestion, setEditItemQuesion, DEFAULT_FILTER, setReflectionList, setReflectionResultList, DATE_RESULT, StarRatingSelector, editorConfig, TINY_MCE_API_KEY, QuestionTypeSelector, setAssessmentList, FULL_DATE_RESULT, setFeedbackList, setTutorialScreenList, setQuestionCateList, setAssignmentList, setSessionTemplateList, setSessionTemplateGeneralClassList, setCustomAlertList, systemCertificateUpload, setCertificateList, Loading as Loading$1, LICENSE_AGGRID } from 'mario-core';
1
+ import { api, BASE_URL, setAlert, CustomSelector, LinkEditButton, DeleteButtonIcon, EmptyDataAlert, CommonModal, RequiredLabel, ErrorHandler, useFilters, setLoading, setClassList, setModal, QuitPrompt, AddButton, CustomPagination, setConferenceRubricList, SearchBoxContainer, getTextFromHTML, generateRandomString, QuestionCategorySelector, DetailActionButtons, SuggestionCategorySelector, CreatableSelector, setSuggestionList, setStrategyList, UploadFileButton, systemStudentBadge, setBadgeList, getFileUrl, setGoalExampleList, setSubjectList, setLearningSupportCategoryList, apiUpload, utcToLocalTime, DATE_FORMAT, setSemesterList, setBandScoreList, EditButtonIcon, setSchoolBlankDayList, SearchBox, CustomTab, SkillList, QUESTION_TYPES, EMOTIONS, QUESTION_TYPES_OPTIONS, setQuestionList, setQuestionByCategory, setSelectQuestion, setResetQuestionList, setMoveItemQuestion, setEditItemQuesion, DEFAULT_FILTER, setReflectionList, setReflectionResultList, DATE_RESULT, StarRatingSelector, editorConfig, TINY_MCE_API_KEY, QuestionTypeSelector, setAssessmentList, FULL_DATE_RESULT, setFeedbackList, setTutorialScreenList, setQuestionCateList, setAssignmentList, setSessionTemplateList, setSessionTemplateGeneralClassList, setCustomAlertList, systemCertificateUpload, setCertificateList, LICENSE_AGGRID } from 'mario-core';
2
2
  import { LicenseManager } from '@ag-grid-enterprise/core';
3
3
  import React, { useState, useRef, useCallback, useEffect, forwardRef, useMemo, Fragment, memo } from 'react';
4
4
  import { useDispatch, useSelector } from 'react-redux';
@@ -17164,18 +17164,12 @@ var getQuantityReport = function getQuantityReport() {
17164
17164
  var getLoginCountingReport = function getLoginCountingReport() {
17165
17165
  return api.get(REPORT_URL + "/logincouting");
17166
17166
  };
17167
- var getSkillReport = function getSkillReport() {
17168
- return api.get(REPORT_URL + "/skill");
17169
- };
17170
17167
  var getGoalProgressReport = function getGoalProgressReport() {
17171
17168
  return api.get(REPORT_URL + "/goalprogress");
17172
17169
  };
17173
17170
  var getHighImpactLearningStrategyReport = function getHighImpactLearningStrategyReport() {
17174
17171
  return api.get(REPORT_URL + "/highimpactlearningstrategy");
17175
17172
  };
17176
- var getTimeInSessionReport = function getTimeInSessionReport() {
17177
- return api.get(REPORT_URL + "/timeinsession");
17178
- };
17179
17173
  var getPerceivedImpactReport = function getPerceivedImpactReport() {
17180
17174
  return api.get(REPORT_URL + "/perceivedimpact");
17181
17175
  };
@@ -17197,28 +17191,20 @@ var useDashboard = function useDashboard() {
17197
17191
  setQuantity = _useState2[1];
17198
17192
 
17199
17193
  var _useState3 = useState(null),
17200
- skill = _useState3[0],
17201
- setSkill = _useState3[1];
17194
+ goalProgress = _useState3[0],
17195
+ setGoalProgress = _useState3[1];
17202
17196
 
17203
17197
  var _useState4 = useState(null),
17204
- goalProgress = _useState4[0],
17205
- setGoalProgress = _useState4[1];
17198
+ highImpact = _useState4[0],
17199
+ setHighImpact = _useState4[1];
17206
17200
 
17207
17201
  var _useState5 = useState(null),
17208
- highImpact = _useState5[0],
17209
- setHighImpact = _useState5[1];
17202
+ perceivedImpact = _useState5[0],
17203
+ setPerceivedImpact = _useState5[1];
17210
17204
 
17211
17205
  var _useState6 = useState(null),
17212
- perceivedImpact = _useState6[0],
17213
- setPerceivedImpact = _useState6[1];
17214
-
17215
- var _useState7 = useState(null),
17216
- timeInSession = _useState7[0],
17217
- setTimeInSession = _useState7[1];
17218
-
17219
- var _useState8 = useState(null),
17220
- grade = _useState8[0],
17221
- setGrade = _useState8[1];
17206
+ grade = _useState6[0],
17207
+ setGrade = _useState6[1];
17222
17208
 
17223
17209
  var callApi = useCallback(function (apiCaller, setData, defaultData) {
17224
17210
  try {
@@ -17245,7 +17231,7 @@ var useDashboard = function useDashboard() {
17245
17231
  try {
17246
17232
  document.title = TITLE$p;
17247
17233
  dispatch(setLoading(true));
17248
- return Promise.resolve(Promise.any([callApi(getLoginCountingReport, setLoginCounting, []), callApi(getQuantityReport, setQuantity, {}), callApi(getSkillReport, setSkill, []), callApi(getGoalProgressReport, setGoalProgress, []), callApi(getHighImpactLearningStrategyReport, setHighImpact, {}), callApi(getPerceivedImpactReport, setPerceivedImpact, []), callApi(getTimeInSessionReport, setTimeInSession, []), callApi(getGradeReport, setGrade, {})])).then(function () {
17234
+ return Promise.resolve(Promise.any([callApi(getLoginCountingReport, setLoginCounting, []), callApi(getQuantityReport, setQuantity, {}), callApi(getGoalProgressReport, setGoalProgress, []), callApi(getHighImpactLearningStrategyReport, setHighImpact, {}), callApi(getPerceivedImpactReport, setPerceivedImpact, []), callApi(getGradeReport, setGrade, {})])).then(function () {
17249
17235
  dispatch(setLoading(false));
17250
17236
  });
17251
17237
  } catch (e) {
@@ -17258,11 +17244,9 @@ var useDashboard = function useDashboard() {
17258
17244
  return {
17259
17245
  loginCounting: loginCounting,
17260
17246
  quantity: quantity,
17261
- skill: skill,
17262
17247
  goalProgress: goalProgress,
17263
17248
  highImpact: highImpact,
17264
17249
  perceivedImpact: perceivedImpact,
17265
- timeInSession: timeInSession,
17266
17250
  grade: grade
17267
17251
  };
17268
17252
  };
@@ -17281,107 +17265,6 @@ var DashboardCard = function DashboardCard(_ref) {
17281
17265
  }, children));
17282
17266
  };
17283
17267
 
17284
- var colors = ["#1C77AC", "#00979B", "#8B0000", "#87E0E0", "#2EB82E"];
17285
- var levels = [{
17286
- name: "No progress",
17287
- field: "noProgress"
17288
- }, {
17289
- name: "Slight",
17290
- field: "slight"
17291
- }, {
17292
- name: "Moderate",
17293
- field: "moderate"
17294
- }, {
17295
- name: "Significant",
17296
- field: "significant"
17297
- }, {
17298
- name: "Achieved",
17299
- field: "achieved"
17300
- }];
17301
-
17302
- var GoalProgressReport = function GoalProgressReport(_ref) {
17303
- var data = _ref.data;
17304
- var series = useMemo(function () {
17305
- if (!data) return [];
17306
-
17307
- try {
17308
- return levels.map(function (level) {
17309
- return {
17310
- name: level.name,
17311
- data: data.map(function (item) {
17312
- return item[level.field];
17313
- })
17314
- };
17315
- });
17316
- } catch (_unused) {
17317
- return [];
17318
- }
17319
- }, [data]);
17320
- var categories = useMemo(function () {
17321
- if (!data) return [];
17322
-
17323
- try {
17324
- return data.map(function (item) {
17325
- return item.createdAt;
17326
- });
17327
- } catch (_unused2) {
17328
- return [];
17329
- }
17330
- }, [data]);
17331
- if (!data) return React.createElement(Loading$1, null);
17332
- var options = {
17333
- chart: {
17334
- type: "bar",
17335
- height: 350,
17336
- stacked: true,
17337
- stackType: "100%",
17338
- toolbar: {
17339
- show: false
17340
- }
17341
- },
17342
- plotOptions: {
17343
- bar: {
17344
- horizontal: false,
17345
- columnWidth: "80%"
17346
- }
17347
- },
17348
- colors: colors,
17349
- responsive: [{
17350
- breakpoint: 480,
17351
- options: {
17352
- legend: {
17353
- position: "bottom",
17354
- offsetX: -10,
17355
- offsetY: 0
17356
- }
17357
- }
17358
- }],
17359
- xaxis: {
17360
- categories: categories
17361
- },
17362
- fill: {
17363
- opacity: 1
17364
- },
17365
- legend: {
17366
- position: "right",
17367
- offsetX: 0,
17368
- offsetY: 50,
17369
- onItemClick: {
17370
- toggleDataSeries: false
17371
- },
17372
- onItemHover: {
17373
- highlightDataSeries: false
17374
- }
17375
- }
17376
- };
17377
- return React.createElement("div", null, React.createElement(ReactApexChart, {
17378
- options: options,
17379
- series: series,
17380
- type: "bar",
17381
- height: 350
17382
- }));
17383
- };
17384
-
17385
17268
  var Loading = function Loading() {
17386
17269
  return React.createElement("div", {
17387
17270
  className: "d-flex align-items-center justify-content-center"
@@ -17403,14 +17286,14 @@ var Loading = function Loading() {
17403
17286
  }, "Loading...")));
17404
17287
  };
17405
17288
 
17406
- var colors$1 = ["rgba(129, 236, 236, 0.8)", "rgba(116, 185, 255, 0.8)", "rgba(250, 177, 160, 0.8)", "rgba(255, 234, 167, 0.8)", "rgba(178, 190, 195, 0.8)", "rgba(85, 239, 196, 0.8)", "rgba(120, 111, 166, 0.8)", "rgba(243, 166, 131, 0.8)"];
17289
+ var colors = ["rgba(129, 236, 236, 0.8)", "rgba(116, 185, 255, 0.8)", "rgba(250, 177, 160, 0.8)", "rgba(255, 234, 167, 0.8)", "rgba(178, 190, 195, 0.8)", "rgba(85, 239, 196, 0.8)", "rgba(120, 111, 166, 0.8)", "rgba(243, 166, 131, 0.8)"];
17407
17290
 
17408
17291
  var getColors = function getColors(length) {
17409
- if (colors$1.length >= length) return colors$1;
17410
- var newColors = [].concat(colors$1);
17292
+ if (colors.length >= length) return colors;
17293
+ var newColors = [].concat(colors);
17411
17294
 
17412
17295
  while (newColors.length < length) {
17413
- newColors = [].concat(newColors, colors$1);
17296
+ newColors = [].concat(newColors, colors);
17414
17297
  }
17415
17298
 
17416
17299
  return newColors;
@@ -17501,7 +17384,7 @@ var HighImpact = function HighImpact(_ref) {
17501
17384
  })));
17502
17385
  };
17503
17386
 
17504
- var colors$2 = ["#1abc9c", "#c0392b"];
17387
+ var colors$1 = ["#1abc9c", "#c0392b"];
17505
17388
 
17506
17389
  var LoginCouting = function LoginCouting(_ref) {
17507
17390
  var data = _ref.data;
@@ -17518,11 +17401,11 @@ var LoginCouting = function LoginCouting(_ref) {
17518
17401
  var series = [{
17519
17402
  name: "Teacher",
17520
17403
  data: teacherCount,
17521
- color: colors$2[0]
17404
+ color: colors$1[0]
17522
17405
  }, {
17523
17406
  name: "Student",
17524
17407
  data: studentCount,
17525
- color: colors$2[1]
17408
+ color: colors$1[1]
17526
17409
  }];
17527
17410
  var options = {
17528
17411
  chart: {
@@ -17539,7 +17422,7 @@ var LoginCouting = function LoginCouting(_ref) {
17539
17422
  markers: {
17540
17423
  size: 4,
17541
17424
  colors: ["#fff"],
17542
- strokeColors: colors$2,
17425
+ strokeColors: colors$1,
17543
17426
  strokeWidth: 2,
17544
17427
  strokeOpacity: 0.9,
17545
17428
  strokeDashArray: 0,
@@ -17571,17 +17454,12 @@ var LoginCouting = function LoginCouting(_ref) {
17571
17454
  }));
17572
17455
  };
17573
17456
 
17574
- var colors$3 = ["#00cec9", "#00b894"];
17457
+ var colors$2 = ["#00cec9", "#00b894"];
17575
17458
 
17576
17459
  var PerceivedImpact = function PerceivedImpact(_ref) {
17577
17460
  var data = _ref.data;
17578
17461
  if (!data) return React.createElement(Loading, null);
17579
17462
  var series = [{
17580
- name: "Teacher",
17581
- data: data.map(function (item) {
17582
- return item.teacherRating;
17583
- })
17584
- }, {
17585
17463
  name: "Student",
17586
17464
  data: data.map(function (item) {
17587
17465
  return item.studentRating;
@@ -17598,7 +17476,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
17598
17476
  show: false
17599
17477
  }
17600
17478
  },
17601
- colors: colors$3,
17479
+ colors: colors$2,
17602
17480
  plotOptions: {
17603
17481
  bar: {
17604
17482
  horizontal: false,
@@ -17636,7 +17514,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
17636
17514
  }));
17637
17515
  };
17638
17516
 
17639
- var colors$4 = ["#00b894", "#00cec9", "#0984e3"];
17517
+ var colors$3 = ["#00b894", "#00cec9", "#0984e3"];
17640
17518
 
17641
17519
  var Quantity = function Quantity(_ref) {
17642
17520
  var data = _ref.data;
@@ -17653,7 +17531,7 @@ var Quantity = function Quantity(_ref) {
17653
17531
  type: "pie"
17654
17532
  },
17655
17533
  labels: ["Teachers", "Students", "Assistants"],
17656
- colors: colors$4,
17534
+ colors: colors$3,
17657
17535
  legend: {
17658
17536
  show: false
17659
17537
  },
@@ -17668,15 +17546,15 @@ var Quantity = function Quantity(_ref) {
17668
17546
  };
17669
17547
  var details = [{
17670
17548
  label: "Teachers",
17671
- color: colors$4[0],
17549
+ color: colors$3[0],
17672
17550
  value: teacherPercentage
17673
17551
  }, {
17674
17552
  label: "Students",
17675
- color: colors$4[1],
17553
+ color: colors$3[1],
17676
17554
  value: studentPercentage
17677
17555
  }, {
17678
17556
  label: "Assistants",
17679
- color: colors$4[2],
17557
+ color: colors$3[2],
17680
17558
  value: assistantPercentage
17681
17559
  }];
17682
17560
  return React.createElement("div", {
@@ -17713,3859 +17591,25 @@ var Quantity = function Quantity(_ref) {
17713
17591
  })));
17714
17592
  };
17715
17593
 
17716
- /**
17717
- * Appends the elements of `values` to `array`.
17718
- *
17719
- * @private
17720
- * @param {Array} array The array to modify.
17721
- * @param {Array} values The values to append.
17722
- * @returns {Array} Returns `array`.
17723
- */
17724
- function arrayPush(array, values) {
17725
- var index = -1,
17726
- length = values.length,
17727
- offset = array.length;
17728
-
17729
- while (++index < length) {
17730
- array[offset + index] = values[index];
17731
- }
17732
- return array;
17733
- }
17734
-
17735
- var _arrayPush = arrayPush;
17736
-
17737
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17738
-
17739
- function createCommonjsModule(fn, module) {
17740
- return module = { exports: {} }, fn(module, module.exports), module.exports;
17741
- }
17742
-
17743
- /** Detect free variable `global` from Node.js. */
17744
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
17745
-
17746
- var _freeGlobal = freeGlobal;
17747
-
17748
- /** Detect free variable `self`. */
17749
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
17750
-
17751
- /** Used as a reference to the global object. */
17752
- var root = _freeGlobal || freeSelf || Function('return this')();
17753
-
17754
- var _root = root;
17755
-
17756
- /** Built-in value references. */
17757
- var Symbol$1 = _root.Symbol;
17758
-
17759
- var _Symbol = Symbol$1;
17760
-
17761
- /** Used for built-in method references. */
17762
- var objectProto = Object.prototype;
17763
-
17764
- /** Used to check objects for own properties. */
17765
- var hasOwnProperty = objectProto.hasOwnProperty;
17766
-
17767
- /**
17768
- * Used to resolve the
17769
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
17770
- * of values.
17771
- */
17772
- var nativeObjectToString = objectProto.toString;
17773
-
17774
- /** Built-in value references. */
17775
- var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
17776
-
17777
- /**
17778
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
17779
- *
17780
- * @private
17781
- * @param {*} value The value to query.
17782
- * @returns {string} Returns the raw `toStringTag`.
17783
- */
17784
- function getRawTag(value) {
17785
- var isOwn = hasOwnProperty.call(value, symToStringTag),
17786
- tag = value[symToStringTag];
17787
-
17788
- try {
17789
- value[symToStringTag] = undefined;
17790
- var unmasked = true;
17791
- } catch (e) {}
17792
-
17793
- var result = nativeObjectToString.call(value);
17794
- if (unmasked) {
17795
- if (isOwn) {
17796
- value[symToStringTag] = tag;
17797
- } else {
17798
- delete value[symToStringTag];
17799
- }
17800
- }
17801
- return result;
17802
- }
17803
-
17804
- var _getRawTag = getRawTag;
17805
-
17806
- /** Used for built-in method references. */
17807
- var objectProto$1 = Object.prototype;
17808
-
17809
- /**
17810
- * Used to resolve the
17811
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
17812
- * of values.
17813
- */
17814
- var nativeObjectToString$1 = objectProto$1.toString;
17815
-
17816
- /**
17817
- * Converts `value` to a string using `Object.prototype.toString`.
17818
- *
17819
- * @private
17820
- * @param {*} value The value to convert.
17821
- * @returns {string} Returns the converted string.
17822
- */
17823
- function objectToString(value) {
17824
- return nativeObjectToString$1.call(value);
17825
- }
17826
-
17827
- var _objectToString = objectToString;
17828
-
17829
- /** `Object#toString` result references. */
17830
- var nullTag = '[object Null]',
17831
- undefinedTag = '[object Undefined]';
17832
-
17833
- /** Built-in value references. */
17834
- var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
17835
-
17836
- /**
17837
- * The base implementation of `getTag` without fallbacks for buggy environments.
17838
- *
17839
- * @private
17840
- * @param {*} value The value to query.
17841
- * @returns {string} Returns the `toStringTag`.
17842
- */
17843
- function baseGetTag(value) {
17844
- if (value == null) {
17845
- return value === undefined ? undefinedTag : nullTag;
17846
- }
17847
- return (symToStringTag$1 && symToStringTag$1 in Object(value))
17848
- ? _getRawTag(value)
17849
- : _objectToString(value);
17850
- }
17851
-
17852
- var _baseGetTag = baseGetTag;
17853
-
17854
- /**
17855
- * Checks if `value` is object-like. A value is object-like if it's not `null`
17856
- * and has a `typeof` result of "object".
17857
- *
17858
- * @static
17859
- * @memberOf _
17860
- * @since 4.0.0
17861
- * @category Lang
17862
- * @param {*} value The value to check.
17863
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
17864
- * @example
17865
- *
17866
- * _.isObjectLike({});
17867
- * // => true
17868
- *
17869
- * _.isObjectLike([1, 2, 3]);
17870
- * // => true
17871
- *
17872
- * _.isObjectLike(_.noop);
17873
- * // => false
17874
- *
17875
- * _.isObjectLike(null);
17876
- * // => false
17877
- */
17878
- function isObjectLike(value) {
17879
- return value != null && typeof value == 'object';
17880
- }
17881
-
17882
- var isObjectLike_1 = isObjectLike;
17883
-
17884
- /** `Object#toString` result references. */
17885
- var argsTag = '[object Arguments]';
17886
-
17887
- /**
17888
- * The base implementation of `_.isArguments`.
17889
- *
17890
- * @private
17891
- * @param {*} value The value to check.
17892
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
17893
- */
17894
- function baseIsArguments(value) {
17895
- return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
17896
- }
17897
-
17898
- var _baseIsArguments = baseIsArguments;
17899
-
17900
- /** Used for built-in method references. */
17901
- var objectProto$2 = Object.prototype;
17902
-
17903
- /** Used to check objects for own properties. */
17904
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
17905
-
17906
- /** Built-in value references. */
17907
- var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
17908
-
17909
- /**
17910
- * Checks if `value` is likely an `arguments` object.
17911
- *
17912
- * @static
17913
- * @memberOf _
17914
- * @since 0.1.0
17915
- * @category Lang
17916
- * @param {*} value The value to check.
17917
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
17918
- * else `false`.
17919
- * @example
17920
- *
17921
- * _.isArguments(function() { return arguments; }());
17922
- * // => true
17923
- *
17924
- * _.isArguments([1, 2, 3]);
17925
- * // => false
17926
- */
17927
- var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
17928
- return isObjectLike_1(value) && hasOwnProperty$1.call(value, 'callee') &&
17929
- !propertyIsEnumerable.call(value, 'callee');
17930
- };
17931
-
17932
- var isArguments_1 = isArguments;
17933
-
17934
- /**
17935
- * Checks if `value` is classified as an `Array` object.
17936
- *
17937
- * @static
17938
- * @memberOf _
17939
- * @since 0.1.0
17940
- * @category Lang
17941
- * @param {*} value The value to check.
17942
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
17943
- * @example
17944
- *
17945
- * _.isArray([1, 2, 3]);
17946
- * // => true
17947
- *
17948
- * _.isArray(document.body.children);
17949
- * // => false
17950
- *
17951
- * _.isArray('abc');
17952
- * // => false
17953
- *
17954
- * _.isArray(_.noop);
17955
- * // => false
17956
- */
17957
- var isArray = Array.isArray;
17958
-
17959
- var isArray_1 = isArray;
17960
-
17961
- /** Built-in value references. */
17962
- var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
17963
-
17964
- /**
17965
- * Checks if `value` is a flattenable `arguments` object or array.
17966
- *
17967
- * @private
17968
- * @param {*} value The value to check.
17969
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
17970
- */
17971
- function isFlattenable(value) {
17972
- return isArray_1(value) || isArguments_1(value) ||
17973
- !!(spreadableSymbol && value && value[spreadableSymbol]);
17974
- }
17975
-
17976
- var _isFlattenable = isFlattenable;
17977
-
17978
- /**
17979
- * The base implementation of `_.flatten` with support for restricting flattening.
17980
- *
17981
- * @private
17982
- * @param {Array} array The array to flatten.
17983
- * @param {number} depth The maximum recursion depth.
17984
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
17985
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
17986
- * @param {Array} [result=[]] The initial result value.
17987
- * @returns {Array} Returns the new flattened array.
17988
- */
17989
- function baseFlatten(array, depth, predicate, isStrict, result) {
17990
- var index = -1,
17991
- length = array.length;
17992
-
17993
- predicate || (predicate = _isFlattenable);
17994
- result || (result = []);
17995
-
17996
- while (++index < length) {
17997
- var value = array[index];
17998
- if (depth > 0 && predicate(value)) {
17999
- if (depth > 1) {
18000
- // Recursively flatten arrays (susceptible to call stack limits).
18001
- baseFlatten(value, depth - 1, predicate, isStrict, result);
18002
- } else {
18003
- _arrayPush(result, value);
18004
- }
18005
- } else if (!isStrict) {
18006
- result[result.length] = value;
18007
- }
18008
- }
18009
- return result;
18010
- }
18011
-
18012
- var _baseFlatten = baseFlatten;
18013
-
18014
- /**
18015
- * A specialized version of `_.map` for arrays without support for iteratee
18016
- * shorthands.
18017
- *
18018
- * @private
18019
- * @param {Array} [array] The array to iterate over.
18020
- * @param {Function} iteratee The function invoked per iteration.
18021
- * @returns {Array} Returns the new mapped array.
18022
- */
18023
- function arrayMap(array, iteratee) {
18024
- var index = -1,
18025
- length = array == null ? 0 : array.length,
18026
- result = Array(length);
18027
-
18028
- while (++index < length) {
18029
- result[index] = iteratee(array[index], index, array);
18030
- }
18031
- return result;
18032
- }
18033
-
18034
- var _arrayMap = arrayMap;
18035
-
18036
- /** `Object#toString` result references. */
18037
- var symbolTag = '[object Symbol]';
18038
-
18039
- /**
18040
- * Checks if `value` is classified as a `Symbol` primitive or object.
18041
- *
18042
- * @static
18043
- * @memberOf _
18044
- * @since 4.0.0
18045
- * @category Lang
18046
- * @param {*} value The value to check.
18047
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
18048
- * @example
18049
- *
18050
- * _.isSymbol(Symbol.iterator);
18051
- * // => true
18052
- *
18053
- * _.isSymbol('abc');
18054
- * // => false
18055
- */
18056
- function isSymbol(value) {
18057
- return typeof value == 'symbol' ||
18058
- (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
18059
- }
18060
-
18061
- var isSymbol_1 = isSymbol;
18062
-
18063
- /** Used to match property names within property paths. */
18064
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
18065
- reIsPlainProp = /^\w*$/;
18066
-
18067
- /**
18068
- * Checks if `value` is a property name and not a property path.
18069
- *
18070
- * @private
18071
- * @param {*} value The value to check.
18072
- * @param {Object} [object] The object to query keys on.
18073
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
18074
- */
18075
- function isKey(value, object) {
18076
- if (isArray_1(value)) {
18077
- return false;
18078
- }
18079
- var type = typeof value;
18080
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
18081
- value == null || isSymbol_1(value)) {
18082
- return true;
18083
- }
18084
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
18085
- (object != null && value in Object(object));
18086
- }
18087
-
18088
- var _isKey = isKey;
18089
-
18090
- /**
18091
- * Checks if `value` is the
18092
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
18093
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
18094
- *
18095
- * @static
18096
- * @memberOf _
18097
- * @since 0.1.0
18098
- * @category Lang
18099
- * @param {*} value The value to check.
18100
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
18101
- * @example
18102
- *
18103
- * _.isObject({});
18104
- * // => true
18105
- *
18106
- * _.isObject([1, 2, 3]);
18107
- * // => true
18108
- *
18109
- * _.isObject(_.noop);
18110
- * // => true
18111
- *
18112
- * _.isObject(null);
18113
- * // => false
18114
- */
18115
- function isObject(value) {
18116
- var type = typeof value;
18117
- return value != null && (type == 'object' || type == 'function');
18118
- }
18119
-
18120
- var isObject_1 = isObject;
18121
-
18122
- /** `Object#toString` result references. */
18123
- var asyncTag = '[object AsyncFunction]',
18124
- funcTag = '[object Function]',
18125
- genTag = '[object GeneratorFunction]',
18126
- proxyTag = '[object Proxy]';
18127
-
18128
- /**
18129
- * Checks if `value` is classified as a `Function` object.
18130
- *
18131
- * @static
18132
- * @memberOf _
18133
- * @since 0.1.0
18134
- * @category Lang
18135
- * @param {*} value The value to check.
18136
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
18137
- * @example
18138
- *
18139
- * _.isFunction(_);
18140
- * // => true
18141
- *
18142
- * _.isFunction(/abc/);
18143
- * // => false
18144
- */
18145
- function isFunction(value) {
18146
- if (!isObject_1(value)) {
18147
- return false;
18148
- }
18149
- // The use of `Object#toString` avoids issues with the `typeof` operator
18150
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
18151
- var tag = _baseGetTag(value);
18152
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
18153
- }
18154
-
18155
- var isFunction_1 = isFunction;
18156
-
18157
- /** Used to detect overreaching core-js shims. */
18158
- var coreJsData = _root['__core-js_shared__'];
18159
-
18160
- var _coreJsData = coreJsData;
18161
-
18162
- /** Used to detect methods masquerading as native. */
18163
- var maskSrcKey = (function() {
18164
- var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
18165
- return uid ? ('Symbol(src)_1.' + uid) : '';
18166
- }());
18167
-
18168
- /**
18169
- * Checks if `func` has its source masked.
18170
- *
18171
- * @private
18172
- * @param {Function} func The function to check.
18173
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
18174
- */
18175
- function isMasked(func) {
18176
- return !!maskSrcKey && (maskSrcKey in func);
18177
- }
18178
-
18179
- var _isMasked = isMasked;
18180
-
18181
- /** Used for built-in method references. */
18182
- var funcProto = Function.prototype;
18183
-
18184
- /** Used to resolve the decompiled source of functions. */
18185
- var funcToString = funcProto.toString;
18186
-
18187
- /**
18188
- * Converts `func` to its source code.
18189
- *
18190
- * @private
18191
- * @param {Function} func The function to convert.
18192
- * @returns {string} Returns the source code.
18193
- */
18194
- function toSource(func) {
18195
- if (func != null) {
18196
- try {
18197
- return funcToString.call(func);
18198
- } catch (e) {}
18199
- try {
18200
- return (func + '');
18201
- } catch (e) {}
18202
- }
18203
- return '';
18204
- }
18205
-
18206
- var _toSource = toSource;
18207
-
18208
- /**
18209
- * Used to match `RegExp`
18210
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
18211
- */
18212
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
18213
-
18214
- /** Used to detect host constructors (Safari). */
18215
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
18216
-
18217
- /** Used for built-in method references. */
18218
- var funcProto$1 = Function.prototype,
18219
- objectProto$3 = Object.prototype;
18220
-
18221
- /** Used to resolve the decompiled source of functions. */
18222
- var funcToString$1 = funcProto$1.toString;
18223
-
18224
- /** Used to check objects for own properties. */
18225
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
18226
-
18227
- /** Used to detect if a method is native. */
18228
- var reIsNative = RegExp('^' +
18229
- funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
18230
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
18231
- );
18232
-
18233
- /**
18234
- * The base implementation of `_.isNative` without bad shim checks.
18235
- *
18236
- * @private
18237
- * @param {*} value The value to check.
18238
- * @returns {boolean} Returns `true` if `value` is a native function,
18239
- * else `false`.
18240
- */
18241
- function baseIsNative(value) {
18242
- if (!isObject_1(value) || _isMasked(value)) {
18243
- return false;
18244
- }
18245
- var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
18246
- return pattern.test(_toSource(value));
18247
- }
18248
-
18249
- var _baseIsNative = baseIsNative;
18250
-
18251
- /**
18252
- * Gets the value at `key` of `object`.
18253
- *
18254
- * @private
18255
- * @param {Object} [object] The object to query.
18256
- * @param {string} key The key of the property to get.
18257
- * @returns {*} Returns the property value.
18258
- */
18259
- function getValue(object, key) {
18260
- return object == null ? undefined : object[key];
18261
- }
18262
-
18263
- var _getValue = getValue;
18264
-
18265
- /**
18266
- * Gets the native function at `key` of `object`.
18267
- *
18268
- * @private
18269
- * @param {Object} object The object to query.
18270
- * @param {string} key The key of the method to get.
18271
- * @returns {*} Returns the function if it's native, else `undefined`.
18272
- */
18273
- function getNative(object, key) {
18274
- var value = _getValue(object, key);
18275
- return _baseIsNative(value) ? value : undefined;
18276
- }
18277
-
18278
- var _getNative = getNative;
18279
-
18280
- /* Built-in method references that are verified to be native. */
18281
- var nativeCreate = _getNative(Object, 'create');
18282
-
18283
- var _nativeCreate = nativeCreate;
18284
-
18285
- /**
18286
- * Removes all key-value entries from the hash.
18287
- *
18288
- * @private
18289
- * @name clear
18290
- * @memberOf Hash
18291
- */
18292
- function hashClear() {
18293
- this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
18294
- this.size = 0;
18295
- }
18296
-
18297
- var _hashClear = hashClear;
18298
-
18299
- /**
18300
- * Removes `key` and its value from the hash.
18301
- *
18302
- * @private
18303
- * @name delete
18304
- * @memberOf Hash
18305
- * @param {Object} hash The hash to modify.
18306
- * @param {string} key The key of the value to remove.
18307
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18308
- */
18309
- function hashDelete(key) {
18310
- var result = this.has(key) && delete this.__data__[key];
18311
- this.size -= result ? 1 : 0;
18312
- return result;
18313
- }
18314
-
18315
- var _hashDelete = hashDelete;
18316
-
18317
- /** Used to stand-in for `undefined` hash values. */
18318
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
18319
-
18320
- /** Used for built-in method references. */
18321
- var objectProto$4 = Object.prototype;
18322
-
18323
- /** Used to check objects for own properties. */
18324
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
18325
-
18326
- /**
18327
- * Gets the hash value for `key`.
18328
- *
18329
- * @private
18330
- * @name get
18331
- * @memberOf Hash
18332
- * @param {string} key The key of the value to get.
18333
- * @returns {*} Returns the entry value.
18334
- */
18335
- function hashGet(key) {
18336
- var data = this.__data__;
18337
- if (_nativeCreate) {
18338
- var result = data[key];
18339
- return result === HASH_UNDEFINED ? undefined : result;
18340
- }
18341
- return hasOwnProperty$3.call(data, key) ? data[key] : undefined;
18342
- }
18343
-
18344
- var _hashGet = hashGet;
18345
-
18346
- /** Used for built-in method references. */
18347
- var objectProto$5 = Object.prototype;
18348
-
18349
- /** Used to check objects for own properties. */
18350
- var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
18351
-
18352
- /**
18353
- * Checks if a hash value for `key` exists.
18354
- *
18355
- * @private
18356
- * @name has
18357
- * @memberOf Hash
18358
- * @param {string} key The key of the entry to check.
18359
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
18360
- */
18361
- function hashHas(key) {
18362
- var data = this.__data__;
18363
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
18364
- }
18365
-
18366
- var _hashHas = hashHas;
18367
-
18368
- /** Used to stand-in for `undefined` hash values. */
18369
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
18370
-
18371
- /**
18372
- * Sets the hash `key` to `value`.
18373
- *
18374
- * @private
18375
- * @name set
18376
- * @memberOf Hash
18377
- * @param {string} key The key of the value to set.
18378
- * @param {*} value The value to set.
18379
- * @returns {Object} Returns the hash instance.
18380
- */
18381
- function hashSet(key, value) {
18382
- var data = this.__data__;
18383
- this.size += this.has(key) ? 0 : 1;
18384
- data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
18385
- return this;
18386
- }
18387
-
18388
- var _hashSet = hashSet;
18389
-
18390
- /**
18391
- * Creates a hash object.
18392
- *
18393
- * @private
18394
- * @constructor
18395
- * @param {Array} [entries] The key-value pairs to cache.
18396
- */
18397
- function Hash(entries) {
18398
- var index = -1,
18399
- length = entries == null ? 0 : entries.length;
18400
-
18401
- this.clear();
18402
- while (++index < length) {
18403
- var entry = entries[index];
18404
- this.set(entry[0], entry[1]);
18405
- }
18406
- }
18407
-
18408
- // Add methods to `Hash`.
18409
- Hash.prototype.clear = _hashClear;
18410
- Hash.prototype['delete'] = _hashDelete;
18411
- Hash.prototype.get = _hashGet;
18412
- Hash.prototype.has = _hashHas;
18413
- Hash.prototype.set = _hashSet;
18414
-
18415
- var _Hash = Hash;
18416
-
18417
- /**
18418
- * Removes all key-value entries from the list cache.
18419
- *
18420
- * @private
18421
- * @name clear
18422
- * @memberOf ListCache
18423
- */
18424
- function listCacheClear() {
18425
- this.__data__ = [];
18426
- this.size = 0;
18427
- }
18428
-
18429
- var _listCacheClear = listCacheClear;
18430
-
18431
- /**
18432
- * Performs a
18433
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
18434
- * comparison between two values to determine if they are equivalent.
18435
- *
18436
- * @static
18437
- * @memberOf _
18438
- * @since 4.0.0
18439
- * @category Lang
18440
- * @param {*} value The value to compare.
18441
- * @param {*} other The other value to compare.
18442
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
18443
- * @example
18444
- *
18445
- * var object = { 'a': 1 };
18446
- * var other = { 'a': 1 };
18447
- *
18448
- * _.eq(object, object);
18449
- * // => true
18450
- *
18451
- * _.eq(object, other);
18452
- * // => false
18453
- *
18454
- * _.eq('a', 'a');
18455
- * // => true
18456
- *
18457
- * _.eq('a', Object('a'));
18458
- * // => false
18459
- *
18460
- * _.eq(NaN, NaN);
18461
- * // => true
18462
- */
18463
- function eq(value, other) {
18464
- return value === other || (value !== value && other !== other);
18465
- }
18466
-
18467
- var eq_1 = eq;
18468
-
18469
- /**
18470
- * Gets the index at which the `key` is found in `array` of key-value pairs.
18471
- *
18472
- * @private
18473
- * @param {Array} array The array to inspect.
18474
- * @param {*} key The key to search for.
18475
- * @returns {number} Returns the index of the matched value, else `-1`.
18476
- */
18477
- function assocIndexOf(array, key) {
18478
- var length = array.length;
18479
- while (length--) {
18480
- if (eq_1(array[length][0], key)) {
18481
- return length;
18482
- }
18483
- }
18484
- return -1;
18485
- }
18486
-
18487
- var _assocIndexOf = assocIndexOf;
18488
-
18489
- /** Used for built-in method references. */
18490
- var arrayProto = Array.prototype;
18491
-
18492
- /** Built-in value references. */
18493
- var splice = arrayProto.splice;
18494
-
18495
- /**
18496
- * Removes `key` and its value from the list cache.
18497
- *
18498
- * @private
18499
- * @name delete
18500
- * @memberOf ListCache
18501
- * @param {string} key The key of the value to remove.
18502
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18503
- */
18504
- function listCacheDelete(key) {
18505
- var data = this.__data__,
18506
- index = _assocIndexOf(data, key);
18507
-
18508
- if (index < 0) {
18509
- return false;
18510
- }
18511
- var lastIndex = data.length - 1;
18512
- if (index == lastIndex) {
18513
- data.pop();
18514
- } else {
18515
- splice.call(data, index, 1);
18516
- }
18517
- --this.size;
18518
- return true;
18519
- }
18520
-
18521
- var _listCacheDelete = listCacheDelete;
18522
-
18523
- /**
18524
- * Gets the list cache value for `key`.
18525
- *
18526
- * @private
18527
- * @name get
18528
- * @memberOf ListCache
18529
- * @param {string} key The key of the value to get.
18530
- * @returns {*} Returns the entry value.
18531
- */
18532
- function listCacheGet(key) {
18533
- var data = this.__data__,
18534
- index = _assocIndexOf(data, key);
18535
-
18536
- return index < 0 ? undefined : data[index][1];
18537
- }
18538
-
18539
- var _listCacheGet = listCacheGet;
18540
-
18541
- /**
18542
- * Checks if a list cache value for `key` exists.
18543
- *
18544
- * @private
18545
- * @name has
18546
- * @memberOf ListCache
18547
- * @param {string} key The key of the entry to check.
18548
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
18549
- */
18550
- function listCacheHas(key) {
18551
- return _assocIndexOf(this.__data__, key) > -1;
18552
- }
18553
-
18554
- var _listCacheHas = listCacheHas;
18555
-
18556
- /**
18557
- * Sets the list cache `key` to `value`.
18558
- *
18559
- * @private
18560
- * @name set
18561
- * @memberOf ListCache
18562
- * @param {string} key The key of the value to set.
18563
- * @param {*} value The value to set.
18564
- * @returns {Object} Returns the list cache instance.
18565
- */
18566
- function listCacheSet(key, value) {
18567
- var data = this.__data__,
18568
- index = _assocIndexOf(data, key);
18569
-
18570
- if (index < 0) {
18571
- ++this.size;
18572
- data.push([key, value]);
18573
- } else {
18574
- data[index][1] = value;
18575
- }
18576
- return this;
18577
- }
18578
-
18579
- var _listCacheSet = listCacheSet;
18580
-
18581
- /**
18582
- * Creates an list cache object.
18583
- *
18584
- * @private
18585
- * @constructor
18586
- * @param {Array} [entries] The key-value pairs to cache.
18587
- */
18588
- function ListCache(entries) {
18589
- var index = -1,
18590
- length = entries == null ? 0 : entries.length;
18591
-
18592
- this.clear();
18593
- while (++index < length) {
18594
- var entry = entries[index];
18595
- this.set(entry[0], entry[1]);
18596
- }
18597
- }
18598
-
18599
- // Add methods to `ListCache`.
18600
- ListCache.prototype.clear = _listCacheClear;
18601
- ListCache.prototype['delete'] = _listCacheDelete;
18602
- ListCache.prototype.get = _listCacheGet;
18603
- ListCache.prototype.has = _listCacheHas;
18604
- ListCache.prototype.set = _listCacheSet;
18605
-
18606
- var _ListCache = ListCache;
18607
-
18608
- /* Built-in method references that are verified to be native. */
18609
- var Map = _getNative(_root, 'Map');
18610
-
18611
- var _Map = Map;
18612
-
18613
- /**
18614
- * Removes all key-value entries from the map.
18615
- *
18616
- * @private
18617
- * @name clear
18618
- * @memberOf MapCache
18619
- */
18620
- function mapCacheClear() {
18621
- this.size = 0;
18622
- this.__data__ = {
18623
- 'hash': new _Hash,
18624
- 'map': new (_Map || _ListCache),
18625
- 'string': new _Hash
18626
- };
18627
- }
18628
-
18629
- var _mapCacheClear = mapCacheClear;
18630
-
18631
- /**
18632
- * Checks if `value` is suitable for use as unique object key.
18633
- *
18634
- * @private
18635
- * @param {*} value The value to check.
18636
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
18637
- */
18638
- function isKeyable(value) {
18639
- var type = typeof value;
18640
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
18641
- ? (value !== '__proto__')
18642
- : (value === null);
18643
- }
18644
-
18645
- var _isKeyable = isKeyable;
18646
-
18647
- /**
18648
- * Gets the data for `map`.
18649
- *
18650
- * @private
18651
- * @param {Object} map The map to query.
18652
- * @param {string} key The reference key.
18653
- * @returns {*} Returns the map data.
18654
- */
18655
- function getMapData(map, key) {
18656
- var data = map.__data__;
18657
- return _isKeyable(key)
18658
- ? data[typeof key == 'string' ? 'string' : 'hash']
18659
- : data.map;
18660
- }
18661
-
18662
- var _getMapData = getMapData;
18663
-
18664
- /**
18665
- * Removes `key` and its value from the map.
18666
- *
18667
- * @private
18668
- * @name delete
18669
- * @memberOf MapCache
18670
- * @param {string} key The key of the value to remove.
18671
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18672
- */
18673
- function mapCacheDelete(key) {
18674
- var result = _getMapData(this, key)['delete'](key);
18675
- this.size -= result ? 1 : 0;
18676
- return result;
18677
- }
18678
-
18679
- var _mapCacheDelete = mapCacheDelete;
18680
-
18681
- /**
18682
- * Gets the map value for `key`.
18683
- *
18684
- * @private
18685
- * @name get
18686
- * @memberOf MapCache
18687
- * @param {string} key The key of the value to get.
18688
- * @returns {*} Returns the entry value.
18689
- */
18690
- function mapCacheGet(key) {
18691
- return _getMapData(this, key).get(key);
18692
- }
18693
-
18694
- var _mapCacheGet = mapCacheGet;
18695
-
18696
- /**
18697
- * Checks if a map value for `key` exists.
18698
- *
18699
- * @private
18700
- * @name has
18701
- * @memberOf MapCache
18702
- * @param {string} key The key of the entry to check.
18703
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
18704
- */
18705
- function mapCacheHas(key) {
18706
- return _getMapData(this, key).has(key);
18707
- }
18708
-
18709
- var _mapCacheHas = mapCacheHas;
18710
-
18711
- /**
18712
- * Sets the map `key` to `value`.
18713
- *
18714
- * @private
18715
- * @name set
18716
- * @memberOf MapCache
18717
- * @param {string} key The key of the value to set.
18718
- * @param {*} value The value to set.
18719
- * @returns {Object} Returns the map cache instance.
18720
- */
18721
- function mapCacheSet(key, value) {
18722
- var data = _getMapData(this, key),
18723
- size = data.size;
18724
-
18725
- data.set(key, value);
18726
- this.size += data.size == size ? 0 : 1;
18727
- return this;
18728
- }
18729
-
18730
- var _mapCacheSet = mapCacheSet;
18731
-
18732
- /**
18733
- * Creates a map cache object to store key-value pairs.
18734
- *
18735
- * @private
18736
- * @constructor
18737
- * @param {Array} [entries] The key-value pairs to cache.
18738
- */
18739
- function MapCache(entries) {
18740
- var index = -1,
18741
- length = entries == null ? 0 : entries.length;
18742
-
18743
- this.clear();
18744
- while (++index < length) {
18745
- var entry = entries[index];
18746
- this.set(entry[0], entry[1]);
18747
- }
18748
- }
18749
-
18750
- // Add methods to `MapCache`.
18751
- MapCache.prototype.clear = _mapCacheClear;
18752
- MapCache.prototype['delete'] = _mapCacheDelete;
18753
- MapCache.prototype.get = _mapCacheGet;
18754
- MapCache.prototype.has = _mapCacheHas;
18755
- MapCache.prototype.set = _mapCacheSet;
18756
-
18757
- var _MapCache = MapCache;
18758
-
18759
- /** Error message constants. */
18760
- var FUNC_ERROR_TEXT = 'Expected a function';
18761
-
18762
- /**
18763
- * Creates a function that memoizes the result of `func`. If `resolver` is
18764
- * provided, it determines the cache key for storing the result based on the
18765
- * arguments provided to the memoized function. By default, the first argument
18766
- * provided to the memoized function is used as the map cache key. The `func`
18767
- * is invoked with the `this` binding of the memoized function.
18768
- *
18769
- * **Note:** The cache is exposed as the `cache` property on the memoized
18770
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
18771
- * constructor with one whose instances implement the
18772
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
18773
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
18774
- *
18775
- * @static
18776
- * @memberOf _
18777
- * @since 0.1.0
18778
- * @category Function
18779
- * @param {Function} func The function to have its output memoized.
18780
- * @param {Function} [resolver] The function to resolve the cache key.
18781
- * @returns {Function} Returns the new memoized function.
18782
- * @example
18783
- *
18784
- * var object = { 'a': 1, 'b': 2 };
18785
- * var other = { 'c': 3, 'd': 4 };
18786
- *
18787
- * var values = _.memoize(_.values);
18788
- * values(object);
18789
- * // => [1, 2]
18790
- *
18791
- * values(other);
18792
- * // => [3, 4]
18793
- *
18794
- * object.a = 2;
18795
- * values(object);
18796
- * // => [1, 2]
18797
- *
18798
- * // Modify the result cache.
18799
- * values.cache.set(object, ['a', 'b']);
18800
- * values(object);
18801
- * // => ['a', 'b']
18802
- *
18803
- * // Replace `_.memoize.Cache`.
18804
- * _.memoize.Cache = WeakMap;
18805
- */
18806
- function memoize(func, resolver) {
18807
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
18808
- throw new TypeError(FUNC_ERROR_TEXT);
18809
- }
18810
- var memoized = function() {
18811
- var args = arguments,
18812
- key = resolver ? resolver.apply(this, args) : args[0],
18813
- cache = memoized.cache;
18814
-
18815
- if (cache.has(key)) {
18816
- return cache.get(key);
18817
- }
18818
- var result = func.apply(this, args);
18819
- memoized.cache = cache.set(key, result) || cache;
18820
- return result;
18821
- };
18822
- memoized.cache = new (memoize.Cache || _MapCache);
18823
- return memoized;
18824
- }
18825
-
18826
- // Expose `MapCache`.
18827
- memoize.Cache = _MapCache;
18828
-
18829
- var memoize_1 = memoize;
18830
-
18831
- /** Used as the maximum memoize cache size. */
18832
- var MAX_MEMOIZE_SIZE = 500;
18833
-
18834
- /**
18835
- * A specialized version of `_.memoize` which clears the memoized function's
18836
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
18837
- *
18838
- * @private
18839
- * @param {Function} func The function to have its output memoized.
18840
- * @returns {Function} Returns the new memoized function.
18841
- */
18842
- function memoizeCapped(func) {
18843
- var result = memoize_1(func, function(key) {
18844
- if (cache.size === MAX_MEMOIZE_SIZE) {
18845
- cache.clear();
18846
- }
18847
- return key;
18848
- });
18849
-
18850
- var cache = result.cache;
18851
- return result;
18852
- }
18853
-
18854
- var _memoizeCapped = memoizeCapped;
18855
-
18856
- /** Used to match property names within property paths. */
18857
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
18858
-
18859
- /** Used to match backslashes in property paths. */
18860
- var reEscapeChar = /\\(\\)?/g;
18861
-
18862
- /**
18863
- * Converts `string` to a property path array.
18864
- *
18865
- * @private
18866
- * @param {string} string The string to convert.
18867
- * @returns {Array} Returns the property path array.
18868
- */
18869
- var stringToPath = _memoizeCapped(function(string) {
18870
- var result = [];
18871
- if (string.charCodeAt(0) === 46 /* . */) {
18872
- result.push('');
18873
- }
18874
- string.replace(rePropName, function(match, number, quote, subString) {
18875
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
18876
- });
18877
- return result;
18878
- });
18879
-
18880
- var _stringToPath = stringToPath;
18881
-
18882
- /** Used as references for various `Number` constants. */
18883
- var INFINITY = 1 / 0;
18884
-
18885
- /** Used to convert symbols to primitives and strings. */
18886
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
18887
- symbolToString = symbolProto ? symbolProto.toString : undefined;
18888
-
18889
- /**
18890
- * The base implementation of `_.toString` which doesn't convert nullish
18891
- * values to empty strings.
18892
- *
18893
- * @private
18894
- * @param {*} value The value to process.
18895
- * @returns {string} Returns the string.
18896
- */
18897
- function baseToString(value) {
18898
- // Exit early for strings to avoid a performance hit in some environments.
18899
- if (typeof value == 'string') {
18900
- return value;
18901
- }
18902
- if (isArray_1(value)) {
18903
- // Recursively convert values (susceptible to call stack limits).
18904
- return _arrayMap(value, baseToString) + '';
18905
- }
18906
- if (isSymbol_1(value)) {
18907
- return symbolToString ? symbolToString.call(value) : '';
18908
- }
18909
- var result = (value + '');
18910
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
18911
- }
18912
-
18913
- var _baseToString = baseToString;
18914
-
18915
- /**
18916
- * Converts `value` to a string. An empty string is returned for `null`
18917
- * and `undefined` values. The sign of `-0` is preserved.
18918
- *
18919
- * @static
18920
- * @memberOf _
18921
- * @since 4.0.0
18922
- * @category Lang
18923
- * @param {*} value The value to convert.
18924
- * @returns {string} Returns the converted string.
18925
- * @example
18926
- *
18927
- * _.toString(null);
18928
- * // => ''
18929
- *
18930
- * _.toString(-0);
18931
- * // => '-0'
18932
- *
18933
- * _.toString([1, 2, 3]);
18934
- * // => '1,2,3'
18935
- */
18936
- function toString(value) {
18937
- return value == null ? '' : _baseToString(value);
18938
- }
18939
-
18940
- var toString_1 = toString;
18941
-
18942
- /**
18943
- * Casts `value` to a path array if it's not one.
18944
- *
18945
- * @private
18946
- * @param {*} value The value to inspect.
18947
- * @param {Object} [object] The object to query keys on.
18948
- * @returns {Array} Returns the cast property path array.
18949
- */
18950
- function castPath(value, object) {
18951
- if (isArray_1(value)) {
18952
- return value;
18953
- }
18954
- return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
18955
- }
18956
-
18957
- var _castPath = castPath;
18958
-
18959
- /** Used as references for various `Number` constants. */
18960
- var INFINITY$1 = 1 / 0;
18961
-
18962
- /**
18963
- * Converts `value` to a string key if it's not a string or symbol.
18964
- *
18965
- * @private
18966
- * @param {*} value The value to inspect.
18967
- * @returns {string|symbol} Returns the key.
18968
- */
18969
- function toKey(value) {
18970
- if (typeof value == 'string' || isSymbol_1(value)) {
18971
- return value;
18972
- }
18973
- var result = (value + '');
18974
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
18975
- }
18976
-
18977
- var _toKey = toKey;
18978
-
18979
- /**
18980
- * The base implementation of `_.get` without support for default values.
18981
- *
18982
- * @private
18983
- * @param {Object} object The object to query.
18984
- * @param {Array|string} path The path of the property to get.
18985
- * @returns {*} Returns the resolved value.
18986
- */
18987
- function baseGet(object, path) {
18988
- path = _castPath(path, object);
18989
-
18990
- var index = 0,
18991
- length = path.length;
18992
-
18993
- while (object != null && index < length) {
18994
- object = object[_toKey(path[index++])];
18995
- }
18996
- return (index && index == length) ? object : undefined;
18997
- }
17594
+ var Dashboard = function Dashboard() {
17595
+ var _useDashboard = useDashboard(),
17596
+ loginCounting = _useDashboard.loginCounting,
17597
+ quantity = _useDashboard.quantity,
17598
+ highImpact = _useDashboard.highImpact,
17599
+ perceivedImpact = _useDashboard.perceivedImpact;
18998
17600
 
18999
- var _baseGet = baseGet;
19000
-
19001
- /**
19002
- * Removes all key-value entries from the stack.
19003
- *
19004
- * @private
19005
- * @name clear
19006
- * @memberOf Stack
19007
- */
19008
- function stackClear() {
19009
- this.__data__ = new _ListCache;
19010
- this.size = 0;
19011
- }
19012
-
19013
- var _stackClear = stackClear;
19014
-
19015
- /**
19016
- * Removes `key` and its value from the stack.
19017
- *
19018
- * @private
19019
- * @name delete
19020
- * @memberOf Stack
19021
- * @param {string} key The key of the value to remove.
19022
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
19023
- */
19024
- function stackDelete(key) {
19025
- var data = this.__data__,
19026
- result = data['delete'](key);
19027
-
19028
- this.size = data.size;
19029
- return result;
19030
- }
19031
-
19032
- var _stackDelete = stackDelete;
19033
-
19034
- /**
19035
- * Gets the stack value for `key`.
19036
- *
19037
- * @private
19038
- * @name get
19039
- * @memberOf Stack
19040
- * @param {string} key The key of the value to get.
19041
- * @returns {*} Returns the entry value.
19042
- */
19043
- function stackGet(key) {
19044
- return this.__data__.get(key);
19045
- }
19046
-
19047
- var _stackGet = stackGet;
19048
-
19049
- /**
19050
- * Checks if a stack value for `key` exists.
19051
- *
19052
- * @private
19053
- * @name has
19054
- * @memberOf Stack
19055
- * @param {string} key The key of the entry to check.
19056
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
19057
- */
19058
- function stackHas(key) {
19059
- return this.__data__.has(key);
19060
- }
19061
-
19062
- var _stackHas = stackHas;
19063
-
19064
- /** Used as the size to enable large array optimizations. */
19065
- var LARGE_ARRAY_SIZE = 200;
19066
-
19067
- /**
19068
- * Sets the stack `key` to `value`.
19069
- *
19070
- * @private
19071
- * @name set
19072
- * @memberOf Stack
19073
- * @param {string} key The key of the value to set.
19074
- * @param {*} value The value to set.
19075
- * @returns {Object} Returns the stack cache instance.
19076
- */
19077
- function stackSet(key, value) {
19078
- var data = this.__data__;
19079
- if (data instanceof _ListCache) {
19080
- var pairs = data.__data__;
19081
- if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
19082
- pairs.push([key, value]);
19083
- this.size = ++data.size;
19084
- return this;
19085
- }
19086
- data = this.__data__ = new _MapCache(pairs);
19087
- }
19088
- data.set(key, value);
19089
- this.size = data.size;
19090
- return this;
19091
- }
19092
-
19093
- var _stackSet = stackSet;
19094
-
19095
- /**
19096
- * Creates a stack cache object to store key-value pairs.
19097
- *
19098
- * @private
19099
- * @constructor
19100
- * @param {Array} [entries] The key-value pairs to cache.
19101
- */
19102
- function Stack(entries) {
19103
- var data = this.__data__ = new _ListCache(entries);
19104
- this.size = data.size;
19105
- }
19106
-
19107
- // Add methods to `Stack`.
19108
- Stack.prototype.clear = _stackClear;
19109
- Stack.prototype['delete'] = _stackDelete;
19110
- Stack.prototype.get = _stackGet;
19111
- Stack.prototype.has = _stackHas;
19112
- Stack.prototype.set = _stackSet;
19113
-
19114
- var _Stack = Stack;
19115
-
19116
- /** Used to stand-in for `undefined` hash values. */
19117
- var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
19118
-
19119
- /**
19120
- * Adds `value` to the array cache.
19121
- *
19122
- * @private
19123
- * @name add
19124
- * @memberOf SetCache
19125
- * @alias push
19126
- * @param {*} value The value to cache.
19127
- * @returns {Object} Returns the cache instance.
19128
- */
19129
- function setCacheAdd(value) {
19130
- this.__data__.set(value, HASH_UNDEFINED$2);
19131
- return this;
19132
- }
19133
-
19134
- var _setCacheAdd = setCacheAdd;
19135
-
19136
- /**
19137
- * Checks if `value` is in the array cache.
19138
- *
19139
- * @private
19140
- * @name has
19141
- * @memberOf SetCache
19142
- * @param {*} value The value to search for.
19143
- * @returns {number} Returns `true` if `value` is found, else `false`.
19144
- */
19145
- function setCacheHas(value) {
19146
- return this.__data__.has(value);
19147
- }
19148
-
19149
- var _setCacheHas = setCacheHas;
19150
-
19151
- /**
19152
- *
19153
- * Creates an array cache object to store unique values.
19154
- *
19155
- * @private
19156
- * @constructor
19157
- * @param {Array} [values] The values to cache.
19158
- */
19159
- function SetCache(values) {
19160
- var index = -1,
19161
- length = values == null ? 0 : values.length;
19162
-
19163
- this.__data__ = new _MapCache;
19164
- while (++index < length) {
19165
- this.add(values[index]);
19166
- }
19167
- }
19168
-
19169
- // Add methods to `SetCache`.
19170
- SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
19171
- SetCache.prototype.has = _setCacheHas;
19172
-
19173
- var _SetCache = SetCache;
19174
-
19175
- /**
19176
- * A specialized version of `_.some` for arrays without support for iteratee
19177
- * shorthands.
19178
- *
19179
- * @private
19180
- * @param {Array} [array] The array to iterate over.
19181
- * @param {Function} predicate The function invoked per iteration.
19182
- * @returns {boolean} Returns `true` if any element passes the predicate check,
19183
- * else `false`.
19184
- */
19185
- function arraySome(array, predicate) {
19186
- var index = -1,
19187
- length = array == null ? 0 : array.length;
19188
-
19189
- while (++index < length) {
19190
- if (predicate(array[index], index, array)) {
19191
- return true;
19192
- }
19193
- }
19194
- return false;
19195
- }
19196
-
19197
- var _arraySome = arraySome;
19198
-
19199
- /**
19200
- * Checks if a `cache` value for `key` exists.
19201
- *
19202
- * @private
19203
- * @param {Object} cache The cache to query.
19204
- * @param {string} key The key of the entry to check.
19205
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
19206
- */
19207
- function cacheHas(cache, key) {
19208
- return cache.has(key);
19209
- }
19210
-
19211
- var _cacheHas = cacheHas;
19212
-
19213
- /** Used to compose bitmasks for value comparisons. */
19214
- var COMPARE_PARTIAL_FLAG = 1,
19215
- COMPARE_UNORDERED_FLAG = 2;
19216
-
19217
- /**
19218
- * A specialized version of `baseIsEqualDeep` for arrays with support for
19219
- * partial deep comparisons.
19220
- *
19221
- * @private
19222
- * @param {Array} array The array to compare.
19223
- * @param {Array} other The other array to compare.
19224
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
19225
- * @param {Function} customizer The function to customize comparisons.
19226
- * @param {Function} equalFunc The function to determine equivalents of values.
19227
- * @param {Object} stack Tracks traversed `array` and `other` objects.
19228
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
19229
- */
19230
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
19231
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
19232
- arrLength = array.length,
19233
- othLength = other.length;
19234
-
19235
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
19236
- return false;
19237
- }
19238
- // Check that cyclic values are equal.
19239
- var arrStacked = stack.get(array);
19240
- var othStacked = stack.get(other);
19241
- if (arrStacked && othStacked) {
19242
- return arrStacked == other && othStacked == array;
19243
- }
19244
- var index = -1,
19245
- result = true,
19246
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache : undefined;
19247
-
19248
- stack.set(array, other);
19249
- stack.set(other, array);
19250
-
19251
- // Ignore non-index properties.
19252
- while (++index < arrLength) {
19253
- var arrValue = array[index],
19254
- othValue = other[index];
19255
-
19256
- if (customizer) {
19257
- var compared = isPartial
19258
- ? customizer(othValue, arrValue, index, other, array, stack)
19259
- : customizer(arrValue, othValue, index, array, other, stack);
19260
- }
19261
- if (compared !== undefined) {
19262
- if (compared) {
19263
- continue;
19264
- }
19265
- result = false;
19266
- break;
19267
- }
19268
- // Recursively compare arrays (susceptible to call stack limits).
19269
- if (seen) {
19270
- if (!_arraySome(other, function(othValue, othIndex) {
19271
- if (!_cacheHas(seen, othIndex) &&
19272
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
19273
- return seen.push(othIndex);
19274
- }
19275
- })) {
19276
- result = false;
19277
- break;
19278
- }
19279
- } else if (!(
19280
- arrValue === othValue ||
19281
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
19282
- )) {
19283
- result = false;
19284
- break;
19285
- }
19286
- }
19287
- stack['delete'](array);
19288
- stack['delete'](other);
19289
- return result;
19290
- }
19291
-
19292
- var _equalArrays = equalArrays;
19293
-
19294
- /** Built-in value references. */
19295
- var Uint8Array = _root.Uint8Array;
19296
-
19297
- var _Uint8Array = Uint8Array;
19298
-
19299
- /**
19300
- * Converts `map` to its key-value pairs.
19301
- *
19302
- * @private
19303
- * @param {Object} map The map to convert.
19304
- * @returns {Array} Returns the key-value pairs.
19305
- */
19306
- function mapToArray(map) {
19307
- var index = -1,
19308
- result = Array(map.size);
19309
-
19310
- map.forEach(function(value, key) {
19311
- result[++index] = [key, value];
19312
- });
19313
- return result;
19314
- }
19315
-
19316
- var _mapToArray = mapToArray;
19317
-
19318
- /**
19319
- * Converts `set` to an array of its values.
19320
- *
19321
- * @private
19322
- * @param {Object} set The set to convert.
19323
- * @returns {Array} Returns the values.
19324
- */
19325
- function setToArray(set) {
19326
- var index = -1,
19327
- result = Array(set.size);
19328
-
19329
- set.forEach(function(value) {
19330
- result[++index] = value;
19331
- });
19332
- return result;
19333
- }
19334
-
19335
- var _setToArray = setToArray;
19336
-
19337
- /** Used to compose bitmasks for value comparisons. */
19338
- var COMPARE_PARTIAL_FLAG$1 = 1,
19339
- COMPARE_UNORDERED_FLAG$1 = 2;
19340
-
19341
- /** `Object#toString` result references. */
19342
- var boolTag = '[object Boolean]',
19343
- dateTag = '[object Date]',
19344
- errorTag = '[object Error]',
19345
- mapTag = '[object Map]',
19346
- numberTag = '[object Number]',
19347
- regexpTag = '[object RegExp]',
19348
- setTag = '[object Set]',
19349
- stringTag = '[object String]',
19350
- symbolTag$1 = '[object Symbol]';
19351
-
19352
- var arrayBufferTag = '[object ArrayBuffer]',
19353
- dataViewTag = '[object DataView]';
19354
-
19355
- /** Used to convert symbols to primitives and strings. */
19356
- var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
19357
- symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
19358
-
19359
- /**
19360
- * A specialized version of `baseIsEqualDeep` for comparing objects of
19361
- * the same `toStringTag`.
19362
- *
19363
- * **Note:** This function only supports comparing values with tags of
19364
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
19365
- *
19366
- * @private
19367
- * @param {Object} object The object to compare.
19368
- * @param {Object} other The other object to compare.
19369
- * @param {string} tag The `toStringTag` of the objects to compare.
19370
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
19371
- * @param {Function} customizer The function to customize comparisons.
19372
- * @param {Function} equalFunc The function to determine equivalents of values.
19373
- * @param {Object} stack Tracks traversed `object` and `other` objects.
19374
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
19375
- */
19376
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
19377
- switch (tag) {
19378
- case dataViewTag:
19379
- if ((object.byteLength != other.byteLength) ||
19380
- (object.byteOffset != other.byteOffset)) {
19381
- return false;
19382
- }
19383
- object = object.buffer;
19384
- other = other.buffer;
19385
-
19386
- case arrayBufferTag:
19387
- if ((object.byteLength != other.byteLength) ||
19388
- !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
19389
- return false;
19390
- }
19391
- return true;
19392
-
19393
- case boolTag:
19394
- case dateTag:
19395
- case numberTag:
19396
- // Coerce booleans to `1` or `0` and dates to milliseconds.
19397
- // Invalid dates are coerced to `NaN`.
19398
- return eq_1(+object, +other);
19399
-
19400
- case errorTag:
19401
- return object.name == other.name && object.message == other.message;
19402
-
19403
- case regexpTag:
19404
- case stringTag:
19405
- // Coerce regexes to strings and treat strings, primitives and objects,
19406
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
19407
- // for more details.
19408
- return object == (other + '');
19409
-
19410
- case mapTag:
19411
- var convert = _mapToArray;
19412
-
19413
- case setTag:
19414
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1;
19415
- convert || (convert = _setToArray);
19416
-
19417
- if (object.size != other.size && !isPartial) {
19418
- return false;
19419
- }
19420
- // Assume cyclic values are equal.
19421
- var stacked = stack.get(object);
19422
- if (stacked) {
19423
- return stacked == other;
19424
- }
19425
- bitmask |= COMPARE_UNORDERED_FLAG$1;
19426
-
19427
- // Recursively compare objects (susceptible to call stack limits).
19428
- stack.set(object, other);
19429
- var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
19430
- stack['delete'](object);
19431
- return result;
19432
-
19433
- case symbolTag$1:
19434
- if (symbolValueOf) {
19435
- return symbolValueOf.call(object) == symbolValueOf.call(other);
19436
- }
19437
- }
19438
- return false;
19439
- }
19440
-
19441
- var _equalByTag = equalByTag;
19442
-
19443
- /**
19444
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
19445
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
19446
- * symbols of `object`.
19447
- *
19448
- * @private
19449
- * @param {Object} object The object to query.
19450
- * @param {Function} keysFunc The function to get the keys of `object`.
19451
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
19452
- * @returns {Array} Returns the array of property names and symbols.
19453
- */
19454
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
19455
- var result = keysFunc(object);
19456
- return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
19457
- }
19458
-
19459
- var _baseGetAllKeys = baseGetAllKeys;
19460
-
19461
- /**
19462
- * A specialized version of `_.filter` for arrays without support for
19463
- * iteratee shorthands.
19464
- *
19465
- * @private
19466
- * @param {Array} [array] The array to iterate over.
19467
- * @param {Function} predicate The function invoked per iteration.
19468
- * @returns {Array} Returns the new filtered array.
19469
- */
19470
- function arrayFilter(array, predicate) {
19471
- var index = -1,
19472
- length = array == null ? 0 : array.length,
19473
- resIndex = 0,
19474
- result = [];
19475
-
19476
- while (++index < length) {
19477
- var value = array[index];
19478
- if (predicate(value, index, array)) {
19479
- result[resIndex++] = value;
19480
- }
19481
- }
19482
- return result;
19483
- }
19484
-
19485
- var _arrayFilter = arrayFilter;
19486
-
19487
- /**
19488
- * This method returns a new empty array.
19489
- *
19490
- * @static
19491
- * @memberOf _
19492
- * @since 4.13.0
19493
- * @category Util
19494
- * @returns {Array} Returns the new empty array.
19495
- * @example
19496
- *
19497
- * var arrays = _.times(2, _.stubArray);
19498
- *
19499
- * console.log(arrays);
19500
- * // => [[], []]
19501
- *
19502
- * console.log(arrays[0] === arrays[1]);
19503
- * // => false
19504
- */
19505
- function stubArray() {
19506
- return [];
19507
- }
19508
-
19509
- var stubArray_1 = stubArray;
19510
-
19511
- /** Used for built-in method references. */
19512
- var objectProto$6 = Object.prototype;
19513
-
19514
- /** Built-in value references. */
19515
- var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
19516
-
19517
- /* Built-in method references for those with the same name as other `lodash` methods. */
19518
- var nativeGetSymbols = Object.getOwnPropertySymbols;
19519
-
19520
- /**
19521
- * Creates an array of the own enumerable symbols of `object`.
19522
- *
19523
- * @private
19524
- * @param {Object} object The object to query.
19525
- * @returns {Array} Returns the array of symbols.
19526
- */
19527
- var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
19528
- if (object == null) {
19529
- return [];
19530
- }
19531
- object = Object(object);
19532
- return _arrayFilter(nativeGetSymbols(object), function(symbol) {
19533
- return propertyIsEnumerable$1.call(object, symbol);
19534
- });
19535
- };
19536
-
19537
- var _getSymbols = getSymbols;
19538
-
19539
- /**
19540
- * The base implementation of `_.times` without support for iteratee shorthands
19541
- * or max array length checks.
19542
- *
19543
- * @private
19544
- * @param {number} n The number of times to invoke `iteratee`.
19545
- * @param {Function} iteratee The function invoked per iteration.
19546
- * @returns {Array} Returns the array of results.
19547
- */
19548
- function baseTimes(n, iteratee) {
19549
- var index = -1,
19550
- result = Array(n);
19551
-
19552
- while (++index < n) {
19553
- result[index] = iteratee(index);
19554
- }
19555
- return result;
19556
- }
19557
-
19558
- var _baseTimes = baseTimes;
19559
-
19560
- /**
19561
- * This method returns `false`.
19562
- *
19563
- * @static
19564
- * @memberOf _
19565
- * @since 4.13.0
19566
- * @category Util
19567
- * @returns {boolean} Returns `false`.
19568
- * @example
19569
- *
19570
- * _.times(2, _.stubFalse);
19571
- * // => [false, false]
19572
- */
19573
- function stubFalse() {
19574
- return false;
19575
- }
19576
-
19577
- var stubFalse_1 = stubFalse;
19578
-
19579
- var isBuffer_1 = createCommonjsModule(function (module, exports) {
19580
- /** Detect free variable `exports`. */
19581
- var freeExports = exports && !exports.nodeType && exports;
19582
-
19583
- /** Detect free variable `module`. */
19584
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
19585
-
19586
- /** Detect the popular CommonJS extension `module.exports`. */
19587
- var moduleExports = freeModule && freeModule.exports === freeExports;
19588
-
19589
- /** Built-in value references. */
19590
- var Buffer = moduleExports ? _root.Buffer : undefined;
19591
-
19592
- /* Built-in method references for those with the same name as other `lodash` methods. */
19593
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
19594
-
19595
- /**
19596
- * Checks if `value` is a buffer.
19597
- *
19598
- * @static
19599
- * @memberOf _
19600
- * @since 4.3.0
19601
- * @category Lang
19602
- * @param {*} value The value to check.
19603
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
19604
- * @example
19605
- *
19606
- * _.isBuffer(new Buffer(2));
19607
- * // => true
19608
- *
19609
- * _.isBuffer(new Uint8Array(2));
19610
- * // => false
19611
- */
19612
- var isBuffer = nativeIsBuffer || stubFalse_1;
19613
-
19614
- module.exports = isBuffer;
19615
- });
19616
-
19617
- /** Used as references for various `Number` constants. */
19618
- var MAX_SAFE_INTEGER = 9007199254740991;
19619
-
19620
- /** Used to detect unsigned integer values. */
19621
- var reIsUint = /^(?:0|[1-9]\d*)$/;
19622
-
19623
- /**
19624
- * Checks if `value` is a valid array-like index.
19625
- *
19626
- * @private
19627
- * @param {*} value The value to check.
19628
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
19629
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
19630
- */
19631
- function isIndex(value, length) {
19632
- var type = typeof value;
19633
- length = length == null ? MAX_SAFE_INTEGER : length;
19634
-
19635
- return !!length &&
19636
- (type == 'number' ||
19637
- (type != 'symbol' && reIsUint.test(value))) &&
19638
- (value > -1 && value % 1 == 0 && value < length);
19639
- }
19640
-
19641
- var _isIndex = isIndex;
19642
-
19643
- /** Used as references for various `Number` constants. */
19644
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
19645
-
19646
- /**
19647
- * Checks if `value` is a valid array-like length.
19648
- *
19649
- * **Note:** This method is loosely based on
19650
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
19651
- *
19652
- * @static
19653
- * @memberOf _
19654
- * @since 4.0.0
19655
- * @category Lang
19656
- * @param {*} value The value to check.
19657
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
19658
- * @example
19659
- *
19660
- * _.isLength(3);
19661
- * // => true
19662
- *
19663
- * _.isLength(Number.MIN_VALUE);
19664
- * // => false
19665
- *
19666
- * _.isLength(Infinity);
19667
- * // => false
19668
- *
19669
- * _.isLength('3');
19670
- * // => false
19671
- */
19672
- function isLength(value) {
19673
- return typeof value == 'number' &&
19674
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
19675
- }
19676
-
19677
- var isLength_1 = isLength;
19678
-
19679
- /** `Object#toString` result references. */
19680
- var argsTag$1 = '[object Arguments]',
19681
- arrayTag = '[object Array]',
19682
- boolTag$1 = '[object Boolean]',
19683
- dateTag$1 = '[object Date]',
19684
- errorTag$1 = '[object Error]',
19685
- funcTag$1 = '[object Function]',
19686
- mapTag$1 = '[object Map]',
19687
- numberTag$1 = '[object Number]',
19688
- objectTag = '[object Object]',
19689
- regexpTag$1 = '[object RegExp]',
19690
- setTag$1 = '[object Set]',
19691
- stringTag$1 = '[object String]',
19692
- weakMapTag = '[object WeakMap]';
19693
-
19694
- var arrayBufferTag$1 = '[object ArrayBuffer]',
19695
- dataViewTag$1 = '[object DataView]',
19696
- float32Tag = '[object Float32Array]',
19697
- float64Tag = '[object Float64Array]',
19698
- int8Tag = '[object Int8Array]',
19699
- int16Tag = '[object Int16Array]',
19700
- int32Tag = '[object Int32Array]',
19701
- uint8Tag = '[object Uint8Array]',
19702
- uint8ClampedTag = '[object Uint8ClampedArray]',
19703
- uint16Tag = '[object Uint16Array]',
19704
- uint32Tag = '[object Uint32Array]';
19705
-
19706
- /** Used to identify `toStringTag` values of typed arrays. */
19707
- var typedArrayTags = {};
19708
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
19709
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
19710
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
19711
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
19712
- typedArrayTags[uint32Tag] = true;
19713
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
19714
- typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] =
19715
- typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag$1] =
19716
- typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
19717
- typedArrayTags[mapTag$1] = typedArrayTags[numberTag$1] =
19718
- typedArrayTags[objectTag] = typedArrayTags[regexpTag$1] =
19719
- typedArrayTags[setTag$1] = typedArrayTags[stringTag$1] =
19720
- typedArrayTags[weakMapTag] = false;
19721
-
19722
- /**
19723
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
19724
- *
19725
- * @private
19726
- * @param {*} value The value to check.
19727
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
19728
- */
19729
- function baseIsTypedArray(value) {
19730
- return isObjectLike_1(value) &&
19731
- isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
19732
- }
19733
-
19734
- var _baseIsTypedArray = baseIsTypedArray;
19735
-
19736
- /**
19737
- * The base implementation of `_.unary` without support for storing metadata.
19738
- *
19739
- * @private
19740
- * @param {Function} func The function to cap arguments for.
19741
- * @returns {Function} Returns the new capped function.
19742
- */
19743
- function baseUnary(func) {
19744
- return function(value) {
19745
- return func(value);
19746
- };
19747
- }
19748
-
19749
- var _baseUnary = baseUnary;
19750
-
19751
- var _nodeUtil = createCommonjsModule(function (module, exports) {
19752
- /** Detect free variable `exports`. */
19753
- var freeExports = exports && !exports.nodeType && exports;
19754
-
19755
- /** Detect free variable `module`. */
19756
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
19757
-
19758
- /** Detect the popular CommonJS extension `module.exports`. */
19759
- var moduleExports = freeModule && freeModule.exports === freeExports;
19760
-
19761
- /** Detect free variable `process` from Node.js. */
19762
- var freeProcess = moduleExports && _freeGlobal.process;
19763
-
19764
- /** Used to access faster Node.js helpers. */
19765
- var nodeUtil = (function() {
19766
- try {
19767
- // Use `util.types` for Node.js 10+.
19768
- var types = freeModule && freeModule.require && freeModule.require('util').types;
19769
-
19770
- if (types) {
19771
- return types;
19772
- }
19773
-
19774
- // Legacy `process.binding('util')` for Node.js < 10.
19775
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
19776
- } catch (e) {}
19777
- }());
19778
-
19779
- module.exports = nodeUtil;
19780
- });
19781
-
19782
- /* Node.js helper references. */
19783
- var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
19784
-
19785
- /**
19786
- * Checks if `value` is classified as a typed array.
19787
- *
19788
- * @static
19789
- * @memberOf _
19790
- * @since 3.0.0
19791
- * @category Lang
19792
- * @param {*} value The value to check.
19793
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
19794
- * @example
19795
- *
19796
- * _.isTypedArray(new Uint8Array);
19797
- * // => true
19798
- *
19799
- * _.isTypedArray([]);
19800
- * // => false
19801
- */
19802
- var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
19803
-
19804
- var isTypedArray_1 = isTypedArray;
19805
-
19806
- /** Used for built-in method references. */
19807
- var objectProto$7 = Object.prototype;
19808
-
19809
- /** Used to check objects for own properties. */
19810
- var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
19811
-
19812
- /**
19813
- * Creates an array of the enumerable property names of the array-like `value`.
19814
- *
19815
- * @private
19816
- * @param {*} value The value to query.
19817
- * @param {boolean} inherited Specify returning inherited property names.
19818
- * @returns {Array} Returns the array of property names.
19819
- */
19820
- function arrayLikeKeys(value, inherited) {
19821
- var isArr = isArray_1(value),
19822
- isArg = !isArr && isArguments_1(value),
19823
- isBuff = !isArr && !isArg && isBuffer_1(value),
19824
- isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
19825
- skipIndexes = isArr || isArg || isBuff || isType,
19826
- result = skipIndexes ? _baseTimes(value.length, String) : [],
19827
- length = result.length;
19828
-
19829
- for (var key in value) {
19830
- if ((inherited || hasOwnProperty$5.call(value, key)) &&
19831
- !(skipIndexes && (
19832
- // Safari 9 has enumerable `arguments.length` in strict mode.
19833
- key == 'length' ||
19834
- // Node.js 0.10 has enumerable non-index properties on buffers.
19835
- (isBuff && (key == 'offset' || key == 'parent')) ||
19836
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
19837
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
19838
- // Skip index properties.
19839
- _isIndex(key, length)
19840
- ))) {
19841
- result.push(key);
19842
- }
19843
- }
19844
- return result;
19845
- }
19846
-
19847
- var _arrayLikeKeys = arrayLikeKeys;
19848
-
19849
- /** Used for built-in method references. */
19850
- var objectProto$8 = Object.prototype;
19851
-
19852
- /**
19853
- * Checks if `value` is likely a prototype object.
19854
- *
19855
- * @private
19856
- * @param {*} value The value to check.
19857
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
19858
- */
19859
- function isPrototype(value) {
19860
- var Ctor = value && value.constructor,
19861
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$8;
19862
-
19863
- return value === proto;
19864
- }
19865
-
19866
- var _isPrototype = isPrototype;
19867
-
19868
- /**
19869
- * Creates a unary function that invokes `func` with its argument transformed.
19870
- *
19871
- * @private
19872
- * @param {Function} func The function to wrap.
19873
- * @param {Function} transform The argument transform.
19874
- * @returns {Function} Returns the new function.
19875
- */
19876
- function overArg(func, transform) {
19877
- return function(arg) {
19878
- return func(transform(arg));
19879
- };
19880
- }
19881
-
19882
- var _overArg = overArg;
19883
-
19884
- /* Built-in method references for those with the same name as other `lodash` methods. */
19885
- var nativeKeys = _overArg(Object.keys, Object);
19886
-
19887
- var _nativeKeys = nativeKeys;
19888
-
19889
- /** Used for built-in method references. */
19890
- var objectProto$9 = Object.prototype;
19891
-
19892
- /** Used to check objects for own properties. */
19893
- var hasOwnProperty$6 = objectProto$9.hasOwnProperty;
19894
-
19895
- /**
19896
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
19897
- *
19898
- * @private
19899
- * @param {Object} object The object to query.
19900
- * @returns {Array} Returns the array of property names.
19901
- */
19902
- function baseKeys(object) {
19903
- if (!_isPrototype(object)) {
19904
- return _nativeKeys(object);
19905
- }
19906
- var result = [];
19907
- for (var key in Object(object)) {
19908
- if (hasOwnProperty$6.call(object, key) && key != 'constructor') {
19909
- result.push(key);
19910
- }
19911
- }
19912
- return result;
19913
- }
19914
-
19915
- var _baseKeys = baseKeys;
19916
-
19917
- /**
19918
- * Checks if `value` is array-like. A value is considered array-like if it's
19919
- * not a function and has a `value.length` that's an integer greater than or
19920
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
19921
- *
19922
- * @static
19923
- * @memberOf _
19924
- * @since 4.0.0
19925
- * @category Lang
19926
- * @param {*} value The value to check.
19927
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
19928
- * @example
19929
- *
19930
- * _.isArrayLike([1, 2, 3]);
19931
- * // => true
19932
- *
19933
- * _.isArrayLike(document.body.children);
19934
- * // => true
19935
- *
19936
- * _.isArrayLike('abc');
19937
- * // => true
19938
- *
19939
- * _.isArrayLike(_.noop);
19940
- * // => false
19941
- */
19942
- function isArrayLike(value) {
19943
- return value != null && isLength_1(value.length) && !isFunction_1(value);
19944
- }
19945
-
19946
- var isArrayLike_1 = isArrayLike;
19947
-
19948
- /**
19949
- * Creates an array of the own enumerable property names of `object`.
19950
- *
19951
- * **Note:** Non-object values are coerced to objects. See the
19952
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
19953
- * for more details.
19954
- *
19955
- * @static
19956
- * @since 0.1.0
19957
- * @memberOf _
19958
- * @category Object
19959
- * @param {Object} object The object to query.
19960
- * @returns {Array} Returns the array of property names.
19961
- * @example
19962
- *
19963
- * function Foo() {
19964
- * this.a = 1;
19965
- * this.b = 2;
19966
- * }
19967
- *
19968
- * Foo.prototype.c = 3;
19969
- *
19970
- * _.keys(new Foo);
19971
- * // => ['a', 'b'] (iteration order is not guaranteed)
19972
- *
19973
- * _.keys('hi');
19974
- * // => ['0', '1']
19975
- */
19976
- function keys(object) {
19977
- return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
19978
- }
19979
-
19980
- var keys_1 = keys;
19981
-
19982
- /**
19983
- * Creates an array of own enumerable property names and symbols of `object`.
19984
- *
19985
- * @private
19986
- * @param {Object} object The object to query.
19987
- * @returns {Array} Returns the array of property names and symbols.
19988
- */
19989
- function getAllKeys(object) {
19990
- return _baseGetAllKeys(object, keys_1, _getSymbols);
19991
- }
19992
-
19993
- var _getAllKeys = getAllKeys;
19994
-
19995
- /** Used to compose bitmasks for value comparisons. */
19996
- var COMPARE_PARTIAL_FLAG$2 = 1;
19997
-
19998
- /** Used for built-in method references. */
19999
- var objectProto$a = Object.prototype;
20000
-
20001
- /** Used to check objects for own properties. */
20002
- var hasOwnProperty$7 = objectProto$a.hasOwnProperty;
20003
-
20004
- /**
20005
- * A specialized version of `baseIsEqualDeep` for objects with support for
20006
- * partial deep comparisons.
20007
- *
20008
- * @private
20009
- * @param {Object} object The object to compare.
20010
- * @param {Object} other The other object to compare.
20011
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
20012
- * @param {Function} customizer The function to customize comparisons.
20013
- * @param {Function} equalFunc The function to determine equivalents of values.
20014
- * @param {Object} stack Tracks traversed `object` and `other` objects.
20015
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
20016
- */
20017
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
20018
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2,
20019
- objProps = _getAllKeys(object),
20020
- objLength = objProps.length,
20021
- othProps = _getAllKeys(other),
20022
- othLength = othProps.length;
20023
-
20024
- if (objLength != othLength && !isPartial) {
20025
- return false;
20026
- }
20027
- var index = objLength;
20028
- while (index--) {
20029
- var key = objProps[index];
20030
- if (!(isPartial ? key in other : hasOwnProperty$7.call(other, key))) {
20031
- return false;
20032
- }
20033
- }
20034
- // Check that cyclic values are equal.
20035
- var objStacked = stack.get(object);
20036
- var othStacked = stack.get(other);
20037
- if (objStacked && othStacked) {
20038
- return objStacked == other && othStacked == object;
20039
- }
20040
- var result = true;
20041
- stack.set(object, other);
20042
- stack.set(other, object);
20043
-
20044
- var skipCtor = isPartial;
20045
- while (++index < objLength) {
20046
- key = objProps[index];
20047
- var objValue = object[key],
20048
- othValue = other[key];
20049
-
20050
- if (customizer) {
20051
- var compared = isPartial
20052
- ? customizer(othValue, objValue, key, other, object, stack)
20053
- : customizer(objValue, othValue, key, object, other, stack);
20054
- }
20055
- // Recursively compare objects (susceptible to call stack limits).
20056
- if (!(compared === undefined
20057
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
20058
- : compared
20059
- )) {
20060
- result = false;
20061
- break;
20062
- }
20063
- skipCtor || (skipCtor = key == 'constructor');
20064
- }
20065
- if (result && !skipCtor) {
20066
- var objCtor = object.constructor,
20067
- othCtor = other.constructor;
20068
-
20069
- // Non `Object` object instances with different constructors are not equal.
20070
- if (objCtor != othCtor &&
20071
- ('constructor' in object && 'constructor' in other) &&
20072
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
20073
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
20074
- result = false;
20075
- }
20076
- }
20077
- stack['delete'](object);
20078
- stack['delete'](other);
20079
- return result;
20080
- }
20081
-
20082
- var _equalObjects = equalObjects;
20083
-
20084
- /* Built-in method references that are verified to be native. */
20085
- var DataView = _getNative(_root, 'DataView');
20086
-
20087
- var _DataView = DataView;
20088
-
20089
- /* Built-in method references that are verified to be native. */
20090
- var Promise$1 = _getNative(_root, 'Promise');
20091
-
20092
- var _Promise = Promise$1;
20093
-
20094
- /* Built-in method references that are verified to be native. */
20095
- var Set$1 = _getNative(_root, 'Set');
20096
-
20097
- var _Set = Set$1;
20098
-
20099
- /* Built-in method references that are verified to be native. */
20100
- var WeakMap = _getNative(_root, 'WeakMap');
20101
-
20102
- var _WeakMap = WeakMap;
20103
-
20104
- /** `Object#toString` result references. */
20105
- var mapTag$2 = '[object Map]',
20106
- objectTag$1 = '[object Object]',
20107
- promiseTag = '[object Promise]',
20108
- setTag$2 = '[object Set]',
20109
- weakMapTag$1 = '[object WeakMap]';
20110
-
20111
- var dataViewTag$2 = '[object DataView]';
20112
-
20113
- /** Used to detect maps, sets, and weakmaps. */
20114
- var dataViewCtorString = _toSource(_DataView),
20115
- mapCtorString = _toSource(_Map),
20116
- promiseCtorString = _toSource(_Promise),
20117
- setCtorString = _toSource(_Set),
20118
- weakMapCtorString = _toSource(_WeakMap);
20119
-
20120
- /**
20121
- * Gets the `toStringTag` of `value`.
20122
- *
20123
- * @private
20124
- * @param {*} value The value to query.
20125
- * @returns {string} Returns the `toStringTag`.
20126
- */
20127
- var getTag = _baseGetTag;
20128
-
20129
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
20130
- if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
20131
- (_Map && getTag(new _Map) != mapTag$2) ||
20132
- (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
20133
- (_Set && getTag(new _Set) != setTag$2) ||
20134
- (_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
20135
- getTag = function(value) {
20136
- var result = _baseGetTag(value),
20137
- Ctor = result == objectTag$1 ? value.constructor : undefined,
20138
- ctorString = Ctor ? _toSource(Ctor) : '';
20139
-
20140
- if (ctorString) {
20141
- switch (ctorString) {
20142
- case dataViewCtorString: return dataViewTag$2;
20143
- case mapCtorString: return mapTag$2;
20144
- case promiseCtorString: return promiseTag;
20145
- case setCtorString: return setTag$2;
20146
- case weakMapCtorString: return weakMapTag$1;
20147
- }
20148
- }
20149
- return result;
20150
- };
20151
- }
20152
-
20153
- var _getTag = getTag;
20154
-
20155
- /** Used to compose bitmasks for value comparisons. */
20156
- var COMPARE_PARTIAL_FLAG$3 = 1;
20157
-
20158
- /** `Object#toString` result references. */
20159
- var argsTag$2 = '[object Arguments]',
20160
- arrayTag$1 = '[object Array]',
20161
- objectTag$2 = '[object Object]';
20162
-
20163
- /** Used for built-in method references. */
20164
- var objectProto$b = Object.prototype;
20165
-
20166
- /** Used to check objects for own properties. */
20167
- var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
20168
-
20169
- /**
20170
- * A specialized version of `baseIsEqual` for arrays and objects which performs
20171
- * deep comparisons and tracks traversed objects enabling objects with circular
20172
- * references to be compared.
20173
- *
20174
- * @private
20175
- * @param {Object} object The object to compare.
20176
- * @param {Object} other The other object to compare.
20177
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
20178
- * @param {Function} customizer The function to customize comparisons.
20179
- * @param {Function} equalFunc The function to determine equivalents of values.
20180
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
20181
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
20182
- */
20183
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
20184
- var objIsArr = isArray_1(object),
20185
- othIsArr = isArray_1(other),
20186
- objTag = objIsArr ? arrayTag$1 : _getTag(object),
20187
- othTag = othIsArr ? arrayTag$1 : _getTag(other);
20188
-
20189
- objTag = objTag == argsTag$2 ? objectTag$2 : objTag;
20190
- othTag = othTag == argsTag$2 ? objectTag$2 : othTag;
20191
-
20192
- var objIsObj = objTag == objectTag$2,
20193
- othIsObj = othTag == objectTag$2,
20194
- isSameTag = objTag == othTag;
20195
-
20196
- if (isSameTag && isBuffer_1(object)) {
20197
- if (!isBuffer_1(other)) {
20198
- return false;
20199
- }
20200
- objIsArr = true;
20201
- objIsObj = false;
20202
- }
20203
- if (isSameTag && !objIsObj) {
20204
- stack || (stack = new _Stack);
20205
- return (objIsArr || isTypedArray_1(object))
20206
- ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
20207
- : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
20208
- }
20209
- if (!(bitmask & COMPARE_PARTIAL_FLAG$3)) {
20210
- var objIsWrapped = objIsObj && hasOwnProperty$8.call(object, '__wrapped__'),
20211
- othIsWrapped = othIsObj && hasOwnProperty$8.call(other, '__wrapped__');
20212
-
20213
- if (objIsWrapped || othIsWrapped) {
20214
- var objUnwrapped = objIsWrapped ? object.value() : object,
20215
- othUnwrapped = othIsWrapped ? other.value() : other;
20216
-
20217
- stack || (stack = new _Stack);
20218
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
20219
- }
20220
- }
20221
- if (!isSameTag) {
20222
- return false;
20223
- }
20224
- stack || (stack = new _Stack);
20225
- return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
20226
- }
20227
-
20228
- var _baseIsEqualDeep = baseIsEqualDeep;
20229
-
20230
- /**
20231
- * The base implementation of `_.isEqual` which supports partial comparisons
20232
- * and tracks traversed objects.
20233
- *
20234
- * @private
20235
- * @param {*} value The value to compare.
20236
- * @param {*} other The other value to compare.
20237
- * @param {boolean} bitmask The bitmask flags.
20238
- * 1 - Unordered comparison
20239
- * 2 - Partial comparison
20240
- * @param {Function} [customizer] The function to customize comparisons.
20241
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
20242
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
20243
- */
20244
- function baseIsEqual(value, other, bitmask, customizer, stack) {
20245
- if (value === other) {
20246
- return true;
20247
- }
20248
- if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
20249
- return value !== value && other !== other;
20250
- }
20251
- return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
20252
- }
20253
-
20254
- var _baseIsEqual = baseIsEqual;
20255
-
20256
- /** Used to compose bitmasks for value comparisons. */
20257
- var COMPARE_PARTIAL_FLAG$4 = 1,
20258
- COMPARE_UNORDERED_FLAG$2 = 2;
20259
-
20260
- /**
20261
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
20262
- *
20263
- * @private
20264
- * @param {Object} object The object to inspect.
20265
- * @param {Object} source The object of property values to match.
20266
- * @param {Array} matchData The property names, values, and compare flags to match.
20267
- * @param {Function} [customizer] The function to customize comparisons.
20268
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
20269
- */
20270
- function baseIsMatch(object, source, matchData, customizer) {
20271
- var index = matchData.length,
20272
- length = index,
20273
- noCustomizer = !customizer;
20274
-
20275
- if (object == null) {
20276
- return !length;
20277
- }
20278
- object = Object(object);
20279
- while (index--) {
20280
- var data = matchData[index];
20281
- if ((noCustomizer && data[2])
20282
- ? data[1] !== object[data[0]]
20283
- : !(data[0] in object)
20284
- ) {
20285
- return false;
20286
- }
20287
- }
20288
- while (++index < length) {
20289
- data = matchData[index];
20290
- var key = data[0],
20291
- objValue = object[key],
20292
- srcValue = data[1];
20293
-
20294
- if (noCustomizer && data[2]) {
20295
- if (objValue === undefined && !(key in object)) {
20296
- return false;
20297
- }
20298
- } else {
20299
- var stack = new _Stack;
20300
- if (customizer) {
20301
- var result = customizer(objValue, srcValue, key, object, source, stack);
20302
- }
20303
- if (!(result === undefined
20304
- ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$4 | COMPARE_UNORDERED_FLAG$2, customizer, stack)
20305
- : result
20306
- )) {
20307
- return false;
20308
- }
20309
- }
20310
- }
20311
- return true;
20312
- }
20313
-
20314
- var _baseIsMatch = baseIsMatch;
20315
-
20316
- /**
20317
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
20318
- *
20319
- * @private
20320
- * @param {*} value The value to check.
20321
- * @returns {boolean} Returns `true` if `value` if suitable for strict
20322
- * equality comparisons, else `false`.
20323
- */
20324
- function isStrictComparable(value) {
20325
- return value === value && !isObject_1(value);
20326
- }
20327
-
20328
- var _isStrictComparable = isStrictComparable;
20329
-
20330
- /**
20331
- * Gets the property names, values, and compare flags of `object`.
20332
- *
20333
- * @private
20334
- * @param {Object} object The object to query.
20335
- * @returns {Array} Returns the match data of `object`.
20336
- */
20337
- function getMatchData(object) {
20338
- var result = keys_1(object),
20339
- length = result.length;
20340
-
20341
- while (length--) {
20342
- var key = result[length],
20343
- value = object[key];
20344
-
20345
- result[length] = [key, value, _isStrictComparable(value)];
20346
- }
20347
- return result;
20348
- }
20349
-
20350
- var _getMatchData = getMatchData;
20351
-
20352
- /**
20353
- * A specialized version of `matchesProperty` for source values suitable
20354
- * for strict equality comparisons, i.e. `===`.
20355
- *
20356
- * @private
20357
- * @param {string} key The key of the property to get.
20358
- * @param {*} srcValue The value to match.
20359
- * @returns {Function} Returns the new spec function.
20360
- */
20361
- function matchesStrictComparable(key, srcValue) {
20362
- return function(object) {
20363
- if (object == null) {
20364
- return false;
20365
- }
20366
- return object[key] === srcValue &&
20367
- (srcValue !== undefined || (key in Object(object)));
20368
- };
20369
- }
20370
-
20371
- var _matchesStrictComparable = matchesStrictComparable;
20372
-
20373
- /**
20374
- * The base implementation of `_.matches` which doesn't clone `source`.
20375
- *
20376
- * @private
20377
- * @param {Object} source The object of property values to match.
20378
- * @returns {Function} Returns the new spec function.
20379
- */
20380
- function baseMatches(source) {
20381
- var matchData = _getMatchData(source);
20382
- if (matchData.length == 1 && matchData[0][2]) {
20383
- return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
20384
- }
20385
- return function(object) {
20386
- return object === source || _baseIsMatch(object, source, matchData);
20387
- };
20388
- }
20389
-
20390
- var _baseMatches = baseMatches;
20391
-
20392
- /**
20393
- * Gets the value at `path` of `object`. If the resolved value is
20394
- * `undefined`, the `defaultValue` is returned in its place.
20395
- *
20396
- * @static
20397
- * @memberOf _
20398
- * @since 3.7.0
20399
- * @category Object
20400
- * @param {Object} object The object to query.
20401
- * @param {Array|string} path The path of the property to get.
20402
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
20403
- * @returns {*} Returns the resolved value.
20404
- * @example
20405
- *
20406
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
20407
- *
20408
- * _.get(object, 'a[0].b.c');
20409
- * // => 3
20410
- *
20411
- * _.get(object, ['a', '0', 'b', 'c']);
20412
- * // => 3
20413
- *
20414
- * _.get(object, 'a.b.c', 'default');
20415
- * // => 'default'
20416
- */
20417
- function get$r(object, path, defaultValue) {
20418
- var result = object == null ? undefined : _baseGet(object, path);
20419
- return result === undefined ? defaultValue : result;
20420
- }
20421
-
20422
- var get_1 = get$r;
20423
-
20424
- /**
20425
- * The base implementation of `_.hasIn` without support for deep paths.
20426
- *
20427
- * @private
20428
- * @param {Object} [object] The object to query.
20429
- * @param {Array|string} key The key to check.
20430
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
20431
- */
20432
- function baseHasIn(object, key) {
20433
- return object != null && key in Object(object);
20434
- }
20435
-
20436
- var _baseHasIn = baseHasIn;
20437
-
20438
- /**
20439
- * Checks if `path` exists on `object`.
20440
- *
20441
- * @private
20442
- * @param {Object} object The object to query.
20443
- * @param {Array|string} path The path to check.
20444
- * @param {Function} hasFunc The function to check properties.
20445
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
20446
- */
20447
- function hasPath(object, path, hasFunc) {
20448
- path = _castPath(path, object);
20449
-
20450
- var index = -1,
20451
- length = path.length,
20452
- result = false;
20453
-
20454
- while (++index < length) {
20455
- var key = _toKey(path[index]);
20456
- if (!(result = object != null && hasFunc(object, key))) {
20457
- break;
20458
- }
20459
- object = object[key];
20460
- }
20461
- if (result || ++index != length) {
20462
- return result;
20463
- }
20464
- length = object == null ? 0 : object.length;
20465
- return !!length && isLength_1(length) && _isIndex(key, length) &&
20466
- (isArray_1(object) || isArguments_1(object));
20467
- }
20468
-
20469
- var _hasPath = hasPath;
20470
-
20471
- /**
20472
- * Checks if `path` is a direct or inherited property of `object`.
20473
- *
20474
- * @static
20475
- * @memberOf _
20476
- * @since 4.0.0
20477
- * @category Object
20478
- * @param {Object} object The object to query.
20479
- * @param {Array|string} path The path to check.
20480
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
20481
- * @example
20482
- *
20483
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
20484
- *
20485
- * _.hasIn(object, 'a');
20486
- * // => true
20487
- *
20488
- * _.hasIn(object, 'a.b');
20489
- * // => true
20490
- *
20491
- * _.hasIn(object, ['a', 'b']);
20492
- * // => true
20493
- *
20494
- * _.hasIn(object, 'b');
20495
- * // => false
20496
- */
20497
- function hasIn(object, path) {
20498
- return object != null && _hasPath(object, path, _baseHasIn);
20499
- }
20500
-
20501
- var hasIn_1 = hasIn;
20502
-
20503
- /** Used to compose bitmasks for value comparisons. */
20504
- var COMPARE_PARTIAL_FLAG$5 = 1,
20505
- COMPARE_UNORDERED_FLAG$3 = 2;
20506
-
20507
- /**
20508
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
20509
- *
20510
- * @private
20511
- * @param {string} path The path of the property to get.
20512
- * @param {*} srcValue The value to match.
20513
- * @returns {Function} Returns the new spec function.
20514
- */
20515
- function baseMatchesProperty(path, srcValue) {
20516
- if (_isKey(path) && _isStrictComparable(srcValue)) {
20517
- return _matchesStrictComparable(_toKey(path), srcValue);
20518
- }
20519
- return function(object) {
20520
- var objValue = get_1(object, path);
20521
- return (objValue === undefined && objValue === srcValue)
20522
- ? hasIn_1(object, path)
20523
- : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3);
20524
- };
20525
- }
20526
-
20527
- var _baseMatchesProperty = baseMatchesProperty;
20528
-
20529
- /**
20530
- * This method returns the first argument it receives.
20531
- *
20532
- * @static
20533
- * @since 0.1.0
20534
- * @memberOf _
20535
- * @category Util
20536
- * @param {*} value Any value.
20537
- * @returns {*} Returns `value`.
20538
- * @example
20539
- *
20540
- * var object = { 'a': 1 };
20541
- *
20542
- * console.log(_.identity(object) === object);
20543
- * // => true
20544
- */
20545
- function identity(value) {
20546
- return value;
20547
- }
20548
-
20549
- var identity_1 = identity;
20550
-
20551
- /**
20552
- * The base implementation of `_.property` without support for deep paths.
20553
- *
20554
- * @private
20555
- * @param {string} key The key of the property to get.
20556
- * @returns {Function} Returns the new accessor function.
20557
- */
20558
- function baseProperty(key) {
20559
- return function(object) {
20560
- return object == null ? undefined : object[key];
20561
- };
20562
- }
20563
-
20564
- var _baseProperty = baseProperty;
20565
-
20566
- /**
20567
- * A specialized version of `baseProperty` which supports deep paths.
20568
- *
20569
- * @private
20570
- * @param {Array|string} path The path of the property to get.
20571
- * @returns {Function} Returns the new accessor function.
20572
- */
20573
- function basePropertyDeep(path) {
20574
- return function(object) {
20575
- return _baseGet(object, path);
20576
- };
20577
- }
20578
-
20579
- var _basePropertyDeep = basePropertyDeep;
20580
-
20581
- /**
20582
- * Creates a function that returns the value at `path` of a given object.
20583
- *
20584
- * @static
20585
- * @memberOf _
20586
- * @since 2.4.0
20587
- * @category Util
20588
- * @param {Array|string} path The path of the property to get.
20589
- * @returns {Function} Returns the new accessor function.
20590
- * @example
20591
- *
20592
- * var objects = [
20593
- * { 'a': { 'b': 2 } },
20594
- * { 'a': { 'b': 1 } }
20595
- * ];
20596
- *
20597
- * _.map(objects, _.property('a.b'));
20598
- * // => [2, 1]
20599
- *
20600
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
20601
- * // => [1, 2]
20602
- */
20603
- function property(path) {
20604
- return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
20605
- }
20606
-
20607
- var property_1 = property;
20608
-
20609
- /**
20610
- * The base implementation of `_.iteratee`.
20611
- *
20612
- * @private
20613
- * @param {*} [value=_.identity] The value to convert to an iteratee.
20614
- * @returns {Function} Returns the iteratee.
20615
- */
20616
- function baseIteratee(value) {
20617
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
20618
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
20619
- if (typeof value == 'function') {
20620
- return value;
20621
- }
20622
- if (value == null) {
20623
- return identity_1;
20624
- }
20625
- if (typeof value == 'object') {
20626
- return isArray_1(value)
20627
- ? _baseMatchesProperty(value[0], value[1])
20628
- : _baseMatches(value);
20629
- }
20630
- return property_1(value);
20631
- }
20632
-
20633
- var _baseIteratee = baseIteratee;
20634
-
20635
- /**
20636
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
20637
- *
20638
- * @private
20639
- * @param {boolean} [fromRight] Specify iterating from right to left.
20640
- * @returns {Function} Returns the new base function.
20641
- */
20642
- function createBaseFor(fromRight) {
20643
- return function(object, iteratee, keysFunc) {
20644
- var index = -1,
20645
- iterable = Object(object),
20646
- props = keysFunc(object),
20647
- length = props.length;
20648
-
20649
- while (length--) {
20650
- var key = props[fromRight ? length : ++index];
20651
- if (iteratee(iterable[key], key, iterable) === false) {
20652
- break;
20653
- }
20654
- }
20655
- return object;
20656
- };
20657
- }
20658
-
20659
- var _createBaseFor = createBaseFor;
20660
-
20661
- /**
20662
- * The base implementation of `baseForOwn` which iterates over `object`
20663
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
20664
- * Iteratee functions may exit iteration early by explicitly returning `false`.
20665
- *
20666
- * @private
20667
- * @param {Object} object The object to iterate over.
20668
- * @param {Function} iteratee The function invoked per iteration.
20669
- * @param {Function} keysFunc The function to get the keys of `object`.
20670
- * @returns {Object} Returns `object`.
20671
- */
20672
- var baseFor = _createBaseFor();
20673
-
20674
- var _baseFor = baseFor;
20675
-
20676
- /**
20677
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
20678
- *
20679
- * @private
20680
- * @param {Object} object The object to iterate over.
20681
- * @param {Function} iteratee The function invoked per iteration.
20682
- * @returns {Object} Returns `object`.
20683
- */
20684
- function baseForOwn(object, iteratee) {
20685
- return object && _baseFor(object, iteratee, keys_1);
20686
- }
20687
-
20688
- var _baseForOwn = baseForOwn;
20689
-
20690
- /**
20691
- * Creates a `baseEach` or `baseEachRight` function.
20692
- *
20693
- * @private
20694
- * @param {Function} eachFunc The function to iterate over a collection.
20695
- * @param {boolean} [fromRight] Specify iterating from right to left.
20696
- * @returns {Function} Returns the new base function.
20697
- */
20698
- function createBaseEach(eachFunc, fromRight) {
20699
- return function(collection, iteratee) {
20700
- if (collection == null) {
20701
- return collection;
20702
- }
20703
- if (!isArrayLike_1(collection)) {
20704
- return eachFunc(collection, iteratee);
20705
- }
20706
- var length = collection.length,
20707
- index = fromRight ? length : -1,
20708
- iterable = Object(collection);
20709
-
20710
- while ((fromRight ? index-- : ++index < length)) {
20711
- if (iteratee(iterable[index], index, iterable) === false) {
20712
- break;
20713
- }
20714
- }
20715
- return collection;
20716
- };
20717
- }
20718
-
20719
- var _createBaseEach = createBaseEach;
20720
-
20721
- /**
20722
- * The base implementation of `_.forEach` without support for iteratee shorthands.
20723
- *
20724
- * @private
20725
- * @param {Array|Object} collection The collection to iterate over.
20726
- * @param {Function} iteratee The function invoked per iteration.
20727
- * @returns {Array|Object} Returns `collection`.
20728
- */
20729
- var baseEach = _createBaseEach(_baseForOwn);
20730
-
20731
- var _baseEach = baseEach;
20732
-
20733
- /**
20734
- * The base implementation of `_.map` without support for iteratee shorthands.
20735
- *
20736
- * @private
20737
- * @param {Array|Object} collection The collection to iterate over.
20738
- * @param {Function} iteratee The function invoked per iteration.
20739
- * @returns {Array} Returns the new mapped array.
20740
- */
20741
- function baseMap(collection, iteratee) {
20742
- var index = -1,
20743
- result = isArrayLike_1(collection) ? Array(collection.length) : [];
20744
-
20745
- _baseEach(collection, function(value, key, collection) {
20746
- result[++index] = iteratee(value, key, collection);
20747
- });
20748
- return result;
20749
- }
20750
-
20751
- var _baseMap = baseMap;
20752
-
20753
- /**
20754
- * The base implementation of `_.sortBy` which uses `comparer` to define the
20755
- * sort order of `array` and replaces criteria objects with their corresponding
20756
- * values.
20757
- *
20758
- * @private
20759
- * @param {Array} array The array to sort.
20760
- * @param {Function} comparer The function to define sort order.
20761
- * @returns {Array} Returns `array`.
20762
- */
20763
- function baseSortBy(array, comparer) {
20764
- var length = array.length;
20765
-
20766
- array.sort(comparer);
20767
- while (length--) {
20768
- array[length] = array[length].value;
20769
- }
20770
- return array;
20771
- }
20772
-
20773
- var _baseSortBy = baseSortBy;
20774
-
20775
- /**
20776
- * Compares values to sort them in ascending order.
20777
- *
20778
- * @private
20779
- * @param {*} value The value to compare.
20780
- * @param {*} other The other value to compare.
20781
- * @returns {number} Returns the sort order indicator for `value`.
20782
- */
20783
- function compareAscending(value, other) {
20784
- if (value !== other) {
20785
- var valIsDefined = value !== undefined,
20786
- valIsNull = value === null,
20787
- valIsReflexive = value === value,
20788
- valIsSymbol = isSymbol_1(value);
20789
-
20790
- var othIsDefined = other !== undefined,
20791
- othIsNull = other === null,
20792
- othIsReflexive = other === other,
20793
- othIsSymbol = isSymbol_1(other);
20794
-
20795
- if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
20796
- (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
20797
- (valIsNull && othIsDefined && othIsReflexive) ||
20798
- (!valIsDefined && othIsReflexive) ||
20799
- !valIsReflexive) {
20800
- return 1;
20801
- }
20802
- if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
20803
- (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
20804
- (othIsNull && valIsDefined && valIsReflexive) ||
20805
- (!othIsDefined && valIsReflexive) ||
20806
- !othIsReflexive) {
20807
- return -1;
20808
- }
20809
- }
20810
- return 0;
20811
- }
20812
-
20813
- var _compareAscending = compareAscending;
20814
-
20815
- /**
20816
- * Used by `_.orderBy` to compare multiple properties of a value to another
20817
- * and stable sort them.
20818
- *
20819
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
20820
- * specify an order of "desc" for descending or "asc" for ascending sort order
20821
- * of corresponding values.
20822
- *
20823
- * @private
20824
- * @param {Object} object The object to compare.
20825
- * @param {Object} other The other object to compare.
20826
- * @param {boolean[]|string[]} orders The order to sort by for each property.
20827
- * @returns {number} Returns the sort order indicator for `object`.
20828
- */
20829
- function compareMultiple(object, other, orders) {
20830
- var index = -1,
20831
- objCriteria = object.criteria,
20832
- othCriteria = other.criteria,
20833
- length = objCriteria.length,
20834
- ordersLength = orders.length;
20835
-
20836
- while (++index < length) {
20837
- var result = _compareAscending(objCriteria[index], othCriteria[index]);
20838
- if (result) {
20839
- if (index >= ordersLength) {
20840
- return result;
20841
- }
20842
- var order = orders[index];
20843
- return result * (order == 'desc' ? -1 : 1);
20844
- }
20845
- }
20846
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
20847
- // that causes it, under certain circumstances, to provide the same value for
20848
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
20849
- // for more details.
20850
- //
20851
- // This also ensures a stable sort in V8 and other engines.
20852
- // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
20853
- return object.index - other.index;
20854
- }
20855
-
20856
- var _compareMultiple = compareMultiple;
20857
-
20858
- /**
20859
- * The base implementation of `_.orderBy` without param guards.
20860
- *
20861
- * @private
20862
- * @param {Array|Object} collection The collection to iterate over.
20863
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
20864
- * @param {string[]} orders The sort orders of `iteratees`.
20865
- * @returns {Array} Returns the new sorted array.
20866
- */
20867
- function baseOrderBy(collection, iteratees, orders) {
20868
- if (iteratees.length) {
20869
- iteratees = _arrayMap(iteratees, function(iteratee) {
20870
- if (isArray_1(iteratee)) {
20871
- return function(value) {
20872
- return _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
20873
- }
20874
- }
20875
- return iteratee;
20876
- });
20877
- } else {
20878
- iteratees = [identity_1];
20879
- }
20880
-
20881
- var index = -1;
20882
- iteratees = _arrayMap(iteratees, _baseUnary(_baseIteratee));
20883
-
20884
- var result = _baseMap(collection, function(value, key, collection) {
20885
- var criteria = _arrayMap(iteratees, function(iteratee) {
20886
- return iteratee(value);
20887
- });
20888
- return { 'criteria': criteria, 'index': ++index, 'value': value };
20889
- });
20890
-
20891
- return _baseSortBy(result, function(object, other) {
20892
- return _compareMultiple(object, other, orders);
20893
- });
20894
- }
20895
-
20896
- var _baseOrderBy = baseOrderBy;
20897
-
20898
- /**
20899
- * A faster alternative to `Function#apply`, this function invokes `func`
20900
- * with the `this` binding of `thisArg` and the arguments of `args`.
20901
- *
20902
- * @private
20903
- * @param {Function} func The function to invoke.
20904
- * @param {*} thisArg The `this` binding of `func`.
20905
- * @param {Array} args The arguments to invoke `func` with.
20906
- * @returns {*} Returns the result of `func`.
20907
- */
20908
- function apply(func, thisArg, args) {
20909
- switch (args.length) {
20910
- case 0: return func.call(thisArg);
20911
- case 1: return func.call(thisArg, args[0]);
20912
- case 2: return func.call(thisArg, args[0], args[1]);
20913
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
20914
- }
20915
- return func.apply(thisArg, args);
20916
- }
20917
-
20918
- var _apply = apply;
20919
-
20920
- /* Built-in method references for those with the same name as other `lodash` methods. */
20921
- var nativeMax = Math.max;
20922
-
20923
- /**
20924
- * A specialized version of `baseRest` which transforms the rest array.
20925
- *
20926
- * @private
20927
- * @param {Function} func The function to apply a rest parameter to.
20928
- * @param {number} [start=func.length-1] The start position of the rest parameter.
20929
- * @param {Function} transform The rest array transform.
20930
- * @returns {Function} Returns the new function.
20931
- */
20932
- function overRest(func, start, transform) {
20933
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
20934
- return function() {
20935
- var args = arguments,
20936
- index = -1,
20937
- length = nativeMax(args.length - start, 0),
20938
- array = Array(length);
20939
-
20940
- while (++index < length) {
20941
- array[index] = args[start + index];
20942
- }
20943
- index = -1;
20944
- var otherArgs = Array(start + 1);
20945
- while (++index < start) {
20946
- otherArgs[index] = args[index];
20947
- }
20948
- otherArgs[start] = transform(array);
20949
- return _apply(func, this, otherArgs);
20950
- };
20951
- }
20952
-
20953
- var _overRest = overRest;
20954
-
20955
- /**
20956
- * Creates a function that returns `value`.
20957
- *
20958
- * @static
20959
- * @memberOf _
20960
- * @since 2.4.0
20961
- * @category Util
20962
- * @param {*} value The value to return from the new function.
20963
- * @returns {Function} Returns the new constant function.
20964
- * @example
20965
- *
20966
- * var objects = _.times(2, _.constant({ 'a': 1 }));
20967
- *
20968
- * console.log(objects);
20969
- * // => [{ 'a': 1 }, { 'a': 1 }]
20970
- *
20971
- * console.log(objects[0] === objects[1]);
20972
- * // => true
20973
- */
20974
- function constant(value) {
20975
- return function() {
20976
- return value;
20977
- };
20978
- }
20979
-
20980
- var constant_1 = constant;
20981
-
20982
- var defineProperty = (function() {
20983
- try {
20984
- var func = _getNative(Object, 'defineProperty');
20985
- func({}, '', {});
20986
- return func;
20987
- } catch (e) {}
20988
- }());
20989
-
20990
- var _defineProperty = defineProperty;
20991
-
20992
- /**
20993
- * The base implementation of `setToString` without support for hot loop shorting.
20994
- *
20995
- * @private
20996
- * @param {Function} func The function to modify.
20997
- * @param {Function} string The `toString` result.
20998
- * @returns {Function} Returns `func`.
20999
- */
21000
- var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
21001
- return _defineProperty(func, 'toString', {
21002
- 'configurable': true,
21003
- 'enumerable': false,
21004
- 'value': constant_1(string),
21005
- 'writable': true
21006
- });
21007
- };
21008
-
21009
- var _baseSetToString = baseSetToString;
21010
-
21011
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
21012
- var HOT_COUNT = 800,
21013
- HOT_SPAN = 16;
21014
-
21015
- /* Built-in method references for those with the same name as other `lodash` methods. */
21016
- var nativeNow = Date.now;
21017
-
21018
- /**
21019
- * Creates a function that'll short out and invoke `identity` instead
21020
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
21021
- * milliseconds.
21022
- *
21023
- * @private
21024
- * @param {Function} func The function to restrict.
21025
- * @returns {Function} Returns the new shortable function.
21026
- */
21027
- function shortOut(func) {
21028
- var count = 0,
21029
- lastCalled = 0;
21030
-
21031
- return function() {
21032
- var stamp = nativeNow(),
21033
- remaining = HOT_SPAN - (stamp - lastCalled);
21034
-
21035
- lastCalled = stamp;
21036
- if (remaining > 0) {
21037
- if (++count >= HOT_COUNT) {
21038
- return arguments[0];
21039
- }
21040
- } else {
21041
- count = 0;
21042
- }
21043
- return func.apply(undefined, arguments);
21044
- };
21045
- }
21046
-
21047
- var _shortOut = shortOut;
21048
-
21049
- /**
21050
- * Sets the `toString` method of `func` to return `string`.
21051
- *
21052
- * @private
21053
- * @param {Function} func The function to modify.
21054
- * @param {Function} string The `toString` result.
21055
- * @returns {Function} Returns `func`.
21056
- */
21057
- var setToString = _shortOut(_baseSetToString);
21058
-
21059
- var _setToString = setToString;
21060
-
21061
- /**
21062
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
21063
- *
21064
- * @private
21065
- * @param {Function} func The function to apply a rest parameter to.
21066
- * @param {number} [start=func.length-1] The start position of the rest parameter.
21067
- * @returns {Function} Returns the new function.
21068
- */
21069
- function baseRest(func, start) {
21070
- return _setToString(_overRest(func, start, identity_1), func + '');
21071
- }
21072
-
21073
- var _baseRest = baseRest;
21074
-
21075
- /**
21076
- * Checks if the given arguments are from an iteratee call.
21077
- *
21078
- * @private
21079
- * @param {*} value The potential iteratee value argument.
21080
- * @param {*} index The potential iteratee index or key argument.
21081
- * @param {*} object The potential iteratee object argument.
21082
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
21083
- * else `false`.
21084
- */
21085
- function isIterateeCall(value, index, object) {
21086
- if (!isObject_1(object)) {
21087
- return false;
21088
- }
21089
- var type = typeof index;
21090
- if (type == 'number'
21091
- ? (isArrayLike_1(object) && _isIndex(index, object.length))
21092
- : (type == 'string' && index in object)
21093
- ) {
21094
- return eq_1(object[index], value);
21095
- }
21096
- return false;
21097
- }
21098
-
21099
- var _isIterateeCall = isIterateeCall;
21100
-
21101
- /**
21102
- * Creates an array of elements, sorted in ascending order by the results of
21103
- * running each element in a collection thru each iteratee. This method
21104
- * performs a stable sort, that is, it preserves the original sort order of
21105
- * equal elements. The iteratees are invoked with one argument: (value).
21106
- *
21107
- * @static
21108
- * @memberOf _
21109
- * @since 0.1.0
21110
- * @category Collection
21111
- * @param {Array|Object} collection The collection to iterate over.
21112
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
21113
- * The iteratees to sort by.
21114
- * @returns {Array} Returns the new sorted array.
21115
- * @example
21116
- *
21117
- * var users = [
21118
- * { 'user': 'fred', 'age': 48 },
21119
- * { 'user': 'barney', 'age': 36 },
21120
- * { 'user': 'fred', 'age': 30 },
21121
- * { 'user': 'barney', 'age': 34 }
21122
- * ];
21123
- *
21124
- * _.sortBy(users, [function(o) { return o.user; }]);
21125
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
21126
- *
21127
- * _.sortBy(users, ['user', 'age']);
21128
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
21129
- */
21130
- var sortBy = _baseRest(function(collection, iteratees) {
21131
- if (collection == null) {
21132
- return [];
21133
- }
21134
- var length = iteratees.length;
21135
- if (length > 1 && _isIterateeCall(collection, iteratees[0], iteratees[1])) {
21136
- iteratees = [];
21137
- } else if (length > 2 && _isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
21138
- iteratees = [iteratees[0]];
21139
- }
21140
- return _baseOrderBy(collection, _baseFlatten(iteratees, 1), []);
21141
- });
21142
-
21143
- var sortBy_1 = sortBy;
21144
-
21145
- var MAX_SKILL_RATING = 7;
21146
-
21147
- var getPercentageRating = function getPercentageRating(rating) {
21148
- return Number((100 * rating / MAX_SKILL_RATING).toFixed(2));
21149
- };
21150
-
21151
- var getTimes = function getTimes(data) {
21152
- try {
21153
- var times = data.map(function (item) {
21154
- return item.ratings.map(function (rating) {
21155
- return rating.time;
21156
- });
21157
- }).flat();
21158
- return times.filter(function (item, index) {
21159
- return times.indexOf(item) === index;
21160
- }).map(function (time) {
21161
- return format$1(new Date(time), DATE_FORMAT);
21162
- }).sort();
21163
- } catch (_unused) {
21164
- return [];
21165
- }
21166
- };
21167
-
21168
- var getRatings = function getRatings(ratings, times) {
21169
- try {
21170
- var formatRatings = sortBy_1(ratings.map(function (item) {
21171
- return _extends({}, item, {
21172
- time: format$1(new Date(item.time), DATE_FORMAT),
21173
- rating: getPercentageRating(item.rating)
21174
- });
21175
- }), "time");
21176
- var results = [];
21177
-
21178
- var _loop = function _loop(i) {
21179
- var time = times[i];
21180
- var rating = formatRatings.find(function (item) {
21181
- return item.time === time;
21182
- });
21183
-
21184
- if (!rating) {
21185
- results[i] = {
21186
- value: i > 0 ? results[i - 1].value : 0,
21187
- isDiscrete: true
21188
- };
21189
- return "continue";
21190
- }
21191
-
21192
- results[i] = {
21193
- value: rating.rating,
21194
- isDiscrete: false
21195
- };
21196
- };
21197
-
21198
- for (var i = 0; i < times.length; i++) {
21199
- var _ret = _loop(i);
21200
-
21201
- if (_ret === "continue") continue;
21202
- }
21203
-
21204
- return results;
21205
- } catch (_unused2) {
21206
- return [];
21207
- }
21208
- };
21209
-
21210
- var useSkillFormat = function useSkillFormat(data) {
21211
- var _useState = useState([]),
21212
- activeSkillNames = _useState[0],
21213
- setActiveSkillNames = _useState[1];
21214
-
21215
- var toggleSkillName = useCallback(function (name) {
21216
- if (activeSkillNames.includes(name)) {
21217
- setActiveSkillNames(activeSkillNames.filter(function (item) {
21218
- return item !== name;
21219
- }));
21220
- return;
21221
- }
21222
-
21223
- setActiveSkillNames([].concat(activeSkillNames, [name]));
21224
- }, [activeSkillNames]);
21225
- var colors = useMemo(function () {
21226
- if (!data) return [];
21227
-
21228
- try {
21229
- return getColors(data.length);
21230
- } catch (_unused3) {
21231
- return [];
21232
- }
21233
- }, [data]);
21234
- var times = useMemo(function () {
21235
- return getTimes(data);
21236
- }, [data]);
21237
- var series = useMemo(function () {
21238
- if (!data) return [];
21239
-
21240
- try {
21241
- return data.map(function (item, index) {
21242
- return {
21243
- name: item.skillName,
21244
- color: colors[index],
21245
- data: getRatings(item.ratings, times).map(function (rating) {
21246
- return rating.value;
21247
- })
21248
- };
21249
- });
21250
- } catch (_unused4) {
21251
- return [];
21252
- }
21253
- }, [data, times]);
21254
- var discrete = useMemo(function () {
21255
- if (!data) return [];
21256
- var results = [];
21257
-
21258
- try {
21259
- data.map(function (item, index) {
21260
- var ratings = getRatings(item.ratings, times);
21261
- ratings.map(function (rating, ratingIndex) {
21262
- if (rating.isDiscrete) {
21263
- results.push({
21264
- seriesIndex: index,
21265
- dataPointIndex: ratingIndex,
21266
- size: 0
21267
- });
21268
- }
21269
- });
21270
- });
21271
- return results;
21272
- } catch (_unused5) {
21273
- return [];
21274
- }
21275
- }, [data, times]);
21276
- useEffect(function () {
21277
- if (data) {
21278
- try {
21279
- setActiveSkillNames(data.map(function (item) {
21280
- return item.skillName;
21281
- }));
21282
- } catch (_unused6) {}
21283
- }
21284
- }, [data]);
21285
- return {
21286
- colors: colors,
21287
- activeSkillNames: activeSkillNames,
21288
- times: times,
21289
- series: series,
21290
- discrete: discrete,
21291
- toggleSkillName: toggleSkillName
21292
- };
21293
- };
21294
-
21295
- var ICON_SIZE = 8;
21296
- var ICON_COLOR = "#fff";
21297
-
21298
- var CustomCheckbox = function CustomCheckbox(_ref) {
21299
- var label = _ref.label,
21300
- color = _ref.color,
21301
- checked = _ref.checked,
21302
- _onClick = _ref.onClick;
21303
- return React.createElement("div", {
21304
- className: "d-flex align-items-center"
21305
- }, React.createElement("span", {
21306
- className: "custom-checkbox-square d-flex align-items-center justify-content-center cursor-pointer",
21307
- style: checked ? {
21308
- backgroundColor: color
21309
- } : {},
21310
- onClick: function onClick(_e) {
21311
- return _onClick();
21312
- }
21313
- }, checked && React.createElement(FaCheck, {
21314
- size: ICON_SIZE,
21315
- color: ICON_COLOR
21316
- })), React.createElement("span", {
21317
- className: "ml-2"
21318
- }, label));
21319
- };
21320
-
21321
- var Skill = function Skill(_ref) {
21322
- var data = _ref.data;
21323
-
21324
- var _useSkillFormat = useSkillFormat(data),
21325
- colors = _useSkillFormat.colors,
21326
- activeSkillNames = _useSkillFormat.activeSkillNames,
21327
- series = _useSkillFormat.series,
21328
- times = _useSkillFormat.times,
21329
- discrete = _useSkillFormat.discrete,
21330
- toggleSkillName = _useSkillFormat.toggleSkillName;
21331
-
21332
- var options = {
21333
- chart: {
21334
- height: 350,
21335
- type: "area",
21336
- toolbar: {
21337
- show: false
21338
- }
21339
- },
21340
- dataLabels: {
21341
- enabled: false
21342
- },
21343
- stroke: {
21344
- width: 2,
21345
- curve: "straight"
21346
- },
21347
- markers: {
21348
- size: 4,
21349
- colors: ["#fff"],
21350
- strokeColors: colors,
21351
- strokeWidth: 2,
21352
- strokeOpacity: 0.9,
21353
- strokeDashArray: 0,
21354
- fillOpacity: 1,
21355
- shape: "circle",
21356
- radius: 2,
21357
- offsetX: 0,
21358
- offsetY: 0,
21359
- onClick: undefined,
21360
- onDblClick: undefined,
21361
- showNullDataPoints: true,
21362
- hover: {
21363
- size: undefined,
21364
- sizeOffset: 3
21365
- },
21366
- discrete: discrete
21367
- },
21368
- legend: {
21369
- show: false
21370
- },
21371
- xaxis: {
21372
- categories: times
21373
- },
21374
- yaxis: {
21375
- min: 0,
21376
- max: 100,
21377
- labels: {
21378
- formatter: function formatter(val) {
21379
- return val + "%";
21380
- }
21381
- }
21382
- },
21383
- tooltip: {}
21384
- };
21385
- if (!data) return React.createElement(Loading, null);
21386
- return React.createElement("div", null, series && React.createElement(Fragment, null, React.createElement("div", {
21387
- className: "d-flex align-items-center flex-wrap"
21388
- }, series.map(function (item, index) {
21389
- return React.createElement("div", {
21390
- key: item.name,
21391
- className: "d-flex align-items-center mr-3"
21392
- }, React.createElement(CustomCheckbox, {
21393
- label: item.name,
21394
- color: colors[index],
21395
- checked: activeSkillNames.includes(item.name),
21396
- onClick: function onClick() {
21397
- return toggleSkillName && toggleSkillName(item.name);
21398
- }
21399
- }));
21400
- })), React.createElement(ReactApexChart, {
21401
- options: options,
21402
- series: series.filter(function (item) {
21403
- return activeSkillNames.includes(item.name);
21404
- }),
21405
- type: "area",
21406
- height: 350
21407
- })));
21408
- };
21409
-
21410
- var colors$5 = ["#c0392b", "#3498db"];
21411
-
21412
- var TimeInSession = function TimeInSession(_ref) {
21413
- var data = _ref.data;
21414
- if (!data) return React.createElement(Loading, null);
21415
- var series = [{
21416
- name: "Teacher",
21417
- data: data.map(function (item) {
21418
- return item.teacherPerceivedImpact;
17601
+ var cards = [{
17602
+ label: "High-impact learning strategies of current school year",
17603
+ children: React.createElement(HighImpact, {
17604
+ data: highImpact
21419
17605
  })
21420
17606
  }, {
21421
- name: "Student",
21422
- data: data.map(function (item) {
21423
- return item.studentPerceivedImpact;
17607
+ label: "Learning strategies perceived impact",
17608
+ children: React.createElement(PerceivedImpact, {
17609
+ data: perceivedImpact
21424
17610
  })
21425
- }];
21426
- var categories = data.map(function (item) {
21427
- return item.sessionCategory;
21428
- });
21429
- var options = {
21430
- chart: {
21431
- type: "bar",
21432
- height: 350,
21433
- toolbar: {
21434
- show: false
21435
- }
21436
- },
21437
- colors: colors$5,
21438
- plotOptions: {
21439
- bar: {
21440
- horizontal: false,
21441
- columnWidth: "55%"
21442
- }
21443
- },
21444
- dataLabels: {
21445
- enabled: false
21446
- },
21447
- stroke: {
21448
- show: true,
21449
- width: 2,
21450
- colors: ["transparent"]
21451
- },
21452
- xaxis: {
21453
- categories: categories
21454
- },
21455
- fill: {
21456
- opacity: 1
21457
- },
21458
- legend: {
21459
- onItemClick: {
21460
- toggleDataSeries: false
21461
- },
21462
- onItemHover: {
21463
- highlightDataSeries: false
21464
- }
21465
- }
21466
- };
21467
- return React.createElement("div", null, React.createElement(ReactApexChart, {
21468
- options: options,
21469
- series: series,
21470
- type: "bar",
21471
- height: 350
21472
- }));
21473
- };
21474
-
21475
- var colors$6 = ["#f0932b", "#22a6b3", "#6ab04c"];
21476
- var categories = ["Before intervention", "During intervention", "After intervention"];
21477
-
21478
- var findGradeLabel = function findGradeLabel(value, bandScores) {
21479
- var sortedBandScores = bandScores === null || bandScores === void 0 ? void 0 : bandScores.sort(function (item1, item2) {
21480
- return item1.value - item2.value;
21481
- });
21482
-
21483
- if ((sortedBandScores === null || sortedBandScores === void 0 ? void 0 : sortedBandScores.length) > 0) {
21484
- for (var i = 0; i < sortedBandScores.length; i++) {
21485
- var _sortedBandScores$i, _sortedBandScores;
21486
-
21487
- if (((_sortedBandScores$i = sortedBandScores[i]) === null || _sortedBandScores$i === void 0 ? void 0 : _sortedBandScores$i.value) <= value && value <= ((_sortedBandScores = sortedBandScores[i + 1]) === null || _sortedBandScores === void 0 ? void 0 : _sortedBandScores.value)) {
21488
- var _sortedBandScores$i2, _sortedBandScores2, _sortedBandScores3;
21489
-
21490
- if (value - ((_sortedBandScores$i2 = sortedBandScores[i]) === null || _sortedBandScores$i2 === void 0 ? void 0 : _sortedBandScores$i2.value) <= ((_sortedBandScores2 = sortedBandScores[i + 1]) === null || _sortedBandScores2 === void 0 ? void 0 : _sortedBandScores2.value) - value) {
21491
- var _sortedBandScores$i3;
21492
-
21493
- return (_sortedBandScores$i3 = sortedBandScores[i]) === null || _sortedBandScores$i3 === void 0 ? void 0 : _sortedBandScores$i3.label;
21494
- }
21495
-
21496
- return (_sortedBandScores3 = sortedBandScores[i + 1]) === null || _sortedBandScores3 === void 0 ? void 0 : _sortedBandScores3.label;
21497
- }
21498
- }
21499
- }
21500
-
21501
- return "";
21502
- };
21503
-
21504
- var Grade = function Grade(_ref) {
21505
- var data = _ref.data;
21506
- if (!data) return React.createElement(Loading, null);
21507
- var series = [{
21508
- data: [data.beforeIntervention, data.duringIntervention, data.afterIntervention]
21509
- }];
21510
- var options = {
21511
- chart: {
21512
- height: 350,
21513
- type: "bar",
21514
- toolbar: {
21515
- show: false
21516
- }
21517
- },
21518
- colors: colors$6,
21519
- plotOptions: {
21520
- bar: {
21521
- columnWidth: "45%",
21522
- distributed: true
21523
- }
21524
- },
21525
- dataLabels: {
21526
- enabled: false
21527
- },
21528
- legend: {
21529
- show: false
21530
- },
21531
- xaxis: {
21532
- categories: categories
21533
- },
21534
- yaxis: {
21535
- max: Math.max.apply(Math, data.bandScores.map(function (item) {
21536
- return item.value;
21537
- })),
21538
- min: Math.min.apply(Math, data.bandScores.map(function (item) {
21539
- return item.value;
21540
- })),
21541
- labels: {
21542
- formatter: function formatter(val) {
21543
- return findGradeLabel(val, data.bandScores);
21544
- }
21545
- }
21546
- }
21547
- };
21548
- return React.createElement("div", null, React.createElement(ReactApexChart, {
21549
- options: options,
21550
- series: series,
21551
- type: "bar",
21552
- height: 350
21553
- }));
21554
- };
21555
-
21556
- var Dashboard = function Dashboard() {
21557
- var _useDashboard = useDashboard(),
21558
- loginCounting = _useDashboard.loginCounting,
21559
- quantity = _useDashboard.quantity,
21560
- skill = _useDashboard.skill,
21561
- goalProgress = _useDashboard.goalProgress,
21562
- highImpact = _useDashboard.highImpact,
21563
- perceivedImpact = _useDashboard.perceivedImpact,
21564
- timeInSession = _useDashboard.timeInSession,
21565
- grade = _useDashboard.grade;
21566
-
21567
- var cards = [{
21568
- label: "Students & teachers login per day",
17611
+ }, {
17612
+ label: "Students & teachers logins per day",
21569
17613
  children: React.createElement(LoginCouting, {
21570
17614
  data: loginCounting
21571
17615
  })
@@ -21574,36 +17618,6 @@ var Dashboard = function Dashboard() {
21574
17618
  children: React.createElement(Quantity, {
21575
17619
  data: quantity
21576
17620
  })
21577
- }, {
21578
- label: "MARIO skill",
21579
- children: React.createElement(Skill, {
21580
- data: skill
21581
- })
21582
- }, {
21583
- label: "Goal progress",
21584
- children: React.createElement(GoalProgressReport, {
21585
- data: goalProgress
21586
- })
21587
- }, {
21588
- label: "1-1 sessions perceived impact",
21589
- children: React.createElement(TimeInSession, {
21590
- data: timeInSession
21591
- })
21592
- }, {
21593
- label: "Grades",
21594
- children: React.createElement(Grade, {
21595
- data: grade
21596
- })
21597
- }, {
21598
- label: "High-impact learning strategies of current school year",
21599
- children: React.createElement(HighImpact, {
21600
- data: highImpact
21601
- })
21602
- }, {
21603
- label: "Learning strategies perceived impact",
21604
- children: React.createElement(PerceivedImpact, {
21605
- data: perceivedImpact
21606
- })
21607
17621
  }];
21608
17622
  return React.createElement("div", null, React.createElement("h4", {
21609
17623
  className: "mb-5"